fork download
  1. def choose_spot
  2. show_board
  3. @player = @turn.odd? ? "1" : "2"
  4. @board_piece = @turn.odd? ? "X" : "O"
  5. puts "Player #{@player} (#{@board_piece}): Your turn. Type a number to put your #{@board_piece} in the spot."
  6. check_valid_spot
  7. end
Success #stdin #stdout 0.05s 9664KB
stdin
Standard input is empty
stdout
Standard output is empty