Sha256: a8dd44d0389cbdd53a05938b3dcf0d8eac572041269e1e642cbe32cdb4f83f4e

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

# encoding: UTF-8
require_relative 'player_color'

# @author Ralf-Tobias Diekert
# A player, participating at a game
class Player
  # @!attribute [r] color
  # @return [PlayerColor] the player's color
  attr_reader :color
  # @!attribute [rw] points
  # @return [Integer] the player's points
  attr_accessor :points
  
  # Initializer
  # @param the new player's color
  def initialize(color)
    @color = color
    self.points = 0
  end
  
  def ==(another_player)
    return self.color == another_player.color
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
software_challenge_client-0.1.1 lib/software_challenge_client/player.rb