Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2011, 3:06:08 PM (13 years ago)
Author:
catherine
Message:

Almost working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tetris/src/modules/tetris/Tetris.h

    r8488 r8537  
    5656        public:
    5757            Tetris(BaseObject* creator); //!< Constructor. Registers and initializes the object.
    58             virtual ~Tetris(); //!< Destructor. Cleans up, if initialized.
    59            
    60             virtual void tick(float dt);
     58            virtual ~Tetris(); //!< Destructor. Cleans up, if initialized.           
    6159
    6260            virtual void start(void); //!< Starts the Tetris minigame.
    6361            virtual void end(void); ///!< Ends the Tetris minigame.
    6462
     63            virtual void tick(float dt);
     64
    6565            virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
    6666
    67             /**
    68             @brief Set the TetrisCenterpoint (the playing field).
    69             @param center A pointer to the TetrisCenterpoint to be set.
    70             */
    71             void setCenterpoint(TetrisCenterpoint* center)
    72                 { this->center_ = center; }
     67            void setCenterpoint(TetrisCenterpoint* center);
    7368
    7469            PlayerInfo* getPlayer(void) const; //!< Get the player.
     70
     71            bool isValidMove(TetrisStone* stone, const Vector3& position);
    7572
    7673        protected:
    7774            virtual void spawnPlayersIfRequested(); //!< Spawns player.
    7875
     76        private:
    7977            void startStone(void); //!< Starts with the first stone.
    8078            void createStone(void);
    8179            void cleanup(void); //!< Cleans up the Gametype by destroying the ball and the bats.
    82             bool correctStonePos(TetrisStone* stone); //!< Check whether the supplied stone is in an allowed position
     80            bool correctStonePos(TetrisStone* stone, const Vector3& position); //!< Check whether the supplied stone is in an allowed position
    8381           
    8482            PlayerInfo* player_;
     
    8684            WeakPtr<TetrisCenterpoint> center_; //!< The playing field.
    8785            std::vector<TetrisStone*> stones_; //!< A list of all stones in play.
     86            std::vector< std::vector<bool> > grid_;
    8887            TetrisStone* activeStone_;
    8988           
Note: See TracChangeset for help on using the changeset viewer.