Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2014, 4:15:08 PM (9 years ago)
Author:
richtero
Message:

working game

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.cc

    r10156 r10168  
    5454
    5555        SetConsoleCommand("Mini4Dgame", "setStone", &Mini4Dgame::setStone).addShortcut();
     56        SetConsoleCommand("Mini4Dgame", "undoStone", &Mini4Dgame::undoStone).addShortcut();
    5657
    5758    RegisterUnloadableClass(Mini4Dgame);
     
    6667
    6768        this->board_ = 0;
    68         //ConsoleCommand("Mini4Dgame", "setStone", &Mini4Dgame::setStone).addShortcut().setAsInputCommand();
    6969
    7070        // Set the type of Bots for this particular Gametype.
     
    8888    void Mini4Dgame::cleanup()
    8989    {
    90 
     90        if(this->board_ != NULL)// Destroy the board, if present.
     91        {
     92                //this->board_->destroy();
     93                this->board_ = 0;
     94        }
    9195    }
    9296
     
    177181    }
    178182
     183    void Mini4Dgame::undoStone()//Vector4 move, const int playerColor)
     184    {
     185        ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>::begin();
     186        it->undoMove();
     187    }
     188
    179189    //void Mini4Dgame::setStone(Vector4 move, const int playerColor, Mini4DgameBoard* board)
    180190    void Mini4Dgame::setStone(int x,int y,int z,int w)//Vector4 move, const int playerColor)
     
    182192        Vector4 move = Vector4(x,y,z,w);
    183193        ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>::begin();
    184         it->makeMove(move,1);//playerColor);
     194        it->makeMove(move);
    185195    }
    186196
Note: See TracChangeset for help on using the changeset viewer.