Check out Janggi (Korean Chess), our featured variant for December, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

How to Enforce Rules in Game Courier. A tutorial on programming a rule-enforcing preset in the GAME Code language.[All Comments] [Add Comment or Rating]
Thomas wrote on Sun, Mar 12, 2023 11:57 AM UTC:

I wonder if it would suffice to check the legality of the newest move only.

As I understand it, every time a player makes a move a program containing all previous moves is built, with the newest move at the end, then executed. Usually the legality is checked in the post-move part, thus all older moves are checked again and again, after every move made by a player.

Wouldn't it be enough to test the legality of a move only once, directly after it is made, in the post-game part, just assuming that all previous moves are legal?