en_passent -> en_passant
This commit is contained in:
parent
f381c51566
commit
1a5368956f
1 changed files with 12 additions and 12 deletions
24
Main.gd
24
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:
|
||||
|
|
Loading…
Reference in a new issue