Fix winner condition
This commit is contained in:
2
app.py
2
app.py
@@ -580,7 +580,7 @@ async def move(request: Request, room_id):
|
|||||||
if not opp_checkmate:
|
if not opp_checkmate:
|
||||||
break
|
break
|
||||||
if opp_checkmate:
|
if opp_checkmate:
|
||||||
room.state = State.BLACK_WIN if is_white else State.WHITE_WIN
|
room.state = State.WHITE_WIN if is_white else State.BLACK_WIN
|
||||||
return {
|
return {
|
||||||
"code": "MOVD",
|
"code": "MOVD",
|
||||||
"color": color.value,
|
"color": color.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user