studio_game_kyle_r 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,18 @@
1
+ Copyright (C) 2013 Kyle Roberts
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
4
+ software and associated documentation files (the "Software"), to deal in the Software
5
+ without restriction, including without limitation the rights to use, copy, modify, merge,
6
+ publish, distribute, sublicense, and/or sell copies of the Software, and to permit
7
+ persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or
11
+ substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
15
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
16
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
+ DEALINGS IN THE SOFTWARE.
data/README ADDED
@@ -0,0 +1,5 @@
1
+ README:
2
+
3
+ This gem creates a game for a certain amount of players. It then either w00ts or
4
+ blams the players. Players may also find treasures too. In then end, the gem will
5
+ score the players and also provide statistics at the end of the game as well.
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,39 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/studio_game/player'
4
+ require_relative '../lib/studio_game/game'
5
+ require_relative '../lib/studio_game/clumsy_player'
6
+ require_relative '../lib/studio_game/berserk_player'
7
+
8
+
9
+ #player1=Player.new("moe")
10
+ #player2=Player.new("larry", 60)
11
+ #player3=Player.new("curly", 125)
12
+ player4=StudioGame::ClumsyPlayer.new("klutz", 105)
13
+ player5=StudioGame::BerserkPlayer.new("berserker", 50)
14
+
15
+ knuckleheads = StudioGame::Game.new("knuckleheads")
16
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
17
+ knuckleheads.load_players(ARGV.shift || default_player_file)
18
+ knuckleheads.add_player(player4)
19
+ knuckleheads.add_player(player5)
20
+ #knuckleheads.add_player(player1)
21
+ #knuckleheads.add_player(player2)
22
+ #knuckleheads.add_player(player3)
23
+
24
+ loop do
25
+ puts "\nHow many game rounds? ('quit' or exit)"
26
+ answer=gets.chomp.downcase
27
+ case answer
28
+ when /^\d+$/
29
+ knuckleheads.play(answer.to_i)
30
+ when 'quit', 'exit'
31
+ knuckleheads.print_stats
32
+ break
33
+ else
34
+ puts "Please enter a number or 'quit'."
35
+ end
36
+ end
37
+
38
+ knuckleheads.save_high_scores
39
+
@@ -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,37 @@
1
+ require_relative 'player'
2
+ module StudioGame
3
+ class BerserkPlayer < Player
4
+
5
+ def initialize(name, health=100)
6
+ super(name, health)
7
+ @woot_count=0
8
+ end
9
+
10
+ def berserk?
11
+ @woot_count > 5
12
+ end
13
+
14
+ def w00t
15
+ super
16
+ @woot_count+=1
17
+ if berserk?
18
+ puts "#{@name} is berserk!"
19
+ end
20
+ end
21
+
22
+ def blam
23
+ if berserk?
24
+ w00t
25
+ else
26
+ super
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ if __FILE__ == $0
33
+ berserker = BerserkPlayer.new("berserker", 50)
34
+ 6.times { berserker.w00t }
35
+ 2.times {berserker.blam}
36
+ puts berserker.health
37
+ end
@@ -0,0 +1,40 @@
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=5)
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
+ end
24
+
25
+ if __FILE__ == $0
26
+ clumsy = ClumsyPlayer.new("klutz")
27
+
28
+ hammer = Treasure.new(:hammer, 50)
29
+ clumsy.found_treasure(hammer)
30
+ clumsy.found_treasure(hammer)
31
+ clumsy.found_treasure(hammer)
32
+
33
+ crowbar = Treasure.new(:crowbar, 400)
34
+ clumsy.found_treasure(crowbar)
35
+
36
+ clumsy.each_found_treasure do |treasure|
37
+ puts "#{treasure.points} total #{treasure.name} points"
38
+ end
39
+ puts "#{clumsy.points} grand total points"
40
+ end
@@ -0,0 +1,19 @@
1
+ require_relative 'auditable'
2
+
3
+ module StudioGame
4
+ class Die
5
+ include Auditable
6
+ attr_reader :number
7
+
8
+ #def initialize
9
+ # roll
10
+ #end
11
+
12
+ def roll
13
+ @number=rand(1..6)
14
+ audit
15
+ @number
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,132 @@
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
+ attr_reader :title
9
+
10
+ def initialize(title)
11
+ @title=title
12
+ @players=[]
13
+
14
+ end
15
+
16
+ def high_score_entry (players)
17
+ "#{players.name.ljust(20, '.')} #{players.score}"
18
+ end
19
+
20
+ #Allows you to load files into the game
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
+ #Saves stats to a .txt file
28
+ def save_high_scores(to_file='high_score.txt')
29
+ File.open(to_file, "w") do |file|
30
+ file.puts "#{@title} High Scores:"
31
+ @players.sort.each do |players|
32
+ file.puts high_score_entry(players)
33
+ end
34
+ end
35
+ end
36
+
37
+ #adds player
38
+ def add_player(a_player)
39
+ @players << a_player
40
+ end
41
+
42
+ #method to print name and score for print_states method
43
+ def print_health_and_name (player)
44
+ puts "#{player.name} (#{player.health})"
45
+ end
46
+
47
+ def total_points
48
+ @players.reduce(0){|sum, player| sum + player.points}
49
+ end
50
+
51
+ def print_stats
52
+ strong_players, wimpy_players=@players.partition{|player| player.strong?}
53
+
54
+ puts "\n#{@title} Statistics:"
55
+ #list the strong players
56
+ puts "\n#{strong_players.length} strong players:"
57
+ strong_players.each do |player|
58
+ print_health_and_name(player)
59
+ end
60
+ #list the wimpy players
61
+ puts "\n #{wimpy_players.length} wimpy players:"
62
+ wimpy_players.each do |player|
63
+ print_health_and_name(player)
64
+ end
65
+
66
+ #sets the scores high to low
67
+ puts "\nHigh Score:"
68
+ @players.sort.each do |players|
69
+ puts high_score_entry(players)
70
+ end
71
+
72
+ #prints out the players grand total by iterating through each player
73
+ @players.each do |players|
74
+ puts "\n#{players.name}'s point totals:"
75
+ puts "#{players.points}"
76
+ end
77
+ #Iterates through each player and prints out each treasure and points of each treasure
78
+ #Also prints out grand total at end for that player
79
+ @players.each do |player|
80
+ puts "\n#{player.name}'s point total:"
81
+ player.each_found_treasure do |treasure|
82
+ puts "Treasure #{treasure.name} with #{treasure.points} points"
83
+ end
84
+ puts "#{player.points} grand total points"
85
+ end
86
+
87
+ puts "#{total_points} found by all players in the game"
88
+
89
+
90
+
91
+ end
92
+
93
+ def play(rounds)
94
+ puts "There are #{@players.size} players in the game #{@title}:"
95
+
96
+ @players.each do |p|
97
+ puts p
98
+ end
99
+
100
+ treasures = TreasureTrove::TREASURES
101
+ puts "\nThere are #{treasures.length} treasures to be found:"
102
+ treasures.each do |treasures|
103
+ puts "A #{treasures.name} is worth #{treasures.points} points"
104
+ end
105
+
106
+ 1.upto(rounds) do |count|
107
+ if block_given?
108
+ break if yield
109
+ end
110
+ puts "\nRound: #{count}:"
111
+ @players.each do |p|
112
+ GameTurn.take_turn(p)
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
118
+
119
+ if __FILE__ == $0
120
+ player1=Player.new("Joe", 100)
121
+ player2=Player.new("Smoe", 120)
122
+ player3=Player.new("Zoe", 120)
123
+ game=Game.new("bullshit")
124
+ game.add_player(player1)
125
+ game.add_player(player2)
126
+ game.add_player(player3)
127
+
128
+ game.play(11) do
129
+ game.total_points >= 2000
130
+ end
131
+ game.print_stats
132
+ end
@@ -0,0 +1,24 @@
1
+ require_relative 'player'
2
+ require_relative 'die'
3
+ require_relative 'treasure_trove'
4
+
5
+ module StudioGame
6
+ module GameTurn
7
+
8
+ def self.take_turn(p)
9
+ die=Die.new
10
+ number_rolled=die.roll
11
+ case number_rolled
12
+ when 5..6
13
+ puts p.w00t
14
+ when 3..4
15
+ puts "#{p.name} was skipped"
16
+ else 1..2
17
+ puts p.blam
18
+ end
19
+
20
+ treasure=TreasureTrove.random
21
+ p.found_treasure(treasure)
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ require_relative 'auditable'
2
+
3
+ module StudioGame
4
+ class LoadedDie
5
+ include Auditable
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
15
+ end
@@ -0,0 +1,17 @@
1
+ module StudioGame
2
+ module Playable
3
+ def blam
4
+ self.health=self.health-10
5
+ "#{self.name} got blammed!"
6
+ end
7
+
8
+ def w00t
9
+ self.health+=15
10
+ puts "#{self.name} got w00ted!"
11
+ end
12
+
13
+ def strong?
14
+ self.health>100
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,63 @@
1
+ require_relative 'treasure_trove'
2
+ require_relative 'playable'
3
+
4
+ module StudioGame
5
+ class Player
6
+ include Playable
7
+ attr_accessor :health
8
+ attr_reader :name
9
+
10
+ def name=(new_name)
11
+ @name=new_name.capitalize
12
+ end
13
+
14
+ def initialize(name, health=100)
15
+ @name=name.capitalize
16
+ @health=health
17
+ @found_treasures=Hash.new(0)
18
+ end
19
+
20
+ def self.from_csv(string)
21
+ player, health = string.split(',')
22
+ Player.new(player, Integer(health))
23
+ end
24
+
25
+ def each_found_treasure
26
+ @found_treasures.each do |name, points|
27
+ yield Treasure.new(name, points)
28
+ end
29
+ end
30
+
31
+ def found_treasure(treasure)
32
+ @found_treasures[treasure.name] += treasure.points
33
+ puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
34
+ puts "#{@name} treasures: #{@found_treasures}"
35
+ end
36
+
37
+ def points
38
+ @found_treasures.values.reduce(0, :+)
39
+ end
40
+
41
+ def <=> (other_player)
42
+ other_player.score <=> self.score
43
+ end
44
+
45
+ def score
46
+ @health + points
47
+ end
48
+
49
+ def to_s
50
+ "I'm #{@name} with a health = #{@health} and a score = #{score}."
51
+ end
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
@@ -0,0 +1,18 @@
1
+ module StudioGame
2
+ Treasure = Struct.new(:name, :points)
3
+
4
+ module TreasureTrove
5
+
6
+ TREASURES = [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,45 @@
1
+ require 'studio_game/clumsy_player'
2
+
3
+ module StudioGame
4
+ describe ClumsyPlayer do
5
+
6
+ before do
7
+ @initial_health = 100
8
+ @boost_factor = 5
9
+ @player = ClumsyPlayer.new("klutz", @initial_health, @boost_factor)
10
+ end
11
+
12
+ it "only gets half the point value for each treasure" do
13
+ @player.points.should == 0
14
+
15
+ hammer = Treasure.new(:hammer, 50)
16
+ @player.found_treasure(hammer)
17
+ @player.found_treasure(hammer)
18
+ @player.found_treasure(hammer)
19
+
20
+ @player.points.should == 75
21
+
22
+ crowbar = Treasure.new(:crowbar, 400)
23
+ @player.found_treasure(crowbar)
24
+
25
+ @player.points.should == 275
26
+
27
+ yielded = []
28
+ @player.each_found_treasure do |treasure|
29
+ yielded << treasure
30
+ end
31
+
32
+ yielded.should == [Treasure.new(:hammer, 75), Treasure.new(:crowbar, 200)]
33
+ end
34
+
35
+ it "has a boost factor" do
36
+ @player.boost_factor.should == 5
37
+ end
38
+
39
+ it "boost w00t by the boost factor" do
40
+ @player.w00t
41
+ @player.health.should==@initial_health + (15*@boost_factor)
42
+ end
43
+
44
+ end
45
+ 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
+ $stdout=StringIO.new
14
+ end
15
+
16
+ it "w00t a player if 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
+ end
23
+
24
+ it "skips a player if medium number is rolled" do
25
+ Die.any_instance.stub(:roll).and_return(3)
26
+
27
+ @game.play(2)
28
+
29
+ @player.health.should==@initial_health
30
+ end
31
+
32
+ it "skips a player if low number is rolled" do
33
+ Die.any_instance.stub(:roll).and_return(1)
34
+
35
+ @game.play(2)
36
+
37
+ @player.health.should==@initial_health-(10*2)
38
+ end
39
+
40
+ it "assigns a treasure for points during a player's turn" do
41
+ game = Game.new("Knuckleheads")
42
+ player = Player.new("moe")
43
+
44
+ game.add_player(player)
45
+
46
+ game.play(1)
47
+
48
+ player.points.should_not be_zero
49
+ end
50
+
51
+ it "computes total points as the sum of all player points" do
52
+ game = Game.new("Knuckleheads")
53
+
54
+ player1 = Player.new("moe")
55
+ player2 = Player.new("larry")
56
+
57
+ game.add_player(player1)
58
+ game.add_player(player2)
59
+
60
+ player1.found_treasure(Treasure.new(:hammer, 50))
61
+ player1.found_treasure(Treasure.new(:hammer, 50))
62
+ player2.found_treasure(Treasure.new(:crowbar, 400))
63
+
64
+ game.total_points.should == 500
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,123 @@
1
+ require 'studio_game/player'
2
+
3
+ module StudioGame
4
+ describe Player do
5
+
6
+ before do
7
+ @initial_health=150
8
+ @player=Player.new("larry", @initial_health)
9
+ $stdout = StringIO.new
10
+ end
11
+ it "has a capital name" do
12
+ @player.name.should=="Larry"
13
+ end
14
+
15
+ it "has an initial health" do
16
+ @player.health.should == @initial_health
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 a health = 150 and a 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
+ @player.health.should == @initial_health +15
36
+ end
37
+ it "decreases health by 10 when blammed" do
38
+ @player.blam
39
+ @player.health.should == @initial_health - 10
40
+
41
+ end
42
+
43
+ context "with a health greater than 100" do
44
+ before do
45
+ @player=Player.new("larry", 150)
46
+ end
47
+
48
+ it "Player is considered strong" do
49
+ @player.should be_strong
50
+ end
51
+ end
52
+
53
+ context "with a health of 100 or less" do
54
+ before do
55
+ @player=Player.new("larry", 100)
56
+ end
57
+
58
+ it "Player is not considered strong" do
59
+ @player.strong?.should == false
60
+ end
61
+ end
62
+
63
+ context "in a collection of players" do
64
+ before do
65
+ @player1 = Player.new("moe", 100)
66
+ @player2 = Player.new("larry", 200)
67
+ @player3 = Player.new("curly", 300)
68
+
69
+ @players = [@player1, @player2, @player3]
70
+ end
71
+
72
+ it "is sorted by decreasing score" do
73
+ @players.sort.should == [@player3, @player2, @player1]
74
+ end
75
+ end
76
+
77
+ require 'studio_game/treasure_trove'
78
+
79
+ it "computes points as the sum of all treasure points" do
80
+ @player.points.should == 0
81
+
82
+ @player.found_treasure(Treasure.new(:hammer, 50))
83
+
84
+ @player.points.should == 50
85
+
86
+ @player.found_treasure(Treasure.new(:crowbar, 400))
87
+
88
+ @player.points.should == 450
89
+
90
+ @player.found_treasure(Treasure.new(:hammer, 50))
91
+
92
+ @player.points.should == 500
93
+ end
94
+
95
+ it "yields each found treasure and its total points" do
96
+ @player.found_treasure(Treasure.new(:skillet, 100))
97
+ @player.found_treasure(Treasure.new(:skillet, 100))
98
+ @player.found_treasure(Treasure.new(:hammer, 50))
99
+ @player.found_treasure(Treasure.new(:bottle, 5))
100
+ @player.found_treasure(Treasure.new(:bottle, 5))
101
+ @player.found_treasure(Treasure.new(:bottle, 5))
102
+ @player.found_treasure(Treasure.new(:bottle, 5))
103
+ @player.found_treasure(Treasure.new(:bottle, 5))
104
+
105
+ yielded = []
106
+ @player.each_found_treasure do |treasure|
107
+ yielded << treasure
108
+ end
109
+
110
+ yielded.should == [
111
+ Treasure.new(:skillet, 200),
112
+ Treasure.new(:hammer, 50),
113
+ Treasure.new(:bottle, 25)
114
+ ]
115
+ end
116
+
117
+ it "creates a new player object from a string" do
118
+ player= Player.from_csv("Larry, 10")
119
+ player.name.should == "Larry"
120
+ player.score.should == 10
121
+ end
122
+ end
123
+ 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,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: studio_game_kyle_r
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kyle Roberts
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-12-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !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: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: ! "README:\n\nThis gem creates a game for a certain amount of players.
31
+ \ It then either w00ts or \nblams the players. Players may also find treasures
32
+ too. In then end, the gem will\nscore the players and also provide statistics at
33
+ the end of the game as well."
34
+ email: kyleroberts2010@gmail.com
35
+ executables:
36
+ - studio_game
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - bin/players.csv
41
+ - bin/studio_game
42
+ - lib/studio_game/auditable.rb
43
+ - lib/studio_game/berserk_player.rb
44
+ - lib/studio_game/clumsy_player.rb
45
+ - lib/studio_game/die.rb
46
+ - lib/studio_game/game.rb
47
+ - lib/studio_game/game_turn.rb
48
+ - lib/studio_game/loaded_die.rb
49
+ - lib/studio_game/playable.rb
50
+ - lib/studio_game/player.rb
51
+ - lib/studio_game/treasure_trove.rb
52
+ - spec/studio_game/berserk_player_spec.rb
53
+ - spec/studio_game/clumsy_player_spec.rb
54
+ - spec/studio_game/game_spec.rb
55
+ - spec/studio_game/player_spec.rb
56
+ - spec/studio_game/treasure_trove_spec.rb
57
+ - LICENSE
58
+ - README
59
+ homepage: ''
60
+ licenses: []
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '1.9'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 1.8.24
80
+ signing_key:
81
+ specification_version: 3
82
+ summary: Creates a game for player objects
83
+ test_files:
84
+ - spec/studio_game/berserk_player_spec.rb
85
+ - spec/studio_game/clumsy_player_spec.rb
86
+ - spec/studio_game/game_spec.rb
87
+ - spec/studio_game/player_spec.rb
88
+ - spec/studio_game/treasure_trove_spec.rb