Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Testat RockPaperScissoirs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OST
WE1
Testat RockPaperScissoirs
Compare revisions
42160d76ea5fc51b53a8409d60aa22d4f03c5aca to 54eac128714bbabb8c0f6b1fdd46d27a8b5863f9
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ost/we1/testat-rockpaperscissoirs
Select target project
No results found
54eac128714bbabb8c0f6b1fdd46d27a8b5863f9
Select Git revision
Swap
Target
ost/we1/testat-rockpaperscissoirs
Select target project
ost/we1/testat-rockpaperscissoirs
1 result
42160d76ea5fc51b53a8409d60aa22d4f03c5aca
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
fixup! html peer review fixups
· 6d7a6208
Andri Joos
authored
2 years ago
6d7a6208
fixup! css peer review fixups
· 69e145dc
Andri Joos
authored
2 years ago
69e145dc
fixup! main.js peer review fixups
· 54eac128
Andri Joos
authored
2 years ago
54eac128
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
TestatVorlage/schere-stein-papier.html
+1
-1
1 addition, 1 deletion
TestatVorlage/schere-stein-papier.html
TestatVorlage/scripts/main.js
+4
-9
4 additions, 9 deletions
TestatVorlage/scripts/main.js
TestatVorlage/styles/global.css
+1
-1
1 addition, 1 deletion
TestatVorlage/styles/global.css
with
6 additions
and
11 deletions
TestatVorlage/schere-stein-papier.html
View file @
54eac128
...
...
@@ -31,7 +31,7 @@
<div
id=
"game"
>
<label
id=
"username-display"
></label>
<div
class
=
"options"
>
<div
id
=
"options"
>
<button
class=
"option"
id=
"rock"
>
Rock
</button>
<button
class=
"option"
id=
"paper"
>
Paper
</button>
<button
class=
"option"
id=
"scissors"
>
Scissors
</button>
...
...
This diff is collapsed.
Click to expand it.
TestatVorlage/scripts/main.js
View file @
54eac128
...
...
@@ -7,12 +7,7 @@ import {getRankings, evaluateHand, createUserIfNotExists} from './game-service.j
const
loginScreen
=
document
.
querySelector
(
'
#login
'
);
const
gameScreen
=
document
.
querySelector
(
'
#game
'
);
const
rockButton
=
document
.
querySelector
(
'
#rock
'
);
const
paperButton
=
document
.
querySelector
(
'
#paper
'
);
const
scissorsButton
=
document
.
querySelector
(
'
#scissors
'
);
const
wellButton
=
document
.
querySelector
(
'
#well
'
);
const
matchstickButton
=
document
.
querySelector
(
'
#matchstick
'
);
const
optionsButtons
=
[
rockButton
,
paperButton
,
scissorsButton
,
wellButton
,
matchstickButton
];
const
options
=
document
.
querySelector
(
'
#options
'
);
const
loginForm
=
document
.
querySelector
(
'
#login-form
'
);
const
usernameInput
=
document
.
querySelector
(
'
#username-input
'
);
...
...
@@ -66,8 +61,8 @@ function showRankings(rankings) {
rankingTable
.
innerHTML
=
rankingsHtml
;
}
function
onOptionClick
()
{
const
userHand
=
this
.
innerText
;
function
onOptionClick
(
event
)
{
const
userHand
=
event
.
target
.
innerText
;
playerHandLabel
.
innerText
=
userHand
;
opponentHandLabel
.
innerText
=
'
\n
'
;
...
...
@@ -148,7 +143,7 @@ function onMainMenuClick() {
getRankings
(
showRankings
);
}
options
Buttons
.
forEach
((
button
)
=>
button
.
addEventListener
(
'
click
'
,
onOptionClick
));
options
.
addEventListener
(
'
click
'
,
(
event
)
=>
onOptionClick
(
event
));
loginForm
.
addEventListener
(
'
submit
'
,
onLoginClick
);
mainMenuButton
.
addEventListener
(
'
click
'
,
onMainMenuClick
);
...
...
This diff is collapsed.
Click to expand it.
TestatVorlage/styles/global.css
View file @
54eac128
.
options
{
#
options
{
display
:
flex
;
width
:
50vw
;
justify-content
:
space-evenly
;
...
...
This diff is collapsed.
Click to expand it.