Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/CMakeLists.txt
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/CMakeLists.txt	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/CMakeLists.txt	(revision 10131)
@@ -1,5 +1,6 @@
 SET_SOURCE_FILES(Mini4Dgame_SRC_FILES
   Mini4Dgame.cc
-  Mini4DgameAI.cc
+  #Mini4DgameAI.cc
+  Mini4DgameBoard.cc
   Mini4DgameCenterpoint.cc
 )
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.cc
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.cc	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.cc	(revision 10131)
@@ -45,4 +45,5 @@
 #include "core/config/ConfigValueIncludes.h"
 #include "infos/PlayerInfo.h"
+#include "core/command/ConsoleCommand.h"
 
 #include "gamestates/GSLevel.h"
@@ -53,4 +54,6 @@
 namespace orxonox
 {
+
+	SetConsoleCommand("Mini4Dgame", "setStone", &Mini4Dgame::setStone).addShortcut();
 
     RegisterUnloadableClass(Mini4Dgame);
@@ -65,5 +68,8 @@
 
         this->center_ = 0;
-        //TODO: player Null setzen
+        this->board_ = 0;
+
+        // Set the type of Bots for this particular Gametype.
+        //this->botclass_ = Class(Mini4DgameBot);
     }
 
@@ -87,15 +93,7 @@
     }
 
-    /*
-    bool Mini4Dgame::isValidMove(Vector4* move, const Mini4DgameBoard* board)
-    {
-
-    }
-    */
-
-
     /**
     @brief
-        Starts the Tetris minigame.
+        Starts the mini4Dgame.
     */
     void Mini4Dgame::start()
@@ -103,5 +101,15 @@
         if (this->center_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
         {
-            //TODO: create all objects if they don't exist so far and attach the parameters specified in the centerpoint to them
+        	if (this->board_ == NULL)
+        	{
+        		this->board_ = new Mini4DgameBoard(this->center_->getContext());
+        		// Apply the template for the ball specified by the centerpoint.
+        		this->board_->addTemplate(this->center_->getBoardtemplate());
+        	}
+
+        	// Attach the board to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to.
+        	this->center_->attach(this->board_);
+        	this->board_->setPosition(0, 0, 0);
+
         }
         else // If no centerpoint was specified, an error is thrown and the level is exited.
@@ -169,4 +177,12 @@
     }
 
+    static void Mini4Dgame::setStone(Vector4 move, const int playerColor, Mini4DgameBoard* board)
+    {
+    	board->makeMove(move,playerColor);
+    }
 
+    void Mini4Dgame::win(Mini4DgameWinner winner)
+    {
+
+    }
 }
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.h
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.h	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.h	(revision 10131)
@@ -37,7 +37,10 @@
 #include "gametypes/Deathmatch.h"
 #include "mini4Dgame/Mini4DgamePrereqs.h"
