TesujiGoFramework/Move Administration

Sub-page of TesujiGoFramework

Move Administration

In order to play a game we need something to keep track of the moves. Not only are we interested in making moves, also in taking back moves (undo) and in a method that tells us whether a move is legal. This functionality will be described by the tesuji.games.general.MoveAdministration interface.

For the moment a very basic implementation will be supplied, called BasicMoveAdministration. This is not the most efficient way to implement a move administration for Go, but it's simple and straightforward. As such it's always to have handy to have ready when you need to keep track of moves and check their legality in places were performance is not a main issue.

On top of those administrative tasks, there are a few handy things a MoveAdministration keeps track of for us, such as which color is to move next, what was the last move and how many moves have been played. Last but not least there's a way to re-initialize this administration when a new game is started.

With MoveAdministration in place, we can move on to defining a GoEngine.


This is a copy of the living page "TesujiGoFramework/Move Administration" at Sensei's Library.
(OC) 2012 the Authors, published under the OpenContent License V1.0.
[Welcome to Sensei's Library!]
StartingPoints
ReferenceSection
About