aboutsummaryrefslogtreecommitdiffstats
path: root/main.rb
blob: ad9eb7287f53b9f24e9deb2f4a27949cbee44aef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_relative 'board'
require_relative 'player'

board = Board.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