Class: ConsoleShogi::Ohsho
Constant Summary collapse
- NUMBER =
8
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
242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/console_shogi/piece.rb', line 242 def base_moves [ {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 1, y: 0}, {x: -1, y: 0}, {x: -1, y: 1}, {x: 0, y: 1}, {x: 1, y: 1} ] end |
#can_promote? ⇒ Boolean
255 256 257 |
# File 'lib/console_shogi/piece.rb', line 255 def can_promote? false end |