Start leaguifying
authorJBM <jbm@codingame.com>
Tue, 9 Jun 2020 16:56:04 +0000 (18:56 +0200)
committerJBM <jbm@codingame.com>
Thu, 11 Jun 2020 09:47:52 +0000 (11:47 +0200)
PLAN.org
src/main/java/com/codingame/game/LeagueManager.java [new file with mode: 0644]
src/main/java/com/codingame/game/Referee.java

index a838764..e31b52c 100644 (file)
--- a/PLAN.org
+++ b/PLAN.org
@@ -49,6 +49,7 @@
 ** DONE html for salting the seed
 ** TODO Leagues (need multiround)
 ** TODO Multiround (need early termination)
 ** DONE html for salting the seed
 ** TODO Leagues (need multiround)
 ** TODO Multiround (need early termination)
+** TODO Leaguification
 ** DONE Early termination (need time rationalization)
 ** DONE Time rationalization (need code reorg)
 ** TODO Code cleanup
 ** DONE Early termination (need time rationalization)
 ** DONE Time rationalization (need code reorg)
 ** TODO Code cleanup
diff --git a/src/main/java/com/codingame/game/LeagueManager.java b/src/main/java/com/codingame/game/LeagueManager.java
new file mode 100644 (file)
index 0000000..ed7d455
--- /dev/null
@@ -0,0 +1,23 @@
+package com.codingame.game;
+
+import com.codingame.gameengine.core.MultiplayerGameManager;
+import com.codingame.gameengine.core.AbstractMultiplayerPlayer;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+@Singleton
+class LeagueManager {
+    enum CheatLevel {
+        ALLOWED,
+        TOLERATED,
+        FORBIDDEN
+    }
+
+    CheatLevel cheatLevel;
+
+    @Inject
+    LeagueManager(MultiplayerGameManager<AbstractMultiplayerPlayer> gameManager)
+    {
+        cheatLevel = CheatLevel.FORBIDDEN;
+    }    
+}
index 3de5140..19ef894 100644 (file)
@@ -14,6 +14,7 @@ import com.google.inject.Provider;
 public class Referee extends AbstractReferee {
     @Inject private GameManager gameManager;
     @Inject private GodModeManager gm;
 public class Referee extends AbstractReferee {
     @Inject private GameManager gameManager;
     @Inject private GodModeManager gm;
+    @Inject private LeagueManager league;
 
     @Inject private View view;
     @Inject private Model model;
 
     @Inject private View view;
     @Inject private Model model;