perfect: Rename Mill class to Position

This commit is contained in:
Calcitem 2021-01-20 00:30:55 +08:00
parent c723376d86
commit 672486f176
6 changed files with 59 additions and 59 deletions

View File

@ -1,5 +1,5 @@
/*********************************************************************\ /*********************************************************************\
Mill.h config.h
Copyright (c) Thomas Weber. All rights reserved. Copyright (c) Thomas Weber. All rights reserved.
Copyright (C) 2021 The Sanmill developers (see AUTHORS file) Copyright (C) 2021 The Sanmill developers (see AUTHORS file)
Licensed under the MIT License. Licensed under the MIT License.

View File

@ -1,7 +1,7 @@
#include <cstdio> #include <cstdio>
#include <iostream> #include <iostream>
#include <windows.h> #include <windows.h>
#include "mill.h" #include "position.h"
#include "miniMaxAI.h" #include "miniMaxAI.h"
#include "randomAI.h" #include "randomAI.h"
#include "perfectAI.h" #include "perfectAI.h"
@ -26,7 +26,7 @@ int main(void)
bool playerTwoHuman = false; bool playerTwoHuman = false;
char ch[100]; char ch[100];
unsigned int pushFrom, pushTo; unsigned int pushFrom, pushTo;
Mill *myGame = new Mill(); Position *myGame = new Position();
perfectAI *myKI = new perfectAI(databaseDirectory); perfectAI *myKI = new perfectAI(databaseDirectory);
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS); SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
@ -107,7 +107,7 @@ int main(void)
// undo moves until a human player shall move // undo moves until a human player shall move
do { do {
myGame->undoLastMove(); myGame->undo_move();
} while (!((myGame->getCurrentPlayer() == fieldStruct::playerOne && playerOneHuman) } while (!((myGame->getCurrentPlayer() == fieldStruct::playerOne && playerOneHuman)
|| (myGame->getCurrentPlayer() == fieldStruct::playerTwo && playerTwoHuman))); || (myGame->getCurrentPlayer() == fieldStruct::playerTwo && playerTwoHuman)));
@ -115,12 +115,12 @@ int main(void)
break; break;
} }
} while (myGame->moveStone(pushFrom, pushTo) == false); } while (myGame->do_move(pushFrom, pushTo) == false);
// Computer // Computer
} else { } else {
cout << "\n"; cout << "\n";
myGame->moveStone(pushFrom, pushTo); myGame->do_move(pushFrom, pushTo);
} }
} while (myGame->getWinner() == 0); } while (myGame->getWinner() == 0);

View File

@ -154,7 +154,7 @@
<ClInclude Include="miniMaxWin.h" /> <ClInclude Include="miniMaxWin.h" />
<ClInclude Include="miniMax_retroAnalysis.h" /> <ClInclude Include="miniMax_retroAnalysis.h" />
<ClInclude Include="miniMaxAI.h" /> <ClInclude Include="miniMaxAI.h" />
<ClInclude Include="mill.h" /> <ClInclude Include="position.h" />
<ClInclude Include="millAI.h" /> <ClInclude Include="millAI.h" />
<ClInclude Include="perfectAI.h" /> <ClInclude Include="perfectAI.h" />
<ClInclude Include="randomAI.h" /> <ClInclude Include="randomAI.h" />
@ -172,7 +172,7 @@
<ClCompile Include="miniMax_statistics.cpp" /> <ClCompile Include="miniMax_statistics.cpp" />
<ClCompile Include="miniMax_test.cpp" /> <ClCompile Include="miniMax_test.cpp" />
<ClCompile Include="minMaxKI.cpp" /> <ClCompile Include="minMaxKI.cpp" />
<ClCompile Include="mill.cpp" /> <ClCompile Include="position.cpp" />
<ClCompile Include="millAI.cpp" /> <ClCompile Include="millAI.cpp" />
<ClCompile Include="perfectAI.cpp" /> <ClCompile Include="perfectAI.cpp" />
<ClCompile Include="randomAI.cpp" /> <ClCompile Include="randomAI.cpp" />

View File

@ -42,9 +42,6 @@
<ClInclude Include="millAI.h"> <ClInclude Include="millAI.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="mill.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="miniMaxAI.h"> <ClInclude Include="miniMaxAI.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@ -54,6 +51,9 @@
<ClInclude Include="config.h"> <ClInclude Include="config.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="position.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="bufferedFile.cpp"> <ClCompile Include="bufferedFile.cpp">
@ -92,9 +92,6 @@
<ClCompile Include="perfectAI.cpp"> <ClCompile Include="perfectAI.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="mill.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="millAI.cpp"> <ClCompile Include="millAI.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -104,5 +101,8 @@
<ClCompile Include="main.cpp"> <ClCompile Include="main.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="position.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,18 +1,18 @@
/********************************************************************* /*********************************************************************
Mill.cpp Position.cpp
Copyright (c) Thomas Weber. All rights reserved. Copyright (c) Thomas Weber. All rights reserved.
Copyright (C) 2021 The Sanmill developers (see AUTHORS file) Copyright (C) 2021 The Sanmill developers (see AUTHORS file)
Licensed under the MIT License. Licensed under the MIT License.
https://github.com/madweasel/madweasels-cpp https://github.com/madweasel/madweasels-cpp
\*********************************************************************/ \*********************************************************************/
#include "mill.h" #include "position.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: Mill() // Name: Position()
// Desc: Mill class constructor // Desc: Position class constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Mill::Mill() Position::Position()
{ {
srand((unsigned)time(nullptr)); srand((unsigned)time(nullptr));
@ -27,19 +27,19 @@ Mill::Mill()
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: ~Mill() // Name: ~Position()
// Desc: Mill class destructor // Desc: Position class destructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Mill::~Mill() Position::~Position()
{ {
deleteArrays(); deleteArrays();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: deleteArrays() // Name: deleteArrays()
// Desc: Deletes all arrays the Mill class has created. // Desc: Deletes all arrays the Position class has created.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::deleteArrays() void Position::deleteArrays()
{ {
SAFE_DELETE_ARRAY(moveLogFrom); SAFE_DELETE_ARRAY(moveLogFrom);
SAFE_DELETE_ARRAY(moveLogTo); SAFE_DELETE_ARRAY(moveLogTo);
@ -50,9 +50,9 @@ void Mill::deleteArrays()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: beginNewGame() // Name: beginNewGame()
// Desc: Reinitializes the Mill object. // Desc: Reinitializes the Position object.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::beginNewGame(millAI *firstPlayerKI, millAI *secondPlayerKI, int currentPlayer) void Position::beginNewGame(millAI *firstPlayerKI, millAI *secondPlayerKI, int currentPlayer)
{ {
// free mem // free mem
deleteArrays(); deleteArrays();
@ -85,7 +85,7 @@ void Mill::beginNewGame(millAI *firstPlayerKI, millAI *secondPlayerKI, int curre
// Name: startSettingPhase() // Name: startSettingPhase()
// Desc: // Desc:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::startSettingPhase(millAI *firstPlayerKI, millAI *secondPlayerKI, int currentPlayer, bool settingPhase) bool Position::startSettingPhase(millAI *firstPlayerKI, millAI *secondPlayerKI, int currentPlayer, bool settingPhase)
{ {
beginNewGame(firstPlayerKI, secondPlayerKI, currentPlayer); beginNewGame(firstPlayerKI, secondPlayerKI, currentPlayer);
@ -98,7 +98,7 @@ bool Mill::startSettingPhase(millAI *firstPlayerKI, millAI *secondPlayerKI, int
// Name: setUpCalcPossibleMoves() // Name: setUpCalcPossibleMoves()
// Desc: Calculates and set the number of possible moves for the passed player considering the game state stored in the 'field' variable. // Desc: Calculates and set the number of possible moves for the passed player considering the game state stored in the 'field' variable.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::setUpCalcPossibleMoves(playerStruct *player) void Position::setUpCalcPossibleMoves(playerStruct *player)
{ {
// locals // locals
unsigned int i, j, k, movingDirection; unsigned int i, j, k, movingDirection;
@ -132,7 +132,7 @@ void Mill::setUpCalcPossibleMoves(playerStruct *player)
// Name: setUpSetWarningAndMill() // Name: setUpSetWarningAndMill()
// Desc: // Desc:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::setUpSetWarningAndMill(unsigned int stone, unsigned int firstNeighbour, unsigned int secondNeighbour) void Position::setUpSetWarningAndMill(unsigned int stone, unsigned int firstNeighbour, unsigned int secondNeighbour)
{ {
// locals // locals
int rowOwner = field.field[stone]; int rowOwner = field.field[stone];
@ -150,7 +150,7 @@ void Mill::setUpSetWarningAndMill(unsigned int stone, unsigned int firstNeighbou
// Name: putStone() // Name: putStone()
// Desc: Put a stone onto the field during the setting phase. // Desc: Put a stone onto the field during the setting phase.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::putStone(unsigned int pos, int player) bool Position::putStone(unsigned int pos, int player)
{ {
// locals // locals
unsigned int i; unsigned int i;
@ -221,7 +221,7 @@ bool Mill::putStone(unsigned int pos, int player)
// Name: settingPhaseHasFinished() // Name: settingPhaseHasFinished()
// Desc: This function has to be called when the setting phase has finished. // Desc: This function has to be called when the setting phase has finished.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::settingPhaseHasFinished() bool Position::settingPhaseHasFinished()
{ {
// remember initialField // remember initialField
field.copyField(&initialField); field.copyField(&initialField);
@ -233,7 +233,7 @@ bool Mill::settingPhaseHasFinished()
// Name: getField() // Name: getField()
// Desc: Copy the current field state into the array 'pField'. // Desc: Copy the current field state into the array 'pField'.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::getField(int *pField) bool Position::getField(int *pField)
{ {
unsigned int index; unsigned int index;
@ -252,7 +252,7 @@ bool Mill::getField(int *pField)
// Name: getLog() // Name: getLog()
// Desc: Copy the whole history of moves into the passed arrays, which must be of size [MAX_NUM_MOVES]. // Desc: Copy the whole history of moves into the passed arrays, which must be of size [MAX_NUM_MOVES].
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::getLog(unsigned int &numMovesDone, unsigned int *from, unsigned int *to) void Position::getLog(unsigned int &numMovesDone, unsigned int *from, unsigned int *to)
{ {
unsigned int index; unsigned int index;
@ -268,7 +268,7 @@ void Mill::getLog(unsigned int &numMovesDone, unsigned int *from, unsigned int *
// Name: setNextPlayer() // Name: setNextPlayer()
// Desc: Current player and opponent player are switched in the field struct. // Desc: Current player and opponent player are switched in the field struct.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::setNextPlayer() void Position::setNextPlayer()
{ {
playerStruct *tmpPlayer; playerStruct *tmpPlayer;
@ -281,7 +281,7 @@ void Mill::setNextPlayer()
// Name: isCurrentPlayerHuman() // Name: isCurrentPlayerHuman()
// Desc: Returns true if the current player is not assigned to an AI. // Desc: Returns true if the current player is not assigned to an AI.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::isCurrentPlayerHuman() bool Position::isCurrentPlayerHuman()
{ {
if (field.curPlayer->id == field.playerOne) return (playerOneKI == nullptr) ? true : false; if (field.curPlayer->id == field.playerOne) return (playerOneKI == nullptr) ? true : false;
else return (playerTwoKI == nullptr) ? true : false; else return (playerTwoKI == nullptr) ? true : false;
@ -291,7 +291,7 @@ bool Mill::isCurrentPlayerHuman()
// Name: isOpponentPlayerHuman() // Name: isOpponentPlayerHuman()
// Desc: Returns true if the opponent player is not assigned to an AI. // Desc: Returns true if the opponent player is not assigned to an AI.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::isOpponentPlayerHuman() bool Position::isOpponentPlayerHuman()
{ {
if (field.oppPlayer->id == field.playerOne) return (playerOneKI == nullptr) ? true : false; if (field.oppPlayer->id == field.playerOne) return (playerOneKI == nullptr) ? true : false;
else return (playerTwoKI == nullptr) ? true : false; else return (playerTwoKI == nullptr) ? true : false;
@ -301,7 +301,7 @@ bool Mill::isOpponentPlayerHuman()
// Name: setKI() // Name: setKI()
// Desc: Assigns an AI to a player. // Desc: Assigns an AI to a player.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::setKI(int player, millAI *KI) void Position::setKI(int player, millAI *KI)
{ {
if (player == field.playerOne) { if (player == field.playerOne) {
playerOneKI = KI; playerOneKI = KI;
@ -315,7 +315,7 @@ void Mill::setKI(int player, millAI *KI)
// Name: getChoiceOfSpecialKI() // Name: getChoiceOfSpecialKI()
// Desc: Returns the move the passed AI would do. // Desc: Returns the move the passed AI would do.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::getChoiceOfSpecialKI(millAI *KI, unsigned int *pushFrom, unsigned int *pushTo) void Position::getChoiceOfSpecialKI(millAI *KI, unsigned int *pushFrom, unsigned int *pushTo)
{ {
fieldStruct theField; fieldStruct theField;
*pushFrom = field.size; *pushFrom = field.size;
@ -330,7 +330,7 @@ void Mill::getChoiceOfSpecialKI(millAI *KI, unsigned int *pushFrom, unsigned int
// Name: getComputersChoice() // Name: getComputersChoice()
// Desc: Returns the move the AI of the current player would do. // Desc: Returns the move the AI of the current player would do.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo) void Position::getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo)
{ {
fieldStruct theField; fieldStruct theField;
*pushFrom = field.size; *pushFrom = field.size;
@ -353,7 +353,7 @@ void Mill::getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo)
// Name: isNormalMovePossible() // Name: isNormalMovePossible()
// Desc: 'Normal' in this context means, by moving the stone along a connection without jumping. // Desc: 'Normal' in this context means, by moving the stone along a connection without jumping.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::isNormalMovePossible(unsigned int from, unsigned int to, playerStruct *player) bool Position::isNormalMovePossible(unsigned int from, unsigned int to, playerStruct *player)
{ {
// locals // locals
unsigned int movingDirection, i; unsigned int movingDirection, i;
@ -386,7 +386,7 @@ bool Mill::isNormalMovePossible(unsigned int from, unsigned int to, playerStruct
// Name: calcPossibleMoves() // Name: calcPossibleMoves()
// Desc: ... // Desc: ...
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::calcPossibleMoves(playerStruct *player) void Position::calcPossibleMoves(playerStruct *player)
{ {
// locals // locals
unsigned int i, j; unsigned int i, j;
@ -419,7 +419,7 @@ void Mill::calcPossibleMoves(playerStruct *player)
// Name: setWarningAndMill() // Name: setWarningAndMill()
// Desc: // Desc:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::setWarningAndMill(unsigned int stone, unsigned int firstNeighbour, unsigned int secondNeighbour, bool isNewStone) void Position::setWarningAndMill(unsigned int stone, unsigned int firstNeighbour, unsigned int secondNeighbour, bool isNewStone)
{ {
// locals // locals
int rowOwner = field.field[stone]; int rowOwner = field.field[stone];
@ -443,7 +443,7 @@ void Mill::setWarningAndMill(unsigned int stone, unsigned int firstNeighbour, un
// Name: updateMillsAndWarnings() // Name: updateMillsAndWarnings()
// Desc: // Desc:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::updateMillsAndWarnings(unsigned int newStone) void Position::updateMillsAndWarnings(unsigned int newStone)
{ {
// locals // locals
unsigned int i; unsigned int i;
@ -470,10 +470,10 @@ void Mill::updateMillsAndWarnings(unsigned int newStone)
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: moveStone() // Name: do_move()
// Desc: // Desc:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::moveStone(unsigned int pushFrom, unsigned int pushTo) bool Position::do_move(unsigned int pushFrom, unsigned int pushTo)
{ {
// avoid index override // avoid index override
if (movesDone >= MAX_NUM_MOVES) if (movesDone >= MAX_NUM_MOVES)
@ -600,7 +600,7 @@ bool Mill::moveStone(unsigned int pushFrom, unsigned int pushTo)
// Name: setCurrentGameState() // Name: setCurrentGameState()
// Desc: Set an arbitrary game state as the current one. // Desc: Set an arbitrary game state as the current one.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::setCurrentGameState(fieldStruct *curState) bool Position::setCurrentGameState(fieldStruct *curState)
{ {
curState->copyField(&field); curState->copyField(&field);
@ -618,7 +618,7 @@ bool Mill::setCurrentGameState(fieldStruct *curState)
// Name: compareWithField() // Name: compareWithField()
// Desc: Compares the current 'field' variable with the passed one. 'stoneMoveAble[]' is ignored. // Desc: Compares the current 'field' variable with the passed one. 'stoneMoveAble[]' is ignored.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::compareWithField(fieldStruct *compareField) bool Position::compareWithField(fieldStruct *compareField)
{ {
unsigned int i, j; unsigned int i, j;
bool ret = true; bool ret = true;
@ -671,7 +671,7 @@ bool Mill::compareWithField(fieldStruct *compareField)
// Name: comparePlayers() // Name: comparePlayers()
// Desc: Compares the two passed players and returns false if they differ. // Desc: Compares the two passed players and returns false if they differ.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool Mill::comparePlayers(playerStruct *playerA, playerStruct *playerB) bool Position::comparePlayers(playerStruct *playerA, playerStruct *playerB)
{ {
// unsigned int i; // unsigned int i;
bool ret = true; bool ret = true;
@ -703,16 +703,16 @@ bool Mill::comparePlayers(playerStruct *playerA, playerStruct *playerB)
// Desc: Calls the printField() function of the current field. // Desc: Calls the printField() function of the current field.
// Prints the current game state on the screen. // Prints the current game state on the screen.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::printField() void Position::printField()
{ {
field.printField(); field.printField();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: undoLastMove() // Name: undo_move()
// Desc: Sets the initial field as the current one and apply all (minus one) moves from the move history. // Desc: Sets the initial field as the current one and apply all (minus one) moves from the move history.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::undoLastMove(void) void Position::undo_move(void)
{ {
// locals // locals
unsigned int *moveLogFrom_bak = new unsigned int[movesDone]; unsigned int *moveLogFrom_bak = new unsigned int[movesDone];
@ -736,7 +736,7 @@ void Mill::undoLastMove(void)
// and play again // and play again
for (i = 0; i < movesDone_bak - 1; i++) { for (i = 0; i < movesDone_bak - 1; i++) {
moveStone(moveLogFrom_bak[i], moveLogTo_bak[i]); do_move(moveLogFrom_bak[i], moveLogTo_bak[i]);
} }
} }
@ -749,7 +749,7 @@ void Mill::undoLastMove(void)
// Name: calcNumberOfRestingStones() // Name: calcNumberOfRestingStones()
// Desc: // Desc:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void Mill::calcNumberOfRestingStones(int &numWhiteStonesResting, int &numBlackStonesResting) void Position::calcNumberOfRestingStones(int &numWhiteStonesResting, int &numBlackStonesResting)
{ {
if (getCurrentPlayer() == fieldStruct::playerTwo) { if (getCurrentPlayer() == fieldStruct::playerTwo) {
numWhiteStonesResting = fieldStruct::numStonesPerPlayer - field.curPlayer->numStonesMissing - field.curPlayer->numStones; numWhiteStonesResting = fieldStruct::numStonesPerPlayer - field.curPlayer->numStonesMissing - field.curPlayer->numStones;

View File

@ -1,5 +1,5 @@
/*********************************************************************\ /*********************************************************************\
Mill.h Position.h
Copyright (c) Thomas Weber. All rights reserved. Copyright (c) Thomas Weber. All rights reserved.
Copyright (C) 2021 The Sanmill developers (see AUTHORS file) Copyright (C) 2021 The Sanmill developers (see AUTHORS file)
Licensed under the MIT License. Licensed under the MIT License.
@ -31,7 +31,7 @@ using namespace std;
/*** Klassen *********************************************************/ /*** Klassen *********************************************************/
class Mill class Position
{ {
private: private:
// Variables // Variables
@ -53,14 +53,14 @@ private:
public: public:
// Constructor / destructor // Constructor / destructor
Mill(); Position();
~Mill(); ~Position();
// Functions // Functions
void undoLastMove(); void undo_move();
void beginNewGame(millAI *firstPlayerKI, millAI *secondPlayerKI, int currentPlayer); void beginNewGame(millAI *firstPlayerKI, millAI *secondPlayerKI, int currentPlayer);
void setKI(int player, millAI *KI); void setKI(int player, millAI *KI);
bool moveStone(unsigned int pushFrom, unsigned int pushTo); bool do_move(unsigned int pushFrom, unsigned int pushTo);
void getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo); void getComputersChoice(unsigned int *pushFrom, unsigned int *pushTo);
bool setCurrentGameState(fieldStruct *curState); bool setCurrentGameState(fieldStruct *curState);
bool compareWithField(fieldStruct *compareField); bool compareWithField(fieldStruct *compareField);