treasure_adventure_game 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +22 -1
- data/spec/treasure_game/berserk_player_spec.rb +1 -0
- data/spec/treasure_game/clumsy_player_spec.rb +2 -0
- metadata +25 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b3bde6562f5b364154239927d02a9e3495ee5390342ea8cca46c82f9bb6ad320
|
|
4
|
+
data.tar.gz: 2be11561dc9f1559951af11fa34cf078219d06917540c783fb103a0d0d90240e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d970a6c5db5c1f20198ad574e8fa5e3167ea764135d011d349fae8e799276b04412b2df741ea14b5bfafec478c28b629fb7fb77f132c2008c020f1bb124b3e9
|
|
7
|
+
data.tar.gz: 1f2f2de883cb2cf697a72a23ca10cc35b2ca6fa4f262c21e0848bc3b66ea64a730b080ef2fb6b20531f9b93d78d6702dc10a5b39cf2b0d826bc048c48316a964
|
data/README.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
This is a fun treasure game written in the Ruby programming language.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Getting Started
|
|
4
|
+
1. Install gem:
|
|
5
|
+
|
|
6
|
+
$ gem install treasure_adventure_game
|
|
7
|
+
|
|
8
|
+
2. At the command prompt:
|
|
9
|
+
|
|
10
|
+
$ treasure_game
|
|
11
|
+
|
|
12
|
+
## Playing the game
|
|
13
|
+
Enter a number for the number of game rounds you'd like to play. Enter `quit` to exit and see a listing of the high scores. The program will also write output to a `high_scores.txt` file.
|
|
14
|
+
|
|
15
|
+
## Upload your own players
|
|
16
|
+
You have the option to load your own players into the game by passing a `csv` file as an argument:
|
|
17
|
+
|
|
18
|
+
$ treasure_game my_players.csv
|
|
19
|
+
|
|
20
|
+
Your `csv` file should be formatted with player names and initial health numbers. For example:
|
|
21
|
+
|
|
22
|
+
Bob,100
|
|
23
|
+
George,60
|
|
24
|
+
Sally,125
|
|
@@ -4,6 +4,7 @@ module TreasureGame
|
|
|
4
4
|
describe ClumsyPlayer do
|
|
5
5
|
before do
|
|
6
6
|
@player = ClumsyPlayer.new("klutz")
|
|
7
|
+
$stdout = StringIO.new
|
|
7
8
|
end
|
|
8
9
|
|
|
9
10
|
it "only gets half the point value for each treasure" do
|
|
@@ -34,6 +35,7 @@ module TreasureGame
|
|
|
34
35
|
@initial_health = 100
|
|
35
36
|
@boost_factor = 5
|
|
36
37
|
@player = ClumsyPlayer.new("klutz", @initial_health, @boost_factor)
|
|
38
|
+
$stdout = StringIO.new
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
it "has a boost factor" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: treasure_adventure_game
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zack Strickland
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -27,7 +27,28 @@ dependencies:
|
|
|
27
27
|
description: |
|
|
28
28
|
This is a fun treasure game written in the Ruby programming language.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
## Getting Started
|
|
31
|
+
1. Install gem:
|
|
32
|
+
|
|
33
|
+
$ gem install treasure_adventure_game
|
|
34
|
+
|
|
35
|
+
2. At the command prompt:
|
|
36
|
+
|
|
37
|
+
$ treasure_game
|
|
38
|
+
|
|
39
|
+
## Playing the game
|
|
40
|
+
Enter a number for the number of game rounds you'd like to play. Enter `quit` to exit and see a listing of the high scores. The program will also write output to a `high_scores.txt` file.
|
|
41
|
+
|
|
42
|
+
## Upload your own players
|
|
43
|
+
You have the option to load your own players into the game by passing a `csv` file as an argument:
|
|
44
|
+
|
|
45
|
+
$ treasure_game my_players.csv
|
|
46
|
+
|
|
47
|
+
Your `csv` file should be formatted with player names and initial health numbers. For example:
|
|
48
|
+
|
|
49
|
+
Bob,100
|
|
50
|
+
George,60
|
|
51
|
+
Sally,125
|
|
31
52
|
email: zack.a.strickland@gmail.com
|
|
32
53
|
executables:
|
|
33
54
|
- treasure_game
|
|
@@ -73,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
73
94
|
version: '0'
|
|
74
95
|
requirements: []
|
|
75
96
|
rubyforge_project:
|
|
76
|
-
rubygems_version: 2.6
|
|
97
|
+
rubygems_version: 2.7.6
|
|
77
98
|
signing_key:
|
|
78
99
|
specification_version: 4
|
|
79
100
|
summary: A fun treasure game.
|