dk_codebreaker 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -7
- data/dk_codebreaker.gemspec +1 -1
- data/lib/dk_codebreaker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e442ac10480363c5c66ed9118058637adf0ba332
|
4
|
+
data.tar.gz: 46fb24ee02cb16af4160ae88c3d04e2f290e900e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cc42536683f1d4dc017527dcc057bdf5f440d1f842bee782fe9849c299c1e41e27a53bbe19fa8821c09dc211c7ca5d314fe9a2c7c97886a12df9ac42ee43be1
|
7
|
+
data.tar.gz: f82a43c14856f5a2cc8b667ee031185ed4a5993c51e5a249c4d38baa2f87c3c6ea0446b149ac283e6d238313d621d7f7fbdef1010e4a4b1236ccaa9f06515c38
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# DkCodebreaker
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/dk_codebreaker.svg)](https://badge.fury.io/rb/dk_codebreaker)
|
4
4
|
|
5
|
-
|
5
|
+
Codebreaker is a logic game in which a code-breaker tries to break a secret code created by a code-maker.The code-maker, which will be played by the application we’re going to write, creates a secret code of four numbers between 1 and 6.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,17 +22,43 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
```ruby
|
26
|
+
# create game instace, it get user name and attempts
|
27
|
+
|
28
|
+
game = DkCodebreaker::Game.new(name,attempts)
|
29
|
+
|
30
|
+
# this will generete Code
|
31
|
+
|
32
|
+
game.start
|
33
|
+
|
34
|
+
# set attempts score to nil and regenerate Code
|
35
|
+
|
36
|
+
game.restart
|
26
37
|
|
27
|
-
|
38
|
+
# enter user answer as string
|
39
|
+
# Return [position_number String] or error code:
|
40
|
+
### :less_then_four
|
41
|
+
### :guess_has_symbol
|
42
|
+
### :code_not_string
|
43
|
+
### :you_lose
|
28
44
|
|
29
|
-
|
45
|
+
game.guess user_code
|
30
46
|
|
31
|
-
|
47
|
+
# return [hint String]
|
48
|
+
|
49
|
+
game.hint
|
50
|
+
|
51
|
+
# Return data about user in format [name,attempts used,attempts count, date]
|
52
|
+
|
53
|
+
game.user_data
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
```
|
32
58
|
|
33
59
|
## Contributing
|
34
60
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/KrDenis/dk_codebreaker
|
36
62
|
|
37
63
|
|
38
64
|
## License
|
data/dk_codebreaker.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = %q{Dk_Codebreaker is a logic game in which a code-breaker tries to break a secret code created by a code-maker.
|
14
14
|
The code-maker, which will be played by the application we’re going to write,
|
15
15
|
creates a secret code of four numbers between 1 and 6.}
|
16
|
-
spec.homepage = "https://github.com/KrDenis"
|
16
|
+
spec.homepage = "https://github.com/KrDenis/dk_codebreaker"
|
17
17
|
spec.license = "MIT"
|
18
18
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
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.
|
4
|
+
version: 0.1.7
|
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-
|
11
|
+
date: 2016-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,7 +87,7 @@ files:
|
|
87
87
|
- dk_codebreaker.gemspec
|
88
88
|
- lib/dk_codebreaker.rb
|
89
89
|
- lib/dk_codebreaker/version.rb
|
90
|
-
homepage: https://github.com/KrDenis
|
90
|
+
homepage: https://github.com/KrDenis/dk_codebreaker
|
91
91
|
licenses:
|
92
92
|
- MIT
|
93
93
|
metadata: {}
|