From ce96d3c2c346190f5241cbae75224dc9dbf1c9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 16 Feb 2016 16:59:20 +0100 Subject: Config: add GameMode.from --- core/src/ch/asynk/rustanddust/game/Config.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- cgit v1.1-2-g2b99