studio_game_mayank 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 +7 -0
- data/LICENSE +19 -0
- data/README +1 -0
- data/bin/batman.csv +2 -0
- data/bin/players.csv +3 -0
- data/bin/studio_game +37 -0
- data/lib/studio_game/auditable.rb +7 -0
- data/lib/studio_game/berserk_player.rb +36 -0
- data/lib/studio_game/clumsy_player.rb +27 -0
- data/lib/studio_game/die.rb +17 -0
- data/lib/studio_game/game.rb +93 -0
- data/lib/studio_game/game_turn.rb +22 -0
- data/lib/studio_game/loaded_die.rb +15 -0
- data/lib/studio_game/playable.rb +18 -0
- data/lib/studio_game/player.rb +67 -0
- data/lib/studio_game/treasure_trove.rb +20 -0
- data/spec/studio_game/game_spec.rb +35 -0
- data/spec/studio_game/player_spec.rb +64 -0
- metadata +82 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 181a2f82697a01e7a294181bb74e6daa8f8178b3788bf280e56a8ddeed76681c
|
|
4
|
+
data.tar.gz: d1deccdfab23ef847934351dd21f57b7aa006d8b360145c3906270b000c6dbd1
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d0d2eb444f042f1700a142bb48dd06d6bf79bc5947b87ad885fe296685d12cb525f16f1d9c058ebc52b2ec557bcb439fbf97ff406c3bf184a9c98c3fdcd8eb9f
|
|
7
|
+
data.tar.gz: 4ef4df6dcc0ed70375db29842dbdd818b3b8fbe711057c62df38e26ae26dc5e686d737329f3e21dfa0ff2f8fd5a9c3dd522675c6e50aa45b60d3a246e4e8af32
|
data/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2022 Mayank Jethva
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
data/README
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PRAGMATIC STUDIO GAME
|
data/bin/batman.csv
ADDED
data/bin/players.csv
ADDED
data/bin/studio_game
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require_relative '../lib/studio_game/game'
|
|
4
|
+
require_relative '../lib/studio_game/player'
|
|
5
|
+
require_relative '../lib/studio_game/clumsy_player'
|
|
6
|
+
require_relative '../lib/studio_game/berserk_player'
|
|
7
|
+
|
|
8
|
+
player1 = StudioGame::Player.new("moe")
|
|
9
|
+
player2 = StudioGame::Player.new("larry", 60)
|
|
10
|
+
player3 = StudioGame::Player.new("curly", 125)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
knuckleheads = StudioGame::Game.new("Knuckleheads")
|
|
14
|
+
players_file = ARGV.shift
|
|
15
|
+
default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
|
|
16
|
+
knuckleheads.load_players(players_file || default_player_file)
|
|
17
|
+
|
|
18
|
+
klutz = StudioGame::ClumsyPlayer.new("klutz", 105)
|
|
19
|
+
knuckleheads.add_player(klutz)
|
|
20
|
+
berserker = StudioGame::BerserkPlayer.new("berserker", 50)
|
|
21
|
+
knuckleheads.add_player(berserker)
|
|
22
|
+
|
|
23
|
+
loop do
|
|
24
|
+
puts "\nHow many game rounds? ('quit' to exit)"
|
|
25
|
+
answer = gets.chomp.downcase
|
|
26
|
+
case answer
|
|
27
|
+
when 'quit', 'exit'
|
|
28
|
+
knuckleheads.print_stats
|
|
29
|
+
knuckleheads.save_high_scores
|
|
30
|
+
break
|
|
31
|
+
when /^\d+$/
|
|
32
|
+
rounds = Integer(answer)
|
|
33
|
+
knuckleheads.play(rounds)
|
|
34
|
+
else
|
|
35
|
+
puts "Please enter a number or 'quit'"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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 w00t
|
|
15
|
+
super
|
|
16
|
+
@w00t_count += 1
|
|
17
|
+
if berserk?
|
|
18
|
+
puts "Berserker 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
|
+
2.times { berserker.w00t }
|
|
35
|
+
2.times { berserker.blam }
|
|
36
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require_relative 'player'
|
|
2
|
+
|
|
3
|
+
module StudioGame
|
|
4
|
+
class ClumsyPlayer < Player
|
|
5
|
+
def found_treasure(treasure)
|
|
6
|
+
damaged_treasure = Treasure.new(treasure.name, treasure.points / 2.0)
|
|
7
|
+
super(damaged_treasure)
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
if __FILE__ == $0
|
|
13
|
+
clumsy = ClumsyPlayer.new("klutz")
|
|
14
|
+
|
|
15
|
+
hammer = Treasure.new(:hammer, 50)
|
|
16
|
+
clumsy.found_treasure(hammer)
|
|
17
|
+
clumsy.found_treasure(hammer)
|
|
18
|
+
clumsy.found_treasure(hammer)
|
|
19
|
+
|
|
20
|
+
crowbar = Treasure.new(:crowbar, 400)
|
|
21
|
+
clumsy.found_treasure(crowbar)
|
|
22
|
+
|
|
23
|
+
clumsy.each_found_treasure do |treasure|
|
|
24
|
+
puts "#{treasure.points} total #{treasure.name} points"
|
|
25
|
+
end
|
|
26
|
+
puts "#{clumsy.points} grand total points"
|
|
27
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
def initialize(title)
|
|
10
|
+
@title = title
|
|
11
|
+
@players = []
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def add_player(player)
|
|
15
|
+
@players << player
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def load_players(from_file)
|
|
19
|
+
File.foreach(from_file) do |line|
|
|
20
|
+
@players << Player.from_csv(line)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def save_high_scores(to_file='high_scores.txt')
|
|
25
|
+
File.open(to_file, 'w') do |file|
|
|
26
|
+
file.puts "#{@title} High Scores:"
|
|
27
|
+
@players.sort.each do |player|
|
|
28
|
+
file.puts player.to_pretty_s
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def print_players(players)
|
|
35
|
+
players.each do |player|
|
|
36
|
+
puts "#{player.name} - #{player.health}"
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def total_points
|
|
41
|
+
total_points = @players.reduce(0) do |total_points, player|
|
|
42
|
+
total_points += player.points
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def play(rounds)
|
|
47
|
+
print_players(@players)
|
|
48
|
+
|
|
49
|
+
treasures = TreasureTrove::TREASURES
|
|
50
|
+
puts "\nThere are #{treasures.size} treasures to be found:\n"
|
|
51
|
+
treasures.each do |treasure|
|
|
52
|
+
puts "A #{treasure.name} is worth #{treasure.points} points"
|
|
53
|
+
end
|
|
54
|
+
puts "\n----"
|
|
55
|
+
|
|
56
|
+
1.upto(rounds) do |r|
|
|
57
|
+
if block_given?
|
|
58
|
+
break if yield
|
|
59
|
+
end
|
|
60
|
+
puts "\nRound: #{r}"
|
|
61
|
+
@players.each_with_index do |player, index|
|
|
62
|
+
GameTurn.take_turn(player)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def print_stats
|
|
68
|
+
puts "\n#{@title} Statistics:\n"
|
|
69
|
+
|
|
70
|
+
strong,wimpy = @players.partition { |player| player.strong? }
|
|
71
|
+
|
|
72
|
+
puts "\n#{@title} High Scores:"
|
|
73
|
+
@players.sort.each do |player|
|
|
74
|
+
puts player.to_pretty_s
|
|
75
|
+
player.each_found_treasure do |treasure|
|
|
76
|
+
puts "#{treasure.points} #{treasure.name} total points"
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
puts "\n#{strong.length} strong player(s):\n"
|
|
81
|
+
print_players(strong)
|
|
82
|
+
puts "\n#{wimpy.length} wimpy player(s):\n"
|
|
83
|
+
print_players(wimpy)
|
|
84
|
+
|
|
85
|
+
grand_total_points = @players.reduce(0) do |total_points, player|
|
|
86
|
+
total_points += player.points
|
|
87
|
+
end
|
|
88
|
+
puts "\n#{grand_total_points} total points found from treasures.\n\n"
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
die = LoadedDie.new
|
|
10
|
+
case die.roll
|
|
11
|
+
when 1..2
|
|
12
|
+
player.blam
|
|
13
|
+
when 3..4
|
|
14
|
+
puts "#{player.name} was skipped."
|
|
15
|
+
when 5..6
|
|
16
|
+
player.w00t
|
|
17
|
+
end
|
|
18
|
+
random_treasure = TreasureTrove.random
|
|
19
|
+
player.found_treasure(random_treasure)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module StudioGame
|
|
2
|
+
module Playable
|
|
3
|
+
def blam
|
|
4
|
+
puts "#{@name} got blammed!"
|
|
5
|
+
self.health -= 10
|
|
6
|
+
end
|
|
7
|
+
def w00t
|
|
8
|
+
puts "#{@name} got w00ted!"
|
|
9
|
+
self.health += 15
|
|
10
|
+
end
|
|
11
|
+
def strong?
|
|
12
|
+
self.health > 100
|
|
13
|
+
end
|
|
14
|
+
def wimpy?
|
|
15
|
+
self.health <= 100
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require_relative 'treasure_trove'
|
|
2
|
+
require_relative 'playable'
|
|
3
|
+
|
|
4
|
+
module StudioGame
|
|
5
|
+
class Player
|
|
6
|
+
|
|
7
|
+
include Playable
|
|
8
|
+
attr_reader :score
|
|
9
|
+
attr_accessor :health,:name
|
|
10
|
+
|
|
11
|
+
def initialize(name, health=100)
|
|
12
|
+
@name = name.capitalize
|
|
13
|
+
@health = health
|
|
14
|
+
@found_treasures = Hash.new(0)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def to_s
|
|
18
|
+
"I'm #{@name.capitalize} with health = #{@health}, points = #{points}, and score of #{score}"
|
|
19
|
+
end
|
|
20
|
+
def name=(new_name)
|
|
21
|
+
@name = new_name.capitalize
|
|
22
|
+
end
|
|
23
|
+
def score
|
|
24
|
+
@health + points
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def to_pretty_s
|
|
28
|
+
formatted_name = @name.ljust(20, '.')
|
|
29
|
+
"#{formatted_name} #{points}"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_csv(line)
|
|
33
|
+
name, health = line.split(',')
|
|
34
|
+
Player.new(name, Integer(health))
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def <=>(other_player)
|
|
38
|
+
other_player.score <=> score
|
|
39
|
+
end
|
|
40
|
+
def found_treasure(treasure)
|
|
41
|
+
@found_treasures[treasure.name] += treasure.points
|
|
42
|
+
puts "#{@name} found a #{treasure.name} worth #{treasure.points}."
|
|
43
|
+
puts @found_treasures
|
|
44
|
+
end
|
|
45
|
+
def each_found_treasure
|
|
46
|
+
@found_treasures.each do |key, value|
|
|
47
|
+
yield Treasure.new(key, value)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
def points
|
|
51
|
+
@found_treasures.values.sum()
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Example Code
|
|
58
|
+
|
|
59
|
+
if __FILE__ == $0
|
|
60
|
+
player = Player.new("moe")
|
|
61
|
+
puts player.name
|
|
62
|
+
puts player.health
|
|
63
|
+
player.w00t
|
|
64
|
+
puts player.health
|
|
65
|
+
player.blam
|
|
66
|
+
puts player.health
|
|
67
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
module StudioGame
|
|
3
|
+
|
|
4
|
+
Treasure = Struct.new(:name, :points)
|
|
5
|
+
|
|
6
|
+
module TreasureTrove
|
|
7
|
+
TREASURES = [
|
|
8
|
+
Treasure.new(:pie, 5),
|
|
9
|
+
Treasure.new(:bottle, 25),
|
|
10
|
+
Treasure.new(:hammer, 50),
|
|
11
|
+
Treasure.new(:skillet, 100),
|
|
12
|
+
Treasure.new(:broomstick, 200),
|
|
13
|
+
Treasure.new(:crowbar, 400)
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
def self.random
|
|
17
|
+
TREASURES.sample()
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
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 "will w00t a player when the die rolls a value >= 5" do
|
|
16
|
+
Die.any_instance.stub(:roll).and_return(5)
|
|
17
|
+
@game.play(1)
|
|
18
|
+
@player.health.should == @initial_health + 15
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it "will skip a player when the die rolls a value between 3 and 4" do
|
|
22
|
+
Die.any_instance.stub(:roll).and_return(3)
|
|
23
|
+
@game.play(1)
|
|
24
|
+
@player.health.should == @initial_health
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
it "will blam a player when the die rolls a value less than 3" do
|
|
29
|
+
Die.any_instance.stub(:roll).and_return(2)
|
|
30
|
+
@game.play(1)
|
|
31
|
+
@player.health.should == @initial_health - 10
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
require 'studio_game/player'
|
|
2
|
+
|
|
3
|
+
module StudioGame
|
|
4
|
+
describe Player do
|
|
5
|
+
before do
|
|
6
|
+
$stdout = StringIO.new
|
|
7
|
+
@initial_health = 150
|
|
8
|
+
@player = Player.new('larry', @initial_health)
|
|
9
|
+
@players = [@player1, @player2, @player3]
|
|
10
|
+
end
|
|
11
|
+
it "has a capitalized name" do
|
|
12
|
+
@player.name.should == 'Larry'
|
|
13
|
+
end
|
|
14
|
+
it "has an initial health" do
|
|
15
|
+
@player.health.should == @initial_health
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it "has a string representation" do
|
|
19
|
+
@player.to_s.should == "I'm Larry with a health of 150 and score of 155"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it "computes a score as the sum of its health and length of name" do
|
|
23
|
+
@player.score.should == 155
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "increases health by 15 when w00ted" do
|
|
27
|
+
@player.w00t
|
|
28
|
+
@player.health.should == @initial_health + 15
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it "decreases health by 10 when blammed" do
|
|
33
|
+
@player.blam
|
|
34
|
+
@player.health.should == @initial_health - 10
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
context "with a health > 100" do
|
|
38
|
+
before do
|
|
39
|
+
@initial_health = 150
|
|
40
|
+
@player = Player.new('larry', @initial_health)
|
|
41
|
+
end
|
|
42
|
+
it "returns true for strong? if the player health is > 100" do
|
|
43
|
+
@player.should be_strong
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
context "with a health <= 100" do
|
|
49
|
+
before do
|
|
50
|
+
@initial_health = 100
|
|
51
|
+
@player = Player.new('larry', @initial_health)
|
|
52
|
+
end
|
|
53
|
+
it "returns true for wimpy? if the player health is <= 100" do
|
|
54
|
+
@player.should be_wimpy
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it "is sorted by decreasing score" do
|
|
60
|
+
@players.sort.should == [@player3, @player2, @player1]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: studio_game_mayank
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Mayank Jethva
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2022-04-27 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: '2.8'
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 2.8.0
|
|
23
|
+
type: :development
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - "~>"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '2.8'
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 2.8.0
|
|
33
|
+
description: PRAGMATIC STUDIO GAME
|
|
34
|
+
email:
|
|
35
|
+
executables:
|
|
36
|
+
- studio_game
|
|
37
|
+
extensions: []
|
|
38
|
+
extra_rdoc_files: []
|
|
39
|
+
files:
|
|
40
|
+
- LICENSE
|
|
41
|
+
- README
|
|
42
|
+
- bin/batman.csv
|
|
43
|
+
- bin/players.csv
|
|
44
|
+
- bin/studio_game
|
|
45
|
+
- lib/studio_game/auditable.rb
|
|
46
|
+
- lib/studio_game/berserk_player.rb
|
|
47
|
+
- lib/studio_game/clumsy_player.rb
|
|
48
|
+
- lib/studio_game/die.rb
|
|
49
|
+
- lib/studio_game/game.rb
|
|
50
|
+
- lib/studio_game/game_turn.rb
|
|
51
|
+
- lib/studio_game/loaded_die.rb
|
|
52
|
+
- lib/studio_game/playable.rb
|
|
53
|
+
- lib/studio_game/player.rb
|
|
54
|
+
- lib/studio_game/treasure_trove.rb
|
|
55
|
+
- spec/studio_game/game_spec.rb
|
|
56
|
+
- spec/studio_game/player_spec.rb
|
|
57
|
+
homepage: https://github.com/mayank23
|
|
58
|
+
licenses:
|
|
59
|
+
- MIT
|
|
60
|
+
metadata: {}
|
|
61
|
+
post_install_message:
|
|
62
|
+
rdoc_options: []
|
|
63
|
+
require_paths:
|
|
64
|
+
- lib
|
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - ">="
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '1.9'
|
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
requirements: []
|
|
76
|
+
rubygems_version: 3.3.7
|
|
77
|
+
signing_key:
|
|
78
|
+
specification_version: 4
|
|
79
|
+
summary: pragmatic studio - studio game
|
|
80
|
+
test_files:
|
|
81
|
+
- spec/studio_game/game_spec.rb
|
|
82
|
+
- spec/studio_game/player_spec.rb
|