ang_ttt_gem 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
|