Leaguify cheating
[troll.git] / src / main / java / com / codingame / game / LeagueManager.java
index ed7d455..94a7f5f 100644 (file)
@@ -18,6 +18,9 @@ class LeagueManager {
     @Inject
     LeagueManager(MultiplayerGameManager<AbstractMultiplayerPlayer> gameManager)
     {
-        cheatLevel = CheatLevel.FORBIDDEN;
+        int level = gameManager.getLeagueLevel();
+        cheatLevel = level <= 1 ? CheatLevel.ALLOWED
+                   : level <= 2 ? CheatLevel.TOLERATED
+                   : CheatLevel.FORBIDDEN;
     }    
 }