Class: ConsoleShogi::Kin
Constant Summary collapse
- NUMBER =
5
Instance Attribute Summary
Attributes inherited from Piece
Instance Method Summary collapse
Methods inherited from Piece
#active_image, #can_move_long_distance?, #change_player!, #focused_image, #fu?, #image, #initialize, #move, #moves, #none?, #number, #promote, #promoted?, #same?
Constructor Details
This class inherits a constructor from ConsoleShogi::Piece
Instance Method Details
#base_moves ⇒ Object
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/console_shogi/piece.rb', line 177 def base_moves [ {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 1, y: 0}, {x: -1, y: 0}, {x: 0, y: 1} ] end |
#can_promote? ⇒ Boolean
188 189 190 |
# File 'lib/console_shogi/piece.rb', line 188 def can_promote? false end |