Created
March 28, 2014 23:30
-
-
Save MtnBiker/9845183 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 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