public static GameMode CreateGameMode(GameModeDescription description)
 {
     switch (description.Mode)
     {
         case (GameModes.TargetScore):
             return new TargetScoreGameMode(description);
         case (GameModes.TargetPlace):
             return new TargetPlaceGameMode(description);
         case (GameModes.TargetChuzzle):
             return new TargetChuzzleGameMode(description);
         default:
             throw new ArgumentOutOfRangeException("Not correct gammode" + description.Mode);
     }
 }
 public TargetPlaceGameMode(GameModeDescription description)
     : base(description)
 {
 }
 public TargetChuzzleGameMode(GameModeDescription description)
     : base(description)
 {
     Amount = TargetAmount = description.Amount;
 }
 public TargetScoreGameMode(GameModeDescription description)
     : base(description)
 {
     TargetScore = description.TargetScore;
 }
Exemple #5
0
 protected GameMode(GameModeDescription description)
 {
     Description = description;
     Turns = StartTurns = description.Turns;
 }