dk_codebreaker 0.1.9.1 → 0.1.9.2

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: a19482e3efec2cf23b3560010fc970b3ae8dc8cc
4
- data.tar.gz: 901f93f686a2c462c01843a88fd36fe52fafbc57
3
+ metadata.gz: 1abe7454bca318a13ca7b4bea3965a4eeaa32aab
4
+ data.tar.gz: c4c8fa78ccbae9c9f100e90f64035368c7c3c72a
5
5
  SHA512:
6
- metadata.gz: 295aa782a3c09bd5bc709fe2f78722eeb2d9a339a0664616034a9b5ddb8c412f8d34d0fa70ee47bfcfe5b4a94377eab8a3f8fff960b7f8ca1b0349dd40e377a7
7
- data.tar.gz: 02a2b071c7dbadcb83da804e051d074342056efb8146f02ca4d77062112bb24bad912be8e8be47f3dc086a72340d3e3d0287d43a9fdbf7deac822fef03f21591
6
+ metadata.gz: a740bebd32d255410ef01bc3c3cd9769ab3ad5c0f999d54c0a2fdbc396a72a40005985571022e5d55ea0e8fa53031ace36a92df3db130dd8bb809f21a560acb0
7
+ data.tar.gz: 9bd5217199f4dc5befd7ed68482e330039e6764d7fd5c7a0472ce1c1ad812c57ec9f278683268093e1ad40eeb1f38622c02cc942cb7f27f77c2031bee8e4a47b
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install dk_codebreaker
24
24
 
25
- ## Usage
25
+ ## Quick documentation
26
26
 
27
27
  ```ruby
28
28
  # create game instace, it get user name and attempts
@@ -47,7 +47,12 @@ game.guess user_code
47
47
  # return [hint String]
48
48
  game.hint
49
49
 
50
- # Return data about user in format [last_result,name,attempts used,attempts count, date]
50
+ # Return Hash with user data {player,result,attempt,attempts,time}
51
+ # :player - username
52
+ # :result - last game result
53
+ # :attempt - current attempt number
54
+ # :attempts - limitation of trying
55
+ # :time - "%m/%d/%Y/%H/%M"
51
56
  game.user_data
52
57
 
53
58
  # Getters and Setters
@@ -57,9 +62,14 @@ game.player
57
62
  game.player=
58
63
  ```
59
64
 
65
+
66
+ ## Implementations
67
+ [codebreaker_console](https://github.com/DenKey/codebreaker_console)
68
+ [codebreaker_web](https://github.com/DenKey/codebreaker_web)
69
+
60
70
  ## Contributing
61
71
 
62
- Bug reports and pull requests are welcome on GitHub at https://github.com/KrDenis/dk_codebreaker
72
+ Bug reports and pull requests are welcome on GitHub at https://github.com/DenKey/dk_codebreaker
63
73
 
64
74
 
65
75
  ## License
@@ -1,7 +1,6 @@
1
1
  module DkCodebreaker
2
2
  class Game
3
- attr_reader :hint_status
4
- attr_reader :attempt
3
+ attr_reader :hint_status, :attempt
5
4
  attr_accessor :player
6
5
 
7
6
  def initialize player = nil, attempts = 10
@@ -54,7 +53,13 @@ module DkCodebreaker
54
53
  end
55
54
 
56
55
  def user_data
57
- [@last_result, @player, @attempt, @limit, Time.new.strftime("%m/%d/%Y/%H/%M")]
56
+ {
57
+ player: @player,
58
+ result: @last_result,
59
+ attempt: @attempt,
60
+ attempts: @limit,
61
+ time: Time.new.strftime("%m/%d/%Y/%H/%M")
62
+ }
58
63
  end
59
64
 
60
65
  private
@@ -1,3 +1,3 @@
1
1
  module DkCodebreaker
2
- VERSION = "0.1.9.1"
2
+ VERSION = "0.1.9.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dk_codebreaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.1
4
+ version: 0.1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Den Key
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-21 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -120,3 +120,4 @@ signing_key:
120
120
  specification_version: 4
121
121
  summary: Codebreaker is a logic game.
122
122
  test_files: []
123
+ has_rdoc: