Skip to content

Instantly share code, notes, and snippets.

require 'pry'
module Hand
attr_accessor :hand
def initialize
@hand = []
end
end
require 'pry'
class Board
attr_accessor :square
def initialize
create_board
end
def create_board
@joeainsworth
joeainsworth / oop_rps.rb
Last active January 2, 2016 18:54
OO RPS Move Class
require 'pry'
class Weapon
WEAPONS = %w(rock paper scissors lizard spock)
attr_reader :name, :beats, :loses
def >(other)
@beats.include?(other.to_s)
end