From 3f5c54d56de87ac2afc51222dfa2373b5bb8238e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Thu, 19 Jan 2012 20:57:34 +0100 Subject: Start implementing GameController. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – GameController will manage the game state with more than one player, and communicating its state with the GUI and the other players. --- .../src/main/java/com/orbekk/GameController.java | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'same-android/src/main/java/com') 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 players = new ArrayList(); + 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 getRemotePlayers() { + return players; + } + + + } -- cgit v1.2.3