rayonrails_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.
data/LICENSE ADDED
File without changes
data/README ADDED
@@ -0,0 +1,8 @@
1
+
2
+ Copyright (C) 2013 RayOnRails
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/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,65 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../lib/studio_game/game'
3
+ require_relative '../lib/studio_game/player'
4
+ require_relative '../lib/studio_game/treasure_trove'
5
+ require_relative '../lib/studio_game/clumsy_player'
6
+ require_relative '../lib/studio_game/berserk_player'
7
+
8
+ #player1 = Player.new("moe")
9
+ #player2 = Player.new("larry", 60)
10
+ #player3 = Player.new("curly", 125)
11
+
12
+ treasures = StudioGame::TreasureTrove::TREASURES
13
+
14
+ puts "\nThere are #{treasures.size} treasures to be found:"
15
+ treasures.each do |treasure|
16
+ puts "A #{treasure.name} is worth #{treasure.points} points"
17
+ end
18
+
19
+ knuckleheads = StudioGame::Game.new("Kruckleheads")
20
+
21
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
22
+ knuckleheads.load_players(ARGV.shift || default_player_file)
23
+
24
+ klutz = StudioGame::ClumsyPlayer.new("klutz", 105)
25
+ knuckleheads.add_player(klutz)
26
+ berserker = StudioGame::BerserkPlayer.new("berserker", 50)
27
+ knuckleheads.add_player(berserker)
28
+
29
+ #knuckleheads.add_player(player1)
30
+ #knuckleheads.add_player(player2)
31
+ #knuckleheads.add_player(player3)
32
+ loop do
33
+ puts "\nHow many game rounds? ('quit' to exit)"
34
+ answer = gets.chomp.downcase
35
+ case answer
36
+ when /^\d+$/
37
+ knuckleheads.play(answer.to_i)
38
+ when 'quit', 'exit'
39
+ knuckleheads.print_stats
40
+ break
41
+ else
42
+ puts "Please enter a number or 'quit'"
43
+ end
44
+ end
45
+
46
+ knuckleheads.save_high_scores
47
+
48
+ #knuckleheads.play(10) do
49
+ # knuckleheads.total_points >= 2000
50
+ #end
51
+
52
+ #player4 = Player.new("alvin", 45)
53
+ #player5 = Player.new("simon", 20)
54
+ #player6 = Player.new("theodore", 10)
55
+
56
+ #chipmunks = Game.new("Chipmunks")
57
+ #chipmunks.add_player(player4)
58
+ #chipmunks.add_player(player5)
59
+ #chipmunks.add_player(player6)
60
+ #chipmunks.add_player(player1)
61
+ #chipmunks.play(3)
62
+
63
+ #knuckleheads.print_stats
64
+
65
+ #chipmunks.print_stats
@@ -0,0 +1,5 @@
1
+ module Auditable
2
+ def audit
3
+ puts "Rolled a #{self.number} (#{self.class})"
4
+ end
5
+ end
@@ -0,0 +1,32 @@
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 woot
15
+ super
16
+ @w00t_count += 1
17
+ puts "#{@name} is berserk" if berserk?
18
+ end
19
+
20
+ def blam
21
+ berserk? ? woot : super
22
+ end
23
+
24
+ end
25
+
26
+ if __FILE__ == $0
27
+ berserker = BerserkPlayer.new("berserker", 50)
28
+ 6.times { berserker.woot }
29
+ 2.times { berserker.blam }
30
+ puts berserker.health
31
+ end
32
+ end
@@ -0,0 +1,40 @@
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 woot
13
+ @boost_factor.times { super }
14
+ end
15
+
16
+
17
+ def found_treasure(treasure)
18
+ damaged_treasure = Treasure.new(treasure.name, treasure.points / 2.0)
19
+ super(damaged_treasure)
20
+ end
21
+
22
+ end
23
+
24
+ if __FILE__ == $0
25
+ clumsy = ClumsyPlayer.new("klutz", 105, 3)
26
+
27
+ hammer = Treasure.new(:hammer, 50)
28
+ clumsy.found_treasure(hammer)
29
+ clumsy.found_treasure(hammer)
30
+ clumsy.found_treasure(hammer)
31
+
32
+ crowbar = Treasure.new(:crowbar, 400)
33
+ clumsy.found_treasure(crowbar)
34
+
35
+ clumsy.each_found_treasure do |treasure|
36
+ puts "#{treasure.points} total #{treasure.name} points."
37
+ end
38
+ puts "#{clumsy.points} grand total points."
39
+ end
40
+ 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,96 @@
1
+ require_relative 'player'
2
+ require_relative 'die'
3
+ require_relative 'game_turn'
4
+ require 'csv'
5
+
6
+ module StudioGame
7
+ class Game
8
+ def initialize(name)
9
+ @name = name
10
+ @players = []
11
+ end
12
+
13
+ def load_players(from_file)
14
+ CSV.foreach(from_file) do |row|
15
+ player = Player.new(row[0], row[1].to_i)
16
+ add_player(player)
17
+ end
18
+ end
19
+
20
+ def save_high_scores(to_file="high_scores.txt")
21
+ File.open(to_file, "w") do |file|
22
+ file.puts "#{@title} High Scores:"
23
+ @players.sort.each do |player|
24
+ file.puts high_score_entry(player)
25
+ end
26
+ end
27
+ end
28
+
29
+ def high_score_entry(player)
30
+ formatted_name = player.name.ljust(20, ".")
31
+ "#{formatted_name} #{player.score}"
32
+ end
33
+
34
+ def add_player(player)
35
+ @players << player
36
+ end
37
+
38
+ def total_points
39
+ @players.reduce(0) { |sum, player| sum + player.points}
40
+ end
41
+
42
+ def play(rounds)
43
+ puts ""
44
+ puts "There #{@players.size} players in #{@name}:"
45
+ puts @players
46
+
47
+ 1.upto(rounds) do |round|
48
+ if block_given?
49
+ break if yield
50
+ end
51
+ puts "\nRound #{round}:"
52
+ @players.each do |player|
53
+ GameTurn.take_turn(player)
54
+ puts player
55
+ end
56
+ end
57
+
58
+ def print_name_and_health(player)
59
+ puts "#{player.name} (#{player.health})"
60
+ end
61
+
62
+ def print_stats
63
+ strong_players = @players.select {|player| player.strong?}
64
+ wimpy_players = @players.reject {|player| player.strong?}
65
+
66
+ puts "\n#{@name} Statistcis:"
67
+
68
+ puts "\n #{strong_players.size} strong players:"
69
+
70
+ strong_players.each do |player|
71
+ print_name_and_health(player)
72
+ end
73
+
74
+ puts "\n #{wimpy_players.size} wimply players:"
75
+ wimpy_players.each do |player|
76
+ print_name_and_health(player)
77
+ end
78
+
79
+ puts "\n #{@name} High Scores:"
80
+ @players.sort.each do |player|
81
+ puts high_score_entry(player)
82
+ end
83
+
84
+ @players.sort.each do |player|
85
+ puts "\n#{player.name}'s points totals:"
86
+ player.each_found_treasure do |treasure|
87
+ puts "#{treasure.points} total #{treasure.name} points"
88
+ end
89
+ puts "#{player.points} grand total points"
90
+ end
91
+
92
+ puts "\n#{total_points} total points from treasure found"
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,23 @@
1
+ module StudioGame
2
+ module GameTurn
3
+ require_relative 'player'
4
+ require_relative 'die'
5
+ require_relative 'loaded_die'
6
+
7
+ def self.take_turn(player)
8
+ die = Die.new
9
+ number_rolled = die.roll
10
+ case number_rolled
11
+ when 1..2
12
+ player.blam
13
+ when 3..4
14
+ puts "#{player.name} was skipped"
15
+ else
16
+ player.woot
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,15 @@
1
+ module Playable
2
+ def woot
3
+ self.health += 15
4
+ puts "#{self.name} got w00ted!"
5
+ end
6
+
7
+ def blam
8
+ self.health -= 10
9
+ puts "#{self.name} go blammed!"
10
+ end
11
+
12
+ def strong?
13
+ self.health > 100
14
+ end
15
+ end
@@ -0,0 +1,61 @@
1
+ require_relative 'game'
2
+ require_relative 'treasure_trove'
3
+ require_relative 'playable'
4
+
5
+ module StudioGame
6
+ class Player
7
+ include Playable
8
+
9
+ attr_accessor :name
10
+ attr_accessor :health
11
+
12
+ def initialize(name,health=100)
13
+ @name = name.capitalize
14
+ @health = health
15
+ @found_treasures = Hash.new(0)
16
+ end
17
+
18
+ def found_treasure(treasure)
19
+ @found_treasures[treasure.name] += treasure.points
20
+ puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
21
+ puts "#{@name}'s treasures: #{@found_treasures}"
22
+ end
23
+
24
+ def self.from_csv(string)
25
+ name, health = string.split(',')
26
+ new(name, Integer(health))
27
+ end
28
+
29
+ def each_found_treasure
30
+ @found_treasures.each do |name, points|
31
+ yield Treasure.new(name, points)
32
+ end
33
+ end
34
+
35
+ def points
36
+ @found_treasures.values.reduce(0, :+)
37
+ end
38
+
39
+ def <=>(other)
40
+ other.score <=> score
41
+ end
42
+
43
+ def score
44
+ @health + points
45
+ end
46
+
47
+ def to_s
48
+ "I'm #{@name} with health = #{@health}, points = #{points}, and score = #{score}."
49
+ end
50
+ end
51
+
52
+ if __FILE__ == $0
53
+ player = Player.new("move")
54
+ puts player.name
55
+ puts player.health
56
+ player.woot
57
+ puts player.health
58
+ player.blam
59
+ puts player.health
60
+ end
61
+ 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,30 @@
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.woot }
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.woot }
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.woot }
25
+ 1.upto(2) { @player.blam }
26
+
27
+ @player.health.should == @initial_health + (8 * 15)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,50 @@
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
+
26
+ @player.each_found_treasure do |treasure|
27
+ yielded << treasure
28
+ end
29
+
30
+ yielded.should == [Treasure.new(:hammer, 75), Treasure.new(:crowbar, 200)]
31
+ end
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 "has a boost factor" do
41
+ @player.boost_factor.should == 5
42
+ end
43
+
44
+ it "gets boost factor number of w00ts when w00ted" do
45
+ @player.woot
46
+ @player.health.should == @initial_health + (15 * @boost_factor)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,64 @@
1
+ require 'studio_game/game'
2
+ require 'studio_game/player'
3
+
4
+ module StudioGame
5
+ describe Game do
6
+
7
+ before do
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 "w00ted 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
+ end
23
+
24
+ it "skips the player if a 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 "blammed the player if a 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 durning a player's turn" do
41
+ game = Game.new("Knuckleheads")
42
+ player = Player.new("moe")
43
+
44
+ game.add_player(player)
45
+ game.play(1)
46
+ player.points.should_not be_zero
47
+ end
48
+
49
+ it "computes total points as the sum of all players points" do
50
+ game = Game.new("Knuckleheads")
51
+ player1 = Player.new("moe")
52
+ player2 = Player.new("larry")
53
+
54
+ game.add_player(player1)
55
+ game.add_player(player2)
56
+
57
+ player1.found_treasure(Treasure.new(:hammer, 50))
58
+ player1.found_treasure(Treasure.new(:hammer, 50))
59
+ player2.found_treasure(Treasure.new(:crowbar, 400))
60
+
61
+ game.total_points.should == 500
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,121 @@
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
+ end
10
+
11
+ before do
12
+ @initial_health = 150
13
+ @player = Player.new("larry", @initial_health)
14
+ end
15
+
16
+ it "has a capitalize name" do
17
+ @player.name.should == "Larry"
18
+ end
19
+
20
+ it "has an initial health" do
21
+ @player.health.should == 150
22
+ end
23
+
24
+ it "has a string representation" do
25
+ @player.found_treasure(Treasure.new(:hammer, 50))
26
+ @player.found_treasure(Treasure.new(:hammer, 50))
27
+
28
+ @player.to_s.should == "I'm Larry with health = 150, points = 100, and score = 250."
29
+ end
30
+
31
+ it "computers a score as te sum of its health and points" do
32
+ @player.found_treasure(Treasure.new(:hammer, 50))
33
+ @player.found_treasure(Treasure.new(:hammer, 50))
34
+
35
+ @player.score.should == 250
36
+ end
37
+
38
+ it "increase health by 15 when w00ted" do
39
+ @player.woot
40
+ @player.health == (@initial_health + 15)
41
+ end
42
+
43
+ it "decreases health by 10 when blammed" do
44
+ @player.blam
45
+ @player.health == (@initial_health - 10)
46
+ end
47
+
48
+ it "can be created from a CSV string" do
49
+ player = Player.from_csv("larry,150")
50
+
51
+ player.name.should == "Larry"
52
+ player.health.should == 150
53
+ end
54
+
55
+ it "computers points as the sum of all treasure points" do
56
+ @player.points.should == 0
57
+ @player.found_treasure(Treasure.new(:hammer, 50))
58
+ @player.points.should == 50
59
+ @player.found_treasure(Treasure.new(:crowbar, 400))
60
+ @player.points.should == 450
61
+ @player.found_treasure(Treasure.new(:hammer, 50))
62
+ @player.points.should == 500
63
+ end
64
+
65
+ it "yields each found treasure and its total points" do
66
+ @player.found_treasure(Treasure.new(:skillet, 100))
67
+ @player.found_treasure(Treasure.new(:skillet, 100))
68
+ @player.found_treasure(Treasure.new(:hammer, 50))
69
+ @player.found_treasure(Treasure.new(:bottle, 5))
70
+ @player.found_treasure(Treasure.new(:bottle, 5))
71
+ @player.found_treasure(Treasure.new(:bottle, 5))
72
+ @player.found_treasure(Treasure.new(:bottle, 5))
73
+ @player.found_treasure(Treasure.new(:bottle, 5))
74
+
75
+ yielded = []
76
+ @player.each_found_treasure do |treasure|
77
+ yielded << treasure
78
+ end
79
+
80
+ yielded.should == [
81
+ Treasure.new(:skillet, 200),
82
+ Treasure.new(:hammer, 50),
83
+ Treasure.new(:bottle, 25)
84
+ ]
85
+ end
86
+
87
+ context "with a health greater than 100" do
88
+ before do
89
+ @player = Player.new("larry", 150)
90
+ end
91
+
92
+ it "is strong" do
93
+ @player.should be_strong
94
+ end
95
+ end
96
+
97
+ context "with a health of 100 or less" do
98
+ before do
99
+ @player = Player.new("larry", 100)
100
+ end
101
+
102
+ it "is wimpy" do
103
+ @player.should_not be_strong
104
+ end
105
+ end
106
+
107
+ context "in a collection of players" do
108
+ before do
109
+ @player1 = Player.new("moe", 100)
110
+ @player2 = Player.new("larry", 200)
111
+ @player3 = Player.new("curly", 300)
112
+
113
+ @players = [@player1, @player2, @player3]
114
+ end
115
+
116
+ it "is sorted by decreasing score" do
117
+ @players.sort.should == [@player3, @player2, @player1]
118
+ end
119
+ end
120
+ end
121
+ 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
+ end
18
+
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,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rayonrails_studio_game
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ray Rogers
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-08 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: ! '
31
+
32
+ Copyright (C) 2013 RayOnRails
33
+
34
+
35
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
36
+ this software and associated documentation files (the "Software"), to deal in the
37
+ Software without restriction, including without limitation the rights to use, copy,
38
+ modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
39
+ and to permit persons to whom the Software is furnished to do so, subject to the
40
+ following conditions:
41
+
42
+
43
+ The above copyright notice and this permission notice shall be included in all copies
44
+ or substantial portions of the Software.
45
+
46
+
47
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
48
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
49
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
50
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
51
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
52
+ USE OR OTHER DEALINGS IN THE SOFTWARE.'
53
+ email: ray@rayonrails.com
54
+ executables:
55
+ - studio_game
56
+ extensions: []
57
+ extra_rdoc_files: []
58
+ files:
59
+ - bin/players.csv
60
+ - bin/studio_game
61
+ - lib/studio_game/auditable.rb
62
+ - lib/studio_game/berserk_player.rb
63
+ - lib/studio_game/clumsy_player.rb
64
+ - lib/studio_game/die.rb
65
+ - lib/studio_game/game.rb
66
+ - lib/studio_game/game_turn.rb
67
+ - lib/studio_game/loaded_die.rb
68
+ - lib/studio_game/playable.rb
69
+ - lib/studio_game/player.rb
70
+ - lib/studio_game/treasure_trove.rb
71
+ - spec/studio_game/berserk_player_spec.rb
72
+ - spec/studio_game/clumsy_player_spec.rb
73
+ - spec/studio_game/game_spec.rb
74
+ - spec/studio_game/player_spec.rb
75
+ - spec/studio_game/treasure_trove_spec.rb
76
+ - LICENSE
77
+ - README
78
+ homepage: http://www.rayonrails.com
79
+ licenses: []
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '1.9'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project:
98
+ rubygems_version: 1.8.25
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: Hunt for some treasures - Pragmatic Online Ruby Course
102
+ test_files:
103
+ - spec/studio_game/berserk_player_spec.rb
104
+ - spec/studio_game/clumsy_player_spec.rb
105
+ - spec/studio_game/game_spec.rb
106
+ - spec/studio_game/player_spec.rb
107
+ - spec/studio_game/treasure_trove_spec.rb