tictactoe_j8th 0.2.1 → 0.2.2

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: 9eba6487c8c021ba766d97f1fd3ae0a33f4a5205
4
- data.tar.gz: b5c9588eaf83b893ddbc9bb1ad139514a5f0c38a
3
+ metadata.gz: 76b5f1f4bad07f0e6b9f722da9370f7d76fe6cdc
4
+ data.tar.gz: 6aa155df13b380b2f66dc0c0ab3dcc4990106541
5
5
  SHA512:
6
- metadata.gz: 0dfb68103ca67e6102885b021ba67782318ccc367818978bb3bae88c9f2dd265a6fd71bdf580ba5dca7d164fc5ea1bbbeca4ffbccba393ea541b2596adb66ff5
7
- data.tar.gz: c13e7a4923c28970eec11901a7a5a5b6028e358b1508dd8e5fdc940e99e1425af38a83cae958f29944470bf6c3bec27dd5b97121deef3f5808211bcc8ed7ab2c
6
+ metadata.gz: b49da2a56a30add27568de731e814e4b2da62c203050f46ffa3aacf7a4f507cd682ddc0986bb292f9914c456f8fd5c203b1d44d4f5e4f4cba0a2b03153e8e0b4
7
+ data.tar.gz: c4b78822d56e3e3f91142a2a946c1c2374c6eb057dcdb76d98c4c3af6ae5d33cc96bb186d475d963bb45d3994c5992f1eed1a1075b89358c56c0286034da2d53
@@ -71,7 +71,7 @@ module TictactoeJ8th
71
71
  def self.from_s(string)
72
72
  board = Board.new
73
73
  (0..BOARD_SIZE-1).each do |i|
74
- board.place(string[i].to_sym, i)
74
+ board.place(string[i].to_sym, i) unless string[i] == 'E'
75
75
  end
76
76
  board
77
77
  end
@@ -1,3 +1,3 @@
1
1
  module TictactoeJ8th
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/spec/board_spec.rb CHANGED
@@ -98,7 +98,11 @@ describe Board do
98
98
  string = 'XEXOEEEEE'
99
99
  board = Board::from_s(string)
100
100
  (0..Board::BOARD_SIZE-1).each do |i|
101
- expect(board[i].to_s).to eq(string[i])
101
+ if string[i] == 'E'
102
+ expect(board[i]).to be_nil
103
+ else
104
+ expect(board[i].to_s).to eq(string[i])
105
+ end
102
106
  end
103
107
  end
104
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tictactoe_j8th
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - j8th