Changeset 9348 for code/trunk/src/modules/tetris/Tetris.h
- Timestamp:
- Aug 30, 2012, 11:08:17 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 .project 1 2 build 2 3 codeblocks 4 dependencies 3 5 vs 4 dependencies
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
code/trunk/src/modules/tetris/Tetris.h
r8706 r9348 56 56 public: 57 57 Tetris(BaseObject* creator); //!< Constructor. Registers and initializes the object. 58 virtual ~Tetris(); //!< Destructor. Cleans up, if initialized. 58 virtual ~Tetris(); //!< Destructor. Cleans up, if initialized. 59 59 60 60 virtual void start(void); //!< Starts the Tetris minigame. … … 68 68 69 69 PlayerInfo* getPlayer(void) const; //!< Get the player. 70 WeakPtr<TetrisCenterpoint> getCenterpoint(void) 71 { return this->center_; } 70 72 71 73 bool isValidMove(TetrisStone* stone, const Vector3& position); 74 bool isValidMove(TetrisBrick* brick, const Vector3& position, bool isRotation); 75 Vector3 rotateVector(Vector3 position, unsigned int amount); 72 76 73 77 protected: 74 78 virtual void spawnPlayersIfRequested(); //!< Spawns player. 75 79 80 76 81 private: 77 void start Stone(void); //!< Starts with the first stone.78 void create Stone(void);82 void startBrick(void); 83 void createBrick(void); 79 84 void cleanup(void); //!< Cleans up the Gametype by destroying the ball and the bats. 80 85 bool isValidStonePosition(TetrisStone* stone, const Vector3& position); 81 86 bool isValidBrickPosition(TetrisBrick* brick); 87 void findFullRows(void); 88 void clearRow(unsigned int row); 89 90 82 91 PlayerInfo* player_; 83 92 84 93 WeakPtr<TetrisCenterpoint> center_; //!< The playing field. 85 std:: vector<TetrisStone*> stones_; //!< A list of all stones in play.86 std::vector< std::vector<bool> > grid_;87 TetrisStone* activeStone_;88 94 std::list<SmartPtr<TetrisStone> > stones_; //!< A list of all stones in play. 95 WeakPtr<TetrisBrick> activeBrick_; 96 WeakPtr<TetrisBrick> futureBrick_; 97 89 98 Timer starttimer_; //!< A timer to delay the start of the game. 90 99 };
Note: See TracChangeset
for help on using the changeset viewer.