Orxonox  0.0.5 Codename: Arcturus
Mini4DgameBoard.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Fabian 'x3n' Landau
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _Mini4DgameBoard_H__
36 #define _Mini4DgameBoard_H__
37 
39 
41 
42 namespace orxonox
43 {
45  {
46  none,
47  red,
48  blue,
49  green
50  };
51 
53  {
54  Mini4DgamePosition(int x, int y, int z, int w) : x(x), y(y), z(z), w(w) {}
55  int x;
56  int y;
57  int z;
58  int w;
59  };
60 
62  {
63  int winningRow[4];
64  int winningColumn[4];
65  int winningHeight[4];
66  int winningNumber[4];
68  };
69 
78  {
79  public:
80  Mini4DgameBoard(Context* context);
81  //virtual ~Mini4DgameBoard();
82 
83  bool isValidMove(const Mini4DgamePosition& move);
84  void undoMove();
85  void makeMove(const Mini4DgamePosition& move);
86  Mini4DgameWinner getWinner();
87 
88  void checkGametype();
89 
90  private:
91  //void registerVariables();
92  std::vector<Mini4DgamePosition> moves;
94  BlinkingBillboard* blinkingBillboards[4][4][4][4];
95  Mini4DgamePlayerColor board[4][4][4][4];
96  };
97 }
98 
99 #endif /* _Mini4DgameBoard_H__ */
bool player_toggle_
Definition: Mini4DgameBoard.h:93
The StaticEntity is the simplest derivative of the orxonox::WorldEntity class.
Definition: StaticEntity.h:50
Definition: BlinkingBillboard.h:40
int x
Definition: Mini4DgameBoard.h:55
Definition: Mini4DgameBoard.h:61
int z
Definition: Mini4DgameBoard.h:57
std::vector< Mini4DgamePosition > moves
Definition: Mini4DgameBoard.h:92
#define _Mini4DgameExport
Definition: Mini4DgamePrereqs.h:60
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
int w
Definition: Mini4DgameBoard.h:58
Mini4DgamePosition(int x, int y, int z, int w)
Definition: Mini4DgameBoard.h:54
int y
Definition: Mini4DgameBoard.h:56
Definition: Context.h:45
This class manages the board for Mini4Dgame.
Definition: Mini4DgameBoard.h:77
Mini4DgamePlayerColor color_
Definition: Mini4DgameBoard.h:67
Definition: Mini4DgameBoard.h:52
Mini4DgamePlayerColor
Definition: Mini4DgameBoard.h:44
Shared library macros, enums, constants and forward declarations for the mini4dgame module ...