ruby_ttt 0.2.7 → 0.2.8
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/game_setup.rb +4 -0
- data/lib/ruby_ttt.rb +4 -0
- metadata +1 -1
data/lib/game_setup.rb
CHANGED
@@ -97,6 +97,10 @@ class WebGameSetup < GameSetup
|
|
97
97
|
PlayerFactory.new(player_one_type, player_two_type)
|
98
98
|
end
|
99
99
|
|
100
|
+
def get_first_move_player
|
101
|
+
|
102
|
+
end
|
103
|
+
|
100
104
|
def get_board(board_size, current_board)
|
101
105
|
board = WebBoard.new(board_size)
|
102
106
|
board.all_cells = current_board
|
data/lib/ruby_ttt.rb
CHANGED
@@ -114,6 +114,10 @@ class WebGame < Game
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
|
+
def get_first_move_player(type_one, type_two)
|
118
|
+
PlayerFactory.new(type_one, type_two).player_goes_first
|
119
|
+
end
|
120
|
+
|
117
121
|
def computer_player?(type_one, type_two)
|
118
122
|
((type_one.downcase) == COMPUTER_PLAYER) || ((type_two.downcase) == COMPUTER_PLAYER)
|
119
123
|
end
|