[Orxonox-commit 7461] r12068 - code/branches/wagnis_HS18/src/modules/wagnis

samuelbl at orxonox.net samuelbl at orxonox.net
Wed Oct 31 11:30:19 CET 2018


Author: samuelbl
Date: 2018-10-31 11:30:19 +0100 (Wed, 31 Oct 2018)
New Revision: 12068

Added:
   code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc
   code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.h
Log:
Wagnis class added.

Added: code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc	2018-10-31 10:30:19 UTC (rev 12068)
@@ -0,0 +1,23 @@
+#include "Wagnis.h"
+#include "WagnisGameboard.h"
+#include "WagnisProvince.h"
+
+       
+        RegisterClass(Wagnis);
+        
+        void Wagnis::createGame()       
+        {   
+            //todo
+            void Wagnis::setPlayers()
+            {
+                //todo
+            }        
+            
+            void Wagnis::chooseProvinces()
+            {
+                //todo
+            }   
+        }
+
+        
+    
\ No newline at end of file

Added: code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.h
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.h	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.h	2018-10-31 10:30:19 UTC (rev 12068)
@@ -0,0 +1,42 @@
+#include "WagnisGameboard.h"
+#include "WagnisProvince.h"
+
+// todo: klassen zusammenfassen
+
+namespace orxonox
+{
+    class _WagnisExport Wagnis : public Deathmatch
+    {
+        public: 
+
+        // to start the game
+        void createGame;        // creates and links provinces
+        
+            void setPlayers;        // initialises players
+            void chooseProvinces    // players can choose their provinces 
+        
+
+        void playerTurn         // each players turn
+           
+            void setTroops;         // get and set your reinforcements
+            void attack;            // attack neighbouring provinces
+            void moveTroops;        // move troops from one province to another
+        
+            // additional checking funtions
+            int  troopCounter;       // counts how many reinforcements player gets
+            bool attackChecker;     // checks whether an attack move is valid
+                                    // (provinces linked, enough troops, no own province) 
+            bool moveChecker;       // checks whether a troop movement is valid
+                                    // (start and target belong to player, link existing)
+            void attackSimulator;   // calculates outcome of battle 
+        
+    
+        private:
+            
+            int owner_ID;
+            int troops;
+            int ID;
+            int continent;
+    }
+
+}
\ No newline at end of file



More information about the Orxonox-commit mailing list