Skip to content

Instantly share code, notes, and snippets.

@monicao
Created March 13, 2013 18:27
Show Gist options
  • Save monicao/5154794 to your computer and use it in GitHub Desktop.
Save monicao/5154794 to your computer and use it in GitHub Desktop.
require_relative "hangman"
# figure out a random word to use for the game
class HangPlay
# Starts the hangman game
def self.start
@@game = Hangman.new("lemonade")
self.show_round
end
def self.show_round
puts ""
puts "Board: #{@@game.board}"
puts ""
puts "Guessed: "
puts ""
puts ""
puts "Chances: #{@@game.chances}"
puts ""
puts "Enter guess:"
letter = gets.chomp
puts "The letter is: #{letter}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment