Sith-Lord_Jedi_Ewok 0.1.1 → 0.1.2

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: a0d7f680a56b27989cd623343ab8d32695bd6177e33acbe1b6dec73c26707da0
4
- data.tar.gz: d4ec4d728647ec875bcd33b7b9596eaabc99699f98e1a43ccd417050b9d0ea52
3
+ metadata.gz: 7388f17c7cc3a35ced91e292e568e35e24b8098d2662ba3511a399ce4aca55c4
4
+ data.tar.gz: addd21d5cb4e2b779190248433f7079fb3267a5cde367b2efe6d31ceaf8753fb
5
5
  SHA512:
6
- metadata.gz: b8ca3054651584f6260ffa9cedada19ba0197a4b01d5b89d133f9ed02891975b94c50181b52a02e614ba3e19b4dbd7eff35b306a94a973f693fd9a47d2613787
7
- data.tar.gz: 9da437ae9f6337618fa6b10a665080afd90354226bf8c6e70446531c854bf8236d4f4e049b7d7da4a30a05f01e8660f8ea6201c44511fb17bc4f5ede877e2186
6
+ metadata.gz: 147b51635f7b79a3413f6bf2751d333e685ae9cffcbbbe25d5b17cddd5edae7940a0a34e415d2e9b594e5c955f35a064851492f29e1d9b7a6e0da1e2f6329299
7
+ data.tar.gz: 1060ff9688d4fe41b8eff5e86acb6ad1f45e83060091f43facd079b91cc4e701dcc2ac926c1433a2ab462dbd8b074378f48d985ea5a48e2c0d333e9a4ffb8f3e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Sith-Lord_Jedi_Ewok (0.1.1)
4
+ Sith-Lord_Jedi_Ewok (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,40 +1,204 @@
1
- # Sith-Lord, Jedi, Ewok
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sith_jedi_ewok`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'sith_jedi_ewok'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install sith_jedi_ewok
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sith_jedi_ewok.
36
-
37
-
38
- ## License
39
-
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ # **Terminal Application - Daniel Waldow**
2
+
3
+ ### Github Repository: https://github.com/waldowred5/T1A3-Terminal-App
4
+
5
+ <br>
6
+
7
+ ## **Software Development Plan:**
8
+
9
+ <br>
10
+
11
+ ### **R5 - Purpose & Scope:**
12
+
13
+ <br>
14
+
15
+ Overview:
16
+ - The schoolyard classic, '*Scissors, Paper, Rock*' was a great past-time before the smartphone era
17
+ - Kids used to engage with each other in a simple game of wits, fist-pumping the air for a chance at victory
18
+
19
+ Problem:
20
+
21
+ - With the introduction of smartphones and their ubiquitous adoption in moden schoolyards, a legacy is at risk of becoming antique
22
+ - To combat this, I have undertaken arguably one of the most important tasks in gaming history... to digitise '*Scissors, Paper, Rock*'
23
+ - This alone won't be enough, however. To succeed, I have made the executive decision to rebrand the classic to appeal to a younger audience
24
+ - I give you: '*Sith-Lord, Jedi, Ewok*'
25
+
26
+ Target Audience:
27
+ - '*Sith-Lord, Jedi, Ewok*' is a game targeting younger audiences who may not have grown up playing '*Scissors, Paper, Rock*', but will also more broadly appeal to fans of the Star Wars franchise
28
+
29
+ Usage:
30
+ - Users of '*Sith-Lord, Jedi, Ewok*' will be given the option to play the rebranded classic against a computer player (AI) and save highscores for bragging rights amongst their friends
31
+
32
+ <br>
33
+
34
+ ### **R6 - Features:**
35
+
36
+ <br>
37
+
38
+ *Note: The term 'user' refers to anyone interacting with any part of the application excluding the 'Play Game' functionality. In this mode, 'users' are referred to as 'players'.*
39
+
40
+ <br>
41
+
42
+ Features:
43
+ - Main Menu:
44
+ - The opening screen for the application includes a weclome banner with Ascii art and 4 options for the user to choose from by using the up and down arrows and enter to select
45
+ - All text in the application is coloured!
46
+ - Every new menu is displayed on a fresh screen with `system('clear')`
47
+
48
+ - Play Game:
49
+ - From the Main Menu, users can choose the 'Play Game' option
50
+ - Once selected, players play rounds of 'Sith-Lord, Jedi, Ewok' against computer player until they lose
51
+ - During each round the following are printed to the screen:
52
+ - Round Number
53
+ - Player choice
54
+ - Computer choice
55
+ - The end of each round includes a unique Star Wars sound byte for each of the 3 possible results (win, lose, draw)
56
+ - Once a player loses a round to the computer they enter their name to save their score to the Leaderboard
57
+ - The computer player makes choices based on a random number generator, which maps to each of the three factions (Sith, Jedi or Ewok)
58
+ - The computer choice is then compared with the player choice to determine the result of the round
59
+
60
+ - View Leaderboard:
61
+ - If the user chooses the 'View Leaderboard' option from the main menu, the app will display the top 10 highest scores for previously played games
62
+ - These scores are saved to an external YAML file, which allows players to save the high scores of their games to the Leaderboard, which persists between sessions
63
+ - If there are no previous scores available, the error message, "No scores on the leaderboard to show!" will be displayed to the user
64
+
65
+ - Show Rules:
66
+ - A list of rules for the game are displayed including an explanation of the scoring system
67
+
68
+ - Sub-Options Menu:
69
+ - At the end of each 'Play Game', 'View Leaderboard' and 'Show Rules' screens the player is prompted to press any key to continue, followed by:
70
+ - A randomly selected Star Wars quote is printed to the screen and the quote sound byte is played (if there is a corresponding sound byte available)
71
+ - There is a DEMO mode which can be activated in the 'quote_generator' file in the code base to ensure only quotes with sound bytes are selected to enhance the demo experience
72
+ - One of 2 options to select from: 'Play New Game' or 'Exit to Main Menu'
73
+
74
+ - Exit
75
+ - Finally, when players are ready to leave and select the 'Exit' option from the Main Menu, they are asked if they are sure they want to leave, and prompted to stay in the app with a sound byte of Luke Skywalker
76
+
77
+ <br>
78
+
79
+ ### **R7 - User Interaction Outline:**
80
+
81
+ <br>
82
+
83
+ *Note: The term 'user' refers to anyone interacting with any part of the application excluding the 'Play Game' functionality. In this mode, 'users' are referred to as 'players'.*
84
+
85
+ Main Menu:
86
+ - Upon launch, users will see a welcome screen which serves as the Main Menu
87
+ - Undeneath the heading banner users are asked what they would like to do
88
+ - Next to this is highlighted help text describing how to access each of the menu options (Press ↑/↓ arrow to move and Enter to select)
89
+ - The user is presented with 4 options in the Main Menu:
90
+ - Play Game
91
+ - Read Rules
92
+ - View Leaderboard
93
+ - Exit
94
+
95
+ Start New Game:
96
+ - When a player chooses the 'Play Game' option they will be presented with a new game, which displays:
97
+ - Round number
98
+ - Instruction for player to choose a faction to start a new match
99
+ - Faction options: Jedi, Sith or Ewok
100
+ - After every match, the player will be presented with the results:
101
+ - Win:
102
+ - "You won!" message displayed
103
+ - "Round saved successfully" message displayed
104
+ - Player is then prompted to press any key to start a new round
105
+ - Draw:
106
+ - "You drew" message displayed
107
+ - "Round saved successfully" message displayed
108
+ - Player is then prompted to press any key to start a new round
109
+ - Loss:
110
+ - "You lost" message displayed
111
+ - "Round saved successfully" message displayed
112
+ - Player is prompted to press any key to continue
113
+ - Player is then prompted to enter their name (this will be used to display their score in the Leaderboard)
114
+ - If the player enters a name with non-alphanumeric characters they will be presented with the error message, "Please enter a valid name (no special characters)". This message is part of a loop which will be displayed every time a user enters an invalid name until they enter a valid name (the validation allows for numbers so players can use aliases).
115
+ - Thanks for playing message displayed, followed by score successfully saved message
116
+ - Once the game is finished due to a loss, the player will then be presented with the Options Sub-Menu, displaying:
117
+ - Iconic Star Wars quote
118
+ - Options menu with the following options:
119
+ - Start New Game (same as choosing Play Game from the Main Menu)
120
+ - Exit to Main Menu
121
+
122
+ Read Rules:
123
+ - When a player chooses the 'Read Rules' option they will be presented with a description of the rules for 'Sith-Lord, Jedi, Ewok'
124
+ - The user is then presented with the Options Sub-Menu (see 'Start New Game', section 3)
125
+
126
+ View Leaderboard:
127
+ - When a user chooses the 'View Leaderboard' option they will be presented with:
128
+ - A table showing a list of scores for previously played games OR
129
+ - If there are no scores to display, the error message "No scores on the leaderboard to show!" will be displayed to the user
130
+ - The user is then presented with the Options Sub-Menu (see 'Start New Game', section 3)
131
+
132
+ - Exit:
133
+ - When a user chooses the 'Exit' option they will be presented with message asking if they are sure they want to exit the application:
134
+ - Yes: Exits the application
135
+ - No: Returns to the Main Menu
136
+
137
+ <br>
138
+
139
+ ### **R8 - Control Flow:**
140
+
141
+ <br>
142
+
143
+ ![App Flowchart](docs/img/flowcharts/app-game-overview-flowcharts-v2_white.png)
144
+
145
+ <br>
146
+
147
+ ### **R9 - Implementation Plan:**
148
+
149
+ <br>
150
+
151
+ https://trello.com/b/jzbxsG9I/terminal-application
152
+
153
+ <br>
154
+
155
+ ### **R9 - Help Documentation:**
156
+
157
+ <br>
158
+
159
+ Installation:
160
+
161
+ To download *'Sith-Lord, Jedi, Ewok'* as a gem, you can find it at RubyGems.org here: https://rubygems.org/gems/Sith-Lord_Jedi_Ewok
162
+
163
+ *NB! The above installation currently contains pathing errors when running the gem. To run the application, download source code from https://github.com/waldowred5/T1A3-Terminal-App, and then run the following command*
164
+
165
+ `sith_jedi_ewok` in terminal from the following directory:
166
+
167
+ `/Users/[user_name]/T1A3-Terminal-App/src/sith_jedi_ewok`
168
+
169
+ To download all dependencies, run `bundle install` in the same directory.
170
+
171
+ <br>
172
+
173
+ If importing to your own application, add this line to your application's Gemfile:
174
+
175
+ ```ruby
176
+ gem 'Sith-Lord_Jedi_Ewok'
177
+ ```
178
+
179
+ And then execute:
180
+
181
+ $ bundle install
182
+
183
+ Or install it yourself as:
184
+
185
+ $ gem install Sith-Lord_Jedi_Ewok
186
+
187
+ - Dependencies:
188
+ - Rake: v12.0
189
+ - Rspec: v3.9
190
+ - TTY-Table: v0.12
191
+ - TTY-Prompt: v0.22.0
192
+ - Colorize: v0.8.1
193
+ - Artii: v2.1
194
+ - Ruby 2D: 0.9.2
195
+ - System/Requirements
196
+ - Mac: Install listed dependencies
197
+ - Windows/Linux: The Ruby 2D gem requires that the MSYS2 devkit has been installed
198
+ - More info at: https://rubyinstaller.org/add-ons/devkit.html
199
+
200
+ <br>
201
+
202
+ ## License
203
+
204
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,6 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. .. lib])
3
-
4
2
  require "bundler/setup"
5
3
  require "sith_jedi_ewok"
6
4
 
@@ -13,3 +11,5 @@ require "sith_jedi_ewok"
13
11
 
14
12
  require "irb"
15
13
  IRB.start(__FILE__)
14
+
15
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
@@ -23,9 +23,4 @@
23
23
  wins: 3
24
24
  draws: 0
25
25
  score: 300
26
- - !ruby/object:Game
27
- id: 5
28
- player_name: ofenqiofiq
29
- wins: 0
30
- draws: 0
31
- score: 0
26
+
@@ -1,3 +1,3 @@
1
1
  module SithJediEwok
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -6,7 +6,29 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ["Daniel Waldow"]
7
7
 
8
8
  spec.summary = %q{Sith-Lord, Jedi is a 'Star Wars' themed 'Scissors, Paper, Rock' simulator.}
9
- spec.description = %q{'Sith-Lord, Jedi, Ewok' is a game targeting younger audiences who may not have grown up playing 'Scissors, Paper, Rock', but will also more broadly appeal to fans of the Star Wars franchise.}
9
+ spec.description = %q{
10
+ 'Sith-Lord, Jedi, Ewok' is a game targeting younger audiences who may not have grown up playing 'Scissors, Paper, Rock', but will also more broadly appeal to fans of the Star Wars franchise.
11
+
12
+ *NB! The gem installation currently contains pathing errors when running the gem. To run the application, download source code from https://github.com/waldowred5/T1A3-Terminal-App, and then run the following command*
13
+
14
+ `sith_jedi_ewok` in terminal from the following directory:
15
+
16
+ `/Users/[user_name]/T1A3-Terminal-App/src/sith_jedi_ewok`
17
+
18
+ To download all dependencies, run `bundle install` in the same directory.
19
+
20
+ "If importing to your own application, add this line to your application's Gemfile:"
21
+
22
+ `gem 'Sith-Lord_Jedi_Ewok'`
23
+
24
+ And then execute:
25
+
26
+ $ bundle install
27
+
28
+ Or install it yourself as:
29
+
30
+ $ gem install Sith-Lord_Jedi_Ewok
31
+ }
10
32
  spec.homepage = "https://github.com/waldowred5/T1A3-Terminal-App"
11
33
  spec.license = "MIT"
12
34
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Sith-Lord_Jedi_Ewok
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Waldow
@@ -114,9 +114,17 @@ dependencies:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: 0.9.2
117
- description: "'Sith-Lord, Jedi, Ewok' is a game targeting younger audiences who may
118
- not have grown up playing 'Scissors, Paper, Rock', but will also more broadly appeal
119
- to fans of the Star Wars franchise."
117
+ description: "\n 'Sith-Lord, Jedi, Ewok' is a game targeting younger audiences
118
+ who may not have grown up playing 'Scissors, Paper, Rock', but will also more broadly
119
+ appeal to fans of the Star Wars franchise.\n\n *NB! The gem installation currently
120
+ contains pathing errors when running the gem. To run the application, download source
121
+ code from https://github.com/waldowred5/T1A3-Terminal-App, and then run the following
122
+ command*\n\n `sith_jedi_ewok` in terminal from the following directory:\n\n `/Users/[user_name]/T1A3-Terminal-App/src/sith_jedi_ewok`\n\n
123
+ \ To download all dependencies, run `bundle install` in the same directory.\n\n
124
+ \ \"If importing to your own application, add this line to your application's
125
+ Gemfile:\"\n\n `gem 'Sith-Lord_Jedi_Ewok'`\n\n And then execute:\n\n $
126
+ bundle install\n\n Or install it yourself as:\n\n $ gem install Sith-Lord_Jedi_Ewok\n
127
+ \ "
120
128
  email:
121
129
  executables:
122
130
  - sith_jedi_ewok