aboutsummaryrefslogtreecommitdiffstats
path: root/main.rb
diff options
context:
space:
mode:
authorTeddy Wing2015-04-14 17:45:33 -0400
committerTeddy Wing2015-04-14 17:45:33 -0400
commit55957ad3f8fb92f4b94f73e6637a9b54fa5bdefc (patch)
tree94922bdc7d76f4cccfa0bb5be003923f6293ed4d /main.rb
parent4ef14b7315bb6bdb5a717f7d0ed5a4ff8d419731 (diff)
downloadtic-tac-toe-55957ad3f8fb92f4b94f73e6637a9b54fa5bdefc.tar.bz2
Add some empty test for Player movement
Test some code for an API concept for player, ideas for tests of the `Player#move` method.
Diffstat (limited to 'main.rb')
-rw-r--r--main.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.rb b/main.rb
index ea449b7..ad9eb72 100644
--- a/main.rb
+++ b/main.rb
@@ -2,11 +2,13 @@ require_relative 'board'
require_relative 'player'
board = Board.new
-player_1 = Player.new
-player_2 = Player.new
+player_1 = Player.new('X', board)
+player_2 = Player.new('O', board)
board.current_player = player_1
until board.winner
coordinates = gets.chomp
coordinates = board.transform_coordinates(coordinates)
+
+ board.current_player.move(coordinates)
end