Just won my first Wagic network game :)

In details:
- I removed my player swap idea, it caused tons of issues with randoms
- instead I simply keep both peer on the exact same game and added one single parameter allowing to configure the view on the game. So, each peer is rendering the same game (gameObserver class) from a different player point of view (DuelLayers and related classes).
- a lot of gui stuff are missing to prevent user forbidden interactions but it works fine on Windows
This commit is contained in:
Xawotihs@gmail.com
2013-01-26 16:42:16 +00:00
parent db0f401ba5
commit f45c8e1d41
12 changed files with 112 additions and 94 deletions

View File

@@ -11,12 +11,14 @@
class GameObserver;
class Player;
class DuelLayers;
class GuiLayer
{
protected:
JButton mActionButton;
GameObserver* observer;
DuelLayers* mpDuelLayers;
public:
int mCurr;
vector<JGuiObject *> mObjects;
@@ -28,6 +30,7 @@ public:
virtual void resetObjects();
int getMaxId();
GuiLayer(GameObserver *observer);
GuiLayer(DuelLayers *duelLayers);
virtual ~GuiLayer();
virtual void Update(float dt);
virtual bool CheckUserInput(JButton key)