Class: CodebreakerVk::GameProcess
- Inherits:
-
Object
- Object
- CodebreakerVk::GameProcess
- Defined in:
- lib/codebreaker_vk/game_process.rb
Instance Attribute Summary collapse
-
#matches ⇒ Object
readonly
Returns the value of attribute matches.
Instance Method Summary collapse
-
#initialize(secret_code, user_code) ⇒ GameProcess
constructor
A new instance of GameProcess.
Constructor Details
#initialize(secret_code, user_code) ⇒ GameProcess
Returns a new instance of GameProcess.
9 10 11 12 13 14 15 16 17 |
# File 'lib/codebreaker_vk/game_process.rb', line 9 def initialize(secret_code, user_code) @secret_code = secret_code.clone @user_code = user_code @exact_matches = 0 @number_matches = 0 @matches = obtain_matches end |
Instance Attribute Details
#matches ⇒ Object (readonly)
Returns the value of attribute matches.
7 8 9 |
# File 'lib/codebreaker_vk/game_process.rb', line 7 def matches @matches end |