Remove a move from the board.

Remove a move from the board. More...


Files

file  unmakemove.c
 Remove a move from the board - source file.
file  unmakemove.h
 Remove a move from the board - header file.

Functions

void unmakemove_1 (short *bptr, int offset, short *board)
 Remove a move from the board.

Detailed Description

Remove a move from the board.

The plains are numbered in the following manner:

  plain    top-left    bot-left   top-right   bot-right
          coordinate  coordinate  coordinate  coordinate
  -----   ----------  ----------  ----------  ----------
    0      (0,0,0)     (3,0,0)     (0,3,0)     (3,3,0)       (top vertical)
    1      (0,0,1)     (3,0,1)     (0,3,1)     (3,3,1)
    2      (0,0,2)     (3,0,2)     (0,3,2)     (3,3,2)
    3      (0,0,3)     (3,0,3)     (0,3,3)     (3,3,3)

    4      (0,0,0)     (3,0,0)     (0,0,3)     (3,0,3)       (top horizontal)
    5      (0,1,0)     (3,1,0)     (0,1,3)     (3,1,3)
    6      (0,2,0)     (3,2,0)     (0,2,3)     (3,2,3)
    7      (0,3,0)     (3,3,0)     (0,3,3)     (3,3,3)

    8      (0,0,0)     (3,0,0)     (0,3,3)     (3,3,3)       (top diagonal)
    9      (0,3,0)     (3,3,0)     (0,0,3)     (3,0,3)

   10      (0,0,0)     (0,3,0)     (0,0,3)     (0,3,3)       (side horizontal)
   11      (1,0,0)     (1,3,0)     (1,0,3)     (1,3,3)
   12      (2,0,0)     (2,3,0)     (2,0,3)     (2,3,3)
   13      (3,0,0)     (3,3,0)     (3,0,3)     (3,3,3)

   14      (0,0,0)     (3,3,0)     (0,0,3)     (3,3,3)       (side diagonal)
   15      (3,0,0)     (0,3,0)     (3,0,3)     (0,3,3)

   16      (0,0,0)     (0,3,0)     (3,0,3)     (3,3,3)       (end diagonal)
   17      (3,0,0)     (3,3,0)     (0,0,3)     (0,3,3)
  

Function Documentation

unmakemove_1 short *  bptr,
int  offset,
short *  board
 

Remove a move from the board.

Parameters:
bptr short * : address of a plain (&board + 10, 11, 12, or 13)
offset int : offset into *bptr.
board short * : &a_board_1[0] or &b_board_1[0].
Returns:
void.


Generated on Sat Sep 24 09:00:12 2011 for ScoreFour by  doxygen 1.4.5