diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-19 20:57:34 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-19 20:57:34 +0100 |
commit | 3f5c54d56de87ac2afc51222dfa2373b5bb8238e (patch) | |
tree | 4c02b11c930ee9d8e3ad2e1eae53537ab53c4317 /same-android/src/main/java/com/orbekk | |
parent | 081b90f0e64ce7796692bc2b6d3528279c5a1e59 (diff) |
Start implementing GameController.
– GameController will manage the game state with more than one player,
and communicating its state with the GUI and the other players.
Diffstat (limited to 'same-android/src/main/java/com/orbekk')
-rw-r--r-- | same-android/src/main/java/com/orbekk/GameController.java | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/same-android/src/main/java/com/orbekk/GameController.java b/same-android/src/main/java/com/orbekk/GameController.java index 01ad24d..8e1e169 100644 --- a/same-android/src/main/java/com/orbekk/GameController.java +++ b/same-android/src/main/java/com/orbekk/GameController.java @@ -1,5 +1,32 @@ package com.orbekk; -public class GameController { +import java.util.ArrayList; +import java.util.List; + +import android.graphics.Paint; +public class GameController { + private List<Player> players = new ArrayList<Player>(); + private Player localPlayer; + + public static class Player { + public Paint color; + public int posX; + public int posY; + } + + public GameController(Player localPlayer) { + this.localPlayer = localPlayer; + } + + public Player getLocalPlayer() { + return localPlayer; + } + + public List<Player> getRemotePlayers() { + return players; + } + + + } |