studio_game_john 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (C) 2013 John Strack
2
+
3
+ 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:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ 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,6 @@
1
+ This is an example application used in The Pragmatic Studio's
2
+ Ruby Programming course, as described at
3
+
4
+ http://pragmaticstudio.com
5
+
6
+ This code is Copyright 2012 The Pragmatic Studio. See the LICENSE file.
data/bin/players.csv ADDED
@@ -0,0 +1,3 @@
1
+ Alvin,100
2
+ simon,60
3
+ Theodore,125
data/bin/studio_game ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/studio_game/game'
4
+ require_relative '../lib/studio_game/player'
5
+
6
+ #player1 = Player.new("moe")
7
+ #player2 = Player.new("larry", 60)
8
+ #player3 = Player.new("curly", 125)
9
+ #player4 = Player.new("shemp", 90)
10
+
11
+ knuckleheads = StudioGame::Game.new("Knuckleheads")
12
+
13
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
14
+ knuckleheads.load_players(ARGV.shift || default_player_file)
15
+ #knuckleheads.add_player(player1)
16
+ #knuckleheads.add_player(player2)
17
+ #knuckleheads.add_player(player3)
18
+ #knuckleheads.add_player(player4)
19
+ loop do
20
+ puts "\nHow many game rounds? ('quit' to exit)"
21
+ answer = gets.chomp.downcase
22
+ case answer
23
+ when /^\d+$/
24
+ knuckleheads.play(answer.to_i)
25
+ when 'quit', 'exit'
26
+ knuckleheads.print_statistics
27
+ break
28
+ else
29
+ puts "Please enter a number or 'quit'."
30
+
31
+ end
32
+ end
33
+
34
+ knuckleheads.save_high_scores
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/studio_game/game'
4
+ require_relative '../lib/studio_game/player'
5
+
6
+ #player1 = Player.new("moe")
7
+ #player2 = Player.new("larry", 60)
8
+ #player3 = Player.new("curly", 125)
9
+ #player4 = Player.new("shemp", 90)
10
+
11
+ knuckleheads = StudioGame::Game.new("Knuckleheads")
12
+
13
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
14
+ knuckleheads.load_players(ARGV.shift || default_player_file)
15
+ #knuckleheads.add_player(player1)
16
+ #knuckleheads.add_player(player2)
17
+ #knuckleheads.add_player(player3)
18
+ #knuckleheads.add_player(player4)
19
+ loop do
20
+ puts "\nHow many game rounds? ('quit' to exit)"
21
+ answer = gets.chomp.downcase
22
+ case answer
23
+ when /^\d+$/
24
+ knuckleheads.play(answer.to_i)
25
+ when 'quit', 'exit'
26
+ knuckleheads.print_statistics
27
+ break
28
+ else
29
+ puts "Please enter a number or 'quit'."
30
+
31
+ end
32
+ end
33
+
34
+ knuckleheads.save_high_scores
@@ -0,0 +1,34 @@
1
+ require_relative 'player'
2
+
3
+ class BerserkPlayer < Player
4
+
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 beserk!" if berserk?
18
+ end
19
+
20
+ def blam
21
+ if berserk?
22
+ w00t
23
+ else
24
+ super
25
+ end
26
+ end
27
+ end
28
+
29
+ if __FILE__ == $0
30
+ berserker = BerserkPlayer.new("berserker", 50)
31
+ 6.times { berserker.w00t }
32
+ 2.times { berserker.blam }
33
+ puts berserker.health
34
+ end
@@ -0,0 +1,39 @@
1
+ require_relative 'player'
2
+ require_relative 'treasure_trove'
3
+
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
+
21
+ end
22
+
23
+ if __FILE__ == $0
24
+ clumsy = ClumsyPlayer.new("klutz")
25
+
26
+ hammer = Treasure.new(:hammer, 50)
27
+ clumsy.found_treasure(hammer)
28
+ clumsy.found_treasure(hammer)
29
+ clumsy.found_treasure(hammer)
30
+
31
+ crowbar = Treasure.new(:crowbar, 400)
32
+ clumsy.found_treasure(crowbar)
33
+
34
+ clumsy.each_found_treasure do |treasure|
35
+ puts "#{treasure.points} total #{treasure.name} points"
36
+ end
37
+ puts "#{clumsy.points} grand total points"
38
+ puts "#{clumsy.boost_factor} is the boost_factor"
39
+ end
@@ -0,0 +1,20 @@
1
+ module StudioGame
2
+ class Die
3
+ attr_reader :number
4
+
5
+ def initialize
6
+ roll
7
+ end
8
+
9
+ def roll
10
+ @number = rand(1..6)
11
+ end
12
+ end
13
+ end
14
+
15
+ if __FILE__ == $0
16
+ die = Die.new
17
+ puts die.roll
18
+ puts die.roll
19
+ puts die.roll
20
+ end
@@ -0,0 +1,107 @@
1
+ require_relative 'player'
2
+ require_relative 'die'
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 high_score_entry(player)
17
+ formatted_name = player.name.ljust(20, '.')
18
+ "#{formatted_name} #{player.score}"
19
+ end
20
+
21
+ def load_players(from_file)
22
+ File.readlines(from_file).each do |line|
23
+ add_player(Player.from_csv(line))
24
+ end
25
+ end
26
+
27
+ def add_player(a_player)
28
+ @players.push(a_player)
29
+ end
30
+
31
+ def save_high_scores(to_file="high_scores.txt")
32
+ File.open(to_file, "w") do |file|
33
+ file.puts "#{@title} High Scores:"
34
+ @players.sort.each do |player|
35
+ file.puts high_score_entry(player)
36
+ end
37
+ end
38
+ end
39
+
40
+ def play(rounds)
41
+ puts "There are #{@players.size} players in #{@title}: "
42
+
43
+ @players.each do |player|
44
+ puts player
45
+ end
46
+
47
+ treasures = TreasureTrove::TREASURES
48
+ puts "\nThere are #{treasures.size} treasures to be found:"
49
+ treasures.each do |treasure|
50
+ puts "A #{treasure.name} is worth #{treasure.points} points."
51
+ end
52
+
53
+ 1.upto(rounds) do |round|
54
+ if block_given?
55
+ break if yield
56
+ end
57
+ puts "\nRound #{round}"
58
+ @players.each do |player|
59
+ GameTurn.take_turn(player)
60
+ puts player
61
+ end
62
+ end
63
+ end
64
+
65
+ def print_name_and_health(player)
66
+ puts "#{player.name} (#{player.health})"
67
+ end
68
+
69
+ def total_points
70
+ @players.reduce(0) {|sum, player| sum + player.points}
71
+ end
72
+
73
+ def print_statistics
74
+ strong_players, wimpy_players = @players.partition {|player| player.strong?}
75
+
76
+ puts "\n#{@title} Statistics:"
77
+
78
+ puts "\n#{strong_players.size} strong players:"
79
+ strong_players.each do |player|
80
+ print_name_and_health(player)
81
+ end
82
+
83
+ puts "\n#{wimpy_players.size} wimpy players:"
84
+ wimpy_players.each do |player|
85
+ print_name_and_health(player)
86
+ end
87
+
88
+ @players.sort.each do |player|
89
+ puts "\n#{player.name}'s point totals:"
90
+ player.each_found_treasure do |treasure|
91
+ puts "#{treasure.points} total #{treasure.name} points"
92
+ end
93
+ puts "#{player.points} grand total points."
94
+ end
95
+
96
+ sorted_players = @players.sort {|a,b| b.score <=> a.score}
97
+
98
+ puts "\n#{@title} High Scores:"
99
+ @players.sort.each do |player|
100
+ puts high_score_entry(player)
101
+ end
102
+
103
+ puts "#{total_points} total points from treasures found."
104
+ end
105
+
106
+ end
107
+ end
@@ -0,0 +1,21 @@
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
+ treasure = TreasureTrove.random
18
+ player.found_treasure (treasure)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,14 @@
1
+ require_relative 'auditable'
2
+
3
+ class LoadedDie
4
+ include Auditable
5
+
6
+ attr_reader :number
7
+
8
+ def roll
9
+ numbers = [1, 1, 2, 5, 6, 6]
10
+ @number = numbers.sample
11
+ audit
12
+ @number
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ module Playable
2
+ def w00t
3
+ self.health += 15
4
+ puts "#{self.name} got w00ted!"
5
+ end
6
+ def blam
7
+ self.health -= 10
8
+ puts "#{self.name} got balmmed!"
9
+ end
10
+ def strong?
11
+ health > 100
12
+ end
13
+ end
@@ -0,0 +1,69 @@
1
+ module StudioGame
2
+ class Player
3
+ attr_accessor :name
4
+ attr_reader :health
5
+
6
+ def initialize(name, health=100)
7
+ @name = name.capitalize
8
+ @health = health
9
+ @found_treasures = Hash.new(0)
10
+ end
11
+
12
+ def self.from_csv(string)
13
+ name, health = string.split(',')
14
+ new(name, Integer(health))
15
+ end
16
+
17
+ def to_s
18
+ "I'm #{@name} with health = #{@health}, points = #{points}, and score = #{score}."
19
+ end
20
+
21
+ def <=>(other)
22
+ other.score <=> score
23
+ end
24
+
25
+ def blam
26
+ @health -= 10
27
+ puts "#{@name} got balmmed!"
28
+ end
29
+
30
+ def w00t
31
+ @health += 15
32
+ puts "#{@name} got w00ted!"
33
+ end
34
+
35
+ def score
36
+ @health + points
37
+ end
38
+
39
+ def strong?
40
+ @health > 100
41
+ end
42
+
43
+ def found_treasure(treasure)
44
+ @found_treasures[treasure.name] += treasure.points
45
+ puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
46
+ puts "#{@name}'s treasures: #{@found_treasures}"
47
+ end
48
+
49
+ def points
50
+ @found_treasures.values.reduce(0, :+)
51
+ end
52
+
53
+ def each_found_treasure
54
+ @found_treasures.each do |name, points|
55
+ yield Treasure.new(name, points)
56
+ end
57
+ end
58
+
59
+ end
60
+ end
61
+ if __FILE__ == $0
62
+ player = Player.new("moe")
63
+ puts player.name
64
+ puts player.health
65
+ player.w00t
66
+ puts player.health
67
+ player.blam
68
+ puts player.health
69
+ end
@@ -0,0 +1,19 @@
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
+
18
+ end
19
+ end
@@ -0,0 +1,29 @@
1
+ require_relative 'berserk_player'
2
+
3
+ describe BerserkPlayer do
4
+
5
+ before do
6
+ @initial_health = 50
7
+ @player = BerserkPlayer.new("berserker", @initial_health)
8
+ end
9
+
10
+ it "does not go berserk when w00ted up to 5 times" do
11
+ 1.upto(5) { @player.w00t }
12
+
13
+ @player.berserk?.should be_false
14
+ end
15
+
16
+ it "goes berserk when w00ted more than 5 times" do
17
+ 1.upto(6) { @player.w00t }
18
+
19
+ @player.berserk?.should be_true
20
+ end
21
+
22
+ it "gets w00ted instead of blammed when it's gone berserk" do
23
+ 1.upto(6) { @player.w00t }
24
+ 1.upto(2) { @player.blam }
25
+
26
+ @player.health.should == @initial_health + (8 * 15)
27
+ end
28
+
29
+ end
@@ -0,0 +1,50 @@
1
+ require_relative 'clumsy_player'
2
+
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
+
49
+
50
+ end
@@ -0,0 +1,67 @@
1
+ require 'studio_game/game'
2
+
3
+ module StudioGame
4
+ describe Game do
5
+
6
+ before do
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
+
50
+ it "computes total points as the sum of all player points" do
51
+ game = Game.new("Knuckleheads")
52
+
53
+ player1 = Player.new("moe")
54
+ player2 = Player.new("larry")
55
+
56
+ game.add_player(player1)
57
+ game.add_player(player2)
58
+
59
+ player1.found_treasure(Treasure.new(:hammer, 50))
60
+ player1.found_treasure(Treasure.new(:hammer, 50))
61
+ player2.found_treasure(Treasure.new(:crowbar, 400))
62
+
63
+ game.total_points.should == 500
64
+ end
65
+
66
+ end
67
+ end
@@ -0,0 +1,125 @@
1
+ require 'studio_game/player'
2
+ require 'studio_game/treasure_trove'
3
+
4
+ module StudioGame
5
+ describe Player do
6
+
7
+ before do
8
+ $stdout = StringIO.new
9
+ @initial_health = 150
10
+ @player = Player.new("larry", @initial_health)
11
+ end
12
+
13
+ it "has a capitalized name" do
14
+ @player.name.should == "Larry"
15
+ end
16
+
17
+ it "has an initial health" do
18
+ @player.health.should == 150
19
+ end
20
+
21
+ it "has a string representation" do
22
+ @player.found_treasure(Treasure.new(:hammer, 50))
23
+ @player.found_treasure(Treasure.new(:hammer, 50))
24
+
25
+ @player.to_s.should == "I'm Larry with health = 150, points = 100, and score = 250."
26
+ end
27
+
28
+ it "computes a score as the sum of its health and length of name" do
29
+ @player.found_treasure(Treasure.new(:hammer, 50))
30
+ @player.found_treasure(Treasure.new(:hammer, 50))
31
+
32
+ @player.score.should == (150 + 100)
33
+ end
34
+
35
+ it "increases health by 15 when w00ted" do
36
+ @player.w00t
37
+ @player.health.should == (@initial_health + 15)
38
+ end
39
+
40
+ it "decreases health by 10 when balmmed" do
41
+ @player.blam
42
+
43
+ @player.health.should == (@initial_health - 10)
44
+ end
45
+
46
+ it "computes points as the sum of all treasure points" do
47
+ @player.points.should == 0
48
+
49
+ @player.found_treasure(Treasure.new(:hammer, 50))
50
+
51
+ @player.points.should == 50
52
+
53
+ @player.found_treasure(Treasure.new(:crowbar, 400))
54
+
55
+ @player.points.should == 450
56
+
57
+ @player.found_treasure(Treasure.new(:hammer, 50))
58
+
59
+ @player.points.should == 500
60
+ end
61
+
62
+ it "yields each found treasure and its total points" do
63
+ @player.found_treasure(Treasure.new(:skillet, 100))
64
+ @player.found_treasure(Treasure.new(:skillet, 100))
65
+ @player.found_treasure(Treasure.new(:hammer, 50))
66
+ @player.found_treasure(Treasure.new(:bottle, 5))
67
+ @player.found_treasure(Treasure.new(:bottle, 5))
68
+ @player.found_treasure(Treasure.new(:bottle, 5))
69
+ @player.found_treasure(Treasure.new(:bottle, 5))
70
+ @player.found_treasure(Treasure.new(:bottle, 5))
71
+
72
+ yielded = []
73
+ @player.each_found_treasure do |treasure|
74
+ yielded << treasure
75
+ end
76
+
77
+ yielded.should == [
78
+ Treasure.new(:skillet, 200),
79
+ Treasure.new(:hammer, 50),
80
+ Treasure.new(:bottle, 25)
81
+ ]
82
+ end
83
+
84
+ it "can be created from a CSV string" do
85
+ player = Player.from_csv("larry,150")
86
+
87
+ player.name.should == "Larry"
88
+ player.health.should == 150
89
+ end
90
+
91
+ context "with health greater than 100" do
92
+ before do
93
+ @player = Player.new("larry", 150)
94
+ end
95
+
96
+ it "is strong" do
97
+ @player.should be_strong
98
+ end
99
+ end
100
+
101
+ context "with health of 100 or less" do
102
+ before do
103
+ @player = Player.new("larry", 100)
104
+ end
105
+
106
+ it "is wimpy" do
107
+ @player.should_not be_strong
108
+ end
109
+ end
110
+
111
+ context "in a collection of players" do
112
+ before do
113
+ @player1 = Player.new("moe", 100)
114
+ @player2 = Player.new("larry", 200)
115
+ @player3 = Player.new("curly", 300)
116
+
117
+ @players = [@player1, @player2, @player3]
118
+ end
119
+
120
+ it "is sorted by decreasing score" do
121
+ @players.sort.should == [@player3, @player2, @player1]
122
+ end
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,57 @@
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
+ end
55
+
56
+ end
57
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: studio_game_john
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Braveheart22
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &24151668 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *24151668
25
+ description: ! "This is an example application used in The Pragmatic Studio's\nRuby
26
+ Programming course, as described at\n\n http://pragmaticstudio.com\n\nThis code
27
+ is Copyright 2012 The Pragmatic Studio. See the LICENSE file."
28
+ email: NoOne@Nowhere.com
29
+ executables:
30
+ - studio_game.rb
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - bin/players.csv
35
+ - bin/studio_game
36
+ - bin/studio_game.rb
37
+ - lib/studio_game/berserk_player.rb
38
+ - lib/studio_game/clumsy_player.rb
39
+ - lib/studio_game/die.rb
40
+ - lib/studio_game/game.rb
41
+ - lib/studio_game/game_turn.rb
42
+ - lib/studio_game/loaded_die.rb
43
+ - lib/studio_game/playable.rb
44
+ - lib/studio_game/player.rb
45
+ - lib/studio_game/treasure_trove.rb
46
+ - spec/studio_game/berserk_player_spec.rb
47
+ - spec/studio_game/clumsy_player_spec.rb
48
+ - spec/studio_game/game_spec.rb
49
+ - spec/studio_game/player_spec.rb
50
+ - spec/studio_game/treasure_trove_spec.rb
51
+ - LICENSE
52
+ - README
53
+ homepage: https://www.facebook.com/John.Strack99
54
+ licenses: []
55
+ post_install_message:
56
+ rdoc_options: []
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '1.9'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubyforge_project:
73
+ rubygems_version: 1.8.16
74
+ signing_key:
75
+ specification_version: 3
76
+ summary: Pragmatic Studio ruby course gem
77
+ test_files:
78
+ - spec/studio_game/berserk_player_spec.rb
79
+ - spec/studio_game/clumsy_player_spec.rb
80
+ - spec/studio_game/game_spec.rb
81
+ - spec/studio_game/player_spec.rb
82
+ - spec/studio_game/treasure_trove_spec.rb