-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
87 lines (74 loc) · 2.76 KB
/
index.html
File metadata and controls
87 lines (74 loc) · 2.76 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Jan Ken Pon - Game</title>
<script src="https://npmcdn.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div id="app" class="container">
<header class="main-header">
<section class="score-header">
<h1>Jan Ken Pon</h1>
<div class="score-border">
<div class="panel panel-primary">
<div class="panel-heading">Player Score</div>
<div class="panel-body">{{ playerScore }}</div>
</div>
</div>
<div class="score-border">
<div class="panel panel-danger">
<div class="panel-heading">CPU Score</div>
<div class="panel-body">{{ cpuScore }}</div>
</div>
</div>
</section>
</header>
<div class="main-content">
<section class="game-play">
<div v-if="!gameRunning" class="game-control">
<label>Best of:</label>
<!-- Vue binding the style property -->
<select v-model="bestOf" :style="{width: 60 + 'px', display: 'inline-block'}">
<option value="1">1</option>
<option value="3">3</option>
<option value="5">5</option>
</select>
<button class="btn btn-sm btn-success" @click="startGame">START</button>
</div>
<div v-else>
<div>
<input type="image" class="option-btn" src="./images/rock.png" @click="setSelected(options.rock)">
<input type="image" class="option-btn" src="./images/paper.png" @click="setSelected(options.paper)">
<input type="image" class="option-btn" src="./images/scissors.png" @click="setSelected(options.scissors)">
</div>
<div class="game-control" v-if="gameRunning">
<button class="btn btn-lg btn-success" @click="jankenpon" :disabled="!optSelected">JANKENPON!</button>
<button class="btn btn-lg btn-warning" @click="restartGame">RESTART</button>
</div>
</div>
</section>
<section class="log-session">
<ul>
<!-- Conditional class selection by Vue binding -->
<li v-for="entry in log" :class="entry.class">
{{ entry.text }}
</li>
</ul>
</section>
</div>
<footer>
<div>
<a href="https://github.com/Joeu" target="_blank">
<img src="./images/github.svg" alt="Github repository">
</a>
</div>
</footer>
</div>
<script src="app.js"></script>
</body>
</html>