Categories: None [Edit]
studio_game_dylan_attal
## Studio Game Demo App
I made this app following along with The Pragmatic Studio's Ruby course found here: https://pragmaticstudio.com/courses/ruby.
## Install the gem
I published the gem for this app on RubyGems.org. In order to install it, run
`gem install studio_game_dylan_attal-1.0.0.gem`
## Run the app
In order to run the app run the following command
`studio_game`
## Summary
This is a console app that simulates a game.
Players are loaded from the `players.csv` file be default. Each player has a name and a starting health value, i.e.:
`Larry,100`
If the user wants, they can provide a different CSV file to load the players. For example, I've provided a file `my_favorite_players.csv` as an alternate list of players. The user should provide the file like so
`studio_game bin/my_favorite_players.csv`
Before the game is played, the user gets to decide how many rounds to play. At this point, the user can also terminate the program by typing in `quit` or `exit`:
`How many game rounds? ('quit to exit')`
Once the user provides the number of rounds, the game is played automatically. The user then sees
1. Which players are involved
```
There are 5 players in Knuckleheads:
I'm Boba with a health = 100, points = 0, and score = 100.
I'm Jango with a health = 90, points = 0, and score = 90.
I'm Din with a health = 80, points = 0, and score = 80.
I'm Klutz with a health = 105, points = 0, and score = 105.
I'm Berserker with a health = 50, points = 0, and score = 50.
```
2. Which treasures there are to find
```
There are 6 treasures to be found:
A pie is worth 5
A bottle is worth 25
A hammer is worth 50
A skillet is worth 100
A broomstick is worth 200
A crowbar is worth 400
```
3. The results of each round
```
Round 1
Rolled a 3 (StudioGame::Die)
Rolled a 4 (StudioGame::Die)
Boba has been skipped
Boba found a skillet worth 100 points.
Boba's treasures: {:skillet=>100}
I'm Boba with a health = 100, points = 100, and score = 200.
Rolled a 3 (StudioGame::Die)
Rolled a 2 (StudioGame::Die)
Jango got blammed!...
Total
Ranking: 165,806 of 180,404
Downloads: 2,183
Daily
Ranking: 80,697 of 180,385
Downloads: 2
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Depends on
Rank | Downloads | Name |
---|---|---|
23 | 765,651,376 | rspec |
Owners
# | Gravatar | Handle |
---|---|---|
1 | DylanAttal |