Method: Chadet::Play#initialize

Defined in:
lib/chadet.rb

#initialize(secret_chars_object) ⇒ Play

Returns a new instance of Play.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/chadet.rb', line 6

def initialize secret_chars_object
  @chars_set = secret_chars_object.chars_set
  @num_of_chars = secret_chars_object.num_of_chars
  @secret_chars = secret_chars_object.secret_chars
  @loaded = false
  @used_true = ""
  @used_false = ""
  @max_hint = (@chars_set.length/@num_of_chars).to_i
  @hint_used = 0
  @moves = []
end