pawn's correctly update control board

This commit is contained in:
jake 2023-02-19 04:27:15 -05:00
parent 76b16ada7a
commit 27314b008d

View file

@ -532,13 +532,14 @@ func make_tiles(coords, pattern, go_range, cant_attack, curr_team,
if create_tiles:
spawn_move_tile([x + a, y + b], dict.get("tile_is_en_passant"), dict.get("en_passant_pawn"), dict.get("castling_rook"))
made_tile.push_back([x + a, y + b])
elif dict.get("must_attack"):
if ! check:
pass
elif check.get_team() != curr_team:
elif dict.get("must_attack"): # pawn setting
print("must attack...")
if check and check.get_team() != curr_team:
if create_tiles:
spawn_move_tile([x + a, y + b])
made_tile.push_back([x + a, y + b])
elif ! create_tiles:
made_tile.push_back([x + a, y + b])
elif ! cant_attack and check.get_team() != curr_team:
if create_tiles:
spawn_move_tile([x + a, y + b], dict.get("tile_is_en_passant"), dict.get("en_passant_pawn"))