- Timestamp:
- Dec 4, 2014, 5:16:20 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.cc
r10131 r10156 50 50 #include "chat/ChatManager.h" 51 51 52 #include "Mini4DgameCenterpoint.h"53 54 52 namespace orxonox 55 53 { … … 67 65 RegisterObject(Mini4Dgame); 68 66 69 this->center_ = 0;70 67 this->board_ = 0; 68 //ConsoleCommand("Mini4Dgame", "setStone", &Mini4Dgame::setStone).addShortcut().setAsInputCommand(); 71 69 72 70 // Set the type of Bots for this particular Gametype. … … 99 97 void Mini4Dgame::start() 100 98 { 101 if (this-> center_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.99 if (this->board_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place. 102 100 { 101 /* 103 102 if (this->board_ == NULL) 104 103 { 105 this->board_ = new Mini4DgameBoard(this-> center_->getContext());104 this->board_ = new Mini4DgameBoard(this->board_->getContext()); 106 105 // Apply the template for the ball specified by the centerpoint. 107 106 this->board_->addTemplate(this->center_->getBoardtemplate()); 108 107 } 108 */ 109 109 110 110 // Attach the board to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to. 111 this->center_->attach(this->board_); 111 112 112 this->board_->setPosition(0, 0, 0); 113 113 … … 177 177 } 178 178 179 static void Mini4Dgame::setStone(Vector4 move, const int playerColor, Mini4DgameBoard* board) 179 //void Mini4Dgame::setStone(Vector4 move, const int playerColor, Mini4DgameBoard* board) 180 void Mini4Dgame::setStone(int x,int y,int z,int w)//Vector4 move, const int playerColor) 180 181 { 181 board->makeMove(move,playerColor); 182 Vector4 move = Vector4(x,y,z,w); 183 ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>::begin(); 184 it->makeMove(move,1);//playerColor); 182 185 } 183 186
Note: See TracChangeset
for help on using the changeset viewer.