Chess: Fix Black allowed to move first

This commit is contained in:
Wuzzy 2023-07-11 12:03:21 +02:00
parent ed3bd0e71c
commit 4ced765ee6

View File

@ -863,6 +863,11 @@ function realchess.move(pos, from_list, from_index, to_list, to_index, _, player
return 0 return 0
end end
if lastMove == "" then
-- Nobody has moved yet, and Black cannot move first
return 0
end
playerBlack = playerName playerBlack = playerName
thisMove = "black" thisMove = "black"
end end