From 1a5368956f07075ece1cd1ff36280b56df0bf404 Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 19 Feb 2023 11:10:41 -0500 Subject: en_passent -> en_passant --- Main.gd | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Main.gd b/Main.gd index d123d3d..a6c3201 100644 --- a/Main.gd +++ b/Main.gd @@ -223,15 +223,15 @@ enum { move_1_up_pawn, attack_1_nw, attack_1_ne, - en_passent_nw, - en_passent_ne, + en_passant_nw, + en_passant_ne, move_2_down_pawn, move_1_down_pawn, attack_1_sw, attack_1_se, - en_passent_sw, - en_passent_se, + en_passant_sw, + en_passant_se, move_1_up, move_1_down, @@ -262,14 +262,14 @@ func get_move_pattern(piece, coords): "pawn": if piece.get_team() == team1: if coords[1] == 6: - return [attack_1_nw, move_2_up_pawn, attack_1_ne, en_passent_ne, en_passent_nw] + return [attack_1_nw, move_2_up_pawn, attack_1_ne, en_passant_ne, en_passant_nw] else: - return [attack_1_nw, move_1_up_pawn, attack_1_ne, en_passent_ne, en_passent_nw] + return [attack_1_nw, move_1_up_pawn, attack_1_ne, en_passant_ne, en_passant_nw] else: if coords[1] == 1: - return [attack_1_sw, move_2_down_pawn, attack_1_se, en_passent_se, en_passent_sw] + return [attack_1_sw, move_2_down_pawn, attack_1_se, en_passant_se, en_passant_sw] else: - return [attack_1_sw, move_1_down_pawn, attack_1_se, en_passent_se, en_passent_sw] + return [attack_1_sw, move_1_down_pawn, attack_1_se, en_passant_se, en_passant_sw] "rook": return [move_up_inf, move_left_inf, move_right_inf, move_down_inf] "knight": @@ -307,11 +307,11 @@ func can_chess_move(pattern, coords, create_tiles=true): can_move.append_array(make_tiles(coords, [-1,1], 1, false, curr_team, {"must_attack": true}, create_tiles)) attack_1_se: can_move.append_array(make_tiles(coords, [1,1], 1, false, curr_team, {"must_attack": true}, create_tiles)) - en_passent_sw: + en_passant_sw: var pawn_maybe = board[coords[0]-1][coords[1]] if pawn_maybe and pawn_maybe.get_piece() == "pawn" and pawn_maybe == en_passant_pawn and pawn_maybe.get_team() != curr_team: can_move.append_array(make_tiles(coords, [-1,1], 1, true, curr_team, {"en_passant_pawn": pawn_maybe}, create_tiles)) - en_passent_se: + en_passant_se: if ! coords[0] + 1 > BOARD_WIDTH: var pawn_maybe = board[coords[0]+1][coords[1]] if pawn_maybe and pawn_maybe.get_piece() == "pawn" and pawn_maybe == en_passant_pawn and pawn_maybe.get_team() != curr_team: @@ -335,11 +335,11 @@ func can_chess_move(pattern, coords, create_tiles=true): can_move.append_array(make_tiles(coords, [-1,-1], 1, false, curr_team, {"must_attack": true}, create_tiles)) attack_1_ne: can_move.append_array(make_tiles(coords, [1,-1], 1, false, curr_team, {"must_attack": true}, create_tiles)) - en_passent_nw: + en_passant_nw: var pawn_maybe = board[coords[0]-1][coords[1]] if pawn_maybe and pawn_maybe.get_piece() == "pawn" and pawn_maybe == en_passant_pawn and pawn_maybe.get_team() != curr_team: can_move.append_array(make_tiles(coords, [-1,-1], 1, true, curr_team, {"en_passant_pawn": pawn_maybe}, create_tiles)) - en_passent_ne: + en_passant_ne: if ! coords[0] + 1 > BOARD_WIDTH: var pawn_maybe = board[coords[0]+1][coords[1]] if pawn_maybe and pawn_maybe.get_piece() == "pawn" and pawn_maybe == en_passant_pawn and pawn_maybe.get_team() != curr_team: -- cgit v1.2.3