Skip to content
Snippets Groups Projects
Select Git revision
  • 48381f4007dd9278b2742c23b9b3a8867ca33ee8
  • master default protected
  • 61-upgrade-framework-and-dependencies
  • 42-improve-app-metadata
  • 17-improve-and-complete-offline-words-list-and-tips
  • 6-allow-translate-application
  • 9-improve-documentation
  • Release_1.10.0_44 protected
  • Release_1.9.2_43 protected
  • Release_1.9.1_42 protected
  • Release_1.9.0_41 protected
  • Release_1.8.0_40 protected
  • Release_1.7.0_39 protected
  • Release_1.6.0_38 protected
  • Release_1.5.2_37 protected
  • Release_1.5.1_36 protected
  • Release_1.5.0_35 protected
  • Release_1.4.1_34 protected
  • Release_1.4.0_33 protected
  • Release_1.3.2_32 protected
  • Release_1.3.1_31 protected
  • Release_1.3.0_30 protected
  • Release_1.2.18_29 protected
  • Release_1.2.17_28 protected
  • Release_1.2.16_27 protected
  • Release_1.2.15_26 protected
  • Release_1.2.14_25 protected
27 results

home.dart

Blame
  • default_game_settings.dart 1.35 KiB
    class DefaultGameSettings {
      static const List<String> availableParameters = [
        'boardSize',
        'colorsCount',
      ];
    
      static const int boardSizeValueSmall = 6;
      static const int boardSizeValueMedium = 10;
      static const int boardSizeValueLarge = 14;
      static const int boardSizeValueExtraLarge = 18;
    
      static const int defaultBoardSizeValue = boardSizeValueMedium;
      static const List<int> allowedBoardSizeValues = [
        boardSizeValueSmall,
        boardSizeValueMedium,
        boardSizeValueLarge,
        boardSizeValueExtraLarge,
      ];
    
      static const int colorsCountValueLow = 5;
      static const int colorsCountValueMedium = 6;
      static const int colorsCountValueHigh = 7;
      static const int colorsCountValueVeryHigh = 8;
    
      static const int defaultColorsCountValue = colorsCountValueMedium;
      static const List<int> allowedColorsCountValues = [
        colorsCountValueLow,
        colorsCountValueMedium,
        colorsCountValueHigh,
        colorsCountValueVeryHigh,
      ];
    
      static List<int> getAvailableValues(String parameterCode) {
        switch (parameterCode) {
          case 'boardSize':
            return DefaultGameSettings.allowedBoardSizeValues;
          case 'colorsCount':
            return DefaultGameSettings.allowedColorsCountValues;
        }
    
        print('Did not find any available value for game parameter \"' + parameterCode + '\".');
        return [];
      }
    
      static int blockMinimumCellsCount = 3;
    }