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