class LoveLetterApplication::Models::Player

Public Instance Methods

active?() click to toggle source
# File lib/love_letter_application/models/player.rb, line 17
def active?;@active;end
inspect() click to toggle source
# File lib/love_letter_application/models/player.rb, line 19
def inspect
  "#<#{self.class} id=#{id}, seat=#{seat} played_cards=#{played_cards} hand=#{hand} " +
    "targetable?=#{targetable?} active?=#{active?}>"
end
targetable?() click to toggle source
# File lib/love_letter_application/models/player.rb, line 18
def targetable?;@targetable;end
to_h() click to toggle source
# File lib/love_letter_application/models/player.rb, line 23
def to_h
  { 
    id: id,
    seat: seat,
    played_cards: played_cards.map(&:to_h),
    hand: hand.map(&:to_h),
    targetable?: targetable?,
    active?: active?
  }
end