studio_game_x 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +7 -0
- data/README +1 -0
- data/bin/players.csv +3 -0
- data/bin/studio_game +33 -0
- data/lib/studio_game/auditable.rb +9 -0
- data/lib/studio_game/berserk_player.rb +30 -0
- data/lib/studio_game/clumsy_player.rb +39 -0
- data/lib/studio_game/die.rb +15 -0
- data/lib/studio_game/game.rb +87 -0
- data/lib/studio_game/game_turn.rb +24 -0
- data/lib/studio_game/loaded_die.rb +16 -0
- data/lib/studio_game/playable.rb +19 -0
- data/lib/studio_game/player.rb +58 -0
- data/lib/studio_game/treasure_trove.rb +22 -0
- data/spec/studio_game/berserk_player_spec.rb +19 -0
- data/spec/studio_game/clumsy_player_spec.rb +34 -0
- data/spec/studio_game/game_spec.rb +44 -0
- data/spec/studio_game/player_spec.rb +61 -0
- data/spec/studio_game/treasure_trove_spec.rb +54 -0
- metadata +85 -0
data/LICENSE
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (C) 2013 RW
|
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 @@
|
|
1
|
+
Simple game resulting from Pragmatic Studio Ruby course.
|
data/bin/players.csv
ADDED
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
|
+
knuckleheads = StudioGame::Game.new("Knuckleheads")
|
8
|
+
default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
|
9
|
+
knuckleheads.load_players(ARGV.shift || default_player_file)
|
10
|
+
|
11
|
+
klutz = StudioGame::ClumsyPlayer.new("klutz", 105)
|
12
|
+
knuckleheads.add_player(klutz)
|
13
|
+
|
14
|
+
berserker = StudioGame::BerserkPlayer.new("berserker", 0)
|
15
|
+
knuckleheads.add_player(berserker)
|
16
|
+
|
17
|
+
loop do
|
18
|
+
puts "How many game rounds? ('quit' to exit)"
|
19
|
+
answer = gets.chomp.downcase
|
20
|
+
case answer
|
21
|
+
when 'quit', 'exit'
|
22
|
+
knuckleheads.print_stats
|
23
|
+
break
|
24
|
+
when /^\d+$/
|
25
|
+
knuckleheads.play(Integer(answer)) do
|
26
|
+
knuckleheads.total_points >= 200000000
|
27
|
+
end
|
28
|
+
else
|
29
|
+
puts "Please enter a number or 'quit'"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
knuckleheads.save_high_scores
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require_relative 'player'
|
2
|
+
|
3
|
+
module StudioGame
|
4
|
+
|
5
|
+
class BerserkPlayer < Player
|
6
|
+
|
7
|
+
attr_reader :w00t_times
|
8
|
+
|
9
|
+
def initialize(name, health)
|
10
|
+
super(name, health)
|
11
|
+
@w00t_times = 0
|
12
|
+
end
|
13
|
+
|
14
|
+
def w00t
|
15
|
+
@w00t_times += 1
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def blam
|
20
|
+
if @w00t_times >= 6
|
21
|
+
puts "Going loco!"
|
22
|
+
w00t
|
23
|
+
else
|
24
|
+
super
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative 'player'
|
2
|
+
require_relative 'treasure_trove'
|
3
|
+
|
4
|
+
module StudioGame
|
5
|
+
class ClumsyPlayer < Player
|
6
|
+
|
7
|
+
def initialize(name, health=100, boost_factor=1)
|
8
|
+
super(name, health)
|
9
|
+
@boost_factor = boost_factor
|
10
|
+
end
|
11
|
+
|
12
|
+
def found_treasure(treasure)
|
13
|
+
damaged_treasure = Treasure.new(treasure.name, treasure.points / 2.0)
|
14
|
+
super(damaged_treasure)
|
15
|
+
end
|
16
|
+
|
17
|
+
def w00t
|
18
|
+
@boost_factor.times { super }
|
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
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require_relative 'player'
|
2
|
+
require_relative 'game_turn'
|
3
|
+
require_relative 'treasure_trove'
|
4
|
+
|
5
|
+
module StudioGame
|
6
|
+
class Game
|
7
|
+
def initialize(name)
|
8
|
+
@name = name
|
9
|
+
@players = []
|
10
|
+
end
|
11
|
+
|
12
|
+
def load_players(from_file)
|
13
|
+
File.readlines(from_file).each do |line|
|
14
|
+
add_player(Player.from_csv(line))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def add_player(player)
|
19
|
+
@players.push(player)
|
20
|
+
end
|
21
|
+
|
22
|
+
def play(rounds)
|
23
|
+
puts "There are #{TreasureTrove::TREASURES.size} treasures to be found:"
|
24
|
+
TreasureTrove::TREASURES.each { |t| puts "A #{t.name} is worth #{t.points} points" }
|
25
|
+
puts "\n"
|
26
|
+
puts "There are #{@players.size} players in #{@name}:"
|
27
|
+
1.upto(rounds) do |round|
|
28
|
+
if block_given? && yield
|
29
|
+
break
|
30
|
+
end
|
31
|
+
puts "Round #{round}:"
|
32
|
+
@players.each do |player|
|
33
|
+
GameTurn.take_turn(player)
|
34
|
+
end
|
35
|
+
puts "\n"
|
36
|
+
end
|
37
|
+
print_stats
|
38
|
+
puts "#{total_points} total points from treasures found"
|
39
|
+
end
|
40
|
+
|
41
|
+
def list_scores
|
42
|
+
@players.each { |p| puts p }
|
43
|
+
end
|
44
|
+
|
45
|
+
def w00t_blam
|
46
|
+
@players.each { |p| p.w00t; p.blam }
|
47
|
+
end
|
48
|
+
|
49
|
+
def total_points
|
50
|
+
@players.reduce(0) { |sum, player| sum + player.points }
|
51
|
+
end
|
52
|
+
|
53
|
+
def print_stats
|
54
|
+
puts "#{@name} Statistics:"
|
55
|
+
strong, wimpy = @players.partition { |p| p.strong? }
|
56
|
+
puts "#{strong.count} strong players:"
|
57
|
+
strong.each { |p| puts "#{p.name} (#{p.score})" }
|
58
|
+
puts "#{wimpy.count} wimpy players:"
|
59
|
+
wimpy.each { |p| puts "#{p.name} (#{p.score})" }
|
60
|
+
puts " "
|
61
|
+
puts "#{@name} High Scores:"
|
62
|
+
@players.sort.each { |p| puts high_score_entry(p)}
|
63
|
+
puts " "
|
64
|
+
@players.each do |player|
|
65
|
+
puts "#{player.name}'s points totals:"
|
66
|
+
player.each_found_treasure do |treasure|
|
67
|
+
puts "#{treasure.points} total #{treasure.name} points"
|
68
|
+
end
|
69
|
+
puts "#{player.points} grand total points\n "
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def save_high_scores(to_file='high_scores.txt')
|
74
|
+
File.open(to_file, 'w') do |file|
|
75
|
+
file.puts "#{@name} High Scores:"
|
76
|
+
@players.sort.each do |player|
|
77
|
+
file.puts high_score_entry(player)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def high_score_entry(player)
|
83
|
+
"#{player.name.ljust(20, '.')} #{player.score}"
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'die'
|
2
|
+
require_relative 'loaded_die'
|
3
|
+
|
4
|
+
module StudioGame
|
5
|
+
module GameTurn
|
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 5..6
|
14
|
+
player.w00t
|
15
|
+
else
|
16
|
+
puts "#{player.name} was skipped."
|
17
|
+
end
|
18
|
+
|
19
|
+
treasure = TreasureTrove::TREASURES.sample
|
20
|
+
player.found_treasure(treasure)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module StudioGame
|
2
|
+
module Playable
|
3
|
+
|
4
|
+
def blam
|
5
|
+
self.health -= 10
|
6
|
+
puts "#{self.name} just got blammed!"
|
7
|
+
end
|
8
|
+
|
9
|
+
def w00t
|
10
|
+
self.health += 15
|
11
|
+
puts "#{self.name} just got w00ted!"
|
12
|
+
end
|
13
|
+
|
14
|
+
def strong?
|
15
|
+
self.health > 100
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require_relative 'playable'
|
2
|
+
|
3
|
+
module StudioGame
|
4
|
+
class Player
|
5
|
+
include Playable
|
6
|
+
|
7
|
+
attr_accessor :name, :health
|
8
|
+
|
9
|
+
def initialize(name, health=100)
|
10
|
+
@name = name.downcase.capitalize
|
11
|
+
@health = health
|
12
|
+
@treasures = Hash.new(0)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.from_csv(string)
|
16
|
+
name, health = string.split(',')
|
17
|
+
self.new(name, Integer(health))
|
18
|
+
end
|
19
|
+
|
20
|
+
def score
|
21
|
+
@health + @name.length
|
22
|
+
end
|
23
|
+
|
24
|
+
def points
|
25
|
+
@treasures.values.reduce(0, :+)
|
26
|
+
end
|
27
|
+
|
28
|
+
def found_treasure(treasure)
|
29
|
+
@treasures[treasure.name] += treasure.points
|
30
|
+
puts "#{@name} found a #{treasure.name} worth #{treasure.points} points"
|
31
|
+
end
|
32
|
+
|
33
|
+
def each_found_treasure
|
34
|
+
@treasures.each do |treasure|
|
35
|
+
tr = Treasure.new(treasure[0], treasure[1])
|
36
|
+
yield(tr)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def <=>(other_player)
|
41
|
+
other_player.score <=> self.score
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_s
|
45
|
+
"I'm #{@name} with a health of #{@health} and a score of #{self.score}."
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
if __FILE__ == $0
|
50
|
+
player = Player.new("moe")
|
51
|
+
puts player.name
|
52
|
+
puts player.health
|
53
|
+
player.w00t
|
54
|
+
puts player.health
|
55
|
+
player.blam
|
56
|
+
puts player.health
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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
|
+
|
21
|
+
puts TreasureTrove.random
|
22
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'studio_game/berserk_player'
|
2
|
+
|
3
|
+
module StudioGame
|
4
|
+
describe BerserkPlayer do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@player = BerserkPlayer.new('berserker', 20)
|
8
|
+
6.times { @player.w00t }
|
9
|
+
puts "w00t times: #{@player.w00t_times}"
|
10
|
+
end
|
11
|
+
|
12
|
+
it "goes loco after 6th w00t, and turns blams into w00ts" do
|
13
|
+
health = @player.health
|
14
|
+
@player.blam
|
15
|
+
@player.health.should == health + 15
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'studio_game/clumsy_player'
|
2
|
+
|
3
|
+
module StudioGame
|
4
|
+
describe ClumsyPlayer do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@player = ClumsyPlayer.new("klutz")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "only gets half the point value for each treasure" do
|
11
|
+
@player.points.should == 0
|
12
|
+
|
13
|
+
hammer = Treasure.new(:hammer, 50)
|
14
|
+
@player.found_treasure(hammer)
|
15
|
+
@player.found_treasure(hammer)
|
16
|
+
@player.found_treasure(hammer)
|
17
|
+
|
18
|
+
@player.points.should == 75
|
19
|
+
|
20
|
+
crowbar = Treasure.new(:crowbar, 400)
|
21
|
+
@player.found_treasure(crowbar)
|
22
|
+
|
23
|
+
@player.points.should == 275
|
24
|
+
|
25
|
+
yielded = []
|
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
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'studio_game/game'
|
2
|
+
|
3
|
+
module StudioGame
|
4
|
+
describe Game do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@game = Game.new("Knuckleheads")
|
8
|
+
@initial_health = 100
|
9
|
+
@player = Player.new("moe", @initial_health)
|
10
|
+
@game.add_player(@player)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "w00t should increase health by 15 if high roll (6)" do
|
14
|
+
roll = Die.any_instance.stub(:roll).and_return(6)
|
15
|
+
@game.play(1)
|
16
|
+
|
17
|
+
@player.health.should == @initial_health + 15
|
18
|
+
end
|
19
|
+
|
20
|
+
it "middle roll should not affect health" do
|
21
|
+
roll = Die.any_instance.stub(:roll).and_return(4)
|
22
|
+
@game.play(1)
|
23
|
+
|
24
|
+
@player.health.should == @initial_health
|
25
|
+
end
|
26
|
+
|
27
|
+
it "computes total points as the sum of all player points" do
|
28
|
+
game = Game.new("Knuckleheads")
|
29
|
+
|
30
|
+
player1 = Player.new("moe")
|
31
|
+
player2 = Player.new("larry")
|
32
|
+
|
33
|
+
game.add_player(player1)
|
34
|
+
game.add_player(player2)
|
35
|
+
|
36
|
+
player1.found_treasure(Treasure.new(:hammer, 50))
|
37
|
+
player1.found_treasure(Treasure.new(:hammer, 50))
|
38
|
+
player2.found_treasure(Treasure.new(:crowbar, 400))
|
39
|
+
|
40
|
+
game.total_points.should == 500
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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.to_s.should == "I'm Larry with a health of 150 and a score of 155."
|
22
|
+
end
|
23
|
+
|
24
|
+
it "computes a score as the sum of its health and length of name" do
|
25
|
+
@player.score.should == (150 + 5)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "increases health by 15 when w00ted" do
|
29
|
+
@player.w00t
|
30
|
+
|
31
|
+
@player.health.should == @initial_health + 15
|
32
|
+
end
|
33
|
+
|
34
|
+
it "decreases health by 10 when blammed" do
|
35
|
+
@player.blam
|
36
|
+
|
37
|
+
@player.health.should == @initial_health - 10
|
38
|
+
end
|
39
|
+
|
40
|
+
context "player with a health of 150" do
|
41
|
+
before do
|
42
|
+
@player = Player.new("someone", 150)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should be strong" do
|
46
|
+
@player.should be_strong
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "player with a health of 100 or less" do
|
51
|
+
before do
|
52
|
+
@player = Player.new("someone", 100)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should be wimpy" do
|
56
|
+
@player.should_not be_strong
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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
|
+
@treasure.name.should == :hammer
|
11
|
+
end
|
12
|
+
|
13
|
+
it "has a points attribute" do
|
14
|
+
@treasure.points.should == 50
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe TreasureTrove do
|
19
|
+
|
20
|
+
it "has a random method that returns one treasure" do
|
21
|
+
treasure = TreasureTrove.random
|
22
|
+
TreasureTrove::TREASURES.should include(treasure)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "has six treasures" do
|
26
|
+
TreasureTrove::TREASURES.size.should == 6
|
27
|
+
end
|
28
|
+
|
29
|
+
it "has a pie worth 5 points" do
|
30
|
+
TreasureTrove::TREASURES[0].should == Treasure.new(:pie, 5)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "has a bottle worth 25 points" do
|
34
|
+
TreasureTrove::TREASURES[1].should == Treasure.new(:bottle, 25)
|
35
|
+
end
|
36
|
+
|
37
|
+
it "has a hammer worth 50 points" do
|
38
|
+
TreasureTrove::TREASURES[2].should == Treasure.new(:hammer, 50)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "has a skillet worth 100 points" do
|
42
|
+
TreasureTrove::TREASURES[3].should == Treasure.new(:skillet, 100)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "has a broomstick worth 200 points" do
|
46
|
+
TreasureTrove::TREASURES[4].should == Treasure.new(:broomstick, 200)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "has a crowbar worth 400 points" do
|
50
|
+
TreasureTrove::TREASURES[5].should == Treasure.new(:crowbar, 400)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: studio_game_x
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Raphael Weiner
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-01-20 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: Simple game resulting from Pragmatic Studio Ruby course.
|
31
|
+
email: raphael.lowweiner@gmail.com
|
32
|
+
executables:
|
33
|
+
- studio_game
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
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/studio_game/berserk_player_spec.rb
|
50
|
+
- spec/studio_game/clumsy_player_spec.rb
|
51
|
+
- spec/studio_game/game_spec.rb
|
52
|
+
- spec/studio_game/player_spec.rb
|
53
|
+
- spec/studio_game/treasure_trove_spec.rb
|
54
|
+
- LICENSE
|
55
|
+
- README
|
56
|
+
homepage: https://github.com/raphweiner
|
57
|
+
licenses: []
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.9'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.8.24
|
77
|
+
signing_key:
|
78
|
+
specification_version: 3
|
79
|
+
summary: simple game from pragmatic studio's rb course
|
80
|
+
test_files:
|
81
|
+
- spec/studio_game/berserk_player_spec.rb
|
82
|
+
- spec/studio_game/clumsy_player_spec.rb
|
83
|
+
- spec/studio_game/game_spec.rb
|
84
|
+
- spec/studio_game/player_spec.rb
|
85
|
+
- spec/studio_game/treasure_trove_spec.rb
|