+#include "Mini4DgameCenterpoint.h"
+#include "Mini4DgameBoard.h"
 
 namespace orxonox
 {
+
 	namespace mini4DgamePlayerColor
 	{
@@ -51,18 +54,4 @@
 	}
 
-	struct Mini4DgamePlayer
-	{
-	    Player player;
-	    mini4DgamePlayerColor::color color_;
-	};
-
-	struct Mini4DgameWinner
-	{
-		int winningRow[4];
-		int winningColumn[4];
-		int winningHeight[4];
-		int winningNumber[4];
-		mini4DgamePlayerColor::color color_;
-	};
     /**
     @brief
@@ -85,4 +74,6 @@
             	{ this->center_ = center; }
 
+            static void setStone(Vector4 move, const int playerColor, Mini4DgameBoard* board);
+
             void win(Mini4DgameWinner winner);
 
@@ -94,7 +85,8 @@
             void cleanup(void); //!< Cleans up the Gametype by destroying the ball and the bats.
 
-            Mini4DgamePlayer players[2];
+            //Player players[2];
 
-            WeakPtr<Mini4DgameCenterpoint> center_; //!< The playing field.
+            WeakPtr<Mini4DgameCenterpoint> center_; //!< The centerpoint to which the objects are attached
+            WeakPtr<Mini4DgameBoard> board_;
     };
 }
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameAI.h
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameAI.h	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameAI.h	(revision 10131)
@@ -71,5 +71,5 @@
                 	The move that the AI decided to make.
             */
-            Vector4 Mini4DgameAI::makeMove(float timeout);
+            Vector4 makeMove(float timeout);
 
 
@@ -86,6 +86,6 @@
         private:
 
-            std::list<Vector4> Mini4DgameAI::getPossibleMoves();
-            void Mini4DgameAI::copyBoard();
+            std::list<Vector4> getPossibleMoves();
+            void copyBoard();
             mini4DgamePlayerColor::color board_[4][4][4][4];
     };
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.cc
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.cc	(revision 10131)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.cc	(revision 10131)
@@ -0,0 +1,839 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file PongBall.cc
+    @brief Implementation of the PongBall class.
+*/
+
+#include "Mini4DgameBoard.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+
+#include "gametypes/Gametype.h"
+
+#include "core/XMLPort.h"
+
+#include "Mini4Dgame.h"
+
+namespace orxonox
+{
+    RegisterClass(Mini4DgameBoard);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    Mini4DgameBoard::Mini4DgameBoard(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Mini4DgameBoard);
+
+        //this->registerVariables();
+
+        //initialize sound
+        for(int i=0;i<4;i++){
+        	for(int j=0;j<4;j++){
+        		for(int k=0;k<4;k++){
+        			for(int l=0;l<4;l++){
+        				this->board[i][j][k][l]=mini4DgamePlayerColor::none;
+        			}
+        		}
+        	}
+        }
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    Mini4DgameBoard::~Mini4DgameBoard()
+    {
+        if (this->isInitialized())
+        {
+
+        }
+    }
+
+    //xml port for loading sounds
+    void Mini4DgameBoard::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Mini4DgameBoard, XMLPort, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Register variables to synchronize over the network.
+
+    void Mini4DgameBoard::registerVariables()
+    {
+        registerVariable( this->fieldWidth_ );
+        registerVariable( this->fieldHeight_ );
+        registerVariable( this->batlength_ );
+        registerVariable( this->speed_ );
+        registerVariable( this->relMercyOffset_ );
+        registerVariable( this->batID_[0] );
+        registerVariable( this->batID_[1], VariableDirection::ToClient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
+    }
+     */
+
+	/**
+        @brief checks if the move is valid
+        @param the position where to put the stone plus the player who makes the move
+    */
+    bool Mini4DgameBoard::isValidMove(const Vector4 move)
+    {
+    	return (this->board[(int)move.x][(int)move.y][(int)move.z][(int)move.w] == mini4DgamePlayerColor::none);
+    }
+
+
+
+    /**
+    @brief makes a move on the logic playboard
+    @param the position where to put the stone plus the player who makes the move
+    */
+    void Mini4DgameBoard::makeMove(const Vector4 move, const int playerColor)
+    {
+    	if(this->isValidMove(move))
+    	{
+    		this->board[(int)move.x][(int)move.y][(int)move.z][(int)move.w] = (mini4DgamePlayerColor::color) playerColor;
+    		//BlinkingBillboard* bb = new BlinkingBillboard(this->getContext());
+    		//bb->setPosition(0,0,0);
+    		Mini4DgameWinner winner = this->getWinner();
+    		if(winner.color_ != mini4DgamePlayerColor::none)
+    		{
+    			//win(winner);
+    		}
+    	}
+    }
+
+    Mini4DgameWinner Mini4DgameBoard::getWinner()
+    {
+    	Mini4DgameWinner winner;
+		winner.color_ = mini4DgamePlayerColor::none;
+
+    	//check diagonals rows-columns-height-numbers
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[i][i][i][i]==mini4DgamePlayerColor::none || this->board[0][0][0][0] != this->board[i][i][i][i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[0][0][0][0];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = x;
+					winner.winningColumn[x] = x;
+					winner.winningHeight[x] = x;
+					winner.winningNumber[x] = x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[3-i][i][i][i]==mini4DgamePlayerColor::none || this->board[3][0][0][0] != this->board[3-i][i][i][i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[3][0][0][0];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = 3-x;
+					winner.winningColumn[x] = x;
+					winner.winningHeight[x] = x;
+					winner.winningNumber[x] = x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[i][3-i][i][i]==mini4DgamePlayerColor::none || this->board[0][3][0][0] != this->board[i][3-i][i][i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[0][3][0][0];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = x;
+					winner.winningColumn[x] = 3-x;
+					winner.winningHeight[x] = x;
+					winner.winningNumber[x] = x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[i][i][3-i][i]==mini4DgamePlayerColor::none || this->board[0][0][3][0] != this->board[i][i][3-i][i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[0][0][3][0];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = x;
+					winner.winningColumn[x] = x;
+					winner.winningHeight[x] = 3-x;
+					winner.winningNumber[x] = x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[i][i][i][3-i]==mini4DgamePlayerColor::none || this->board[0][0][0][3] != this->board[i][i][i][3-i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[0][0][0][3];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = x;
+					winner.winningColumn[x] = x;
+					winner.winningHeight[x] = x;
+					winner.winningNumber[x] = 3-x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[3-i][3-i][i][i]==mini4DgamePlayerColor::none || this->board[3][3][0][0] != this->board[3-i][3-i][i][i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[3][3][0][0];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = 3-x;
+					winner.winningColumn[x] = 3-x;
+					winner.winningHeight[x] = x;
+					winner.winningNumber[x] = x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[3-i][i][3-i][i]==mini4DgamePlayerColor::none || this->board[3][0][3][0] != this->board[3-i][i][3-i][i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[3][0][3][0];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = 3-x;
+					winner.winningColumn[x] = x;
+					winner.winningHeight[x] = 3-x;
+					winner.winningNumber[x] = x;
+				}
+				return winner;
+			}
+		}
+		for(int i=1; i<4; i++)
+		{
+			if(this->board[3-i][i][i][3-i]==mini4DgamePlayerColor::none || this->board[3][0][0][3] != this->board[3-i][i][i][3-i])
+				break;
+			if(i==3)
+			{
+				winner.color_ = this->board[3][0][0][3];
+				for(int x=0; x<4; x++){
+					winner.winningRow[x] = 3-x;
+					winner.winningColumn[x] = x;
+					winner.winningHeight[x] = x;
+					winner.winningNumber[x] = 3-x;
+				}
+				return winner;
+			}
+		}
+
+		//check diagonals rows-columns-height
+		for(int l=0; l<4; l++)
+		{
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][i][i][l]==mini4DgamePlayerColor::none || this->board[0][0][0][l] != this->board[i][i][i][l])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][0][0][l];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = l;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[3-i][i][i][l]==mini4DgamePlayerColor::none || this->board[3][0][0][l] != this->board[3-i][i][i][l])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[3][0][0][l];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = 3-x;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = l;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][3-i][i][l]==mini4DgamePlayerColor::none || this->board[0][3][0][l] != this->board[i][3-i][i][l])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][3][0][l];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = 3-x;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = l;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][i][3-i][l]==mini4DgamePlayerColor::none || this->board[0][0][3][l] != this->board[i][i][3-i][l])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][0][3][l];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = 3-x;
+						winner.winningNumber[x] = l;
+					}
+					return winner;
+				}
+			}
+		}
+
+		//check diagonals rows-columns-numbers
+		for(int l=0; l<4; l++)
+		{
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][i][l][i]==mini4DgamePlayerColor::none || this->board[0][0][l][0] != this->board[i][i][l][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][0][l][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = l;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[3-i][i][l][i]==mini4DgamePlayerColor::none || this->board[3][0][l][0] != this->board[3-i][i][l][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[3][0][l][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = 3-x;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = l;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][3-i][l][i]==mini4DgamePlayerColor::none || this->board[0][3][l][0] != this->board[i][3-i][l][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][3][l][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = 3-x;
+						winner.winningHeight[x] = l;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][i][l][3-i]==mini4DgamePlayerColor::none || this->board[0][0][l][3] != this->board[i][i][l][3-i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][0][l][3];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = l;
+						winner.winningNumber[x] = 3-x;
+					}
+					return winner;
+				}
+			}
+		}
+
+		//check diagonals rows-height-numbers
+		for(int l=0; l<4; l++)
+		{
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][l][i][i]==mini4DgamePlayerColor::none || this->board[0][l][0][0] != this->board[i][l][i][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][l][0][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = l;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[3-i][l][i][i]==mini4DgamePlayerColor::none || this->board[3][l][0][0] != this->board[3-i][l][i][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[3][l][0][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = 3-x;
+						winner.winningColumn[x] = l;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][l][3-i][i]==mini4DgamePlayerColor::none || this->board[0][l][3][0] != this->board[i][l][3-i][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][l][3][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = l;
+						winner.winningHeight[x] = 3-x;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[i][l][i][3-i]==mini4DgamePlayerColor::none || this->board[0][l][0][3] != this->board[i][l][i][3-i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[0][l][0][3];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = x;
+						winner.winningColumn[x] = l;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = 3-x;
+					}
+					return winner;
+				}
+			}
+		}
+
+		//check diagonals columns-height-numbers
+		for(int l=0; l<4; l++)
+		{
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[l][i][i][i]==mini4DgamePlayerColor::none || this->board[l][0][0][0] != this->board[l][i][i][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[l][0][0][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = l;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[l][3-i][i][i]==mini4DgamePlayerColor::none || this->board[l][3][0][0] != this->board[l][3-i][i][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[l][3][0][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = l;
+						winner.winningColumn[x] = 3-x;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[l][i][3-i][i]==mini4DgamePlayerColor::none || this->board[l][0][3][0] != this->board[l][i][3-i][i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[l][0][3][0];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = l;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = 3-x;
+						winner.winningNumber[x] = x;
+					}
+					return winner;
+				}
+			}
+			for(int i=1; i<4; i++)
+			{
+				if(this->board[l][i][i][3-i]==mini4DgamePlayerColor::none || this->board[l][0][0][3] != this->board[l][i][i][3-i])
+					break;
+				if(i==3)
+				{
+					winner.color_ = this->board[l][0][0][3];
+					for(int x=0; x<4; x++){
+						winner.winningRow[x] = l;
+						winner.winningColumn[x] = x;
+						winner.winningHeight[x] = x;
+						winner.winningNumber[x] = 3-x;
+					}
+					return winner;
+				}
+			}
+		}
+
+		//check 2d diagonals
+		for(int k=0;k<4;k++){
+    		for(int l=0;l<4;l++){
+    			//rows-columns
+    			for(int i=1; i<4; i++)
+				{
+					if(this->board[i][i][k][l]==mini4DgamePlayerColor::none || this->board[0][0][k][l] != this->board[i][i][k][l])
+						break;
+					if(i==3)
+					{
+						winner.color_ = this->board[0][0][k][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = x;
+							winner.winningColumn[x] = x;
+							winner.winningHeight[x] = k;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+					}
+				}
+				for(int i=1; i<4; i++)
+				{
+					if(this->board[3-i][i][k][l]==mini4DgamePlayerColor::none || this->board[3][0][k][l] != this->board[3-i][i][k][l])
+						break;
+					if(i==3)
+					{
+						winner.color_ = this->board[3][0][k][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = 3-x;
+							winner.winningColumn[x] = x;
+							winner.winningHeight[x] = k;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+					}
+				}
+				//rows-height
+    			for(int i=1; i<4; i++)
+    			{
+    				if(this->board[i][k][i][l]==mini4DgamePlayerColor::none || this->board[0][k][0][l] != this->board[i][k][i][l])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[0][k][0][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = x;
+							winner.winningColumn[x] = k;
+							winner.winningHeight[x] = x;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+					}
+				}
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[3-i][k][i][l]==mini4DgamePlayerColor::none || this->board[3][k][0][l] != this->board[3-i][k][i][l])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[3][k][0][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = 3-x;
+							winner.winningColumn[x] = k;
+							winner.winningHeight[x] = x;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+					}
+				}
+				//rows-numbers
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[i][k][l][i]==mini4DgamePlayerColor::none || this->board[0][k][l][0] != this->board[i][k][l][i])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[0][k][l][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = x;
+							winner.winningColumn[x] = k;
+							winner.winningHeight[x] = l;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+					}
+				}
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[3-i][k][l][i]==mini4DgamePlayerColor::none || this->board[3][k][l][0] != this->board[3-i][k][l][i])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[3][k][l][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = 3-x;
+							winner.winningColumn[x] = k;
+							winner.winningHeight[x] = l;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+					}
+				}
+				//column-height
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[k][i][i][l]==mini4DgamePlayerColor::none || this->board[k][0][0][l] != this->board[k][i][i][l])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[k][0][0][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = k;
+							winner.winningColumn[x] = x;
+							winner.winningHeight[x] = x;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+					}
+				}
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[k][3-i][i][l]==mini4DgamePlayerColor::none || this->board[k][3][0][l] != this->board[k][3-i][i][l])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[k][3][0][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = k;
+							winner.winningColumn[x] = 3-x;
+							winner.winningHeight[x] = x;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+					}
+				}
+				//column-numbers
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[k][i][l][i]==mini4DgamePlayerColor::none || this->board[k][0][l][0] != this->board[k][i][l][i])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[k][0][l][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = k;
+							winner.winningColumn[x] = x;
+							winner.winningHeight[x] = l;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+					}
+				}
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[k][3-i][l][i]==mini4DgamePlayerColor::none || this->board[k][3][l][0] != this->board[k][3-i][l][i])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[k][3][l][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = k;
+							winner.winningColumn[x] = 3-x;
+							winner.winningHeight[x] = l;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+					}
+				}
+				//height-numbers
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[k][l][i][i]==mini4DgamePlayerColor::none || this->board[k][l][0][0] != this->board[k][l][i][i])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[k][l][0][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = k;
+							winner.winningColumn[x] = l;
+							winner.winningHeight[x] = x;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+					}
+				}
+				for(int i=1; i<4; i++)
+    			{
+    				if(this->board[k][l][3-i][i]==mini4DgamePlayerColor::none || this->board[k][l][3][0] != this->board[k][l][3-i][i])
+    					break;
+    				if(i==3)
+    				{
+						winner.color_ = this->board[k][l][3][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = k;
+							winner.winningColumn[x] = l;
+							winner.winningHeight[x] = 3-x;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+					}
+				}
+    		}
+    	}
+
+    	//check rows
+    	for(int j=0;j<4;j++){
+    		for(int k=0;k<4;k++){
+    			for(int l=0;l<4;l++){
+    				if(this->board[0][j][k][l]!= mini4DgamePlayerColor::none
+    				   && this->board[0][j][k][l]==this->board[1][j][k][l]
+    				   && this->board[1][j][k][l]==this->board[2][j][k][l]
+    				   && this->board[2][j][k][l]==this->board[3][j][k][l])
+    				{
+    					winner.color_ = this->board[0][j][k][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = x;
+							winner.winningColumn[x] = j;
+							winner.winningHeight[x] = k;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+    				}
+    			}
+    		}
+    	}
+
+    	//check columns
+    	for(int i=0;i<4;i++){
+    		for(int k=0;k<4;k++){
+    			for(int l=0;l<4;l++){
+    				if(this->board[i][0][k][l]!= mini4DgamePlayerColor::none
+    	    				   && this->board[i][0][k][l]==this->board[i][1][k][l]
+    	    				   && this->board[i][1][k][l]==this->board[i][2][k][l]
+    	    				   && this->board[i][2][k][l]==this->board[i][3][k][l])
+    				{
+    	    			winner.color_ = this->board[i][0][k][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = i;
+							winner.winningColumn[x] = x;
+							winner.winningHeight[x] = k;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+    				}
+    			}
+    		}
+    	}
+
+    	//check height
+    	for(int i=0;i<4;i++){
+    		for(int j=0;j<4;j++){
+    			for(int l=0;l<4;l++){
+    				if(this->board[i][j][0][l]!= mini4DgamePlayerColor::none
+    	    	    				   && this->board[i][j][0][l]==this->board[i][j][1][l]
+    	    	    				   && this->board[i][j][1][l]==this->board[i][j][2][l]
+    	    	    				   && this->board[i][j][2][l]==this->board[i][j][3][l])
+    				{
+    					winner.color_ = this->board[i][j][0][l];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = i;
+							winner.winningColumn[x] = j;
+							winner.winningHeight[x] = x;
+							winner.winningNumber[x] = l;
+						}
+						return winner;
+    				}
+    			}
+    		}
+    	}
+
+    	//check numbers
+    	for(int i=0;i<4;i++){
+    		for(int j=0;j<4;j++){
+    			for(int k=0;k<4;k++){
+    				if(this->board[i][j][k][0]!= mini4DgamePlayerColor::none
+    	    	    				   && this->board[i][j][k][0]==this->board[i][j][k][1]
+    	    	    				   && this->board[i][j][k][1]==this->board[i][j][k][2]
+    	    	    				   && this->board[i][j][k][2]==this->board[i][j][k][3])
+    				{
+    					winner.color_ = this->board[i][j][k][0];
+						for(int x=0; x<4; x++){
+							winner.winningRow[x] = i;
+							winner.winningColumn[x] = j;
+							winner.winningHeight[x] = k;
+							winner.winningNumber[x] = x;
+						}
+						return winner;
+    				}
+    			}
+    		}
+    	}
+    	return winner;
+    }
+}
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.h
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.h	(revision 10131)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.h	(revision 10131)
@@ -0,0 +1,81 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Mini4DgameBoard.h
+    @brief Declaration of the Mini4DgameBoard class.
+    @ingroup Pong
+*/
+
+#ifndef _Mini4DgameBoard_H__
+#define _Mini4DgameBoard_H__
+
+#include "mini4Dgame/Mini4DgamePrereqs.h"
+
+#include "worldentities/StaticEntity.h"
+
+#include "Mini4DgameCenterpoint.h"
+
+namespace orxonox
+{
+
+	struct Mini4DgameWinner
+	{
+		int winningRow[4];
+		int winningColumn[4];
+		int winningHeight[4];
+		int winningNumber[4];
+		int color_;
+	};
+
+    /**
+    @brief
+        This class manages the board for @ref orxonox::Mini4Dgame "Mini4Dgame".
+
+    @author
+        Oliver Richter
+    */
+    class _Mini4DgameExport Mini4DgameBoard : public StaticEntity
+    {
+        public:
+    		Mini4DgameBoard(Context* context);
+            virtual ~Mini4DgameBoard();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            bool isValidMove(const Vector4 move);
+            void makeMove(const Vector4 move, const int playerColor);
+            Mini4DgameWinner getWinner();
+
+        private:
+            //void registerVariables();
+            int board[4][4][4][4]; //!< The logical board where the game takes place. board[row][column][height][number]
+    };
+}
+
+#endif /* _Mini4DgameBoard_H__ */
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameCenterpoint.cc
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameCenterpoint.cc	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameCenterpoint.cc	(revision 10131)
@@ -37,10 +37,12 @@
 #include "core/XMLPort.h"
 
