pawn promotion
This commit is contained in:
parent
73bef9f806
commit
1fcc420ae7
Binary file not shown.
Binary file not shown.
4
board.py
4
board.py
@ -201,6 +201,10 @@ class Board:
|
||||
self.board.boardlist[self.final_row][self.final_column].piece = self.x
|
||||
exit(0)
|
||||
self.board.boardlist[self.final_row][self.final_column].piece = self.x
|
||||
#pawn promotion
|
||||
if isinstance(self.x, Pawn):
|
||||
if (self.final_row==0) or (self.final_row==7):
|
||||
self.board.boardlist[self.final_row][self.final_column].piece = Queen(self.x.color)
|
||||
self.board.boardlist[self.final_row][self.final_column].piece.moved = True
|
||||
self.board.boardlist[self.final_row][self.final_column].piece.delete_moves()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user