Class: JustXiangqi::Piece
- Inherits:
-
BoardGameGrid::Piece
- Object
- BoardGameGrid::Piece
- JustXiangqi::Piece
- Defined in:
- lib/just_xiangqi/pieces/piece.rb
Overview
Piece
A piece that can move on a board
Instance Method Summary collapse
-
#initialize(id:, player_number:, type: nil) ⇒ Piece
constructor
A new instance of Piece.
Constructor Details
#initialize(id:, player_number:, type: nil) ⇒ Piece
Returns a new instance of Piece.
9 10 11 12 |
# File 'lib/just_xiangqi/pieces/piece.rb', line 9 def initialize(id: , player_number: , type: nil) @id = id @player_number = player_number end |