-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
223 lines (214 loc) · 10.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
---
---
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="https://use.fontawesome.com/3f32a610b7.js"></script>
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Rock Paper Scissors
<small>a friendly little exercise</small>
</h1>
</div>
<div class="winners block">
{% if site.data.paper.chosen and site.data.rock.chosen and site.data.scissors.chosen == false %}
<div class="row winning-row">
<div class="col-xs-6">
<div class="winning weapon-icon"><i class="fa fa-hand-paper-o" aria-hidden="true"></i></div>
<h1 class="player">{{ site.data.paper.player }}</h1>
</div>
<div class="col-xs-6">
<div class="losing weapon-icon"><i class="fa fa-hand-rock-o" aria-hidden="true"></i></div>
<h1 class="player">{{ site.data.rock.player }}</h1>
</div>
</div>
{% elsif site.data.paper.chosen and site.data.rock.chosen == false and site.data.scissors.chosen %}
<div class="row winning-row">
<div class="col-xs-6">
<div class="winning weapon-icon"><i class="fa fa-hand-scissors-o" aria-hidden="true"></i></div>
<h1 class="player">{{ site.data.scissors.player }}</h1>
</div>
<div class="col-xs-6">
<div class="losing weapon-icon"><i class="fa fa-hand-paper-o" aria-hidden="true"></i></div>
<h1 class="player">{{ site.data.paper.player }}</h1>
</div>
</div>
{% elsif site.data.paper.chosen == false and site.data.rock.chosen and site.data.scissors.chosen %}
<div class="row winning-row">
<div class="col-xs-6">
<div class="winning weapon-icon"><i class="fa fa-hand-rock-o" aria-hidden="true"></i></div>
<h1 class="player">{{ site.data.rock.player }}</h1>
</div>
<div class="col-xs-6">
<div class="losing weapon-icon"><i class="fa fa-hand-scissors-o" aria-hidden="true"></i></div>
<h1 class="player">{{ site.data.scissors.player }}</h1>
</div>
</div>
{% elsif site.data.paper.chosen == false and site.data.rock.chosen == false and site.data.scissors.chosen ==false %}
</div>
<div class="instructions block">
<h2>Instructions</h2>
<ul class="list-group">
<li class="list-group-item">To play, pop a
<span class="label label-default">chosen: true</span> next to your choice of
<code>rock</code> or <code>paper</code> or <code>scissors</code>
and add your player name in one of the files linked below:
</li>
<li class="list-group-item">
<i class="fa fa-file-o" aria-hidden="true"></i>
_data/rock.yml
</li>
<li class="list-group-item">
<i class="fa fa-file-o" aria-hidden="true"></i>
_data/paper.yml
</li>
<li class="list-group-item">
<i class="fa fa-file-o" aria-hidden="true"></i>
_data/scissors.yml
</li>
</ul>
{% endif %}
</div>
<div class="rules block">
<h2>Rules</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
<div class="rules-tile">
<p>
<i class="fa fa-hand-rock-o" aria-hidden="true"></i>
beats
<i class="fa fa-hand-scissors-o" aria-hidden="true"></i>
</p>
by smashing them up
</div>
</div>
<div class="col-xs-12 col-md-4">
<div class="rules-tile">
<p>
<i class="fa fa-hand-scissors-o" aria-hidden="true"></i>
beats
<i class="fa fa-hand-paper-o" aria-hidden="true"></i>
</p>
by chopping them up
</div>
</div>
<div class="col-xs-12 col-md-4">
<div class="rules-tile">
<p>
<i class="fa fa-hand-paper-o" aria-hidden="true"></i>
beats
<i class="fa fa-hand-rock-o" aria-hidden="true"></i>
</p>
by somehow covering it up or something
</div>
</div>
</div>
</div>
<div class="play block">
<h2>How to play</h2>
<ul class="list-group">
<li class="list-group-item">
<div><i class="fa fa-users" aria-hidden="true"></i></div>
Find a buddy and choose which one is Bud #1 and which one is Bud #2
</li>
<li class="list-group-item">
<div><i class="fa fa-globe" aria-hidden="true"></i></div>
Go to <a href="https://github.com/njall/rock-paper-scissors">
https://github.com/njall/rock-paper-scissors</a>
</li>
<li class="list-group-item">
<div><i class="fa fa-plus" aria-hidden="true"></i></div>
Bud #1: Import project using <a href="https://github.com/new/import">GitHub Importer</a> and name it <code>rock-paper-scissors</code>
</li>
<li class="list-group-item">
<div><i class="fa fa-user-plus" aria-hidden="true"></i></div>
Bud #1: Add Bud #2 as a collaborator
</li>
<li class="list-group-item">
<div><i class="fa fa-terminal" aria-hidden="true"></i></div>
Both open up your terminal and run this command to download the code:
<pre>git clone https://github.com/<b>bud-1-username</b>/rock-paper-scissors.git</pre>
</li>
<li class="list-group-item">
<div><i class="fa fa-file-o" aria-hidden="true"></i></div>
Open your weapon of choice: _data/rock.yml, _data/paper.yml or
_data/scissors.yml. Change <code>false</code> to <code>true</code> from your chosen file and add your
name.
</li>
<li class="list-group-item">
<div>
<i class="fa fa-terminal" aria-hidden="true"></i>
</div>
Run this command:
<pre>git add _data/<b>weapon-of-choice</b>.yml</pre>
where file is your choice (e.g. rock).
This 'stages' the file which tells git 'Hey, I think this file is ready to be saved' <a
href="https://git-scm.com/docs/git-add">read more</a>)
</li>
<li class="list-group-item">
<div>
<i class="fa fa-terminal" aria-hidden="true"></i>
</div>
Run this command:
<pre>git commit -m "Added my weapon of choice"</pre>
which tells git 'Yep, go ahead and save this on my machine, and here's a handy reminder of what I've
done'
</li>
<li class="list-group-item">
<div>
<i class="fa fa-terminal" aria-hidden="true"></i>
</div>
Run this command:
<pre>git push</pre>
which tells git 'Now push those changes onto github for the whole world to see'
</li>
<li class="list-group-item list-group-item-danger">
<div><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></div>
An issue occured for the slow-poke! You've both edited the same
repository at the same time. You can add one person's set of changes, but the second one requires a bit
of action!
</li>
<li class="list-group-item">
<div>
<i class="fa fa-terminal" aria-hidden="true"></i>
</div>
Slow-poke, run this command:
<pre>git pull</pre>
you've pulled Speedy Gonzalez' changes into your repository
</li>
<li class="list-group-item">
<div><i class="fa fa-files-o" aria-hidden="true"></i>
</div>
Now you need to accept these changes. Try committing them again like you did when
you chose your weapon the first time. When you're ready, push your changes to the repository!
</li>
<li class="list-group-item">
<div><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></div>
Not good? Might be a merge error!
</li>
<li class="list-group-item">
<div><i class="fa fa-globe" aria-hidden="true"></i></div>
Finally, go to <code>bud-1-username</code>.github.io/rock-paper-scissors to see who won!
</li>
</ul>
</div>
<div class="about block">
<h3> About </h3>
This tutorial was made by <img
src="https://avatars2.githubusercontent.com/u/860475?v=4&s=400&u=2d0dfbd90e0afb8b68a5f9527eac41051c8e4d4a"
class="img-circle"> <a href="https://github.com/njall">Niall Beard</a> and <img src="https://avatars3.githubusercontent.com/u/1516118?v=4&s=460"
class="img-circle"> <a href="https://github.com/ralooki10">Raluca Puichilita</a> and is adapted from Raniere Silva's <a
href="https://github.com/rgaiacs/rock-paper-scissors">Rock-Paper-Scissor git game</a>. A
fun
implementation of <a href="https://en.wikipedia.org/wiki/Rock%E2%80%93paper%E2%80%93scissors">Rock paper
scissors</a> that helps show what Git does! The
game is implemented in <a href="https://shopify.github.io/liquid/">Liquid</a>
template language.
</div>
</div>
</body>
</html>