Changeset 8537 for code/branches/tetris/src/modules/tetris/Tetris.h
- Timestamp:
- May 23, 2011, 3:06:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tetris/src/modules/tetris/Tetris.h
r8488 r8537 56 56 public: 57 57 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. 61 59 62 60 virtual void start(void); //!< Starts the Tetris minigame. 63 61 virtual void end(void); ///!< Ends the Tetris minigame. 64 62 63 virtual void tick(float dt); 64 65 65 virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player. 66 66 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); 73 68 74 69 PlayerInfo* getPlayer(void) const; //!< Get the player. 70 71 bool isValidMove(TetrisStone* stone, const Vector3& position); 75 72 76 73 protected: 77 74 virtual void spawnPlayersIfRequested(); //!< Spawns player. 78 75 76 private: 79 77 void startStone(void); //!< Starts with the first stone. 80 78 void createStone(void); 81 79 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 position80 bool correctStonePos(TetrisStone* stone, const Vector3& position); //!< Check whether the supplied stone is in an allowed position 83 81 84 82 PlayerInfo* player_; … … 86 84 WeakPtr<TetrisCenterpoint> center_; //!< The playing field. 87 85 std::vector<TetrisStone*> stones_; //!< A list of all stones in play. 86 std::vector< std::vector<bool> > grid_; 88 87 TetrisStone* activeStone_; 89 88
Note: See TracChangeset
for help on using the changeset viewer.