Sha256: 7ed28bec935f53f65143e8030f83026225fa869e46c1df4b9197d9952fc6cbbd
Contents?: true
Size: 509 Bytes
Versions: 10
Compression:
Stored size: 509 Bytes
Contents
module JustGo # = Stone # # A stone that is placed on the board. class Stone def initialize(id: , player_number: , chain_id: nil) @id = id @player_number = player_number @chain_id = chain_id end attr_reader :id attr_reader :player_number attr_reader :chain_id def as_json { id: id, player_number: player_number, chain_id: chain_id } end def join_chain(stone) @chain_id = stone.chain_id end end end
Version data entries
10 entries across 10 versions & 1 rubygems