dk_codebreaker 0.1.9.2 → 0.1.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1abe7454bca318a13ca7b4bea3965a4eeaa32aab
4
- data.tar.gz: c4c8fa78ccbae9c9f100e90f64035368c7c3c72a
3
+ metadata.gz: 86c6b05fe62a9e0a8df36b9ff540bb82be878bbe
4
+ data.tar.gz: cfb8f6abef8f07c3fc9ed6b3423d70cffad517c5
5
5
  SHA512:
6
- metadata.gz: a740bebd32d255410ef01bc3c3cd9769ab3ad5c0f999d54c0a2fdbc396a72a40005985571022e5d55ea0e8fa53031ace36a92df3db130dd8bb809f21a560acb0
7
- data.tar.gz: 9bd5217199f4dc5befd7ed68482e330039e6764d7fd5c7a0472ce1c1ad812c57ec9f278683268093e1ad40eeb1f38622c02cc942cb7f27f77c2031bee8e4a47b
6
+ metadata.gz: b93af58284e61dde22692c88c314ddf72fb9b623a7553bb82c13732b9b5538297fa12ca4d0d20e8b96ee4f3416af055718870aaad082e64f3d783f1aaa097a38
7
+ data.tar.gz: 2f3b55cb7f7ca5e10ecffdccb085d348d25e7b8bf1741374f15d88dda7d5df8047855c907b7a1d0ef0d8b136afc690d2348e650007b86789da8f7e0d6d351cd4
data/README.md CHANGED
@@ -60,11 +60,14 @@ game.hint_status
60
60
  game.attempt
61
61
  game.player
62
62
  game.player=
63
+ game.attempts
64
+ game.attempts=
63
65
  ```
64
66
 
65
67
 
66
68
  ## Implementations
67
69
  [codebreaker_console](https://github.com/DenKey/codebreaker_console)
70
+
68
71
  [codebreaker_web](https://github.com/DenKey/codebreaker_web)
69
72
 
70
73
  ## Contributing
@@ -1,7 +1,7 @@
1
1
  module DkCodebreaker
2
2
  class Game
3
3
  attr_reader :hint_status, :attempt
4
- attr_accessor :player
4
+ attr_accessor :player, :attempts
5
5
 
6
6
  def initialize player = nil, attempts = 10
7
7
  @submit_code = nil
@@ -9,7 +9,7 @@ module DkCodebreaker
9
9
  @player = player
10
10
  @attempt = 1
11
11
  @hint_status = false
12
- @limit = attempts
12
+ @attempts = attempts
13
13
  @last_result = nil
14
14
  end
15
15
 
@@ -26,7 +26,7 @@ module DkCodebreaker
26
26
  end
27
27
 
28
28
  def guess submit_code
29
- if @attempt < @limit
29
+ if @attempt < @attempts
30
30
  if submit_code.is_a? String
31
31
  return :less_then_four if submit_code.size < 4
32
32
  submit_code = submit_code[0,4] if submit_code.size > 4
@@ -57,7 +57,7 @@ module DkCodebreaker
57
57
  player: @player,
58
58
  result: @last_result,
59
59
  attempt: @attempt,
60
- attempts: @limit,
60
+ attempts: @attempts,
61
61
  time: Time.new.strftime("%m/%d/%Y/%H/%M")
62
62
  }
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module DkCodebreaker
2
- VERSION = "0.1.9.2"
2
+ VERSION = "0.1.9.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dk_codebreaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.2
4
+ version: 0.1.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Den Key
@@ -120,4 +120,3 @@ signing_key:
120
120
  specification_version: 4
121
121
  summary: Codebreaker is a logic game.
122
122
  test_files: []
123
- has_rdoc: