Chess: Remove comments about incorrect Chess rules

This commit is contained in:
Wuzzy 2023-07-11 13:40:50 +02:00
parent 4ced765ee6
commit 528eafb669

View File

@ -1389,7 +1389,6 @@ function realchess.move(pos, from_list, from_index, to_list, to_index, _, player
if blackAttacked then if blackAttacked then
if thisMove == "black" then if thisMove == "black" then
--[(*)[ and meta:get_string("blackAttacked") == "true" ]] then
return 0 return 0
else else
meta:set_string("blackAttacked", "true") meta:set_string("blackAttacked", "true")
@ -1400,7 +1399,6 @@ function realchess.move(pos, from_list, from_index, to_list, to_index, _, player
if whiteAttacked then if whiteAttacked then
if thisMove == "white" then if thisMove == "white" then
--[(*)[ and meta:get_string("whiteAttacked") == "true" ]] then
return 0 return 0
else else
meta:set_string("whiteAttacked", "true") meta:set_string("whiteAttacked", "true")
@ -1409,8 +1407,6 @@ function realchess.move(pos, from_list, from_index, to_list, to_index, _, player
meta:set_string("whiteAttacked", "") meta:set_string("whiteAttacked", "")
end end
--(*) Allow a piece to move and put its king in check. Maybe not in the chess rules though?
lastMove = thisMove lastMove = thisMove
meta:set_string("lastMove", lastMove) meta:set_string("lastMove", lastMove)
meta:set_int("lastMoveTime", minetest.get_gametime()) meta:set_int("lastMoveTime", minetest.get_gametime())