Skip to content

Commit

Permalink
l
Browse files Browse the repository at this point in the history
  • Loading branch information
ben authored and ben committed Apr 30, 2017
1 parent 5375856 commit 2cbe09c
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 11 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added ._.DS_Store
Binary file not shown.
Binary file added CppCatchDaFlagMTA/.DS_Store
Binary file not shown.
Binary file added CppCatchDaFlagMTA/._.DS_Store
Binary file not shown.
5 changes: 0 additions & 5 deletions CppCatchDaFlagMTA/GameManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ void GameManager::_initGame(Player* pa, Player* pb) {
ATools = new BoardTool[TOOLS_COUNT];
BTools = new BoardTool[TOOLS_COUNT];

gameIndex++;

// load board
if (LOADED) {
Position APositions[TOOLS_COUNT];
Position BPositions[TOOLS_COUNT];
Expand All @@ -210,7 +207,6 @@ void GameManager::_initGame(Player* pa, Player* pb) {
_setTools(BTools, bColor, BPositions);
err = CheckBoard();
}
// faild to load file location
else {
char buffer[255];
strerror_s(buffer, errCode);
Expand All @@ -219,7 +215,6 @@ void GameManager::_initGame(Player* pa, Player* pb) {
}

}
// random board
else {
_setRandomTools(ATools, aColor, A_KEY);
_setRandomTools(BTools, bColor, B_KEY);
Expand Down
6 changes: 3 additions & 3 deletions CppCatchDaFlagMTA/GameManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class GameManager {
string boardFilePath;
string moveAFilePath;
string moveBFilePath;
string gamePrefixPath;
int gameIndex = 0;
string gamePrefixPath = "board_ok_";
int gameIndex;

vector<Move> aMoves;
vector<Move> bMoves;
Expand All @@ -56,7 +56,7 @@ class GameManager {

public:

GameManager(Board * b) : _b(b) {}
GameManager(Board * b,int idx=0) : _b(b), gameIndex(idx) {}
~GameManager();

void addErrorMsg(string msg) {
Expand Down
5 changes: 3 additions & 2 deletions CppCatchDaFlagMTA/Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ class Menu {
_resetScore();
break;
case RECORD_GAME:
txt[4] = (gm.isRecording())? "Stop record game" : "Start record game";
(txt[4] == "Start record game") ? gm.startRecord() : gm.endRecord();
(!gm.isRecording()) ? gm.startRecord() : gm.endRecord();
txt[4] = (gm.isRecording()) ? "Stop record game" : "Start record game";
break;
// TODO: remove this case, only for debug
case LOAD_FILE:
gm.setBoard("C:\\Users\\benf\\Downloads\\board_ok_2.gboard");
gm.setMoves("C:\\Users\\benf\\Downloads\\board_ok_2.moves-a_small","");
Expand Down
1 change: 0 additions & 1 deletion CppCatchDaFlagMTA/_1.gboard

This file was deleted.

0 comments on commit 2cbe09c

Please sign in to comment.