summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-16 16:59:20 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-16 16:59:20 +0100
commitce96d3c2c346190f5241cbae75224dc9dbf1c9d8 (patch)
treece2f54438723271ef94712902f4a9e2daf839b22 /core
parentebc82f8e2bfc9f6ecbf8c6ae31f097c410b06534 (diff)
downloadRustAndDust-ce96d3c2c346190f5241cbae75224dc9dbf1c9d8.zip
RustAndDust-ce96d3c2c346190f5241cbae75224dc9dbf1c9d8.tar.gz
Config: add GameMode.from
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Config.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Config.java b/core/src/ch/asynk/rustanddust/game/Config.java
index cbfeeff..cc148db 100644
--- a/core/src/ch/asynk/rustanddust/game/Config.java
+++ b/core/src/ch/asynk/rustanddust/game/Config.java
@@ -55,6 +55,15 @@ public class Config
return PVP;
return SOLO;
}
+ public static GameMode from(int i)
+ {
+ GameMode r = SOLO;
+ switch(i) {
+ case 1: r = PVE; break;
+ case 2: r = PVP; break;
+ }
+ return r;
+ }
};
public GameMode gameMode;