Skip to content

Instantly share code, notes, and snippets.

@MtnBiker
Created March 28, 2014 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MtnBiker/9845183 to your computer and use it in GitHub Desktop.
Save MtnBiker/9845183 to your computer and use it in GitHub Desktop.
class GameBoard
def initialize
puts "Now the game starts"
end
def set_locations_cells(locations)
@locations = locations
@all_three = [] # storing guesses
end
def check_yourself(user_guess)
puts "THIS IS e3.gameboard.clean.rb, USE e3.gameboard.clean.rb IN THE FUTURE\n @locations.class: #{@locations.class}"
puts "\n@locations: #{@locations}
user_guess: #{user_guess}
@locations.include?(user_guess): #{@locations.include?(user_guess)}"
if @locations.include?(user_guess)
puts "Hit"
else
puts "Miss"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment