studio_game_aj 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 14405baf92d3814ae4c3dfbddd9cccdd389d8e555bcb8ff90de9fbd0f394dfa4
4
+ data.tar.gz: 89e9a20d8818cb71baa3076e2e0aa6f544dc95487d1d4eed6972bbcee9bb644f
5
+ SHA512:
6
+ metadata.gz: ff862d6c79394537b6227d2bf4b852ebe2b325fa1716a83b246d349edfe54e9f58224d355836af645152a3c02846c2f50e617440e3145a6a13500d6b96438745
7
+ data.tar.gz: 1d7667c3f296920977f9691a1545a409cf8d3d6f2e87796504d975b86b3600309a8014e3b48198ca3cf0187f2dc7e4d74a9c5d60caa7cacfbfcf7febb7a51025
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2023 Alabhya Jindal
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,3 @@
1
+ ### Player game
2
+
3
+ My first Ruby gem!!
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,34 @@
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
+ player1 = StudioGame::Player.new("moe")
9
+ player2 = StudioGame::Player.new("larry", 60)
10
+ player3 = StudioGame::Player.new("curly", 125)
11
+
12
+ knuckleheads = StudioGame::Game.new('Knuckleheads')
13
+ default_player_file = File.join(File.dirname(__FILE__), 'players.csv')
14
+ knuckleheads.load_players(ARGV.shift || default_player_file)
15
+
16
+ player4 = StudioGame::ClumsyPlayer.new('klutz', 105, 10)
17
+ knuckleheads.add_player(player4)
18
+
19
+ player5 = StudioGame::BerserkPlayer.new('berserk', 50)
20
+ knuckleheads.add_player(player5)
21
+
22
+ loop do
23
+ puts "\nHow many game rounds? (type 'quit' to exit)"
24
+ rounds = gets.chomp.downcase
25
+ case rounds
26
+ when /^\d+$/
27
+ knuckleheads.play(rounds.to_i)
28
+ when 'quit', 'exit'
29
+ knuckleheads.print_stats
30
+ break
31
+ else
32
+ puts "Please enter a number or 'quit'"
33
+ end
34
+ end
@@ -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,31 @@
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
+ puts "Berserker is berserk!" if berserk?
18
+ end
19
+
20
+ def blam
21
+ berserk? ? w00t : super
22
+ end
23
+ end
24
+ end
25
+
26
+ if __FILE__ == $0
27
+ berserker = BerserkPlayer.new("berserker", 50)
28
+ 6.times { berserker.w00t }
29
+ 2.times { berserker.blam }
30
+ puts berserker.health
31
+ end
@@ -0,0 +1,38 @@
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 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
+ end
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
@@ -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,108 @@
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, :players
9
+
10
+ def initialize(title)
11
+ @title = title.capitalize
12
+ @players = []
13
+ end
14
+
15
+ def high_score_entry(player)
16
+ formatted_name = player.name.ljust(20, '.')
17
+ "#{formatted_name} #{player.score}"
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
+ puts "\n#{@title} High Scores:"
24
+ @players.sort.each do |player|
25
+ file.puts high_score_entry(player)
26
+ end
27
+ end
28
+ end
29
+
30
+ def load_players(filename)
31
+ lines = File.readlines(filename).each do |line|
32
+ add_player(Player.from_csv(line))
33
+ end
34
+ end
35
+
36
+ def add_player(player)
37
+ @players << player
38
+ end
39
+
40
+ def total_points
41
+ @players.reduce(0) { |sum, player| sum + player.points}
42
+ end
43
+
44
+ def play(rounds)
45
+ puts "There are #{@players.size} players in #{@title}:"
46
+ @players.each do |player|
47
+ puts player
48
+ end
49
+
50
+ treasures = TreasureTrove::TREASURES
51
+ puts "\nThere are #{treasures.size} treasures to be found:"
52
+ treasures.each do |treasure|
53
+ puts "A #{treasure.name} is worth #{treasure.points} points"
54
+ end
55
+
56
+ 1.upto(rounds) do |round|
57
+ if block_given?
58
+ break if yield
59
+ end
60
+ puts "\nRound #{round}:"
61
+ @players.each do |player|
62
+ GameTurn.take_turn(player)
63
+ end
64
+ end
65
+ end
66
+
67
+ def print_name_and_health(player)
68
+ puts "#{player.name} (#{player.health})"
69
+ end
70
+
71
+ def print_stats
72
+ strong_players, wimpy_players = @players.partition { |player| player.strong? }
73
+
74
+ puts "\n#{@title} Statistics:"
75
+
76
+ puts "\n#{strong_players.size} strong players:"
77
+ strong_players.each do |player|
78
+ print_name_and_health(player)
79
+ end
80
+
81
+ puts "\n#{wimpy_players.size} wimpy players:"
82
+ wimpy_players.each do |player|
83
+ print_name_and_health(player)
84
+ end
85
+
86
+ @players.sort.each do |player|
87
+ puts "\n#{player.name}'s point totals:"
88
+ player.each_found_treasure do |treasure|
89
+ puts "#{treasure.name} worth #{treasure.points} points"
90
+ end
91
+ puts "#{player.points} grand total points"
92
+ end
93
+
94
+ puts "\n#{total_points} total points from treasures found"
95
+
96
+ puts "\n#{@title} High Scores:"
97
+ @players.sort.each do |player|
98
+ puts high_score_entry(player)
99
+ end
100
+ end
101
+ end
102
+ end
103
+
104
+ if __FILE__ == $0
105
+ knuckleheads = Game.new('knuckleheads')
106
+ knuckleheads.load_players('players.csv')
107
+ knuckleheads.save_high_scores
108
+ end
@@ -0,0 +1,23 @@
1
+ require_relative 'Die'
2
+ require_relative 'treasure_trove'
3
+ require_relative 'player'
4
+ require_relative 'loaded_die'
5
+
6
+ module StudioGame
7
+ module GameTurn
8
+ def self.take_turn(player)
9
+ die = Die.new()
10
+ case die.roll
11
+ when (1..2)
12
+ player.blam
13
+ when (3..4)
14
+ puts "#{player.name} was skipped."
15
+ else
16
+ player.w00t
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,17 @@
1
+ module StudioGame
2
+ module Playable
3
+ def w00t
4
+ self.health += 15
5
+ puts "#{name} got w00ted!"
6
+ end
7
+
8
+ def blam
9
+ self.health -= 10
10
+ puts "#{name} got blammed!"
11
+ end
12
+
13
+ def strong?
14
+ health > 100
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,54 @@
1
+ require_relative 'treasure_trove'
2
+ require_relative 'playable'
3
+
4
+ module StudioGame
5
+ class Player
6
+ include Playable
7
+
8
+ attr_accessor :health
9
+ attr_reader :name
10
+
11
+ def <=>(other)
12
+ other.score <=> score
13
+ end
14
+
15
+ def name=(new_name)
16
+ @name = new_name.capitalize
17
+ end
18
+
19
+ def initialize(name, health=100)
20
+ @name = name.capitalize
21
+ @health = health
22
+ @found_treasures = Hash.new(0)
23
+ end
24
+
25
+ def self.from_csv(string)
26
+ name, health = string.split(',')
27
+ Player.new(name, Integer(health))
28
+ end
29
+
30
+ def points
31
+ @found_treasures.values.reduce(0, :+)
32
+ end
33
+
34
+ def found_treasure(treasure)
35
+ @found_treasures[treasure.name] += treasure.points
36
+ puts "#{@name} found a #{treasure.name} worth #{treasure.points} points."
37
+ end
38
+
39
+ def each_found_treasure
40
+ @found_treasures.each do |name, points|
41
+ treasure = Treasure.new(name, points)
42
+ yield(treasure)
43
+ end
44
+ end
45
+
46
+ def to_s
47
+ "I'm #{@name} with health = #{@health}, points = #{points}, and score = #{score}."
48
+ end
49
+
50
+ def score
51
+ @health + points
52
+ end
53
+ end
54
+ 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,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,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
+ @player.each_found_treasure do |treasure|
26
+ yielded << treasure
27
+ end
28
+
29
+ yielded.should == [Treasure.new(:hammer, 75), Treasure.new(:crowbar, 200)]
30
+ end
31
+
32
+ context "with a boost factor" do
33
+ before do
34
+ @initial_health = 100
35
+ @boost_factor = 5
36
+ @player = ClumsyPlayer.new("klutz", @initial_health, @boost_factor)
37
+ end
38
+
39
+ it "has a boost factor" do
40
+ @player.boost_factor.should == 5
41
+ end
42
+
43
+ it "gets boost factor number of w00ts when w00ted" do
44
+ @player.w00t
45
+
46
+ @player.health.should == @initial_health + (15 * @boost_factor)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,72 @@
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 "has a title" do
16
+ @game.title.should == "Knuckleheads"
17
+ end
18
+
19
+ it "w00ts the player if a high number is rolled" do
20
+ Die.any_instance.stub(:roll).and_return(5)
21
+
22
+ @game.play(2)
23
+
24
+ @player.health.should == @initial_health + (15 * 2)
25
+ end
26
+
27
+ it "skips the player if a medium number is rolled" do
28
+ Die.any_instance.stub(:roll).and_return(3)
29
+
30
+ @game.play(2)
31
+
32
+ @player.health.should == @initial_health
33
+ end
34
+
35
+ it "blams the player if a low number is rolled" do
36
+ Die.any_instance.stub(:roll).and_return(1)
37
+
38
+ @game.play(2)
39
+
40
+ @player.health.should == @initial_health - (10 * 2)
41
+ end
42
+
43
+ it "assigns a treasure for points during a player's turn" do
44
+ game = Game.new("Knuckleheads")
45
+ player = Player.new("moe")
46
+
47
+ game.add_player(player)
48
+
49
+ game.play(1)
50
+
51
+ p player.points
52
+ player.points.should_not be_zero
53
+ end
54
+
55
+ it "computes total points as the sum of all player points" do
56
+ game = Game.new("Knuckleheads")
57
+
58
+ player1 = Player.new("moe")
59
+ player2 = Player.new("larry")
60
+
61
+ game.add_player(player1)
62
+ game.add_player(player2)
63
+
64
+ player1.found_treasure(Treasure.new(:hammer, 50))
65
+ player1.found_treasure(Treasure.new(:hammer, 50))
66
+ player2.found_treasure(Treasure.new(:crowbar, 400))
67
+
68
+ game.total_points.should == 500
69
+ end
70
+
71
+ end
72
+ end
@@ -0,0 +1,132 @@
1
+ require 'studio_game/player'
2
+ require 'studio_game/treasure_trove'
3
+
4
+ module StudioGame
5
+ describe Player do
6
+
7
+ before do
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 health = 150, points = 0, and score = 150."
22
+ end
23
+
24
+ it "computes a score as the sum of its health and points" do
25
+ @player.found_treasure(Treasure.new(:hammer, 50))
26
+ @player.found_treasure(Treasure.new(:hammer, 50))
27
+
28
+ @player.score.should == 250
29
+ end
30
+
31
+ it "increases health by 15 when w00ted" do
32
+ @player.w00t
33
+
34
+ @player.health.should == @initial_health + 15
35
+ end
36
+
37
+ it "decreases health by 10 when blammed" do
38
+ @player.blam
39
+
40
+ @player.health.should == @initial_health - 10
41
+ end
42
+
43
+ it "yields each found treasure and its total points" do
44
+ @player.found_treasure(Treasure.new(:skillet, 100))
45
+ @player.found_treasure(Treasure.new(:skillet, 100))
46
+ @player.found_treasure(Treasure.new(:hammer, 50))
47
+ @player.found_treasure(Treasure.new(:bottle, 5))
48
+ @player.found_treasure(Treasure.new(:bottle, 5))
49
+ @player.found_treasure(Treasure.new(:bottle, 5))
50
+ @player.found_treasure(Treasure.new(:bottle, 5))
51
+ @player.found_treasure(Treasure.new(:bottle, 5))
52
+
53
+ yielded = []
54
+ @player.each_found_treasure do |treasure|
55
+ yielded << treasure
56
+ end
57
+
58
+ yielded.should == [
59
+ Treasure.new(:skillet, 200),
60
+ Treasure.new(:hammer, 50),
61
+ Treasure.new(:bottle, 25)
62
+ ]
63
+ end
64
+
65
+ it "can be created from a CSV string" do
66
+ player = Player.from_csv("larry,150")
67
+
68
+ player.name.should == "Larry"
69
+ player.health.should == 150
70
+ end
71
+
72
+ context "created with a default health" do
73
+ before do
74
+ @player = Player.new("larry")
75
+ end
76
+
77
+ it "has a health of 100" do
78
+ @player.health.should == 100
79
+ end
80
+ end
81
+
82
+ context "with a health greater than 100" do
83
+ before do
84
+ @player = Player.new("larry", 150)
85
+ end
86
+
87
+ it "is strong" do
88
+ @player.should be_strong
89
+ end
90
+ end
91
+
92
+ context "with a health less than 100" do
93
+ before do
94
+ @player = Player.new("larry", 40)
95
+ end
96
+
97
+ it "is not strong" do
98
+ @player.should_not be_strong
99
+ end
100
+ end
101
+
102
+ context "in a collection of players" do
103
+ before do
104
+ @player1 = Player.new("moe", 100)
105
+ @player2 = Player.new("larry", 200)
106
+ @player3 = Player.new("curly", 300)
107
+
108
+ @players = [@player1, @player2, @player3]
109
+ end
110
+
111
+ it "is sorted by decreasing score" do
112
+ @players.sort.should == [@player3, @player2, @player1]
113
+ end
114
+ end
115
+
116
+ it "computes points as the sum of all treasure points" do
117
+ @player.points.should == 0
118
+
119
+ @player.found_treasure(Treasure.new(:hammer, 50))
120
+
121
+ @player.points.should == 50
122
+
123
+ @player.found_treasure(Treasure.new(:crowbar, 400))
124
+
125
+ @player.points.should == 450
126
+
127
+ @player.found_treasure(Treasure.new(:hammer, 50))
128
+
129
+ @player.points.should == 500
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,55 @@
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
+ TreasureTrove::TREASURES.should include(treasure)
53
+ end
54
+ end
55
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: studio_game_aj
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Alabhya Jindal
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-09-12 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: |
34
+ ### Player game
35
+
36
+ My first Ruby gem!!
37
+ email: alabhya10@gmail.com
38
+ executables:
39
+ - studio_game
40
+ extensions: []
41
+ extra_rdoc_files: []
42
+ files:
43
+ - LICENSE
44
+ - README
45
+ - bin/players.csv
46
+ - bin/studio_game
47
+ - lib/studio_game/auditable.rb
48
+ - lib/studio_game/berserk_player.rb
49
+ - lib/studio_game/clumsy_player.rb
50
+ - lib/studio_game/die.rb
51
+ - lib/studio_game/game.rb
52
+ - lib/studio_game/game_turn.rb
53
+ - lib/studio_game/loaded_die.rb
54
+ - lib/studio_game/playable.rb
55
+ - lib/studio_game/player.rb
56
+ - lib/studio_game/treasure_trove.rb
57
+ - spec/studio_game/berserk_player_spec.rb
58
+ - spec/studio_game/clumsy_player_spec.rb
59
+ - spec/studio_game/game_spec.rb
60
+ - spec/studio_game/player_spec.rb
61
+ - spec/studio_game/treasure_trove_spec.rb
62
+ homepage: https://pragmaticstudio.com/ruby
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '1.9'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubygems_version: 3.3.26
82
+ signing_key:
83
+ specification_version: 4
84
+ summary: Game created as part of The Pragmatic Studio's course
85
+ test_files:
86
+ - spec/studio_game/berserk_player_spec.rb
87
+ - spec/studio_game/clumsy_player_spec.rb
88
+ - spec/studio_game/game_spec.rb
89
+ - spec/studio_game/player_spec.rb
90
+ - spec/studio_game/treasure_trove_spec.rb