class Mathangman::Display
Public Class Methods
confirm_quit()
click to toggle source
# File lib/mathangman/display.rb, line 90 def self.confirm_quit <<-EOS **************************************************************** * Are you sure you want to quit the game? Press Y to confirm * **************************************************************** EOS end
no_source()
click to toggle source
# File lib/mathangman/display.rb, line 114 def self.no_source <<-EOS *************************************** * No file to source words from. * *************************************** EOS end
quit_notice()
click to toggle source
# File lib/mathangman/display.rb, line 98 def self.quit_notice <<-EOS ************************************************* * You have successfully ended the game. * ************************************************* EOS end
save_notice()
click to toggle source
# File lib/mathangman/display.rb, line 106 def self.save_notice <<-EOS *********************************************************** * Would you like to save your game? Press Y to confirm * *********************************************************** EOS end
Public Instance Methods
complete_disp()
click to toggle source
# File lib/mathangman/display.rb, line 45 def complete_disp <<-EOS ****************************************** * YOU WIN! * * YOU HANGED HANGMAN! * YOU ARE THE BOSS! * ****************************************** EOS end
difficulty()
click to toggle source
# File lib/mathangman/display.rb, line 20 def difficulty <<-EOS Choose a difficulty level. 7 - for beginner 8 - for intermediate 9 - for PRO EOS end
get_name()
click to toggle source
# File lib/mathangman/display.rb, line 37 def get_name <<-EOS ************************************************* * Please enter a username * ************************************************* EOS end
greeting()
click to toggle source
# File lib/mathangman/display.rb, line 6 def greeting <<-EOS ************************************************* * HANGMAN * * * * Press 1 to start a new game * * Press 2 to load a saved game * * Press 3 for more information * * Press * to quit the game at anytime * * * ************************************************* EOS end
info()
click to toggle source
# File lib/mathangman/display.rb, line 74 def info <<-EOS ************************************************** * This is HANGMAN game v0.1.0 * * By Olaide Ojewale * * Enjoy and expect the next version * * Press * at anytime to quit the game. * * You will be prompted to save a started... * * ...game whenever you attempt to quit. * * You can also load and continue saved... * * ... games by uisng your username. * * Press Y to continue with the game. * ************************************************** EOS end
invalid_entry()
click to toggle source
# File lib/mathangman/display.rb, line 29 def invalid_entry <<-EOS ************************************************* * Invalid entry. * ************************************************* EOS end
lost(word)
click to toggle source
# File lib/mathangman/display.rb, line 56 def lost(word) <<-EOS ************************************* * YOU HAVE BEEN HANGED! * * GAME OVER! * THE WORD IS: #{word} ************************************* EOS end
msg(anything)
click to toggle source
# File lib/mathangman/display.rb, line 66 def msg(anything) <<-EOS * #{anything} * EOS end