ruby-stones 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 601af61872c4d31ac05025d9dba7ee424e363505
4
- data.tar.gz: 2c9a9aa24574546e6137d76be986d1534effa3df
3
+ metadata.gz: 54e996a869120addef61727109d79bb1b6870205
4
+ data.tar.gz: 5378a7237a9434870911d795e816438c1913c0dc
5
5
  SHA512:
6
- metadata.gz: ec10f7e5dddb449c8eebecd6aa4e13127d0a958c36edf41e4d42962d4f907d6fcb526af28eb7f5cdda570dd2fed620c48fceb7009893deb98f4204eaf2feb0e6
7
- data.tar.gz: 313fb51835c950c08c23615353cbb85d19037a455eedc12db085fe4a6ffb53b7d7cffe4d85bd878f96627d9d3b63c81b05740bad336fb5c223d510abb903de25
6
+ metadata.gz: cc035ebaed291954c6eac9204b7cd0276e52b486cd448b9632fff40d9b6d91dcf32986041cad50a5787126b8d4e3b4da66aa8ec140c4dd92a03638b7a9513d3d
7
+ data.tar.gz: 8f2e69df31f2fe4084f23c1ae365b0491bda682e3eba53c697060fc33506db70d168b81312bd01e3050e8bb29e9f6da023f9f0ffb638651c63d0ab07bea20314
data/lib/stones/board.rb CHANGED
@@ -22,14 +22,22 @@ module Stones
22
22
 
23
23
  def ==(other)
24
24
  self.class == other.class &&
25
- self.cells == other.cells &&
26
- self.head_position == other.head_position
25
+ cells_equal?(other) &&
26
+ head_position_equal?(other)
27
27
  end
28
28
 
29
29
  def hash
30
30
  self.cells.hash ^ self.head_position.hash
31
31
  end
32
32
 
33
+ def head_position_equal?(other)
34
+ self.head_position == other.head_position
35
+ end
36
+
37
+ def cells_equal?(other)
38
+ self.cells == other.cells
39
+ end
40
+
33
41
  def self.empty(x, y, position=[0, 0])
34
42
  self.new(empty_cells(x, y), position)
35
43
  end
@@ -1,3 +1,3 @@
1
1
  module Stones
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-stones
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Aloi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-01 00:00:00.000000000 Z
12
+ date: 2015-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler