rpsg 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/doc/created.rid +2 -2
  4. data/doc/js/navigation.js.gz +0 -0
  5. data/doc/js/search_index.js.gz +0 -0
  6. data/doc/js/searcher.js.gz +0 -0
  7. data/lib/rpsg/version.rb +1 -1
  8. data/rpsg.gemspec +2 -3
  9. metadata +2 -62
  10. data/docs/Gemfile +0 -6
  11. data/docs/LICENSE +0 -116
  12. data/docs/_config.yml +0 -73
  13. data/docs/_includes/footer.html +0 -20
  14. data/docs/_includes/header.html +0 -19
  15. data/docs/_layouts/default.html +0 -50
  16. data/docs/_pages/README.txt +0 -47
  17. data/docs/_pages/bundler.txt +0 -26
  18. data/docs/_pages/code.txt +0 -178
  19. data/docs/_pages/index.txt +0 -16
  20. data/docs/_pages/install.txt +0 -110
  21. data/docs/_pages/simple.txt +0 -45
  22. data/docs/_pages/test.md +0 -40
  23. data/docs/_pages/uninstall.txt +0 -19
  24. data/docs/_pages/update.txt +0 -19
  25. data/docs/_sass/jekyll-theme-cayman.scss +0 -346
  26. data/docs/_sass/normalize.scss +0 -424
  27. data/docs/_sass/pace.sass +0 -278
  28. data/docs/_sass/rouge-github.scss +0 -209
  29. data/docs/_sass/variables.scss +0 -23
  30. data/docs/_site/assets/css/style.css +0 -1
  31. data/docs/_site/assets/favicons/android-chrome-192x192.png +0 -0
  32. data/docs/_site/assets/favicons/android-chrome-256x256.png +0 -0
  33. data/docs/_site/assets/favicons/apple-touch-icon.png +0 -0
  34. data/docs/_site/assets/favicons/browserconfig.xml +0 -9
  35. data/docs/_site/assets/favicons/favicon-16x16.png +0 -0
  36. data/docs/_site/assets/favicons/favicon-32x32.png +0 -0
  37. data/docs/_site/assets/favicons/favicon.ico +0 -0
  38. data/docs/_site/assets/favicons/manifest.json +0 -18
  39. data/docs/_site/assets/favicons/mstile-150x150.png +0 -0
  40. data/docs/_site/assets/favicons/safari-pinned-tab.svg +0 -17
  41. data/docs/_site/assets/js/pace.min.js +0 -2
  42. data/docs/_site/bundler.html +0 -108
  43. data/docs/_site/code.html +0 -244
  44. data/docs/_site/index.html +0 -83
  45. data/docs/_site/install.html +0 -244
  46. data/docs/_site/readme.html +0 -132
  47. data/docs/_site/simple.html +0 -111
  48. data/docs/_site/test.html +0 -99
  49. data/docs/_site/uninstall.html +0 -92
  50. data/docs/_site/update.html +0 -92
  51. data/docs/assets/css/style.scss +0 -4
  52. data/docs/assets/favicons/android-chrome-192x192.png +0 -0
  53. data/docs/assets/favicons/android-chrome-256x256.png +0 -0
  54. data/docs/assets/favicons/apple-touch-icon.png +0 -0
  55. data/docs/assets/favicons/browserconfig.xml +0 -9
  56. data/docs/assets/favicons/favicon-16x16.png +0 -0
  57. data/docs/assets/favicons/favicon-32x32.png +0 -0
  58. data/docs/assets/favicons/favicon.ico +0 -0
  59. data/docs/assets/favicons/manifest.json +0 -18
  60. data/docs/assets/favicons/mstile-150x150.png +0 -0
  61. data/docs/assets/favicons/safari-pinned-tab.svg +0 -17
  62. data/docs/assets/js/pace.min.js +0 -2
  63. data/docs/jekyll-theme-cayman.gemspec +0 -18
  64. data/docs/script/bootstrap +0 -6
  65. data/docs/script/cibuild +0 -6
  66. data/docs/script/release +0 -42
  67. data/docs/script/server +0 -3
  68. data/docs/thumbnail.png +0 -0
@@ -1,244 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en-us">
3
- <head>
4
- <meta charset="UTF-8"/>
5
- <title>How to Install - RPSG</title>
6
- <meta name="description" content="A Ruby Programmed Rock Paper Scissors Game"/>
7
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
8
- <meta name="theme-color" content="#157878"/>
9
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
10
- <link rel="stylesheet" href="/assets/css/style.css?v=a05748f4c68340abcebe6fa7337ffcf4443a0aec"/>
11
- <script src="assets/js/pace.min.js"></script>
12
-
13
- <link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
14
- <link rel="icon" type="image/png" sizes="32x32" href="assets/favicons/favicon-32x32.png"/>
15
- <link rel="icon" type="image/png" sizes="16x16" href="assets/favicons/favicon-16x16.png"/>
16
- <link rel="manifest" href="assets/favicons/manifest.json"/>
17
- <link rel="mask-icon" href="assets/favicons/safari-pinned-tab.svg" color="#5bbad5"/>
18
- <!--
19
- <meta name="theme-color" content="#ffffff">
20
- -->
21
- </head>
22
- <body>
23
-
24
- <section class="page-header">
25
- <h1 class="project-name">Rock Paper Scissors Game</h1>
26
- <h2 class="project-tagline">A Ruby Programmed Rock Paper Scissors Game</h2>
27
-
28
- <a href="http://github.com/bag3318/RPSG" class="btn" target="_blank">View on GitHub</a>
29
- <a href="http://github.com/bag3318/RPSG/issues" target="_blank" class="btn">Report a Bug</a>
30
-
31
-
32
- <a href="http://github.com/bag3318/RPSG/zipball/gh-pages" class="btn">Download .zip</a>
33
- <a href="http://github.com/bag3318/RPSG/tarball/gh-pages" class="btn">Download .tar.gz</a>
34
-
35
- <br/>
36
-
37
- <a href="#site-nav" class="btn">Site Navigation</a>
38
-
39
-
40
- <a href="./" class="btn">Home</a>
41
-
42
- </section>
43
- <section class="main-content">
44
-
45
- <h1 id="install-guide">Install Guide</h1>
46
-
47
- <ul id="markdown-toc">
48
- <li><a href="#install-guide" id="markdown-toc-install-guide">Install Guide</a> <ul>
49
- <li><a href="#for-macosx" id="markdown-toc-for-macosx">For Mac/OSX</a> <ul>
50
- <li><a href="#useful-skills" id="markdown-toc-useful-skills">Useful Skills:</a> <ul>
51
- <li><a href="#to-open-the-terminal" id="markdown-toc-to-open-the-terminal">To open the Terminal</a></li>
52
- <li><a href="#to-copy" id="markdown-toc-to-copy">To Copy</a></li>
53
- <li><a href="#to-paste" id="markdown-toc-to-paste">To Paste</a></li>
54
- </ul>
55
- </li>
56
- <li><a href="#step-1---installing-xcode-command-line-tools" id="markdown-toc-step-1---installing-xcode-command-line-tools">Step 1 - Installing XCode Command Line Tools</a></li>
57
- <li><a href="#step-2---installing-homebrew" id="markdown-toc-step-2---installing-homebrew">Step 2 - Installing Homebrew</a></li>
58
- <li><a href="#step-3---installing-rvmrubyrubygems" id="markdown-toc-step-3---installing-rvmrubyrubygems">Step 3 - Installing RVM/Ruby/RubyGems</a></li>
59
- <li><a href="#step-4---installing-rpsg" id="markdown-toc-step-4---installing-rpsg">Step 4 - Installing RPSG</a></li>
60
- <li><a href="#step-5---running-rpsg" id="markdown-toc-step-5---running-rpsg">Step 5 - Running RPSG</a></li>
61
- </ul>
62
- </li>
63
- <li><a href="#for-windows" id="markdown-toc-for-windows">For Windows</a> <ul>
64
- <li><a href="#useful-skills-1" id="markdown-toc-useful-skills-1">Useful Skills</a> <ul>
65
- <li><a href="#opening-the-command-prompt" id="markdown-toc-opening-the-command-prompt">Opening the Command Prompt</a></li>
66
- <li><a href="#to-copy-1" id="markdown-toc-to-copy-1">To Copy</a></li>
67
- <li><a href="#to-paste-1" id="markdown-toc-to-paste-1">To Paste</a></li>
68
- </ul>
69
- </li>
70
- <li><a href="#step-1---downloading-ruby-installer" id="markdown-toc-step-1---downloading-ruby-installer">Step 1 - Downloading Ruby Installer</a></li>
71
- <li><a href="#step-2---installing-ruby--rubygems" id="markdown-toc-step-2---installing-ruby--rubygems">Step 2 - Installing Ruby &amp; RubyGems</a></li>
72
- <li><a href="#step-3---installing-rpsg" id="markdown-toc-step-3---installing-rpsg">Step 3 - Installing RPSG</a></li>
73
- <li><a href="#step-4---running-rpsg" id="markdown-toc-step-4---running-rpsg">Step 4 - Running RPSG</a></li>
74
- </ul>
75
- </li>
76
- </ul>
77
- </li>
78
- </ul>
79
-
80
- <blockquote>
81
- <p>This guide will tell you how to install everything that is needed for using my <strong><code class="highlighter-rouge">RPSG</code></strong> gem.</p>
82
- </blockquote>
83
-
84
- <h2 id="for-macosx">For Mac/OSX</h2>
85
-
86
- <p><strong>What you will install:</strong></p>
87
-
88
- <ol>
89
- <li>Ruby</li>
90
- <li>RubyGems</li>
91
- <li>Homebrew</li>
92
- <li>RVM</li>
93
- <li>XCode Command Line Tools</li>
94
- <li>RPSG (my RubyGem)</li>
95
- </ol>
96
-
97
- <h3 id="useful-skills">Useful Skills:</h3>
98
-
99
- <h4 id="to-open-the-terminal">To open the Terminal</h4>
100
-
101
- <ol>
102
- <li>Press <kbd>Command</kbd> + <kbd>Space</kbd></li>
103
- <li>Type in <code class="highlighter-rouge">Terminal</code></li>
104
- <li>Press <kbd>Return</kbd></li>
105
- </ol>
106
-
107
- <h4 id="to-copy">To Copy</h4>
108
-
109
- <ol>
110
- <li>Press <kbd>Command</kbd> + <kbd>C</kbd></li>
111
- </ol>
112
-
113
- <h4 id="to-paste">To Paste</h4>
114
-
115
- <ol>
116
- <li>Press <kbd>Command</kbd> + <kbd>V</kbd></li>
117
- </ol>
118
-
119
- <h3 id="step-1---installing-xcode-command-line-tools">Step 1 - Installing XCode Command Line Tools</h3>
120
-
121
- <ol>
122
- <li>Open <code class="highlighter-rouge">Terminal</code> and copy/paste this: <code class="highlighter-rouge">sudo xcode-select --install</code> and hit <kbd>Return</kbd></li>
123
- <li>You might need to enter your password a few times</li>
124
- </ol>
125
-
126
- <h3 id="step-2---installing-homebrew">Step 2 - Installing Homebrew</h3>
127
-
128
- <ol>
129
- <li>In the <code class="highlighter-rouge">Terminal</code>, copy/paste this: <code class="highlighter-rouge">/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</code>, and hit <kbd>Return</kbd></li>
130
- <li>You might need to enter your password</li>
131
- </ol>
132
-
133
- <h3 id="step-3---installing-rvmrubyrubygems">Step 3 - Installing RVM/Ruby/RubyGems</h3>
134
-
135
- <ol>
136
- <li>In the <code class="highlighter-rouge">Terminal</code>, copy/paste this: <code class="highlighter-rouge">\curl -sSL https://get.rvm.io | bash -s stable --ruby</code> and hit <kbd>Return</kbd></li>
137
- <li>You might need to enter your password</li>
138
- </ol>
139
-
140
- <h3 id="step-4---installing-rpsg">Step 4 - Installing RPSG</h3>
141
-
142
- <ol>
143
- <li>Close <code class="highlighter-rouge">Terminal</code> by pressing <kbd>Command</kbd> + <kbd>Q</kbd></li>
144
- <li>Open <code class="highlighter-rouge">Terminal</code> again</li>
145
- <li>Type in the following: <code class="highlighter-rouge">gem install rpsg</code>, then hit <kbd>Return</kbd></li>
146
- </ol>
147
-
148
- <h3 id="step-5---running-rpsg">Step 5 - Running RPSG</h3>
149
-
150
- <ol>
151
- <li>Whenever you want to play Rock Paper Scissors, just open <code class="highlighter-rouge">Terminal</code> and type in: <code class="highlighter-rouge">rpsg</code>, then hit <kbd>Return</kbd></li>
152
- </ol>
153
-
154
- <h2 id="for-windows">For Windows</h2>
155
-
156
- <p><strong>What you will install:</strong></p>
157
-
158
- <ol>
159
- <li>Ruby</li>
160
- <li>RubyGems</li>
161
- <li>RPSG (my RubyGem)</li>
162
- </ol>
163
-
164
- <h3 id="useful-skills-1">Useful Skills</h3>
165
-
166
- <h4 id="opening-the-command-prompt">Opening the Command Prompt</h4>
167
-
168
- <ol>
169
- <li>Press <kbd>Windows</kbd> + <kbd>R</kbd></li>
170
- <li>Type in <code class="highlighter-rouge">cmd</code></li>
171
- <li>Press <kbd>Enter</kbd></li>
172
- </ol>
173
-
174
- <h4 id="to-copy-1">To Copy</h4>
175
-
176
- <ol>
177
- <li>Press <kbd>Control</kbd> + <kbd>C</kbd></li>
178
- </ol>
179
-
180
- <h4 id="to-paste-1">To Paste</h4>
181
-
182
- <ol>
183
- <li>Press <kbd>Control</kbd> + <kbd>V</kbd></li>
184
- </ol>
185
-
186
- <h3 id="step-1---downloading-ruby-installer">Step 1 - Downloading Ruby Installer</h3>
187
-
188
- <ol>
189
- <li>Open a Web Browser
190
- <ul>
191
- <li>Web Browser ex: Chrome, Firefox, IE, Safari, Edge, Opera, etc…</li>
192
- </ul>
193
- </li>
194
- <li>Copy/paste this into the browser’s URL bar <code class="highlighter-rouge">https://rubyinstaller.org/downloads/</code></li>
195
- <li>Press <kbd>Enter</kbd></li>
196
- <li>Download the appropriate installer</li>
197
- </ol>
198
-
199
- <h3 id="step-2---installing-ruby--rubygems">Step 2 - Installing Ruby &amp; RubyGems</h3>
200
-
201
- <ol>
202
- <li>Open the <code class="highlighter-rouge">rubyinstaller.exe</code> (may be named differently for you)</li>
203
- <li>Proceed with the installation</li>
204
- </ol>
205
-
206
- <h3 id="step-3---installing-rpsg">Step 3 - Installing RPSG</h3>
207
-
208
- <ol>
209
- <li>Open the <code class="highlighter-rouge">Command Prompt</code></li>
210
- <li>Type in the following: <code class="highlighter-rouge">gem install rpsg</code></li>
211
- </ol>
212
-
213
- <h3 id="step-4---running-rpsg">Step 4 - Running RPSG</h3>
214
-
215
- <ol>
216
- <li>Any time you would like to play rock paper scissors, just open the <code class="highlighter-rouge">Command Prompt</code> and type in: <code class="highlighter-rouge">rpsg</code> and hit <kbd>enter</kbd></li>
217
- </ol>
218
-
219
-
220
- <footer class="site-footer">
221
-
222
- <h2 id="site-nav">Site Navigation</h2>
223
- <table>
224
- <tr>
225
- <td><a href="./">Home</a></td>
226
- <td><a href="readme">README File</a></td>
227
- <td><a href="install">Install</a></td>
228
- <td><a href="update">Update</a></td>
229
- <td><a href="uninstall">Uninstall</a></td>
230
- <td><a href="code">Full Code</a></td>
231
- <td><a href="simple">Simple Code</td>
232
- <td><a href="bundler">Bundler</a></td>
233
- </tr>
234
- </table>
235
- <br/>
236
- <hr/>
237
- <span class="site-footer-owner"><a href="http://github.com/bag3318/RPSG" target="_blank">RPSG</a> is maintained by <a href="http://github.com/bag3318" target="_blank">bag3318</a>.</span><span><strong><a href="http://github.com/bag3318/RPSG" target="_blank">Source Code</a></strong></span>
238
-
239
- </footer>
240
- </section>
241
-
242
-
243
- </body>
244
- </html>
@@ -1,132 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en-us">
3
- <head>
4
- <meta charset="UTF-8"/>
5
- <title>README - RPSG</title>
6
- <meta name="description" content="A Ruby Programmed Rock Paper Scissors Game"/>
7
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
8
- <meta name="theme-color" content="#157878"/>
9
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
10
- <link rel="stylesheet" href="/assets/css/style.css?v=a05748f4c68340abcebe6fa7337ffcf4443a0aec"/>
11
- <script src="assets/js/pace.min.js"></script>
12
-
13
- <link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
14
- <link rel="icon" type="image/png" sizes="32x32" href="assets/favicons/favicon-32x32.png"/>
15
- <link rel="icon" type="image/png" sizes="16x16" href="assets/favicons/favicon-16x16.png"/>
16
- <link rel="manifest" href="assets/favicons/manifest.json"/>
17
- <link rel="mask-icon" href="assets/favicons/safari-pinned-tab.svg" color="#5bbad5"/>
18
- <!--
19
- <meta name="theme-color" content="#ffffff">
20
- -->
21
- </head>
22
- <body>
23
-
24
- <section class="page-header">
25
- <h1 class="project-name">Rock Paper Scissors Game</h1>
26
- <h2 class="project-tagline">A Ruby Programmed Rock Paper Scissors Game</h2>
27
-
28
- <a href="http://github.com/bag3318/RPSG" class="btn" target="_blank">View on GitHub</a>
29
- <a href="http://github.com/bag3318/RPSG/issues" target="_blank" class="btn">Report a Bug</a>
30
-
31
-
32
- <a href="http://github.com/bag3318/RPSG/zipball/gh-pages" class="btn">Download .zip</a>
33
- <a href="http://github.com/bag3318/RPSG/tarball/gh-pages" class="btn">Download .tar.gz</a>
34
-
35
- <br/>
36
-
37
- <a href="#site-nav" class="btn">Site Navigation</a>
38
-
39
-
40
- <a href="./" class="btn">Home</a>
41
-
42
- </section>
43
- <section class="main-content">
44
-
45
- <h1 id="rpsg-rock-paper-scissors-game">RPSG (Rock Paper Scissors Game)</h1>
46
-
47
- <ul id="markdown-toc">
48
- <li><a href="#rpsg-rock-paper-scissors-game" id="markdown-toc-rpsg-rock-paper-scissors-game">RPSG (Rock Paper Scissors Game)</a> <ul>
49
- <li><a href="#requirements" id="markdown-toc-requirements">Requirements</a> <ul>
50
- <li><a href="#for-windows" id="markdown-toc-for-windows">For Windows</a></li>
51
- <li><a href="#for-mac" id="markdown-toc-for-mac">For Mac</a></li>
52
- </ul>
53
- </li>
54
- <li><a href="#how-to-use" id="markdown-toc-how-to-use">How To Use</a> <ul>
55
- <li><a href="#windows" id="markdown-toc-windows">Windows</a></li>
56
- <li><a href="#mac" id="markdown-toc-mac">Mac</a></li>
57
- </ul>
58
- </li>
59
- </ul>
60
- </li>
61
- </ul>
62
-
63
- <h2 id="requirements">Requirements</h2>
64
-
65
- <h3 id="for-windows">For Windows</h3>
66
-
67
- <ul>
68
- <li>Ruby</li>
69
- <li>RubyGems</li>
70
- </ul>
71
-
72
- <h3 id="for-mac">For Mac</h3>
73
-
74
- <ul>
75
- <li>Ruby</li>
76
- <li>RubyGems</li>
77
- <li>RVM (Ruby Version Manager)</li>
78
- </ul>
79
-
80
- <h2 id="how-to-use">How To Use</h2>
81
-
82
- <h3 id="windows">Windows</h3>
83
-
84
- <ol>
85
- <li>Open <code class="highlighter-rouge">cmd</code> as non-admin
86
- <ul>
87
- <li><code class="highlighter-rouge">cmd</code> is the <code class="highlighter-rouge">Command Prompt</code></li>
88
- </ul>
89
- </li>
90
- <li>type the following: <code class="highlighter-rouge">gem install rpsg</code></li>
91
- <li>run the following: <code class="highlighter-rouge">rpsg</code></li>
92
- </ol>
93
-
94
- <h3 id="mac">Mac</h3>
95
-
96
- <ol>
97
- <li>Open <code class="highlighter-rouge">Terminal</code></li>
98
- <li>type the following: <code class="highlighter-rouge">gem install rpsg</code></li>
99
- <li>run the following: <code class="highlighter-rouge">rpsg</code></li>
100
- </ol>
101
-
102
- <hr />
103
-
104
- <p>RubyGems page: <a href="https://rubygems.org/gems/rpsg" target="_blank">https://rubygems.org/gems/rpsg</a>
105
- Source Code: <a href="https://github.com/bag3318/rpsg" target="_blank">https://github.com/bag3318/rpsg</a></p>
106
-
107
-
108
- <footer class="site-footer">
109
-
110
- <h2 id="site-nav">Site Navigation</h2>
111
- <table>
112
- <tr>
113
- <td><a href="./">Home</a></td>
114
- <td><a href="readme">README File</a></td>
115
- <td><a href="install">Install</a></td>
116
- <td><a href="update">Update</a></td>
117
- <td><a href="uninstall">Uninstall</a></td>
118
- <td><a href="code">Full Code</a></td>
119
- <td><a href="simple">Simple Code</td>
120
- <td><a href="bundler">Bundler</a></td>
121
- </tr>
122
- </table>
123
- <br/>
124
- <hr/>
125
- <span class="site-footer-owner"><a href="http://github.com/bag3318/RPSG" target="_blank">RPSG</a> is maintained by <a href="http://github.com/bag3318" target="_blank">bag3318</a>.</span><span><strong><a href="http://github.com/bag3318/RPSG" target="_blank">Source Code</a></strong></span>
126
-
127
- </footer>
128
- </section>
129
-
130
-
131
- </body>
132
- </html>
@@ -1,111 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en-us">
3
- <head>
4
- <meta charset="UTF-8"/>
5
- <title>Simple Code - RPSG</title>
6
- <meta name="description" content="A Ruby Programmed Rock Paper Scissors Game"/>
7
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
8
- <meta name="theme-color" content="#157878"/>
9
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
10
- <link rel="stylesheet" href="/assets/css/style.css?v=a05748f4c68340abcebe6fa7337ffcf4443a0aec"/>
11
- <script src="assets/js/pace.min.js"></script>
12
-
13
- <link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png"/>
14
- <link rel="icon" type="image/png" sizes="32x32" href="assets/favicons/favicon-32x32.png"/>
15
- <link rel="icon" type="image/png" sizes="16x16" href="assets/favicons/favicon-16x16.png"/>
16
- <link rel="manifest" href="assets/favicons/manifest.json"/>
17
- <link rel="mask-icon" href="assets/favicons/safari-pinned-tab.svg" color="#5bbad5"/>
18
- <!--
19
- <meta name="theme-color" content="#ffffff">
20
- -->
21
- </head>
22
- <body>
23
-
24
- <section class="page-header">
25
- <h1 class="project-name">Rock Paper Scissors Game</h1>
26
- <h2 class="project-tagline">A Ruby Programmed Rock Paper Scissors Game</h2>
27
-
28
- <a href="http://github.com/bag3318/RPSG" class="btn" target="_blank">View on GitHub</a>
29
- <a href="http://github.com/bag3318/RPSG/issues" target="_blank" class="btn">Report a Bug</a>
30
-
31
-
32
- <a href="http://github.com/bag3318/RPSG/zipball/gh-pages" class="btn">Download .zip</a>
33
- <a href="http://github.com/bag3318/RPSG/tarball/gh-pages" class="btn">Download .tar.gz</a>
34
-
35
- <br/>
36
-
37
- <a href="#site-nav" class="btn">Site Navigation</a>
38
-
39
-
40
- <a href="./" class="btn">Home</a>
41
-
42
- </section>
43
- <section class="main-content">
44
-
45
- <h1 id="simplebeginners-rps-code">Simple/Beginners RPS Code</h1>
46
-
47
- <ul id="markdown-toc">
48
- <li><a href="#simplebeginners-rps-code" id="markdown-toc-simplebeginners-rps-code">Simple/Beginners RPS Code</a></li>
49
- </ul>
50
-
51
- <blockquote>
52
- <p>This is what a beginner’s RPS code might look like</p>
53
- </blockquote>
54
-
55
- <figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="n">options</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"rock"</span><span class="p">,</span> <span class="s2">"paper"</span><span class="p">,</span> <span class="s2">"scissors"</span><span class="p">]</span>
56
- <span class="n">computer_choice</span> <span class="o">=</span> <span class="n">options</span><span class="p">[</span><span class="nb">rand</span><span class="p">(</span><span class="n">options</span><span class="p">.</span><span class="nf">length</span><span class="p">)]</span>
57
- <span class="nb">puts</span> <span class="s2">"What's your choice?"</span>
58
- <span class="nb">puts</span> <span class="s2">"rock, paper, or scissors"</span>
59
- <span class="n">user_input</span> <span class="o">=</span> <span class="nb">gets</span><span class="p">.</span><span class="nf">chomp</span><span class="p">.</span><span class="nf">downcase</span> <span class="c1"># read user input and convert to lower case</span>
60
- <span class="kp">loop</span> <span class="k">do</span>
61
- <span class="k">if</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"rock"</span> <span class="o">||</span> <span class="n">user_input</span> <span class="o">==</span> <span class="s2">"paper"</span> <span class="o">||</span> <span class="n">user_input</span> <span class="o">==</span> <span class="s2">"scissors"</span><span class="p">)</span>
62
- <span class="k">if</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="n">computer_choice</span><span class="p">)</span>
63
- <span class="nb">puts</span> <span class="s2">"We got the same, let's keep playing!"</span>
64
- <span class="k">elsif</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"rock"</span> <span class="o">&amp;&amp;</span> <span class="n">computer_choice</span> <span class="o">==</span> <span class="s2">"scissors"</span><span class="p">)</span>
65
- <span class="nb">puts</span> <span class="s2">"computer choice is: "</span> <span class="o">+</span> <span class="n">computer_choice</span> <span class="o">+</span> <span class="s2">", you win! :)"</span>
66
- <span class="k">elsif</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"rock"</span> <span class="o">&amp;&amp;</span> <span class="n">computer_choice</span> <span class="o">==</span> <span class="s2">"paper"</span><span class="p">)</span>
67
- <span class="nb">puts</span> <span class="s2">"computer choice is: "</span> <span class="o">+</span> <span class="n">computer_choice</span> <span class="o">+</span> <span class="s2">", computer wins :("</span>
68
- <span class="k">elsif</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"paper"</span> <span class="o">&amp;&amp;</span> <span class="n">computer_choice</span> <span class="o">==</span> <span class="s2">"scissors"</span><span class="p">)</span>
69
- <span class="nb">puts</span> <span class="s2">"computer choice is: "</span> <span class="o">+</span> <span class="n">computer_choice</span> <span class="o">+</span> <span class="s2">", computer wins :("</span>
70
- <span class="k">elsif</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"paper"</span> <span class="o">&amp;&amp;</span> <span class="n">computer_choice</span> <span class="o">==</span> <span class="s2">"rock"</span><span class="p">)</span>
71
- <span class="nb">puts</span> <span class="s2">"computer choice is: "</span> <span class="o">+</span> <span class="n">computer_choice</span> <span class="o">+</span> <span class="s2">", you win! :)"</span>
72
- <span class="k">elsif</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"scissors"</span> <span class="o">&amp;&amp;</span> <span class="n">computer_choice</span> <span class="o">==</span> <span class="s2">"rock"</span><span class="p">)</span>
73
- <span class="nb">puts</span> <span class="s2">"computer choice is: "</span> <span class="o">+</span> <span class="n">computer_choice</span> <span class="o">+</span> <span class="s2">", computer wins :("</span>
74
- <span class="k">elsif</span> <span class="p">(</span><span class="n">user_input</span> <span class="o">==</span> <span class="s2">"scissors"</span> <span class="o">&amp;&amp;</span> <span class="n">computer_choice</span> <span class="o">==</span> <span class="s2">"paper"</span><span class="p">)</span>
75
- <span class="nb">puts</span> <span class="s2">"computer choice is: "</span> <span class="o">+</span> <span class="n">computer_choice</span> <span class="o">+</span> <span class="s2">", you win! :)"</span>
76
- <span class="k">end</span>
77
- <span class="k">else</span>
78
- <span class="nb">puts</span> <span class="s2">"Invalid choice, enter Rock, Paper, or Scissors"</span>
79
- <span class="k">end</span>
80
- <span class="k">break</span>
81
- <span class="k">end</span>
82
-
83
- <span class="vg">$end</span></code></pre></figure>
84
-
85
-
86
-
87
- <footer class="site-footer">
88
-
89
- <h2 id="site-nav">Site Navigation</h2>
90
- <table>
91
- <tr>
92
- <td><a href="./">Home</a></td>
93
- <td><a href="readme">README File</a></td>
94
- <td><a href="install">Install</a></td>
95
- <td><a href="update">Update</a></td>
96
- <td><a href="uninstall">Uninstall</a></td>
97
- <td><a href="code">Full Code</a></td>
98
- <td><a href="simple">Simple Code</td>
99
- <td><a href="bundler">Bundler</a></td>
100
- </tr>
101
- </table>
102
- <br/>
103
- <hr/>
104
- <span class="site-footer-owner"><a href="http://github.com/bag3318/RPSG" target="_blank">RPSG</a> is maintained by <a href="http://github.com/bag3318" target="_blank">bag3318</a>.</span><span><strong><a href="http://github.com/bag3318/RPSG" target="_blank">Source Code</a></strong></span>
105
-
106
- </footer>
107
- </section>
108
-
109
-
110
- </body>
111
- </html>