alex_codebreaker 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +2 -1
 - data/lib/alex_codebreaker/files_config.rb +15 -0
 - data/lib/alex_codebreaker/session.rb +1 -1
 - data/lib/alex_codebreaker/version.rb +1 -1
 - data/lib/alex_codebreaker.rb +1 -0
 - metadata +2 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: a432d6f410802e9cea031e229e91c263a6ea96aa8727ee0e07d9030002db02e8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 8240100de2062d96c46596b944781125e5f41e0cd0541efdcbe98881f12c0db9
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 60490a305bf3b3cc44e2d69a872a08ff3b329b1d00743572b51d421ed3044e48d04c3fac2b5f83d51999e823d00a7d8c63f1466585fcb29dfad65fbb1ef8b8d5
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1eaeef0b3ceafe7ddb017b804fbc7632b854f8cc83102e963b7ff862dbe784d1feabec80ec850cad88005e3ac5a26b4b66677079348a78a4d823e9a298223282
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -20,7 +20,8 @@ Or install it yourself as: 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            ## Usage
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
            To config storage path add this to your app config 
     | 
| 
      
 23 
     | 
    
         
            +
            To config storage path add this to your app config
         
     | 
| 
      
 24 
     | 
    
         
            +
                 `AlexCodebreaker.configure { |config| config.storage_path = 'your/path.yml' }`
         
     | 
| 
       24 
25 
     | 
    
         | 
| 
       25 
26 
     | 
    
         
             
            Use this gem for creating amazing version of codebreaker game!
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
         @@ -0,0 +1,15 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module AlexCodebreaker
         
     | 
| 
      
 2 
     | 
    
         
            +
              class FilesConfig
         
     | 
| 
      
 3 
     | 
    
         
            +
                # rubocop:disable Style/ClassVars
         
     | 
| 
      
 4 
     | 
    
         
            +
                DEFAULT_PATH = 'stats.yml'.freeze
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                def default_path
         
     | 
| 
      
 7 
     | 
    
         
            +
                  @@default_path ||= DEFAULT_PATH
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                def default_path=(path)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @@default_path = path
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
                # rubocop:enable Style/ClassVars
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -6,7 +6,7 @@ module AlexCodebreaker 
     | 
|
| 
       6 
6 
     | 
    
         
             
                INITIAL_HINTS_USED = 0
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                attr_reader :hints_used, :attempts_used, :player_name, :hints_total,
         
     | 
| 
       9 
     | 
    
         
            -
                            :difficulty_name, :attempts_total, :difficulty_level
         
     | 
| 
      
 9 
     | 
    
         
            +
                            :difficulty_name, :attempts_total, :difficulty_level, :time
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
                def initialize
         
     | 
| 
       12 
12 
     | 
    
         
             
                  @attempts_used = INITIAL_ATTEMPTS_USED
         
     | 
    
        data/lib/alex_codebreaker.rb
    CHANGED
    
    | 
         @@ -6,6 +6,7 @@ require_relative 'alex_codebreaker/modules/settings' 
     | 
|
| 
       6 
6 
     | 
    
         
             
            require_relative 'alex_codebreaker/modules/difficulty_levels'
         
     | 
| 
       7 
7 
     | 
    
         
             
            require_relative 'alex_codebreaker/modules/validators'
         
     | 
| 
       8 
8 
     | 
    
         
             
            require_relative 'alex_codebreaker/modules/arguments_validation'
         
     | 
| 
      
 9 
     | 
    
         
            +
            require_relative 'alex_codebreaker/files_config'
         
     | 
| 
       9 
10 
     | 
    
         
             
            require_relative 'alex_codebreaker/secret_code_generator'
         
     | 
| 
       10 
11 
     | 
    
         
             
            require_relative 'alex_codebreaker/comparison'
         
     | 
| 
       11 
12 
     | 
    
         
             
            require_relative 'alex_codebreaker/players_rating'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: alex_codebreaker
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.11
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Oleksandr Loza
         
     | 
| 
         @@ -162,6 +162,7 @@ files: 
     | 
|
| 
       162 
162 
     | 
    
         
             
            - lib/alex_codebreaker.rb
         
     | 
| 
       163 
163 
     | 
    
         
             
            - lib/alex_codebreaker/comparison.rb
         
     | 
| 
       164 
164 
     | 
    
         
             
            - lib/alex_codebreaker/configuration.rb
         
     | 
| 
      
 165 
     | 
    
         
            +
            - lib/alex_codebreaker/files_config.rb
         
     | 
| 
       165 
166 
     | 
    
         
             
            - lib/alex_codebreaker/game.rb
         
     | 
| 
       166 
167 
     | 
    
         
             
            - lib/alex_codebreaker/modules/arguments_validation.rb
         
     | 
| 
       167 
168 
     | 
    
         
             
            - lib/alex_codebreaker/modules/difficulty_levels.rb
         
     |