Sha256: 55b4cfff8800c063d6eb24ec1559c786edd0655cab0f197780b579311377c308
Contents?: true
Size: 522 Bytes
Versions: 1
Compression:
Stored size: 522 Bytes
Contents
require 'just_xiangqi/pieces/piece' module JustXiangqi # = Ju # # The piece that can move orthogonally. class Ju < Piece # All the squares that the piece can move to and/or capture. # # @param [Square] square # the origin square. # # @param [GameState] game_state # the current game state. def destinations(square, game_state) game_state.squares.orthogonal(square).unoccupied_or_occupied_by_opponent(player_number).unblocked(square, game_state.squares) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
just_xiangqi-0.1.0 | lib/just_xiangqi/pieces/ju.rb |