studio_game_ma 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bfb69edd7124ece933aac372fdfcd0db6d6db0e4c288948eae6fe5219c03ad79
4
+ data.tar.gz: 6c406ccd2d63ace08d322edbc62f3d9ea3dd4d612f7bce28adb131839b6170b9
5
+ SHA512:
6
+ metadata.gz: e27b9c3fb1a4c11a5ac5ad0bd922f162f9649aa0ae395ada507d30d007aef31a049ed0ad0237c71099616931490cb8a807f5c49d97b320ca5358e502cda362e1
7
+ data.tar.gz: c8c3f6aec5bde13f487fc0009a44972007f09a59e8067880a2cfc40015226cd1774b6477f955518839ecf73be1fe32445dc8fc163e340b10e8ec71a95e6acf74
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2023 MA
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
data/README ADDED
@@ -0,0 +1,6 @@
1
+ This is an example application based off The Pragmatic Studio's
2
+ Ruby Programming course.
3
+
4
+ http://pragmaticstudio.com
5
+
6
+ See the LICENSE file for Copyright
data/bin/players.csv ADDED
@@ -0,0 +1,3 @@
1
+ Alvin,100
2
+ Simon,60
3
+ Theo,125
data/bin/studio_game ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/studio_game/game'
4
+ require_relative '../lib/studio_game/clumsy_player'
5
+ require_relative '../lib/studio_game/berserk_player'
6
+
7
+ knuckleheads = StudioGame::Game.new("Knuckleheads")
8
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
9
+ knuckleheads.load_players(ARGV.shift || default_player_file)
10
+
11
+ klutz = StudioGame::ClumsyPlayer.new("klutz", 105)
12
+ berserker = StudioGame::BerserkPlayer.new("berserker", 50)
13
+
14
+ knuckleheads.add_player(klutz)
15
+ knuckleheads.add_player(berserker)
16
+
17
+ loop do
18
+ puts "\nHow many game rounds? ('quit' to exit)"
19
+ answer = gets.chomp.downcase
20
+ case answer
21
+ when /^\d+$/
22
+ knuckleheads.play(answer.to_i)
23
+ when 'quit', 'exit'
24
+ knuckleheads.print_stats
25
+ break
26
+ else
27
+ puts "Please enter a number or 'quit'"
28
+ end
29
+ end
30
+
31
+ knuckleheads.save_high_scores
@@ -0,0 +1,7 @@
1
+ module StudioGame
2
+ module Auditable
3
+ def audit
4
+ puts "Rolled a #{self.number} (#{self.class})"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,31 @@
1
+ require_relative 'player'
2
+
3
+ module StudioGame
4
+ class BerserkPlayer < Player
5
+ def initialize(name, health=100)
6
+ super(name, health)
7
+ @w00t_count = 0
8
+ end
9
+
10
+ def berserk?
11
+ @w00t_count > 5
12
+ end
13
+
14
+ def w00t
15
+ super
16
+ @w00t_count +=1
17
+ puts "#{@name} is berserk!" if berserk?
18
+ end
19
+
20
+ def blam
21
+ berserk? ? w00t : super
22
+ end
23
+ end
24
+ end
25
+
26
+ if __FILE__ == $0
27
+ berserker = BerserkPlayer.new("berserker", 50)
28
+ 6.times { berserker.w00t }
29
+ 2.times { berserker.blam }
30
+ puts berserker.health
31
+ end
@@ -0,0 +1,35 @@
1
+ require_relative 'player'
2
+
3
+ module StudioGame
4
+ class ClumsyPlayer < Player
5
+ attr_reader :boost_factor
6
+
7
+ def initialize(name, health=100, boost_factor=1)
8
+ super(name, health)
9
+ @boost_factor = boost_factor
10
+ end
11
+
12
+ def w00t
13
+ @boost_factor.times { super }
14
+ end
15
+
16
+ def found_treasure(treasure)
17
+ damaged_treasure = Treasure.new(treasure.name, treasure.points / 2.0)
18
+ super(damaged_treasure)
19
+ end
20
+ end
21
+ end
22
+
23
+ if __FILE__ == $0
24
+ clumsy = StudioGame::ClumsyPlayer.new("klutz")
25
+ hammer = StudioGame::Treasure.new(:hammer, 50)
26
+ clumsy.found_treasure(hammer)
27
+ clumsy.found_treasure(hammer)
28
+ clumsy.found_treasure(hammer)
29
+ crowbar = StudioGame::Treasure.new(:crowbar, 400)
30
+ clumsy.found_treasure(crowbar)
31
+ clumsy.each_found_treasure do |treasure|
32
+ puts "#{treasure.points} total #{treasure.name} points"
33
+ end
34
+ puts "#{clumsy.points} grand total points"
35
+ end
@@ -0,0 +1,24 @@
1
+ require_relative 'auditable'
2
+
3
+ module StudioGame
4
+ class Die
5
+ include Auditable
6
+
7
+ attr_reader :number
8
+
9
+ def initialize
10
+ roll
11
+ end
12
+
13
+ def roll
14
+ @number = rand(1..6)
15
+ end
16
+ end
17
+ end
18
+
19
+ if __FILE__ == $0
20
+ die = StudioGame::Die.new
21
+ puts die.roll
22
+ puts die.roll
23
+ puts die.roll
24
+ end
@@ -0,0 +1,103 @@
1
+ require_relative "player"
2
+ require_relative "die"
3
+ require_relative 'game_turn'
4
+
5
+ module StudioGame
6
+ class Game
7
+ attr_accessor :title
8
+
9
+ def initialize(title)
10
+ @title = title
11
+ @players = []
12
+ end
13
+
14
+ def add_player(player)
15
+ @players << player
16
+ end
17
+
18
+ def load_players(from_file)
19
+ File.readlines(from_file).each do |line|
20
+ add_player(Player.from_csv(line))
21
+
22
+ end
23
+ end
24
+
25
+ def save_high_scores(to_file="high_scores.txt")
26
+ File.open(to_file, "w") do |file|
27
+ file.puts "#{@title} High Scores:"
28
+ @players.sort.each do |player|
29
+ file.puts high_score_entry(player)
30
+ end
31
+ end
32
+ end
33
+
34
+ def high_score_entry(player)
35
+ formatted_name = player.name.ljust(20, '.')
36
+ "#{formatted_name} #{player.score}"
37
+ end
38
+
39
+ def pluralize(count)
40
+ count == 1 ? "" : "s"
41
+ end
42
+
43
+ def play(rounds)
44
+ puts "There #{@players.size == 1 ? "is " : "are "}#{@players.size} player#{pluralize(@players.size)} in #{self.title}."
45
+
46
+ @players.each { |player| puts player }
47
+
48
+ treasures = TreasureTrove::TREASURES
49
+ puts "\nThere are #{treasures.size} treasures to be found:"
50
+ treasures.each do |treasure|
51
+ puts "A #{treasure.name} is worth #{treasure.points} points"
52
+ end
53
+
54
+
55
+ 1.upto(rounds) do |round|
56
+ puts "\nRound #{round}:"
57
+ @players.each do |player|
58
+ GameTurn.take_turn(player)
59
+ end
60
+ end
61
+ end
62
+
63
+
64
+ def print_name_and_health(player)
65
+ puts "#{player.name} (#{player.health})"
66
+ end
67
+
68
+ def print_stats
69
+ strong_players = @players.select { |player| player.strong? }
70
+ wimpy_players = @players.reject { |player| player.strong? }
71
+
72
+ puts "\n#{@title} Statistics:"
73
+
74
+ @players.each do |player|
75
+ puts high_score_entry(player)
76
+ end
77
+
78
+ @players.sort.each do |player|
79
+ puts "\n#{player.name}'s point totals:"
80
+ player.each_found_treasure do |treasure|
81
+ puts "#{treasure.points} total #{treasure.name} points"
82
+ end
83
+ puts "#{player.points} grand total points"
84
+ end
85
+
86
+ puts "\n#{strong_players.size} strong players:"
87
+ strong_players.each do |player|
88
+ print_name_and_health(player)
89
+ end
90
+
91
+ puts "\n#{wimpy_players.size} wimpy players:"
92
+ wimpy_players.each do |player|
93
+ print_name_and_health(player)
94
+ end
95
+
96
+ puts "\n#{@title} High Scores:"
97
+ @players.sort.each do |player|
98
+ formatted_name = player.name.ljust(20, '.')
99
+ puts "#{formatted_name} #{player.score}"
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,22 @@
1
+ require_relative 'player'
2
+ require_relative 'die'
3
+ require_relative 'treasure_trove'
4
+
5
+ module StudioGame
6
+ module GameTurn
7
+ def self.take_turn(player)
8
+ die = Die.new
9
+ case die.roll
10
+ when 1..2
11
+ player.blam
12
+ when 3..4
13
+ puts "#{player.name} was skipped."
14
+ else
15
+ player.w00t
16
+ end
17
+
18
+ treasure = TreasureTrove.random
19
+ player.found_treasure(treasure)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,16 @@
1
+ require_relative 'auditable'
2
+
3
+ module StudioGame
4
+ class LoadedDie
5
+ include Auditable
6
+
7
+ attr_reader :number
8
+
9
+ def roll
10
+ numbers = [1, 1, 2, 5, 6, 6]
11
+ @number = numbers.sample
12
+ audit
13
+ @number
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ module StudioGame
2
+ module Playable
3
+ def w00t
4
+ self.health += 15
5
+ puts "#{name} got w00ted!"
6
+ end
7
+
8
+ def blam
9
+ self.health -= 10
10
+ puts "#{name} got blammed!"
11
+ end
12
+
13
+ def strong?
14
+ self.health > 100
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,64 @@
1
+ require_relative 'treasure_trove'
2
+ require_relative 'playable'
3
+
4
+ module StudioGame
5
+ class Player
6
+ include Playable
7
+
8
+ attr_accessor :name
9
+ attr_accessor :health
10
+
11
+ def initialize(name, health = 100)
12
+ @name = name.capitalize
13
+ @health = health
14
+ @found_treasures = Hash.new(0)
15
+ end
16
+
17
+ def name=(new_name)
18
+ @name = new_name.capitalize
19
+ end
20
+
21
+ def to_s
22
+ "I'm #{@name} with health = #{@health}, points = #{points}, and score = #{score}."
23
+ end
24
+
25
+ def score
26
+ @health + points
27
+ end
28
+
29
+ def <=>(other_player)
30
+ other_player.health <=> @health
31
+ end
32
+
33
+ def found_treasure(treasure)
34
+ @found_treasures[treasure.name] += treasure.points
35
+ puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
36
+ puts "#{@name}'s treasures: #{@found_treasures}"
37
+ end
38
+
39
+ def each_found_treasure
40
+ @found_treasures.each do |name, points|
41
+ yield Treasure.new(name, points)
42
+ end
43
+ end
44
+
45
+ def points
46
+ @found_treasures.values.reduce(0, :+)
47
+ end
48
+
49
+ def self.from_csv(string)
50
+ name, health = string.split(',')
51
+ Player.new(name, Integer(health))
52
+ end
53
+ end
54
+
55
+ if __FILE__ == $0
56
+ player = Player.new("moe")
57
+ puts player.name
58
+ puts player.health
59
+ player.w00t
60
+ puts player.health
61
+ player.blam
62
+ puts player.health
63
+ end
64
+ end
@@ -0,0 +1,18 @@
1
+ module StudioGame
2
+ Treasure = Struct.new(:name, :points)
3
+
4
+ module TreasureTrove
5
+ TREASURES = [
6
+ Treasure.new(:pie, 5),
7
+ Treasure.new(:bottle, 25),
8
+ Treasure.new(:hammer, 50),
9
+ Treasure.new(:skillet, 100),
10
+ Treasure.new(:broomstick, 200),
11
+ Treasure.new(:crowbar, 400)
12
+ ]
13
+
14
+ def self.random
15
+ TREASURES.sample
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,31 @@
1
+ require 'studio_game/berserk_player'
2
+
3
+ module StudioGame
4
+ describe BerserkPlayer do
5
+
6
+ before do
7
+ @initial_health = 50
8
+ @player = BerserkPlayer.new("berserker", @initial_health)
9
+ end
10
+
11
+ it "does not go berserk when w00ted up to 5 times" do
12
+ 1.upto(5) { @player.w00t }
13
+
14
+ @player.berserk?.should be_false
15
+ end
16
+
17
+ it "goes berserk when w00ted more than 5 times" do
18
+ 1.upto(6) { @player.w00t }
19
+
20
+ @player.berserk?.should be_true
21
+ end
22
+
23
+ it "gets w00ted instead of blammed when it's gone berserk" do
24
+ 1.upto(6) { @player.w00t }
25
+ 1.upto(2) { @player.blam }
26
+
27
+ @player.health.should == @initial_health + (8 * 15)
28
+ end
29
+
30
+ end
31
+ end
@@ -0,0 +1,49 @@
1
+ require 'studio_game/clumsy_player'
2
+ module StudioGame
3
+ describe ClumsyPlayer do
4
+ before do
5
+ @player = ClumsyPlayer.new("klutz")
6
+ end
7
+
8
+ it "only gets half the point value for each treasure" do
9
+ @player.points.should == 0
10
+
11
+ hammer = Treasure.new(:hammer, 50)
12
+ @player.found_treasure(hammer)
13
+ @player.found_treasure(hammer)
14
+ @player.found_treasure(hammer)
15
+
16
+ @player.points.should == 75
17
+
18
+ crowbar = Treasure.new(:crowbar, 400)
19
+ @player.found_treasure(crowbar)
20
+
21
+ @player.points.should == 275
22
+
23
+ yielded = []
24
+ @player.each_found_treasure do |treasure|
25
+ yielded << treasure
26
+ end
27
+
28
+ yielded.should == [Treasure.new(:hammer, 75), Treasure.new(:crowbar, 200)]
29
+ end
30
+
31
+ context "with a boost factor" do
32
+ before do
33
+ @initial_health = 100
34
+ @boost_factor = 5
35
+ @player = ClumsyPlayer.new("klutz", @initial_health, @boost_factor)
36
+ end
37
+
38
+ it "has a boost factor" do
39
+ @player.boost_factor.should == 5
40
+ end
41
+
42
+ it "gets boost factor number of w00ts when w00ted" do
43
+ @player.w00t
44
+
45
+ @player.health.should == @initial_health + (15 * @boost_factor)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,50 @@
1
+ require 'studio_game/game'
2
+
3
+ module StudioGame
4
+ describe Game do
5
+ before do
6
+ $stdout = StringIO.new
7
+ @game = Game.new("Knuckleheads")
8
+
9
+ @initial_health = 100
10
+ @player = Player.new("moe", @initial_health)
11
+
12
+ @game.add_player(@player)
13
+ end
14
+
15
+ it "w00ts the player if a high number is rolled" do
16
+ Die.any_instance.stub(:roll).and_return(5)
17
+
18
+ @game.play(2)
19
+
20
+ @player.health.should == @initial_health + (15 * 2)
21
+ end
22
+
23
+ it "skips the player if a medium number is rolled" do
24
+ Die.any_instance.stub(:roll).and_return(3)
25
+
26
+ @game.play(2)
27
+
28
+ @player.health.should == @initial_health
29
+ end
30
+
31
+ it "blams the player if a low number is rolled" do
32
+ Die.any_instance.stub(:roll).and_return(1)
33
+
34
+ @game.play(2)
35
+
36
+ @player.health.should == @initial_health - (10 * 2)
37
+ end
38
+
39
+ it "assigns a treasure for points during a player's turn" do
40
+ game = Game.new("Knuckleheads")
41
+ player = Player.new("moe")
42
+
43
+ game.add_player(player)
44
+
45
+ game.play(1)
46
+
47
+ player.points.should_not be_zero
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,120 @@
1
+ require 'studio_game/player'
2
+ require 'studio_game/treasure_trove'
3
+
4
+ module StudioGame
5
+ describe Player do
6
+ before do
7
+ $stdout = StringIO.new
8
+ @initial_health = 150
9
+ @player = Player.new("larry", @initial_health)
10
+ end
11
+ it "has a capitalized name" do
12
+ @player.name.should == "Larry"
13
+ end
14
+
15
+ it "has an initial health" do
16
+ @player.health.should == 150
17
+ end
18
+
19
+ it "has a string representation" do
20
+ @player.found_treasure(Treasure.new(:hammer, 50))
21
+ @player.found_treasure(Treasure.new(:hammer, 50))
22
+
23
+ @player.to_s.should == "I'm Larry with health = 150, points = 100, and score = 250."
24
+ end
25
+
26
+ it "computes a score as the sum of its health and points" do
27
+ @player.found_treasure(Treasure.new(:hammer, 50))
28
+ @player.found_treasure(Treasure.new(:hammer, 50))
29
+
30
+ @player.score.should == 250
31
+ end
32
+
33
+ it "increases health by 15 when w00ted" do
34
+ @player.w00t
35
+
36
+ @player.health.should == @initial_health + 15
37
+ end
38
+
39
+ it "decreases health by 10 when blammed" do
40
+ @player.blam
41
+
42
+ @player.health.should == @initial_health - 10
43
+ end
44
+
45
+ context "with a health greater than 100" do
46
+ before { @player = Player.new("larry", 150) }
47
+
48
+ it "is strong" do
49
+ @player.should be_strong
50
+ end
51
+ end
52
+
53
+ context "with a health of 100 or less" do
54
+ before { @player = Player.new("larry", 100) }
55
+
56
+ it "is wimpy" do
57
+ @player.should_not be_strong
58
+ end
59
+ end
60
+
61
+ context "in a collection of players" do
62
+ before do
63
+ @player1 = Player.new("moe", 100)
64
+ @player2 = Player.new("larry", 200)
65
+ @player3 = Player.new("curly", 300)
66
+
67
+ @players = [@player1, @player2, @player3]
68
+ end
69
+
70
+ it "is sorted by decreasing score" do
71
+ @players.sort.should == [@player3, @player2, @player1]
72
+ end
73
+ end
74
+
75
+ it "computes points as the sum of all treasure points" do
76
+ @player.points.should == 0
77
+
78
+ @player.found_treasure(Treasure.new(:hammer, 50))
79
+
80
+ @player.points.should == 50
81
+
82
+ @player.found_treasure(Treasure.new(:crowbar, 400))
83
+
84
+ @player.points.should == 450
85
+
86
+ @player.found_treasure(Treasure.new(:hammer, 50))
87
+
88
+ @player.points.should == 500
89
+ end
90
+
91
+ it "yields each found treasure and its total points" do
92
+ @player.found_treasure(Treasure.new(:skillet, 100))
93
+ @player.found_treasure(Treasure.new(:skillet, 100))
94
+ @player.found_treasure(Treasure.new(:hammer, 50))
95
+ @player.found_treasure(Treasure.new(:bottle, 5))
96
+ @player.found_treasure(Treasure.new(:bottle, 5))
97
+ @player.found_treasure(Treasure.new(:bottle, 5))
98
+ @player.found_treasure(Treasure.new(:bottle, 5))
99
+ @player.found_treasure(Treasure.new(:bottle, 5))
100
+
101
+ yielded = []
102
+ @player.each_found_treasure do |treasure|
103
+ yielded << treasure
104
+ end
105
+
106
+ yielded.should == [
107
+ Treasure.new(:skillet, 200),
108
+ Treasure.new(:hammer, 50),
109
+ Treasure.new(:bottle, 25)
110
+ ]
111
+ end
112
+
113
+ it "can be created from a CSV string" do
114
+ player = Player.from_csv("larry,150")
115
+
116
+ player.name.should == "Larry"
117
+ player.health.should == 150
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,50 @@
1
+ require 'studio_game/treasure_trove'
2
+ module StudioGame
3
+ describe Treasure do
4
+
5
+ before do
6
+ @treasure = Treasure.new(:hammer, 50)
7
+ end
8
+
9
+ it "has a name attribute" do
10
+ @treasure.name.should == :hammer
11
+ end
12
+
13
+ it "has a points attribute" do
14
+ @treasure.points.should == 50
15
+ end
16
+
17
+ end
18
+
19
+ describe TreasureTrove do
20
+
21
+ it "has six treasures" do
22
+ TreasureTrove::TREASURES.size.should == 6
23
+ end
24
+
25
+ it "has a pie worth 5 points" do
26
+ TreasureTrove::TREASURES[0].should == Treasure.new(:pie, 5)
27
+ end
28
+
29
+ it "has a bottle worth 25 points" do
30
+ TreasureTrove::TREASURES[1].should == Treasure.new(:bottle, 25)
31
+ end
32
+
33
+ it "has a hammer worth 50 points" do
34
+ TreasureTrove::TREASURES[2].should == Treasure.new(:hammer, 50)
35
+ end
36
+
37
+ it "has a skillet worth 100 points" do
38
+ TreasureTrove::TREASURES[3].should == Treasure.new(:skillet, 100)
39
+ end
40
+
41
+ it "has a broomstick worth 200 points" do
42
+ TreasureTrove::TREASURES[4].should == Treasure.new(:broomstick, 200)
43
+ end
44
+
45
+ it "has a crowbar worth 400 points" do
46
+ TreasureTrove::TREASURES[5].should == Treasure.new(:crowbar, 400)
47
+ end
48
+
49
+ end
50
+ end
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: studio_game_ma
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - MA
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-06-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.8.0
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.8.0
33
+ description: |
34
+ This is an example application based off The Pragmatic Studio's
35
+ Ruby Programming course.
36
+
37
+ http://pragmaticstudio.com
38
+
39
+ See the LICENSE file for Copyright
40
+ email: the_mackison@hotmail.com
41
+ executables:
42
+ - studio_game
43
+ extensions: []
44
+ extra_rdoc_files: []
45
+ files:
46
+ - LICENSE
47
+ - README
48
+ - bin/players.csv
49
+ - bin/studio_game
50
+ - lib/studio_game/auditable.rb
51
+ - lib/studio_game/berserk_player.rb
52
+ - lib/studio_game/clumsy_player.rb
53
+ - lib/studio_game/die.rb
54
+ - lib/studio_game/game.rb
55
+ - lib/studio_game/game_turn.rb
56
+ - lib/studio_game/loaded_die.rb
57
+ - lib/studio_game/playable.rb
58
+ - lib/studio_game/player.rb
59
+ - lib/studio_game/treasure_trove.rb
60
+ - spec/studio_game/berserk_player_spec.rb
61
+ - spec/studio_game/clumsy_player_spec.rb
62
+ - spec/studio_game/game_spec.rb
63
+ - spec/studio_game/player_spec.rb
64
+ - spec/studio_game/treasure_trove_spec.rb
65
+ homepage: http://pragmaticstudio.com
66
+ licenses:
67
+ - MIT
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '1.9'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.2.32
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: A fun, and entirely random, text-based game
88
+ test_files:
89
+ - spec/studio_game/berserk_player_spec.rb
90
+ - spec/studio_game/clumsy_player_spec.rb
91
+ - spec/studio_game/game_spec.rb
92
+ - spec/studio_game/player_spec.rb
93
+ - spec/studio_game/treasure_trove_spec.rb