+#include "../orxonox/graphics/BlinkingBillboard.h"
+
 #include "Mini4Dgame.h"
 
 namespace orxonox
 {
+
     RegisterClass(Mini4DgameCenterpoint);
-
     /**
     @brief
@@ -54,14 +56,4 @@
         this->height_ = 200;
         this->length_ = 200;
-
-        for(int i=0;i<4;i++){
-        	for(int j=0;j<4;j++){
-        		for(int k=0;k<4;k++){
-        			for(int l=0;l<4;l++){
-        				this->board[i][j][k][l]=mini4DgamePlayerColor::none;
-        			}
-        		}
-        	}
-        }
 
         this->checkGametype();
@@ -77,4 +69,5 @@
 
         XMLPortParam(Mini4DgameCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
+        XMLPortParam(Mini4DgameCenterpoint, "boardtemplate", setBoardtemplate, getBoardtemplate, xmlelement, mode);
     }
 
@@ -103,734 +96,3 @@
         }
     }
-
-    /**
-        @brief checks if the move is valid
-        @param the position where to put the stone plus the player who makes the move
-    */
-    bool Mini4DgameCenterpoint::isValidMove(const Vector4 move)
-    {
-    	return (this->board[(int)move.x][(int)move.y][(int)move.z][(int)move.w] == mini4DgamePlayerColor::none);
-    }
-
-    /**
-    @brief makes a move on the logic playboard
-    @param the position where to put the stone plus the player who makes the move
-    */
-    void Mini4DgameCenterpoint::makeMove(const Vector4 move, const mini4DgamePlayerColor::color playerColor)
-    {
-    	if(this->isValidMove(move))
-    	{
-    		this->board[(int)move.x][(int)move.y][(int)move.z][(int)move.w] = playerColor;
-    		Mini4DgameWinner winner = this->getWinner();
-    		if(winner.color_ != mini4DgamePlayerColor::none)
-    		{
-    			Mini4Dgame->win(winner);
-    		}
-    	}
-    }
-
-    Mini4DgameWinner Mini4DgameCenterpoint::getWinner()
-    {
-    	Mini4DgameWinner winner;
-		winner.color_ = mini4DgamePlayerColor::none;
-
-    	//check diagonals rows-columns-height-numbers
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[i][i][i][i]==mini4DgamePlayerColor::none || this->board[0][0][0][0] != this->board[i][i][i][i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[0][0][0][0];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = x;
-					winner.winningColumn[x] = x;
-					winner.winningHeight[x] = x;
-					winner.winningNumber[x] = x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[3-i][i][i][i]==mini4DgamePlayerColor::none || this->board[3][0][0][0] != this->board[3-i][i][i][i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[3][0][0][0];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = 3-x;
-					winner.winningColumn[x] = x;
-					winner.winningHeight[x] = x;
-					winner.winningNumber[x] = x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[i][3-i][i][i]==mini4DgamePlayerColor::none || this->board[0][3][0][0] != this->board[i][3-i][i][i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[0][3][0][0];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = x;
-					winner.winningColumn[x] = 3-x;
-					winner.winningHeight[x] = x;
-					winner.winningNumber[x] = x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[i][i][3-i][i]==mini4DgamePlayerColor::none || this->board[0][0][3][0] != this->board[i][i][3-i][i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[0][0][3][0];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = x;
-					winner.winningColumn[x] = x;
-					winner.winningHeight[x] = 3-x;
-					winner.winningNumber[x] = x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[i][i][i][3-i]==mini4DgamePlayerColor::none || this->board[0][0][0][3] != this->board[i][i][i][3-i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[0][0][0][3];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = x;
-					winner.winningColumn[x] = x;
-					winner.winningHeight[x] = x;
-					winner.winningNumber[x] = 3-x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[3-i][3-i][i][i]==mini4DgamePlayerColor::none || this->board[3][3][0][0] != this->board[3-i][3-i][i][i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[3][3][0][0];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = 3-x;
-					winner.winningColumn[x] = 3-x;
-					winner.winningHeight[x] = x;
-					winner.winningNumber[x] = x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[3-i][i][3-i][i]==mini4DgamePlayerColor::none || this->board[3][0][3][0] != this->board[3-i][i][3-i][i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[3][0][3][0];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = 3-x;
-					winner.winningColumn[x] = x;
-					winner.winningHeight[x] = 3-x;
-					winner.winningNumber[x] = x;
-				}
-				return winner;
-			}
-		}
-		for(int i=1; i<4; i++)
-		{
-			if(this->board[3-i][i][i][3-i]==mini4DgamePlayerColor::none || this->board[3][0][0][3] != this->board[3-i][i][i][3-i])
-				break;
-			if(i==3)
-			{
-				winner.color_ = this->board[3][0][0][3];
-				for(int x=0; x<4; x++){
-					winner.winningRow[x] = 3-x;
-					winner.winningColumn[x] = x;
-					winner.winningHeight[x] = x;
-					winner.winningNumber[x] = 3-x;
-				}
-				return winner;
-			}
-		}
-
-		//check diagonals rows-columns-height
-		for(int l=0; l<4; l++)
-		{
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][i][i][l]==mini4DgamePlayerColor::none || this->board[0][0][0][l] != this->board[i][i][i][l])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][0][0][l];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = l;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[3-i][i][i][l]==mini4DgamePlayerColor::none || this->board[3][0][0][l] != this->board[3-i][i][i][l])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[3][0][0][l];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = 3-x;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = l;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][3-i][i][l]==mini4DgamePlayerColor::none || this->board[0][3][0][l] != this->board[i][3-i][i][l])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][3][0][l];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = 3-x;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = l;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][i][3-i][l]==mini4DgamePlayerColor::none || this->board[0][0][3][l] != this->board[i][i][3-i][l])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][0][3][l];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = 3-x;
-						winner.winningNumber[x] = l;
-					}
-					return winner;
-				}
-			}
-		}
-
-		//check diagonals rows-columns-numbers
-		for(int l=0; l<4; l++)
-		{
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][i][l][i]==mini4DgamePlayerColor::none || this->board[0][0][l][0] != this->board[i][i][l][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][0][l][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = l;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[3-i][i][l][i]==mini4DgamePlayerColor::none || this->board[3][0][l][0] != this->board[3-i][i][l][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[3][0][l][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = 3-x;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = l;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][3-i][l][i]==mini4DgamePlayerColor::none || this->board[0][3][l][0] != this->board[i][3-i][l][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][3][l][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = 3-x;
-						winner.winningHeight[x] = l;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][i][l][3-i]==mini4DgamePlayerColor::none || this->board[0][0][l][3] != this->board[i][i][l][3-i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][0][l][3];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = l;
-						winner.winningNumber[x] = 3-x;
-					}
-					return winner;
-				}
-			}
-		}
-
-		//check diagonals rows-height-numbers
-		for(int l=0; l<4; l++)
-		{
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][l][i][i]==mini4DgamePlayerColor::none || this->board[0][l][0][0] != this->board[i][l][i][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][l][0][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = l;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[3-i][l][i][i]==mini4DgamePlayerColor::none || this->board[3][l][0][0] != this->board[3-i][l][i][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[3][l][0][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = 3-x;
-						winner.winningColumn[x] = l;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][l][3-i][i]==mini4DgamePlayerColor::none || this->board[0][l][3][0] != this->board[i][l][3-i][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][l][3][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = l;
-						winner.winningHeight[x] = 3-x;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[i][l][i][3-i]==mini4DgamePlayerColor::none || this->board[0][l][0][3] != this->board[i][l][i][3-i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[0][l][0][3];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = x;
-						winner.winningColumn[x] = l;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = 3-x;
-					}
-					return winner;
-				}
-			}
-		}
-
-		//check diagonals columns-height-numbers
-		for(int l=0; l<4; l++)
-		{
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[l][i][i][i]==mini4DgamePlayerColor::none || this->board[l][0][0][0] != this->board[l][i][i][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[l][0][0][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = l;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[l][3-i][i][i]==mini4DgamePlayerColor::none || this->board[l][3][0][0] != this->board[l][3-i][i][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[l][3][0][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = l;
-						winner.winningColumn[x] = 3-x;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[l][i][3-i][i]==mini4DgamePlayerColor::none || this->board[l][0][3][0] != this->board[l][i][3-i][i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[l][0][3][0];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = l;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = 3-x;
-						winner.winningNumber[x] = x;
-					}
-					return winner;
-				}
-			}
-			for(int i=1; i<4; i++)
-			{
-				if(this->board[l][i][i][3-i]==mini4DgamePlayerColor::none || this->board[l][0][0][3] != this->board[l][i][i][3-i])
-					break;
-				if(i==3)
-				{
-					winner.color_ = this->board[l][0][0][3];
-					for(int x=0; x<4; x++){
-						winner.winningRow[x] = l;
-						winner.winningColumn[x] = x;
-						winner.winningHeight[x] = x;
-						winner.winningNumber[x] = 3-x;
-					}
-					return winner;
-				}
-			}
-		}
-
-		//check 2d diagonals
-		for(int k=0;k<4;k++){
-    		for(int l=0;l<4;l++){
-    			//rows-columns
-    			for(int i=1; i<4; i++)
-				{
-					if(this->board[i][i][k][l]==mini4DgamePlayerColor::none || this->board[0][0][k][l] != this->board[i][i][k][l])
-						break;
-					if(i==3)
-					{
-						winner.color_ = this->board[0][0][k][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = x;
-							winner.winningColumn[x] = x;
-							winner.winningHeight[x] = k;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-					}
-				}
-				for(int i=1; i<4; i++)
-				{
-					if(this->board[3-i][i][k][l]==mini4DgamePlayerColor::none || this->board[3][0][k][l] != this->board[3-i][i][k][l])
-						break;
-					if(i==3)
-					{
-						winner.color_ = this->board[3][0][k][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = 3-x;
-							winner.winningColumn[x] = x;
-							winner.winningHeight[x] = k;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-					}
-				}
-				//rows-height
-    			for(int i=1; i<4; i++)
-    			{
-    				if(this->board[i][k][i][l]==mini4DgamePlayerColor::none || this->board[0][k][0][l] != this->board[i][k][i][l])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[0][k][0][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = x;
-							winner.winningColumn[x] = k;
-							winner.winningHeight[x] = x;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-					}
-				}
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[3-i][k][i][l]==mini4DgamePlayerColor::none || this->board[3][k][0][l] != this->board[3-i][k][i][l])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[3][k][0][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = 3-x;
-							winner.winningColumn[x] = k;
-							winner.winningHeight[x] = x;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-					}
-				}
-				//rows-numbers
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[i][k][l][i]==mini4DgamePlayerColor::none || this->board[0][k][l][0] != this->board[i][k][l][i])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[0][k][l][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = x;
-							winner.winningColumn[x] = k;
-							winner.winningHeight[x] = l;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-					}
-				}
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[3-i][k][l][i]==mini4DgamePlayerColor::none || this->board[3][k][l][0] != this->board[3-i][k][l][i])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[3][k][l][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = 3-x;
-							winner.winningColumn[x] = k;
-							winner.winningHeight[x] = l;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-					}
-				}
-				//column-height
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[k][i][i][l]==mini4DgamePlayerColor::none || this->board[k][0][0][l] != this->board[k][i][i][l])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[k][0][0][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = k;
-							winner.winningColumn[x] = x;
-							winner.winningHeight[x] = x;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-					}
-				}
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[k][3-i][i][l]==mini4DgamePlayerColor::none || this->board[k][3][0][l] != this->board[k][3-i][i][l])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[k][3][0][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = k;
-							winner.winningColumn[x] = 3-x;
-							winner.winningHeight[x] = x;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-					}
-				}
-				//column-numbers
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[k][i][l][i]==mini4DgamePlayerColor::none || this->board[k][0][l][0] != this->board[k][i][l][i])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[k][0][l][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = k;
-							winner.winningColumn[x] = x;
-							winner.winningHeight[x] = l;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-					}
-				}
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[k][3-i][l][i]==mini4DgamePlayerColor::none || this->board[k][3][l][0] != this->board[k][3-i][l][i])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[k][3][l][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = k;
-							winner.winningColumn[x] = 3-x;
-							winner.winningHeight[x] = l;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-					}
-				}
-				//height-numbers
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[k][l][i][i]==mini4DgamePlayerColor::none || this->board[k][l][0][0] != this->board[k][l][i][i])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[k][l][0][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = k;
-							winner.winningColumn[x] = l;
-							winner.winningHeight[x] = x;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-					}
-				}
-				for(int i=1; i<4; i++)
-    			{
-    				if(this->board[k][l][3-i][i]==mini4DgamePlayerColor::none || this->board[k][l][3][0] != this->board[k][l][3-i][i])
-    					break;
-    				if(i==3)
-    				{
-						winner.color_ = this->board[k][l][3][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = k;
-							winner.winningColumn[x] = l;
-							winner.winningHeight[x] = 3-x;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-					}
-				}
-    		}
-    	}
-
-    	//check rows
-    	for(int j=0;j<4;j++){
-    		for(int k=0;k<4;k++){
-    			for(int l=0;l<4;l++){
-    				if(this->board[0][j][k][l]!= mini4DgamePlayerColor::none
-    				   && this->board[0][j][k][l]==this->board[1][j][k][l]
-    				   && this->board[1][j][k][l]==this->board[2][j][k][l]
-    				   && this->board[2][j][k][l]==this->board[3][j][k][l])
-    				{
-    					winner.color_ = this->board[0][j][k][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = x;
-							winner.winningColumn[x] = j;
-							winner.winningHeight[x] = k;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-    				}
-    			}
-    		}
-    	}
-
-    	//check columns
-    	for(int i=0;i<4;i++){
-    		for(int k=0;k<4;k++){
-    			for(int l=0;l<4;l++){
-    				if(this->board[i][0][k][l]!= mini4DgamePlayerColor::none
-    	    				   && this->board[i][0][k][l]==this->board[i][1][k][l]
-    	    				   && this->board[i][1][k][l]==this->board[i][2][k][l]
-    	    				   && this->board[i][2][k][l]==this->board[i][3][k][l])
-    				{
-    	    			winner.color_ = this->board[i][0][k][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = i;
-							winner.winningColumn[x] = x;
-							winner.winningHeight[x] = k;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-    				}
-    			}
-    		}
-    	}
-
-    	//check height
-    	for(int i=0;i<4;i++){
-    		for(int j=0;j<4;j++){
-    			for(int l=0;l<4;l++){
-    				if(this->board[i][j][0][l]!= mini4DgamePlayerColor::none
-    	    	    				   && this->board[i][j][0][l]==this->board[i][j][1][l]
-    	    	    				   && this->board[i][j][1][l]==this->board[i][j][2][l]
-    	    	    				   && this->board[i][j][2][l]==this->board[i][j][3][l])
-    				{
-    					winner.color_ = this->board[i][j][0][l];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = i;
-							winner.winningColumn[x] = j;
-							winner.winningHeight[x] = x;
-							winner.winningNumber[x] = l;
-						}
-						return winner;
-    				}
-    			}
-    		}
-    	}
-
-    	//check numbers
-    	for(int i=0;i<4;i++){
-    		for(int j=0;j<4;j++){
-    			for(int k=0;k<4;k++){
-    				if(this->board[i][j][k][0]!= mini4DgamePlayerColor::none
-    	    	    				   && this->board[i][j][k][0]==this->board[i][j][k][1]
-    	    	    				   && this->board[i][j][k][1]==this->board[i][j][k][2]
-    	    	    				   && this->board[i][j][k][2]==this->board[i][j][k][3])
-    				{
-    					winner.color_ = this->board[i][j][k][0];
-						for(int x=0; x<4; x++){
-							winner.winningRow[x] = i;
-							winner.winningColumn[x] = j;
-							winner.winningHeight[x] = k;
-							winner.winningNumber[x] = x;
-						}
-						return winner;
-    				}
-    			}
-    		}
-    	}
-    	return winner;
-    }
 }
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameCenterpoint.h
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameCenterpoint.h	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameCenterpoint.h	(revision 10131)
@@ -41,21 +41,12 @@
 #include "worldentities/StaticEntity.h"
 #include "mini4Dgame/Mini4DgamePrereqs.h"
