Make a move on the board.

Make a move on the board. More...


Files

file  makemove.c
 Make a move on the board - source file.
file  makemove.h
 Make a move on the board - header file.

Functions

void makemove_1 (short *bptr, int offset, short *board)
 Make a move on the board.

Detailed Description

Make a move on the board.

A move effects a number of plains. This routine takes care of that. 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

makemove_1 short *  bptr,
int  offset,
short *  board
 

Make a move on 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