Created
September 24, 2014 15:35
-
-
Save pumpkincouture/736c2db3dbfbfd6ad003 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserInterface | |
def prompt_for_board | |
puts "Welcome to Tic Tac Toe. Please enter a number to determine board size : ex, inputting '6' would create a 6x6 board." | |
end | |
def get_board_choice | |
choice = gets.chomp | |
choice.to_i | |
end | |
def prompt_for_player_type | |
puts "Please choose your player level : press e for easy and h for hard." | |
end | |
def get_player_choice | |
choice = gets.chomp | |
choice.upcase! | |
end | |
def print_player_error | |
puts "That's not a valid choice, please try again." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment