burger_game 1.0.1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc1d0c98f88b17a7513b6c86dd8dfaa492612164ac943b9274aee79e9d8de483
4
- data.tar.gz: fab481d8be76b65c24463561bcb029e67f005c422614ecf75c5100c801d06315
3
+ metadata.gz: 016a5be00bfc91801f7968d288aedbd6c465a83661bef6f2ce9eec89c53a2393
4
+ data.tar.gz: b4642b36acc216fdad31819e88855f076c925e49cc0ddd480cdeb7c21b4e5d1e
5
5
  SHA512:
6
- metadata.gz: 6dac60f1e1771c18c5af6ccba90751f158b901982be687ab68a1be6599a168eeb8e005711e8b388b36deed764ee65d4ba514b6227afce5966b43c8d6fa891553
7
- data.tar.gz: 0405c0efea01172f8b01b75c3d3fbf5662ee47e7fb8be26974801bf51afdce7a43c55331c094c878af33c60522d8dc46de672cda54d223366693919544fc641b
6
+ metadata.gz: 45fb5e026aa06c0b7083550cc5c79143b6a4a04a8a56d7e139d2ee7304527e578a8111cf56a6380d5cb8c2840d7b4c0fc1bfccaf0f8ecca79ed4d6f7a01d25a5
7
+ data.tar.gz: 8f3fd3ff6e8f60c484256f830f873b9bc08822ad09f71863f0a5d310f01f64c93bfd37f2dc487cccb659ba387c4bd8d3b2fa6548bd30f5019cc73ace1c8bc913
data/Gemfile.lock CHANGED
@@ -1,60 +1,60 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- artii (2.1.2)
5
- colorize (0.8.1)
6
- diff-lcs (1.4.4)
7
- json (2.5.1)
8
- pastel (0.8.0)
9
- tty-color (~> 0.5)
10
- rspec (3.10.0)
11
- rspec-core (~> 3.10.0)
12
- rspec-expectations (~> 3.10.0)
13
- rspec-mocks (~> 3.10.0)
14
- rspec-core (3.10.1)
15
- rspec-support (~> 3.10.0)
16
- rspec-expectations (3.10.1)
17
- diff-lcs (>= 1.2.0, < 2.0)
18
- rspec-support (~> 3.10.0)
19
- rspec-mocks (3.10.2)
20
- diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.10.0)
22
- rspec-support (3.10.2)
23
- strings (0.2.1)
24
- strings-ansi (~> 0.2)
25
- unicode-display_width (>= 1.5, < 3.0)
26
- unicode_utils (~> 1.4)
27
- strings-ansi (0.2.0)
28
- tty-box (0.7.0)
29
- pastel (~> 0.8)
30
- strings (~> 0.2.0)
31
- tty-cursor (~> 0.7)
32
- tty-color (0.6.0)
33
- tty-cursor (0.7.1)
34
- tty-prompt (0.23.1)
35
- pastel (~> 0.8)
36
- tty-reader (~> 0.8)
37
- tty-reader (0.9.0)
38
- tty-cursor (~> 0.7)
39
- tty-screen (~> 0.8)
40
- wisper (~> 2.0)
41
- tty-screen (0.8.1)
42
- unicode-display_width (2.0.0)
43
- unicode_utils (1.4.0)
44
- wisper (2.0.1)
45
-
46
- PLATFORMS
47
- ruby
48
- x64-mingw32
49
- x86_64-linux
50
-
51
- DEPENDENCIES
52
- artii (~> 2.1)
53
- colorize (~> 0.8.1)
54
- json (~> 2.5)
55
- rspec (~> 3.10)
56
- tty-box (~> 0.7.0)
57
- tty-prompt (~> 0.23.1)
58
-
59
- BUNDLED WITH
60
- 2.2.17
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ artii (2.1.2)
5
+ colorize (0.8.1)
6
+ diff-lcs (1.4.4)
7
+ json (2.5.1)
8
+ pastel (0.8.0)
9
+ tty-color (~> 0.5)
10
+ rspec (3.10.0)
11
+ rspec-core (~> 3.10.0)
12
+ rspec-expectations (~> 3.10.0)
13
+ rspec-mocks (~> 3.10.0)
14
+ rspec-core (3.10.1)
15
+ rspec-support (~> 3.10.0)
16
+ rspec-expectations (3.10.1)
17
+ diff-lcs (>= 1.2.0, < 2.0)
18
+ rspec-support (~> 3.10.0)
19
+ rspec-mocks (3.10.2)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.10.0)
22
+ rspec-support (3.10.2)
23
+ strings (0.2.1)
24
+ strings-ansi (~> 0.2)
25
+ unicode-display_width (>= 1.5, < 3.0)
26
+ unicode_utils (~> 1.4)
27
+ strings-ansi (0.2.0)
28
+ tty-box (0.7.0)
29
+ pastel (~> 0.8)
30
+ strings (~> 0.2.0)
31
+ tty-cursor (~> 0.7)
32
+ tty-color (0.6.0)
33
+ tty-cursor (0.7.1)
34
+ tty-prompt (0.23.1)
35
+ pastel (~> 0.8)
36
+ tty-reader (~> 0.8)
37
+ tty-reader (0.9.0)
38
+ tty-cursor (~> 0.7)
39
+ tty-screen (~> 0.8)
40
+ wisper (~> 2.0)
41
+ tty-screen (0.8.1)
42
+ unicode-display_width (2.0.0)
43
+ unicode_utils (1.4.0)
44
+ wisper (2.0.1)
45
+
46
+ PLATFORMS
47
+ ruby
48
+ x64-mingw32
49
+ x86_64-linux
50
+
51
+ DEPENDENCIES
52
+ artii (~> 2.1)
53
+ colorize (~> 0.8.1)
54
+ json (~> 2.5)
55
+ rspec (~> 3.10)
56
+ tty-box (~> 0.7.0)
57
+ tty-prompt (~> 0.23.1)
58
+
59
+ BUNDLED WITH
60
+ 2.2.17
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'burger_game'
4
+
5
+ begin
6
+ BurgerGame.new *ARGV.dup
7
+ rescue StandardError => e
8
+ puts "Something went wrong."
9
+ puts "Error message: " + e.message
10
+ end
data/burger_game.gemspec CHANGED
@@ -1,27 +1,29 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "burger_game"
3
- s.version = "1.0.1"
3
+ s.version = "1.0.6"
4
4
  s.summary = "A Ruby Burger Game"
5
5
  s.description = "A simple text-based Ruby terminal game, that simulates a burger shop, where you need to build the meal for the customers with different requests and preferences."
6
6
  s.authors = ["Jessica Gozali"]
7
7
  s.email = "gcas012115@coderacademy.edu.au"
8
8
  s.require_paths = ["lib"]
9
+ s.bindir = "bin"
10
+ s.executables = ["start_burger_game"]
9
11
  s.files = ["./burger_game.gemspec",
10
- "./burger_game.rb",
11
- "./burger_game.sh",
12
12
  "./Gemfile",
13
13
  "./Gemfile.lock",
14
14
  "./LICENSE",
15
- "./spec/burger_game_spec.rb",
15
+ "./bin/start_burger_game",
16
+ "./lib/burger_game.rb",
16
17
  "./lib/customer_request.rb",
17
18
  "./lib/game_state.rb",
18
19
  "./lib/player_option.rb",
19
20
  "./lib/recipe.rb",
20
21
  "./lib/score_comparison.rb",
21
22
  "./lib/screen_message.rb",
22
- "./lib/data/customer_request.json",
23
- "./lib/data/customer_response.json",
24
- "./lib/data/recipe.json"]
23
+ "./lib/customer_request.json",
24
+ "./lib/customer_response.json",
25
+ "./lib/recipe.json",
26
+ "./spec/burger_game_spec.rb"]
25
27
  s.homepage = "https://rubygems.org/gems/burger_game"
26
28
  s.license = "GPL-3.0"
27
29
  s.required_ruby_version = "~> 2.7"
@@ -0,0 +1,199 @@
1
+ # For command line argument
2
+ require 'optparse'
3
+ require 'ostruct'
4
+
5
+ require_relative './game_state'
6
+ require_relative './screen_message'
7
+ require_relative './recipe'
8
+ require_relative './customer_request'
9
+ require_relative './player_option'
10
+ require_relative './score_comparison'
11
+
12
+ class BurgerGame
13
+ def initialize(*args)
14
+ # Initialise
15
+ game_state = GameState.new
16
+ show_menu = Recipe.new
17
+ no_of_recipe = Recipe.no_of_recipe
18
+ screen = ScreenMessage.new
19
+ player_options = PlayerOption.new
20
+ customer = CustomerRequest.new
21
+ no_of_customer = CustomerRequest.no_of_customer
22
+ options = OpenStruct.new
23
+
24
+ # Handle command line argument
25
+ opt_parser = OptionParser.new do |opt|
26
+ opt.banner = "Usage: start_burger_game [options]"
27
+
28
+ opt.on("-h", "--help", "Print this Help menu for Ruby Burger Game.") do |arg|
29
+ puts opt
30
+ exit
31
+ end
32
+
33
+ opt.on("-m", "--money TARGET_MONEY", screen.display_h_money) { |arg| options.target_money = arg }
34
+
35
+ opt.on("-r", "--reputation MAX_REPUTATION", screen.display_h_reputation) { |arg| options.max_reputation = arg }
36
+ end
37
+
38
+ # ERROR HANDLING for command line argument
39
+ begin
40
+ opt_parser.parse!(args)
41
+ rescue OptionParser::InvalidOption => e
42
+ puts "You have entered an invalid option. Please check the available options in our Help menu '-h' or '--help'."
43
+ puts e.message
44
+ exit
45
+ rescue OptionParser::MissingArgument => e
46
+ puts "You have not entered the argument for your option."
47
+ puts e.message
48
+ exit
49
+ rescue OptionParser::ParseError => e
50
+ puts "Error when parsing argument."
51
+ puts e.message
52
+ exit
53
+ rescue => e
54
+ puts "Something went wrong."
55
+ puts "Error message: " + e.message
56
+ exit
57
+ end
58
+
59
+ if (options.target_money)
60
+ if ((options.target_money.to_i >= 10 ) && (options.target_money.to_i <= 99 ))
61
+ puts "Change TARGET_MONEY to: $#{options.target_money}.00."
62
+ # Set target money in GameState
63
+ game_state.set_target_money(options.target_money.to_f)
64
+ else
65
+ puts screen.display_invalid("for TARGET_MONEY.")
66
+ exit
67
+ end
68
+
69
+ end
70
+ if (options.max_reputation)
71
+ if ((options.max_reputation.to_i >= 1 ) && (options.max_reputation.to_i <= 10 ))
72
+ puts "Change MAX_REPUTATION to: #{options.max_reputation}."
73
+ # Set max reputation in GameState
74
+ game_state.set_max_reputation(options.max_reputation.to_i)
75
+ else
76
+ puts screen.display_invalid("for MAX_REPUTATION.")
77
+ exit
78
+ end
79
+ end
80
+
81
+ # Ask user if they want to launch the game or exit
82
+ puts
83
+ launch_game = player_options.launch_game
84
+
85
+ # Exit command line if user select Exit
86
+ exit if launch_game === false
87
+
88
+ # Show welcome message
89
+ puts
90
+ puts screen.display_welcome
91
+ puts
92
+ screen.go_to_next
93
+
94
+ # Feature 1: Options to see instructions or to start the game
95
+ loop do
96
+ puts
97
+ start_game = player_options.start_game
98
+
99
+ break if start_game === true
100
+
101
+ # Show instructions
102
+ puts
103
+ puts screen.display_instructions
104
+
105
+ puts
106
+ screen.go_to_next
107
+ end
108
+
109
+ # Show prologue
110
+ puts
111
+ puts screen.display_prologue
112
+
113
+ puts
114
+ screen.go_to_next
115
+
116
+ # Loop game until WIN / GAME OVER
117
+ loop do
118
+ # Display current money and reputation status
119
+ puts game_state.display_game_state
120
+
121
+ puts
122
+ screen.go_to_next
123
+
124
+ # Feature 2: Formatted display for showing shop's menu
125
+ puts
126
+ puts "Ruby Burger's Menu"
127
+ puts
128
+ puts
129
+ puts "We have #{no_of_recipe} recipes. Try to remember the recipe name, the stack order of ingredients and the quantity. We will build the burger from bottom to top."
130
+ puts
131
+
132
+ # Loop to display all recipes
133
+ i = 0
134
+ loop do
135
+ puts show_menu.display_recipe(i)
136
+
137
+ puts
138
+ screen.go_to_next
139
+
140
+ i += 1
141
+ break if i > (no_of_recipe - 1)
142
+ end
143
+
144
+ # Feature 3: Randomised customers with set of request (and associated preferences) and responses
145
+ # Display customer request
146
+ puts
147
+ puts "There is a customer in the queue..."
148
+ puts
149
+ # Randomise customer
150
+ customer_no = rand(no_of_customer)
151
+ puts customer.display_request(customer_no)
152
+ puts
153
+
154
+ puts
155
+ screen.go_to_next
156
+
157
+ # Feature 4: Selectable options for list of ingredients, so no manual entry (typing) is needed.
158
+ # Quantity input as integer within a pre-set range.
159
+ # Display player's options
160
+ player_recipe = player_options.get_selection
161
+ customer_recipe = customer.get_request(customer_no)
162
+
163
+ # Feature 5: Score calculation based on customer's request and preferences compared to player's input
164
+ # Calculate score
165
+ compare = ScoreComparison.new(player_recipe, customer_recipe)
166
+ score = compare.get_score
167
+ mood = compare.get_mood(score)
168
+
169
+ # Feautre 6: Get customers' responses from a JSON file
170
+ # Display customer's response
171
+ puts
172
+ puts "The customer wants to say something..."
173
+ puts
174
+ puts customer.display_response(customer_no, mood)
175
+
176
+ puts
177
+ screen.go_to_next
178
+ puts
179
+
180
+ # Update game state
181
+ compare.calculate_state(mood)
182
+
183
+ # Feature 7: Lose/win criteria based on reputation and money
184
+ # GAME OVER condition
185
+ if GameState.current_reputation == 0
186
+ puts screen.display_game_over
187
+ puts
188
+ break
189
+ end
190
+
191
+ # WIN condition
192
+ if GameState.current_money >= GameState.target_money
193
+ puts screen.display_win
194
+ puts
195
+ break
196
+ end
197
+ end
198
+ end
199
+ end
@@ -5,7 +5,8 @@ class CustomerRequest
5
5
  # ERROR HANDLING for reading files
6
6
  begin
7
7
  # Read customer_request.JSON file
8
- customer_file = File.read('./lib/data/customer_request.json')
8
+ customer_file = File.read(File.join(File.dirname(__FILE__), './customer_request.json'))
9
+
9
10
  rescue Errno::ENOENT => e
10
11
  puts "Could not find customer_request.json file. Please put customer_request.json in the 'data' directory."
11
12
  puts e.message
@@ -18,7 +19,8 @@ class CustomerRequest
18
19
 
19
20
  begin
20
21
  # Read customer_response.JSON file
21
- response_file = File.read('./lib/data/customer_response.json')
22
+ response_file = File.read(File.join(File.dirname(__FILE__), './customer_response.json'))
23
+
22
24
  rescue Errno::ENOENT => e
23
25
  puts "Could not find customer_response.json file. Please put customer_response.json in the 'data' directory."
24
26
  puts e.message
File without changes
data/lib/recipe.rb CHANGED
@@ -8,7 +8,8 @@ class Recipe
8
8
  # ERROR HANDLING for reading files
9
9
  begin
10
10
  # Read recipe.JSON file
11
- file = File.read('./lib/data/recipe.json')
11
+ file = File.read(File.join(File.dirname(__FILE__), './recipe.json'))
12
+
12
13
  rescue Errno::ENOENT => e
13
14
  puts "Could not find recipe.json file. Please put recipe.json in the 'data' directory."
14
15
  puts e.message
@@ -1,4 +1,4 @@
1
- require_relative '../burger_game'
1
+ require_relative '../lib/burger_game'
2
2
  require_relative '../lib/screen_message'
3
3
  require_relative '../lib/recipe'
4
4
  require_relative '../lib/player_option'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burger_game
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jessica Gozali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-25 00:00:00.000000000 Z
11
+ date: 2021-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -111,26 +111,28 @@ dependencies:
111
111
  description: A simple text-based Ruby terminal game, that simulates a burger shop,
112
112
  where you need to build the meal for the customers with different requests and preferences.
113
113
  email: gcas012115@coderacademy.edu.au
114
- executables: []
114
+ executables:
115
+ - start_burger_game
115
116
  extensions: []
116
117
  extra_rdoc_files: []
117
118
  files:
118
119
  - "./Gemfile"
119
120
  - "./Gemfile.lock"
120
121
  - "./LICENSE"
122
+ - "./bin/start_burger_game"
121
123
  - "./burger_game.gemspec"
122
- - "./burger_game.rb"
123
- - "./burger_game.sh"
124
+ - "./lib/burger_game.rb"
125
+ - "./lib/customer_request.json"
124
126
  - "./lib/customer_request.rb"
125
- - "./lib/data/customer_request.json"
126
- - "./lib/data/customer_response.json"
127
- - "./lib/data/recipe.json"
127
+ - "./lib/customer_response.json"
128
128
  - "./lib/game_state.rb"
129
129
  - "./lib/player_option.rb"
130
+ - "./lib/recipe.json"
130
131
  - "./lib/recipe.rb"
131
132
  - "./lib/score_comparison.rb"
132
133
  - "./lib/screen_message.rb"
133
134
  - "./spec/burger_game_spec.rb"
135
+ - bin/start_burger_game
134
136
  homepage: https://rubygems.org/gems/burger_game
135
137
  licenses:
136
138
  - GPL-3.0
data/burger_game.rb DELETED
@@ -1,197 +0,0 @@
1
- # For command line argument
2
- require 'optparse'
3
- require 'ostruct'
4
-
5
- require_relative './lib/game_state'
6
- require_relative './lib/screen_message'
7
- require_relative './lib/recipe'
8
- require_relative './lib/customer_request'
9
- require_relative './lib/player_option'
10
- require_relative './lib/score_comparison'
11
-
12
- class BurgerGame
13
- # Initialise
14
- game_state = GameState.new
15
- show_menu = Recipe.new
16
- no_of_recipe = Recipe.no_of_recipe
17
- screen = ScreenMessage.new
18
- player_options = PlayerOption.new
19
- customer = CustomerRequest.new
20
- no_of_customer = CustomerRequest.no_of_customer
21
- options = OpenStruct.new
22
-
23
- # Handle command line argument
24
- opt_parser = OptionParser.new do |opt|
25
- opt.banner = "Usage: main.rb [options]"
26
-
27
- opt.on("-h", "--help", "Print this Help menu for Ruby Burger Game.") do |arg|
28
- puts opt
29
- exit
30
- end
31
-
32
- opt.on("-m", "--money TARGET_MONEY", screen.display_h_money) { |arg| options.target_money = arg }
33
-
34
- opt.on("-r", "--reputation MAX_REPUTATION", screen.display_h_reputation) { |arg| options.max_reputation = arg }
35
- end
36
-
37
- # ERROR HANDLING for command line argument
38
- begin
39
- opt_parser.parse!
40
- rescue OptionParser::InvalidOption => e
41
- puts "You have entered an invalid option. Please check the available options in our Help menu '-h' or '--help'."
42
- puts e.message
43
- exit
44
- rescue OptionParser::MissingArgument => e
45
- puts "You have not entered the argument for your option."
46
- puts e.message
47
- exit
48
- rescue OptionParser::ParseError => e
49
- puts "Error when parsing argument."
50
- puts e.message
51
- exit
52
- rescue => e
53
- puts "Something went wrong."
54
- puts "Error message: " + e.message
55
- exit
56
- end
57
-
58
- if (options.target_money)
59
- if ((options.target_money.to_i >= 10 ) && (options.target_money.to_i <= 99 ))
60
- puts "Change TARGET_MONEY to: $#{options.target_money}.00."
61
- # Set target money in GameState
62
- game_state.set_target_money(options.target_money.to_f)
63
- else
64
- puts screen.display_invalid("for TARGET_MONEY.")
65
- exit
66
- end
67
-
68
- end
69
- if (options.max_reputation)
70
- if ((options.max_reputation.to_i >= 1 ) && (options.max_reputation.to_i <= 10 ))
71
- puts "Change MAX_REPUTATION to: #{options.max_reputation}."
72
- # Set max reputation in GameState
73
- game_state.set_max_reputation(options.max_reputation.to_i)
74
- else
75
- puts screen.display_invalid("for MAX_REPUTATION.")
76
- exit
77
- end
78
- end
79
-
80
- # Ask user if they want to launch the game or exit
81
- puts
82
- launch_game = player_options.launch_game
83
-
84
- # Exit command line if user select Exit
85
- exit if launch_game === false
86
-
87
- # Show welcome message
88
- puts
89
- puts screen.display_welcome
90
- puts
91
- screen.go_to_next
92
-
93
- # Feature 1: Options to see instructions or to start the game
94
- loop do
95
- puts
96
- start_game = player_options.start_game
97
-
98
- break if start_game === true
99
-
100
- # Show instructions
101
- puts
102
- puts screen.display_instructions
103
-
104
- puts
105
- screen.go_to_next
106
- end
107
-
108
- # Show prologue
109
- puts
110
- puts screen.display_prologue
111
-
112
- puts
113
- screen.go_to_next
114
-
115
- # Loop game until WIN / GAME OVER
116
- loop do
117
- # Display current money and reputation status
118
- puts game_state.display_game_state
119
-
120
- puts
121
- screen.go_to_next
122
-
123
- # Feature 2: Formatted display for showing shop's menu
124
- puts
125
- puts "Ruby Burger's Menu"
126
- puts
127
- puts
128
- puts "We have #{no_of_recipe} recipes. Try to remember the recipe name, the stack order of ingredients and the quantity. We will build the burger from bottom to top."
129
- puts
130
-
131
- # Loop to display all recipes
132
- i = 0
133
- loop do
134
- puts show_menu.display_recipe(i)
135
-
136
- puts
137
- screen.go_to_next
138
-
139
- i += 1
140
- break if i > (no_of_recipe - 1)
141
- end
142
-
143
- # Feature 3: Randomised customers with set of request (and associated preferences) and responses
144
- # Display customer request
145
- puts
146
- puts "There is a customer in the queue..."
147
- puts
148
- # Randomise customer
149
- customer_no = rand(no_of_customer)
150
- puts customer.display_request(customer_no)
151
- puts
152
-
153
- puts
154
- screen.go_to_next
155
-
156
- # Feature 4: Selectable options for list of ingredients, so no manual entry (typing) is needed.
157
- # Quantity input as integer within a pre-set range.
158
- # Display player's options
159
- player_recipe = player_options.get_selection
160
- customer_recipe = customer.get_request(customer_no)
161
-
162
- # Feature 5: Score calculation based on customer's request and preferences compared to player's input
163
- # Calculate score
164
- compare = ScoreComparison.new(player_recipe, customer_recipe)
165
- score = compare.get_score
166
- mood = compare.get_mood(score)
167
-
168
- # Feautre 6: Get customers' responses from a JSON file
169
- # Display customer's response
170
- puts
171
- puts "The customer wants to say something..."
172
- puts
173
- puts customer.display_response(customer_no, mood)
174
-
175
- puts
176
- screen.go_to_next
177
- puts
178
-
179
- # Update game state
180
- compare.calculate_state(mood)
181
-
182
- # Feature 7: Lose/win criteria based on reputation and money
183
- # GAME OVER condition
184
- if GameState.current_reputation == 0
185
- puts screen.display_game_over
186
- puts
187
- break
188
- end
189
-
190
- # WIN condition
191
- if GameState.current_money >= GameState.target_money
192
- puts screen.display_win
193
- puts
194
- break
195
- end
196
- end
197
- end
data/burger_game.sh DELETED
@@ -1,9 +0,0 @@
1
- #!/bin/bash
2
- if ! gem list -i burger_game > /dev/null; then
3
- gem install burger_game
4
- fi
5
- if ! gem list -i bundler > /dev/null; then
6
- gem install bundler
7
- fi
8
- bundle install --quiet
9
- ruby burger_game.rb "$@"