Implement king alt move on server.
This commit is contained in:
parent
911a1590e4
commit
9e0e6bd3cc
@ -637,6 +637,24 @@ impl Game {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hearth
|
||||
3 => {
|
||||
for target in &self.board.pieces {
|
||||
if let Some(target) = target {
|
||||
let tile = self.board.tiles[target.tile as usize];
|
||||
if !tile.threat[!target.player as usize] && target.blocking == 0 {
|
||||
plays.push(PlayInfo {
|
||||
valid: true,
|
||||
threat: false,
|
||||
play: Play::from_alt(piece.tile, target.tile),
|
||||
check: CheckState::new(),
|
||||
blocking: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_ => { }
|
||||
}
|
||||
|
@ -125,7 +125,9 @@ pub const PIECES :[PieceClass; PIECES_COUNT] = [
|
||||
name: "Heart",
|
||||
moves: MoveSet::new()
|
||||
.add(bit(0) | bit(1) | bit(2) | bit(3) | bit(4) | bit(5) | bit(7) | bit(10)),
|
||||
pmoves: MoveSet::new(),
|
||||
pmoves: MoveSet::new()
|
||||
.add(bit(0) | bit(1) | bit(2) | bit(3) | bit(4) | bit(5) | bit(7) | bit(10))
|
||||
.add_alt(3),
|
||||
},
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user