[Orxonox-commit 7462] r12069 - code/branches/wagnis_HS18/src/modules/wagnis
stadlero at orxonox.net
stadlero at orxonox.net
Wed Oct 31 11:32:03 CET 2018
Author: stadlero
Date: 2018-10-31 11:32:03 +0100 (Wed, 31 Oct 2018)
New Revision: 12069
Added:
code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc
code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h
Log:
Player class added
Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc 2018-10-31 10:32:03 UTC (rev 12069)
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+#include "WagnisPlayer.h"
+#include <vector>
+#include <string>
+
+namespace orxonox
+{
+ RegisterClass(WagnisPlayer);
+
+ //Constructor
+ WagnisPlayer::WagnisPlayer(Context* context) : OrxonoxClass(context){
+ RegisterObject(WagnisPlayer);
+ }
+ //Destructor
+ WagnisPlayer::~WagnisPlayer(){
+
+ }
+ //Manages a Players turn
+ void WagnisPlayer::playerTurn(WagnisGameboard* gameBoard){
+
+ }
+ //
+ void WagnisPlayer::setTroops(WagnisGameboard* gameBoard,WagnisProvince* prov){
+
+ }
+ void WagnisPlayer::attack(WagnisGameboard* gameBoard,WagnisProvince* own,WagnisProvince* target){
+
+ }
+ void WagnisPlayer::moveTroops(WagnisGameboard* gameBoard,WagnisProvince* current,WagnisProvince* target){
+
+ }
+ //Return a "Player x" String
+ std::string WagnisPlayer::toString(){
+ std::string str = "Player ";
+ str.append(std::to_string(Player_ID);
+ return str;
+ }
+}
Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h 2018-10-31 10:32:03 UTC (rev 12069)
@@ -0,0 +1,39 @@
+
+
+
+
+
+#ifndef Wagnis_Player_h
+#define Wagnis_Player_h
+
+#include "OrxonoxPrereqs.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include <vector>
+#include <string>
+
+
+
+namespace orxonox
+{
+ class WagnisPlayer : public OrxonoxClass
+ {
+ public:
+ WagnisPlayer(Context*);
+ virtual ~WagnisPlayer();
+
+ void playerTurn(WagnisGameboard*);
+ bool checkMove(WagnisGameboard*,WagnisProvince*,WagnisProvince*)
+ void setTroops(WagnisGameboard*,WagnisProvince*);
+ void attack(WagnisGameboard*,WagnisProvince*,WagnisProvince*);
+ void moveTroops(WagnisGameboard*,WagnisProvince*,WagnisProvince*);
+ std::string toString();
+
+ private:
+ int Player_ID;
+
+ };
+}
+
+
+#endif
More information about the Orxonox-commit
mailing list