title: Java enum class with a twist
body: <p>I have to model an object which is essentially an enum representing a game level:</p>
  
  <pre><code>public enum GameLevel {
      EASY(0, 3, 30),
      NORMAL(1, 4, 40),
      HARD(2, 5, 50);
  
      private int levelNum;
      private int size;
      private int score;
  
      private GameLevel(int levelNum, int size, int score) {
          this.levelNum = levelNum;
          this.size = size;
          this.score = score;
      }
  
      public int getLevelNum() {
          return levelNum;
      }
  
      public int getSize() {
          return size;
      }
  
      public int getScore() {
          return score;
      }
  }
  </code></pre>
  
  <p>Now my problem is that this enum exists both on my server and on my client (shared library jar).
  I'm serializing it with the full content:</p>
  
  <pre><code>level { "levelNum":0, "size":3, "score":30 }
  </code></pre>
  
  <p>I have no problem deserializing it back again to an GameLevel enum object.
  But, I would like to be able to change it on the server level (e.g: easy size = 6 instead of 3)
  and serialize it in the same way but on the client end to be able to deserialize these new values (without changing the object on the client of course, only the server is updated).</p>
  
  <p>I doesn't look like an enum is the right choice for that, but when looking at my code everything is treated in an "enum" like way.</p>