#include <TestWin.h>
Public Member Functions | |
CTestWin (const char *pBoard, char *pWinBoard, int boardSizeX, int boardSizeY, int boardSizeZ, char playerToTest, int winFieldCount, int returnImmediately) | |
The constructor needs the game board properties and the player to test for a win. | |
bool | testWin () |
Returns if the player given by the constructor won a game or not. |
CTestWin::CTestWin | ( | const char * | pBoard, | |
char * | pWinBoard, | |||
int | boardSizeX, | |||
int | boardSizeY, | |||
int | boardSizeZ, | |||
char | playerToTest, | |||
int | winFieldCount, | |||
int | returnImmediately | |||
) |
The constructor needs the game board properties and the player to test for a win.
The winning pieces are written into the game board pWinboard on call of testWin(), which is'nt cleared before. If returnImmediately is set to true the winning pieces are not written on call of testWin(), then pWinBoard can be NULL.