public GameDifficulty find_game_difficulty_by(string difficulty_name)
        {
            GameDifficulty game_difficulty;

            switch (difficulty_name)
            {
                case  "easy" :
                    game_difficulty = new GameDifficulty(new MinefieldSize(9, 9), 10);
                    break;
                case "medium":
                    game_difficulty = new GameDifficulty(new MinefieldSize(16, 16), 40);
                    break;
                case "hard":
                    game_difficulty = new GameDifficulty(new MinefieldSize(30, 16), 99);
                    break;
                default :
                    game_difficulty = new GameDifficulty(new MinefieldSize(9, 9), 10);
                    break;
            }

            return game_difficulty;
        }
Beispiel #2
0
 public MinePlanter(ICoordinatePicker random_coordinate_picker, GameDifficulty game_difficulty)
 {
     _game_difficulty          = game_difficulty;
     _random_coordinate_picker = random_coordinate_picker;
 }
 public IMinePlanter create_for(GameDifficulty game_difficulty)
 {
     return new MinePlanter(_coordinatePicker, game_difficulty);
 }
 public MinePlanter(ICoordinatePicker random_coordinate_picker, GameDifficulty game_difficulty)
 {
     _game_difficulty = game_difficulty;
     _random_coordinate_picker = random_coordinate_picker;
 }
 public IMinePlanter create_for(GameDifficulty game_difficulty)
 {
     return(new MinePlanter(_coordinatePicker, game_difficulty));
 }
 public GameOptions(GameDifficulty game_difficulty, Guid game_id)
 {
     this.game_difficulty = game_difficulty;
     this.player_id       = game_id;
 }