ruby-stones 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 54e996a869120addef61727109d79bb1b6870205
4
- data.tar.gz: 5378a7237a9434870911d795e816438c1913c0dc
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWI0MWI1NTAwZmNlNWIxZGFmNzg1N2EyOWVjZmY1MmQxY2NjYzg4Mg==
5
+ data.tar.gz: !binary |-
6
+ N2EyNTFjNGQyYjkzNzY2OWE3OTdhYzVkNzhhYWMxNGFlMjIwYjJjMg==
5
7
  SHA512:
6
- metadata.gz: cc035ebaed291954c6eac9204b7cd0276e52b486cd448b9632fff40d9b6d91dcf32986041cad50a5787126b8d4e3b4da66aa8ec140c4dd92a03638b7a9513d3d
7
- data.tar.gz: 8f2e69df31f2fe4084f23c1ae365b0491bda682e3eba53c697060fc33506db70d168b81312bd01e3050e8bb29e9f6da023f9f0ffb638651c63d0ab07bea20314
8
+ metadata.gz: !binary |-
9
+ ZWI2ZDY4ZDI0ZDM4NGIzNGM0NWY0NDA0Y2Y4YzNkZjZlNWIzODcwM2ZkODFk
10
+ YmM2OWU3ZTkyZjlhNTRjMjc4NTFhMmIxODNkNzJjZjdiZThjODdiNzY0Mjkx
11
+ ZmQ1MmI3Njc3MGIxNzVkYTYxZDdmNTE3YjI4Mjg4NWY0Mzg4N2Q=
12
+ data.tar.gz: !binary |-
13
+ NGY1NjlmOTFjMjg5MTI2YzlmNTg1OTgwYWEzODVhYWNlNjg0M2RlMDNlN2Q0
14
+ MzY0YzY4MTAzNGI2ZGEzODA4OWFjNWVlMjk5NGQ3OTI5OTc5ZTNkNWM0Yjcx
15
+ Mjk3OGEzMTNkNDNmNzdiMmI2Zjg4MTk3MGUwM2JmYWQ2MThhNzE=
data/lib/stones/board.rb CHANGED
@@ -46,8 +46,6 @@ module Stones
46
46
  self.new(cells.map { |row| row.map { |cell| empty_cell.merge(cell) } }, position)
47
47
  end
48
48
 
49
- private
50
-
51
49
  def each_cell
52
50
  (0..(size[0]-1)).each do |x|
53
51
  (0..(size[1]-1)).each do |y|
@@ -61,6 +59,12 @@ module Stones
61
59
  cells[-(position[1]+1)][position[0]]
62
60
  end
63
61
 
62
+ def head_cell
63
+ cell_at(head_position)
64
+ end
65
+
66
+ private
67
+
64
68
  def set_cell(position, cell)
65
69
  cell_at(position).merge! cell
66
70
  end
@@ -71,10 +75,6 @@ module Stones
71
75
  position[0] < x && position[1] < y
72
76
  end
73
77
 
74
- def head_cell
75
- cell_at(head_position)
76
- end
77
-
78
78
  def self.empty_cell
79
79
  {red: 0, black: 0, green: 0, blue: 0}
80
80
  end
@@ -1,3 +1,3 @@
1
1
  module Stones
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
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.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Aloi
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-03 00:00:00.000000000 Z
12
+ date: 2016-02-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.7'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.7'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '10.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '10.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '2'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '2'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: codeclimate-test-reporter
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - ! '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - ! '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  description: Write Gobstones program within Ruby
@@ -100,17 +100,17 @@ require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ">="
103
+ - - ! '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.2.0
113
+ rubygems_version: 2.4.5
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Pure ruby library that implements a Gobstones-like board and dsl