Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 4, 2014, 5:16:20 PM (11 years ago)
Author:
richtero
Message:

getting closer to a playable version

File:
1 edited

Legend:

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

    r10131 r10156  
    5050#include "chat/ChatManager.h"
    5151
    52 #include "Mini4DgameCenterpoint.h"
    53 
    5452namespace orxonox
    5553{
     
    6765        RegisterObject(Mini4Dgame);
    6866
    69         this->center_ = 0;
    7067        this->board_ = 0;
     68        //ConsoleCommand("Mini4Dgame", "setStone", &Mini4Dgame::setStone).addShortcut().setAsInputCommand();
    7169
    7270        // Set the type of Bots for this particular Gametype.
     
    9997    void Mini4Dgame::start()
    10098    {
    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.
    102100        {
     101                /*
    103102                if (this->board_ == NULL)
    104103                {
    105                         this->board_ = new Mini4DgameBoard(this->center_->getContext());
     104                        this->board_ = new Mini4DgameBoard(this->board_->getContext());
    106105                        // Apply the template for the ball specified by the centerpoint.
    107106                        this->board_->addTemplate(this->center_->getBoardtemplate());
    108107                }
     108                */
    109109
    110110                // 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
    112112                this->board_->setPosition(0, 0, 0);
    113113
     
    177177    }
    178178
    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)
    180181    {
    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);
    182185    }
    183186
Note: See TracChangeset for help on using the changeset viewer.