aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-04-11 16:40:09 -0400
committerTeddy Wing2015-04-11 16:40:09 -0400
commit1863abc09ec0af8a0026d4c170bfd50b11032b76 (patch)
treec92e0808eac403de9bf8034842b5f1455f8121e1
parenta08417fe1a150d6a94d8c83ef6dffa9aa409f896 (diff)
downloadtic-tac-toe-1863abc09ec0af8a0026d4c170bfd50b11032b76.tar.bz2
Create main game loop
* main.rb will be what we use to run the game. Add some setup and an idea for grabbing board coordinates to place a piece. * Add empty Player class to represent Xes and Os
-rw-r--r--main.rb12
-rw-r--r--player.rb2
2 files changed, 14 insertions, 0 deletions
diff --git a/main.rb b/main.rb
new file mode 100644
index 0000000..ea449b7
--- /dev/null
+++ b/main.rb
@@ -0,0 +1,12 @@
+require_relative 'board'
+require_relative 'player'
+
+board = Board.new
+player_1 = Player.new
+player_2 = Player.new
+board.current_player = player_1
+
+until board.winner
+ coordinates = gets.chomp
+ coordinates = board.transform_coordinates(coordinates)
+end
diff --git a/player.rb b/player.rb
new file mode 100644
index 0000000..8e63645
--- /dev/null
+++ b/player.rb
@@ -0,0 +1,2 @@
+class Player
+end