ang_ttt_gem 1.0.3 → 1.0.4
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.
- data/lib/ang_ttt_gem/game.rb +5 -1
- metadata +1 -1
data/lib/ang_ttt_gem/game.rb
CHANGED
@@ -49,11 +49,15 @@ class Game
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def prepare_display_state
|
52
|
-
|
52
|
+
gather_board_state.each_with_index.map do |cell, index|
|
53
53
|
cell == " " ? (index + 1).to_s : cell
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
def gather_board_state
|
58
|
+
@board.current_state
|
59
|
+
end
|
60
|
+
|
57
61
|
def is_over?
|
58
62
|
@scoring.winner?(@board) || @scoring.draw?(@board)
|
59
63
|
end
|