studio_game_am 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: 3d7c9421b7045b938e12ff5d46ebd15dfeedc316319b903c667cf5421ebdc420
4
+ data.tar.gz: '00984072796b0e62a77e7aec26ff246a65548fd997ecaeda0845f751ec2a57df'
5
+ SHA512:
6
+ metadata.gz: 26f1e55849439a46e481cdd9d5b634230839f27e86295d94ad7fd5668b65724f7517cc090c396b7354d328165cbef7ca9ed88d7a5f68448a9e12a529eb96203f
7
+ data.tar.gz: 7b9bfa14aa5d210650471151874f2be65da2ff46cba81ea7528504237e08e57c2c23799613e5edb9d063b8944d17de0fd18548608975d2e3faa65911e3e6c842
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2019 Ashley Martin
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
File without changes
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,33 @@
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
+ game = StudioGame::Game.new("Knuckleheads")
8
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
9
+ game.load_players(ARGV.shift || default_player_file)
10
+
11
+ klutz = StudioGame::ClumsyPlayer.new("klutz", 105, 3)
12
+ # game.add_player(klutz)
13
+
14
+ berserker = StudioGame::BerserkPlayer.new("berserker", 50)
15
+ # game.add_player(berserker)
16
+
17
+ loop do
18
+ puts "\nHow many rounds? ('quit' to exit)"
19
+ answer = gets.chomp.downcase
20
+ case answer
21
+ when /^\d+$/
22
+ game.play(answer.to_i) do
23
+ # game.total_points >= 2000
24
+ end
25
+ when 'quit', 'exit'
26
+ game.print_stats
27
+ break
28
+ else
29
+ puts "Please enter a number or 'quit'"
30
+ end
31
+ end
32
+
33
+ game.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
+
25
+ if __FILE__ == $0
26
+ berserker = BerserkPlayer.new("berserker", 50)
27
+ 6.times { berserker.w00t }
28
+ 2.times { berserker.blam }
29
+ puts berserker.health
30
+ end
31
+ end
@@ -0,0 +1,37 @@
1
+ require_relative 'player'
2
+
3
+ module StudioGame
4
+ class ClumsyPlayer < Player
5
+ def initialize(name, health=100, boost_factor=1)
6
+ super(name, health)
7
+ @boost_factor = boost_factor
8
+ end
9
+
10
+ def found_treasure(treasure)
11
+ damaged_treasure = Treasure.new(treasure.name, treasure.points / 2.0)
12
+ super(damaged_treasure)
13
+ end
14
+
15
+ def w00t
16
+ @boost_factor.times { super }
17
+ end
18
+ end
19
+
20
+ # the following only runs the enclosing code if the name of the current source file (__FILE__) is the same as the name of the Ruby program file being run ($0 or $PROGRAM_NAME)
21
+ if __FILE__ == $0
22
+ clumsy = ClumsyPlayer.new("klutz")
23
+
24
+ hammer = Treasure.new(:hammer, 50)
25
+ clumsy.found_treasure(hammer)
26
+ clumsy.found_treasure(hammer)
27
+ clumsy.found_treasure(hammer)
28
+
29
+ crowbar = Treasure.new(:crowbar, 400)
30
+ clumsy.found_treasure(crowbar)
31
+
32
+ clumsy.each_found_treasure do |treasure|
33
+ puts "#{treasure.points} total #{treasure.name} points"
34
+ end
35
+ puts "#{clumsy.points} grand total points"
36
+ end
37
+ end
@@ -0,0 +1,17 @@
1
+ require_relative 'auditable'
2
+
3
+ module StudioGame
4
+ class Die
5
+ include Auditable
6
+
7
+ attr_reader :number
8
+
9
+ def roll
10
+ @number = rand(1..6)
11
+ audit
12
+ @number
13
+ end
14
+ end
15
+ end
16
+
17
+ # we don't need an initialize method because instance variables spring into existence when you assign to them. On the other hand, we want our die to always have a valid number between 1 and 6 even if it hasn't been rolled yet.
@@ -0,0 +1,100 @@
1
+ require_relative 'player'
2
+ require_relative 'game_turn'
3
+
4
+ module StudioGame
5
+ class Game
6
+ attr_reader :title
7
+
8
+ def initialize(title)
9
+ @title = title
10
+ @players = []
11
+ end
12
+
13
+ def add_player(player)
14
+ @players << player
15
+ end
16
+
17
+ def load_players(from_file)
18
+ File.readlines(from_file).each do |line|
19
+ add_player(Player.from_csv(line))
20
+ end
21
+ end
22
+
23
+ def play(rounds)
24
+ puts "There are #{@players.size} players in #{@title}:"
25
+ puts @players
26
+
27
+ treasures = TreasureTrove::TREASURES
28
+
29
+ puts "\nThere are #{treasures.size} treasures to be found"
30
+
31
+ treasures.each do |treasure|
32
+ puts "A #{treasure.name} is worth #{treasure.points} points"
33
+ end
34
+
35
+ 1.upto(rounds) do |round|
36
+ if block_given?
37
+ break if yield
38
+ end
39
+ puts "\nRound #{round}:"
40
+ @players.each do |player|
41
+ GameTurn.take_turn(player)
42
+ puts player
43
+ end
44
+ end
45
+ end
46
+
47
+ def print_name_and_health(player)
48
+ puts "#{player.name} (#{player.health})"
49
+ end
50
+
51
+ def high_score_entry(player)
52
+ formatted_name = player.name.ljust(20, '.')
53
+ "#{formatted_name} #{player.score}"
54
+ end
55
+
56
+ def print_stats
57
+ strong_players, wimpy_players = @players.partition { |player| player.strong? }
58
+
59
+ puts "\n#{@title} Statistics:"
60
+
61
+ puts "\n#{strong_players.size} strong players"
62
+ strong_players.each do |player|
63
+ print_name_and_health(player)
64
+ end
65
+
66
+ puts "\n#{wimpy_players.size} wimpy players"
67
+ wimpy_players.each do |player|
68
+ print_name_and_health(player)
69
+ end
70
+
71
+ puts "\n#{title} High Scores:"
72
+ @players.sort.each do |player|
73
+ puts high_score_entry(player)
74
+ end
75
+
76
+ @players.each do |player|
77
+ puts "\n#{player.name}'s points totals:"
78
+ player.each_found_treasure do |treasure|
79
+ puts "#{treasure.points} total #{treasure.name} points"
80
+ end
81
+ puts "#{player.points} grand total points"
82
+ end
83
+
84
+ puts "\n#{total_points} total points from treasures found"
85
+ end
86
+
87
+ def total_points
88
+ @players.reduce(0) { |sum, player| sum + player.points }
89
+ end
90
+
91
+ def save_high_scores(to_file='high_scores.txt')
92
+ File.open(to_file, "w") do |file|
93
+ file.puts "#{@title} High Scores:"
94
+ @players.sort.each do |player|
95
+ file.puts high_score_entry(player)
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,23 @@
1
+ require_relative 'player'
2
+ require_relative 'die'
3
+ require_relative 'loaded_die'
4
+ require_relative 'treasure_trove'
5
+
6
+ module StudioGame
7
+ module GameTurn
8
+ def self.take_turn(player)
9
+ die = Die.new
10
+ case die.roll
11
+ when 1..2
12
+ player.blam
13
+ when 3..4
14
+ puts "#{player.name} was skipped"
15
+ else
16
+ player.w00t
17
+ end
18
+
19
+ treasure = TreasureTrove.random
20
+ player.found_treasure(treasure)
21
+ end
22
+ end
23
+ 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 wooted!"
6
+ end
7
+
8
+ def blam
9
+ self.health -= 10
10
+ puts "#{name} got blammed!"
11
+ end
12
+
13
+ def strong?
14
+ health > 100
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,53 @@
1
+ require_relative 'treasure_trove'
2
+ require_relative 'playable'
3
+
4
+ module StudioGame
5
+ class Player
6
+ include Playable
7
+
8
+ attr_reader :name
9
+ attr_accessor :health
10
+
11
+ def initialize(name, health=100)
12
+ @health = health
13
+ @name = name.capitalize
14
+ @found_treasures = Hash.new(0)
15
+ end
16
+
17
+ def self.from_csv(string)
18
+ name, health = string.split(',')
19
+ Player.new(name, Integer(health))
20
+ end
21
+
22
+ def name=(new_name)
23
+ @name = new_name.capitalize
24
+ end
25
+
26
+ def to_s
27
+ "I'm #{@name} with a health = #{@health}, points = #{points} and a score = #{score}."
28
+ end
29
+
30
+ def score
31
+ @health + points
32
+ end
33
+
34
+ def <=>(other)
35
+ other.score <=> score
36
+ end
37
+
38
+ def found_treasure(treasure)
39
+ @found_treasures[treasure.name] += treasure.points
40
+ puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
41
+ end
42
+
43
+ def points
44
+ @found_treasures.values.reduce(0, :+)
45
+ end
46
+
47
+ def each_found_treasure
48
+ @found_treasures.each do |name, points|
49
+ yield Treasure.new(name, points)
50
+ end
51
+ end
52
+ end
53
+ 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
+ $stdout = StringIO.new
8
+ @initial_health = 50
9
+ @player = BerserkPlayer.new("berserker", @initial_health)
10
+ end
11
+
12
+ it "does not go berserk when w00ted up to 5 times" do
13
+ 1.upto(5) { @player.w00t }
14
+
15
+ expect(@player.berserk?).to be_falsey
16
+ end
17
+
18
+ it "goes berserk when w00ted more than 5 times" do
19
+ 1.upto(6) { @player.w00t }
20
+
21
+ expect(@player.berserk?).to be_truthy
22
+ end
23
+
24
+ it "gets w00ted instead of blammed when it's gone berserk" do
25
+ 1.upto(6) { @player.w00t }
26
+ 1.upto(2) { @player.blam }
27
+
28
+ expect(@player.health).to eq(@initial_health + (8 * 15))
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,47 @@
1
+ require 'studio_game/clumsy_player'
2
+
3
+ module StudioGame
4
+ describe ClumsyPlayer do
5
+ before do
6
+ @player = ClumsyPlayer.new("klutz")
7
+ end
8
+
9
+ it "only gets half the point value for each treasure" do
10
+ expect(@player.points).to eq(0)
11
+
12
+ hammer = Treasure.new(:hammer, 50)
13
+ @player.found_treasure(hammer)
14
+ @player.found_treasure(hammer)
15
+ @player.found_treasure(hammer)
16
+
17
+ expect(@player.points).to eq(75)
18
+
19
+ crowbar = Treasure.new(:crowbar, 400)
20
+ @player.found_treasure(crowbar)
21
+
22
+ expect(@player.points).to eq(275)
23
+
24
+ yielded = []
25
+ @player.each_found_treasure do |treasure|
26
+ yielded << treasure
27
+ end
28
+
29
+ expect(yielded).to eq([Treasure.new(:hammer, 75), Treasure.new(:crowbar, 200)])
30
+ end
31
+
32
+
33
+ context "with a boost factor" do
34
+ before do
35
+ @initial_health = 100
36
+ @boost_factor = 5
37
+ @player = ClumsyPlayer.new("klutz", @initial_health, @boost_factor)
38
+ end
39
+
40
+ it "gets boost factor number of w00ts when w00ted" do
41
+ @player.w00t
42
+
43
+ expect(@player.health).to eq(@initial_health + (15 * @boost_factor))
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,65 @@
1
+ require 'studio_game/game'
2
+
3
+ module StudioGame
4
+ describe Game do
5
+ before do
6
+ @game = Game.new("Knuckleheads")
7
+
8
+ @initial_health = 100
9
+ @player = Player.new("moe", @initial_health)
10
+
11
+ @game.add_player(@player)
12
+ end
13
+
14
+ it "w00ts the player if a high number is rolled" do
15
+ allow_any_instance_of(Die).to receive(:roll).and_return(5)
16
+
17
+ @game.play(2)
18
+
19
+ expect(@player.health).to eq(@initial_health + 2 * 15)
20
+ end
21
+
22
+ it "skips the player if a medium number is rolled" do
23
+ allow_any_instance_of(Die).to receive(:roll).and_return(3)
24
+
25
+ @game.play(1)
26
+
27
+ expect(@player.health).to eq(@initial_health)
28
+ end
29
+
30
+ it "blams the player if a low number is rolled" do
31
+ allow_any_instance_of(Die).to receive(:roll).and_return(1)
32
+
33
+ @game.play(2)
34
+
35
+ expect(@player.health).to eq(@initial_health - 2 * 10)
36
+ end
37
+
38
+ it "assigns a treasure for points during a player's turn" do
39
+ game = Game.new("Knuckleheads")
40
+ player = Player.new("moe")
41
+
42
+ game.add_player(player)
43
+
44
+ game.play(1)
45
+
46
+ expect(player.points).not_to be_zero
47
+ end
48
+
49
+ it "computes total points as the sum of all player points" do
50
+ game = Game.new("Knuckleheads")
51
+
52
+ player1 = Player.new("moe")
53
+ player2 = Player.new("larry")
54
+
55
+ game.add_player(player1)
56
+ game.add_player(player2)
57
+
58
+ player1.found_treasure(Treasure.new(:hammer, 50))
59
+ player1.found_treasure(Treasure.new(:hammer, 50))
60
+ player2.found_treasure(Treasure.new(:crowbar, 400))
61
+
62
+ expect(game.total_points).to eq(500)
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,138 @@
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
+
12
+ it "has a capitalized name" do
13
+ expect(@player.name).to eq("Larry")
14
+ end
15
+
16
+ it "has an initial health" do
17
+ expect(@player.health).to eq(150)
18
+ end
19
+
20
+ it "has a string representation" do
21
+ @player.found_treasure(Treasure.new(:hammer, 50))
22
+ @player.found_treasure(Treasure.new(:hammer, 50))
23
+
24
+ expect(@player.to_s).to eq("I'm Larry with a health = 150, points = 100 and a score = 250.")
25
+ end
26
+
27
+ it "computes a score as the sum of its health and points" do
28
+ @player.found_treasure(Treasure.new(:hammer, 50))
29
+ @player.found_treasure(Treasure.new(:hammer, 50))
30
+
31
+ expect(@player.score).to eq(150 + 100)
32
+ end
33
+
34
+ it "increases health by 15 when w00ted" do
35
+ @player.w00t
36
+
37
+ expect(@player.health).to eq(@initial_health + 15)
38
+ end
39
+
40
+ it "decreases health by 10 when blammed" do
41
+ @player.blam
42
+
43
+ expect(@player.health).to eq(@initial_health - 10)
44
+ end
45
+
46
+ context "created with a default health" do
47
+ before do
48
+ @player = Player.new("larry")
49
+ end
50
+
51
+ it "has a health of 100" do
52
+ expect(@player.health).to eq(100)
53
+ end
54
+ end
55
+
56
+ context "with a health greater than 100" do
57
+ before do
58
+ @player = Player.new("larry", 150)
59
+ end
60
+
61
+ it "is strong" do
62
+ # expect(@player.strong?).to eq(true)
63
+
64
+ # with some sugar
65
+ expect(@player).to be_strong
66
+ end
67
+ end
68
+
69
+ context "with a health of 100" do
70
+ before do
71
+ @player = Player.new("larry", 100)
72
+ end
73
+
74
+ it "is not strong" do
75
+ expect(@player).not_to be_strong
76
+ end
77
+ end
78
+
79
+ context "in a collection of players" do
80
+ before do
81
+ @player1 = Player.new("moe", 100)
82
+ @player2 = Player.new("larry", 200)
83
+ @player3 = Player.new("curly", 300)
84
+
85
+ @players = [@player1, @player2, @player3]
86
+ end
87
+
88
+ it "is sorted by decreasing order" do
89
+ expect(@players.sort).to eq([@player3, @player2, @player1])
90
+ end
91
+ end
92
+
93
+ it "computes points as the sum of all treasure points" do
94
+ expect(@player.points).to eq(0)
95
+
96
+ @player.found_treasure(Treasure.new(:hammer, 50))
97
+
98
+ expect(@player.points).to eq(50)
99
+
100
+ @player.found_treasure(Treasure.new(:crowbar, 400))
101
+
102
+ expect(@player.points).to eq(450)
103
+
104
+ @player.found_treasure(Treasure.new(:hammer, 50))
105
+
106
+ expect(@player.points).to eq(500)
107
+ end
108
+
109
+ it "yields each found treasure and its total points" do
110
+ @player.found_treasure(Treasure.new(:skillet, 100))
111
+ @player.found_treasure(Treasure.new(:skillet, 100))
112
+ @player.found_treasure(Treasure.new(:hammer, 50))
113
+ @player.found_treasure(Treasure.new(:bottle, 5))
114
+ @player.found_treasure(Treasure.new(:bottle, 5))
115
+ @player.found_treasure(Treasure.new(:bottle, 5))
116
+ @player.found_treasure(Treasure.new(:bottle, 5))
117
+ @player.found_treasure(Treasure.new(:bottle, 5))
118
+
119
+ yielded = []
120
+ @player.each_found_treasure do |treasure|
121
+ yielded << treasure
122
+ end
123
+
124
+ expect(yielded).to eq([
125
+ Treasure.new(:skillet, 200),
126
+ Treasure.new(:hammer, 50),
127
+ Treasure.new(:bottle, 25)
128
+ ])
129
+ end
130
+
131
+ it "can be created from a csv string" do
132
+ player = Player.from_csv("larry,150")
133
+
134
+ expect(player.name).to eq("Larry")
135
+ expect(player.health).to eq(150)
136
+ end
137
+ end
138
+ end
@@ -0,0 +1,53 @@
1
+ require 'studio_game/treasure_trove'
2
+
3
+ module StudioGame
4
+ describe Treasure do
5
+ before do
6
+ @treasure = Treasure.new(:hammer, 50)
7
+ end
8
+
9
+ it "has a name attribute" do
10
+ expect(@treasure.name).to eq(:hammer)
11
+ end
12
+
13
+ it "has a points attribute" do
14
+ expect(@treasure.points).to eq(50)
15
+ end
16
+ end
17
+
18
+ describe TreasureTrove do
19
+ it "has six treasures" do
20
+ expect(TreasureTrove::TREASURES.size).to eq(6)
21
+ end
22
+
23
+ it "has a pie worth 5 points" do
24
+ expect(TreasureTrove::TREASURES[0]).to eq(Treasure.new(:pie, 5))
25
+ end
26
+
27
+ it "has a bottle worth 25 points" do
28
+ expect(TreasureTrove::TREASURES[1]).to eq(Treasure.new(:bottle, 25))
29
+ end
30
+
31
+ it "has a hammer worth 50 points" do
32
+ expect(TreasureTrove::TREASURES[2]).to eq(Treasure.new(:hammer, 50))
33
+ end
34
+
35
+ it "has a skillet worth 100 points" do
36
+ expect(TreasureTrove::TREASURES[3]).to eq(Treasure.new(:skillet, 100))
37
+ end
38
+
39
+ it "has a broomstick worth 200 points" do
40
+ expect(TreasureTrove::TREASURES[4]).to eq(Treasure.new(:broomstick, 200))
41
+ end
42
+
43
+ it "has a crowbar worth 400 points" do
44
+ expect(TreasureTrove::TREASURES[5]).to eq(Treasure.new(:crowbar, 400))
45
+ end
46
+
47
+ it "returns a random treasure" do
48
+ treasure = TreasureTrove.random
49
+
50
+ expect(TreasureTrove::TREASURES).to include(treasure)
51
+ end
52
+ end
53
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: studio_game_am
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ashley Martin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-10-03 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: 3.8.0
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '3.8'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 3.8.0
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.8'
33
+ description: ''
34
+ email:
35
+ executables:
36
+ - studio_game
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - LICENSE
41
+ - README
42
+ - bin/players.csv
43
+ - bin/studio_game
44
+ - lib/studio_game/auditable.rb
45
+ - lib/studio_game/berserk_player.rb
46
+ - lib/studio_game/clumsy_player.rb
47
+ - lib/studio_game/die.rb
48
+ - lib/studio_game/game.rb
49
+ - lib/studio_game/game_turn.rb
50
+ - lib/studio_game/loaded_die.rb
51
+ - lib/studio_game/playable.rb
52
+ - lib/studio_game/player.rb
53
+ - lib/studio_game/treasure_trove.rb
54
+ - spec/studio_game/berserk_player_spec.rb
55
+ - spec/studio_game/clumsy_player_spec.rb
56
+ - spec/studio_game/game_spec.rb
57
+ - spec/studio_game/player_spec.rb
58
+ - spec/studio_game/treasure_trove_spec.rb
59
+ homepage: https://rubygems.org
60
+ licenses:
61
+ - MIT
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '2.5'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.0.6
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: A simple text-based game from one of Pragmatic Studio's ruby courses.
82
+ test_files:
83
+ - spec/studio_game/clumsy_player_spec.rb
84
+ - spec/studio_game/treasure_trove_spec.rb
85
+ - spec/studio_game/berserk_player_spec.rb
86
+ - spec/studio_game/player_spec.rb
87
+ - spec/studio_game/game_spec.rb