Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/mini4dgame/Mini4DgameBoard.h @ 11231

Last change on this file since 11231 was 11071, checked in by landauf, 9 years ago

merged branch cpp11_v3 back to trunk

  • Property svn:eol-style set to native
File size: 2.6 KB
RevLine 
[10131]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
29/**
30    @file Mini4DgameBoard.h
31    @brief Declaration of the Mini4DgameBoard class.
32    @ingroup Pong
33*/
34
35#ifndef _Mini4DgameBoard_H__
36#define _Mini4DgameBoard_H__
37
[10227]38#include "mini4dgame/Mini4DgamePrereqs.h"
[10131]39
40#include "worldentities/StaticEntity.h"
41
42namespace orxonox
43{
[11071]44    enum class Mini4DgamePlayerColor
45    {
46        none,
47        red,
48        blue,
49        green
50    };
[10131]51
[10229]52    struct Mini4DgamePosition
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
[10230]61    struct Mini4DgameWinner
62    {
63        int winningRow[4];
64        int winningColumn[4];
65        int winningHeight[4];
66        int winningNumber[4];
[11071]67        Mini4DgamePlayerColor color_;
[10230]68    };
[10131]69
70    /**
71    @brief
72        This class manages the board for @ref orxonox::Mini4Dgame "Mini4Dgame".
73
74    @author
75        Oliver Richter
76    */
77    class _Mini4DgameExport Mini4DgameBoard : public StaticEntity
78    {
79        public:
[10230]80            Mini4DgameBoard(Context* context);
[10168]81            //virtual ~Mini4DgameBoard();
[10131]82
[10229]83            bool isValidMove(const Mini4DgamePosition& move);
[10168]84            void undoMove();
[10229]85            void makeMove(const Mini4DgamePosition& move);
[10131]86            Mini4DgameWinner getWinner();
87
[10156]88            void checkGametype();
89
[10131]90        private:
91            //void registerVariables();
[10229]92            std::vector<Mini4DgamePosition> moves;
[10168]93            bool player_toggle_;
94            BlinkingBillboard* blinkingBillboards[4][4][4][4];
[11071]95            Mini4DgamePlayerColor board[4][4][4][4]; //!< The logical board where the game takes place. board[row][column][height][number]
[10131]96    };
97}
98
99#endif /* _Mini4DgameBoard_H__ */
Note: See TracBrowser for help on using the repository browser.