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