-#include "mini4Dgame/Mini4Dgame.h"
+//#include "mini4Dgame/Mini4Dgame.h"
 
 namespace orxonox
 {
-    
     /**
     @brief
         The Mini4DgameCenterpoint implements the playing field @ref orxonox::Mini4Dgame "Mini4Dgame" takes place in and allows for many parameters of the minigame to be set.
         
-        Various parameters can be set:
-        - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
-        - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::PongBall "PongBall", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
-        - The <b>battemplate</b> is a template that is applied to the @ref orxonox::PongBall "PongBat", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
-        - The <b>ballspeed</b> is the speed with which the @ref orxonox::PongBall "PongBall" moves. The default is <em>100</em>.
-        - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::PongBall "PongBall". The default is <em>1.0</em>.
-        - The <b>batspeed</b> is the speed with which the @ref orxonox::PongBat "PongBats" move. The default is <em>60</em>.
-        - The <b>batlength</b> is the length of the @ref orxonox::PongBat "PongBats" as the percentage of the height of the playing field. The default is <em>0.25</em>.
     */
     class _Mini4DgameExport Mini4DgameCenterpoint : public StaticEntity
@@ -70,26 +61,18 @@
 
             /**
-            @brief Set the template for the ball. (e.g. to attach the model of the ball, but also to attach an EventListener to it to detect, when it hits the boundaries, and e.g. display some ParticleEffets, when it does.)
-            @param balltemplate The name of the template to be set.
+            @brief Get the template of the board.
+            @return Returns the name of the template of the board.
+            */
+            const std::string& getBoardtemplate() const
+                { return this->boardtemplate_; }
 
-            void setBalltemplate(const std::string& balltemplate)
-                { this->balltemplate_ = balltemplate; }
-            */
 
             /**
-            @brief Get the template of the ball.
-            @return Returns the name of the template of the ball. 
+            @brief Set the template for the board.
+            @param boardtemplate The name of the template to be set.
+            */
+            void setBoardtemplate(const std::string& boardtemplate)
+                { this->boardtemplate_ = boardtemplate; }
 
-            const std::string& getBalltemplate() const
-                { return this->balltemplate_; }
-            */
-
-            /**
-            @brief Set the template for the bats. (e.g. to attach the model of the bat, but also to attach CameraPositions to it, to be able to view the game from the bats perspective)
-            @param battemplate The name of the template to be set.
-
-            void setBattemplate(const std::string& battemplate)
-                { this->battemplate_ = battemplate; }
-            */
 
             /**
@@ -106,32 +89,12 @@
                 { return Vector3(this->width_, this->height_, this->length_); }
 
-            /**
-                    @brief checks if the move is valid
-                    @param the position where to put the stone plus the player who makes the move
-            */
-            bool isValidMove(const Vector4 move);
-
-            /**
-               @brief makes a move on the logic playboard
-           	   @param the position where to put the stone plus the player who makes the move
-             */
-            void makeMove(const Vector4 move, const mini4DgamePlayerColor::color playerColor);
-
-            /**
-               @brief checks if somebody has won
-               @return the winner with the winning fields or a winner with winner.color_ == mini4DgamePlayerColor::none if nobody has won so far.
-            */
-            Mini4DgameWinner Mini4DgameCenterpoint::getWinner();
-
         private:
             void checkGametype(); //!< Checks whether the gametype is Mini4Dgame and if it is, sets its centerpoint.
 
-            //std::string balltemplate_; //!< The template for the ball.
-            //std::string battemplate_; //!< The template for the bats.
+            std::string boardtemplate_; //!< The template for the board.
 
             float width_; //!< The height of the playing field.
             float height_; //!< The width of the playing field.
             float length_; //!< The length of the playing field.
-            mini4DgamePlayerColor::color board[4][4][4][4]; //!< The logical board where the game takes place. board[row][column][height][number]
     };
 }
Index: code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgamePrereqs.h
===================================================================
--- code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgamePrereqs.h	(revision 10121)
+++ code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgamePrereqs.h	(revision 10131)
@@ -69,4 +69,5 @@
 {
     class Mini4Dgame;
+    class Mini4DgameBoard;
     class Mini4DgameCenterpoint;
 }
