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
require 'pry' | |
module Hand | |
attr_accessor :hand | |
def initialize | |
@hand = [] | |
end | |
end |
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
require 'pry' | |
class Board | |
attr_accessor :square | |
def initialize | |
create_board | |
end | |
def create_board |
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
require 'pry' | |
class Weapon | |
WEAPONS = %w(rock paper scissors lizard spock) | |
attr_reader :name, :beats, :loses | |
def >(other) | |
@beats.include?(other.to_s) | |
end |
NewerOlder