summaryrefslogtreecommitdiffstats
path: root/desktop/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-31 01:51:59 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-31 01:51:59 +0100
commit8244dd3748900fa7beb3dd78a62382fc21989a2c (patch)
tree78accbb97f1e8d2d22249ea309bcc8f7f72b8442 /desktop/src/ch/asynk/rustanddust
parent3d1f6cbaabf630f5a334f43183ff75e06fbf1ee5 (diff)
downloadRustAndDust-8244dd3748900fa7beb3dd78a62382fc21989a2c.zip
RustAndDust-8244dd3748900fa7beb3dd78a62382fc21989a2c.tar.gz
Backend: add init(), getMyId() and getOpponentId()
Diffstat (limited to 'desktop/src/ch/asynk/rustanddust')
-rw-r--r--desktop/src/ch/asynk/rustanddust/desktop/DesktopBackend.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/src/ch/asynk/rustanddust/desktop/DesktopBackend.java b/desktop/src/ch/asynk/rustanddust/desktop/DesktopBackend.java
index 4b54056..610ac6d 100644
--- a/desktop/src/ch/asynk/rustanddust/desktop/DesktopBackend.java
+++ b/desktop/src/ch/asynk/rustanddust/desktop/DesktopBackend.java
@@ -1,10 +1,23 @@
package ch.asynk.rustanddust.desktop;
+import ch.asynk.rustanddust.RustAndDust;
import ch.asynk.rustanddust.Backend;
public class DesktopBackend implements Backend
{
+ private int me;
+ private int opponent;
+
public DesktopBackend()
{
}
+
+ public int getMyId() { return me; }
+ public int getOpponentId() { return opponent; }
+
+ public void init(RustAndDust game)
+ {
+ me = game.db.storePlayerGetId("me", "myself", "I");
+ opponent = game.db.storePlayerGetId("opponent", "other", "you");
+ }
}