Class: CodebreakerVk::GameProcess

Inherits:
Object
  • Object
show all
Defined in:
lib/codebreaker_vk/game_process.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#matchesObject (readonly)

Returns the value of attribute matches.



7
8
9
# File 'lib/codebreaker_vk/game_process.rb', line 7

def matches
  @matches
end