Fix knight alt move check.
This commit is contained in:
parent
ac5a189d13
commit
e0e888f861
@ -594,7 +594,7 @@ impl Game {
|
||||
// Knight
|
||||
1 => {
|
||||
for tile_id in subject_tiles {
|
||||
if self.board.tiles[tile_id as usize].piece.is_none() {
|
||||
if self.can_drop(piece, tile_id, flags::IGNORE_CHECK | flags::IGNORE_EXTENT) {
|
||||
plays.push(PlayInfo {
|
||||
valid: true,
|
||||
threat: false,
|
||||
|
@ -646,7 +646,7 @@ GAME.Game = class {
|
||||
// Check all tiles if not blocking.
|
||||
if(block_directions == 0) {
|
||||
for(let i = 0; i < GAME_DATA.board.tiles.length; ++i) {
|
||||
if(this.board.tiles[i].piece === null) {
|
||||
if(this.placable_tile(piece, tile_id, {check:false, extent:false})) {
|
||||
tiles.push(new GAME.MovementTile(i, true, false, 0, 0));
|
||||
}
|
||||
}
|
||||
@ -667,7 +667,7 @@ GAME.Game = class {
|
||||
if(HEX.is_valid_board(tile_hex)) {
|
||||
let tile_id = HEX.hex_to_tile(tile_hex);
|
||||
|
||||
if(this.board.tiles[tile_id].piece === null) {
|
||||
if(this.placable_tile(piece, tile_id, {check:false, extent:false})) {
|
||||
tiles.push(new GAME.MovementTile(tile_id, true, false, 0, 0));
|
||||
}
|
||||
} else { break; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user