aboutsummaryrefslogtreecommitdiffstats
path: root/main.rb
blob: dedf9f7a8dcacfbe391c841b49c303080b649bf1 (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(Player::INSIGNIAS[:x], board)
player_2 = Player.new(Player::INSIGNIAS[:o], board)
board.current_player = player_1

until board.winner
  coordinates = gets.chomp
  coordinates = board.transform_coordinates(coordinates)
  
  board.current_player.move(coordinates)
end