// $Id: GetMove.htm 119 2004-05-16 00:02:24Z ggs_mburo $ // This is a GGS file, licensed under the GPL
The GetMove function is called from the standard message handlers for the CMsgOsJoin and CMsgOsUpdate messages when it is your turn to move.
Return a move, and optionally a numerical evaluation of the position, in the form of a COsMoveListItem. Set mli.mv.fPass = true if you need to pass; set mli.mv.fPass=false and mli.mv.row and mli.mv.col if you place a piece. (row,col) = (0,0) is the top left square on the board.
Find how the pieces are set on the board (game.pos.board), probably using the COsBoard functions PieceGet() or TextGet().
You may also need your time remaining, (game.pos.cks[game.pos.board.iMover]), see COsClock
The game type is available as game.gt, see COsMatchType
The ODK will automatically calculate the time your program took to move to the nearest second. If you desire more accuracy than this, you will need to modify MakeMoveIfNeeded()