Move piece meta data selection to after play.
This commit is contained in:
parent
9a9eecdb9c
commit
d14af61d73
@ -209,8 +209,6 @@ impl Game {
|
||||
if let Some(mut piece) = self.board.pieces[piece_id as usize] {
|
||||
let mut swap = false;
|
||||
|
||||
meta = piece.class | ((piece.promoted as u8) << 3) | (piece.player << 4);
|
||||
|
||||
if let Some(tid) = self.board.tiles[play.to as usize].piece {
|
||||
if let Some(target) = &mut self.board.pieces[tid as usize] {
|
||||
|
||||
@ -255,6 +253,7 @@ impl Game {
|
||||
|
||||
self.board.pieces[piece_id as usize] = Some(piece);
|
||||
|
||||
meta = piece.class | ((piece.promoted as u8) << 3) | (piece.player << 4);
|
||||
self.turn += 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user