-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
96 lines (89 loc) · 3.5 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/app.css" />
</head>
<body>
<div class="container" id="app">
<div class="row controls">
<div class="col-sm-6">
<h1 class="text-center">YOU</h1>
<div class="healthbar">
<div
class="healthbar text-center"
style="background-color: green; margin: 0; color: white;"
:style="{width: playerHealth + '%'}"
>
{{ playerHealth }}
</div>
</div>
</div>
<div class="col-sm-6">
<h1 class="text-center">MONSTER</h1>
<div class="healthbar">
<div
class="healthbar text-center"
style="background-color: green; margin: 0; color: white;"
:style="{width: playerHealth + '%'}"
>
{{ monsterHealth }}
</div>
</div>
</div>
</div>
<!--End Row -->
<div class="row controls" v-if="!gameIsRunning">
<div class="col-sm-12">
<button id="start-game" class="btn btn-success" @click="startGame">Start New Game</button>
</div>
</div>
<!-- Enr row -->
<div class="row controls" v-else>
<div class="col-sm-12" align="center">
<button id="attack" class="btn btn-primary" @click="attack"> Attack </button>
<button id="special-attack" class="btn btn-success" @click="specialAttack"> Special Attack </button>
<button id="heal" class="btn btn-warning" @click="heal"> Heal </button>
<button id="give-up" class="btn btn-warning" @click="giveUp"> Give Up </button>
</div>
</div>
<!-- End row -->
<div class="row log" v-if="turns.length > 0">
<div class="columns">
<ul>
<li v-for="turn in turns" :class="{'player-turn' : turn.isPlayer, 'monster-turn' : !turn.isPlayer}">
{{ turn.text }}
</li>
</ul>
</div>
</div>
<!-- End Row -->
</div>
<!-- End Container -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="lib/vue.js"></script>
<script src="js/app.js"></script>
<script>
// let app = new Vue({
// el: '#app',
// data: {
// message: 'Welcome to Vuejs',
// name: 'Kingsley',
// inputText: null
// },
// methods:{
// getMessage(){
// this.name = this.inputText;
// this.inputText = null;
// }
// }
// });
</script>
</body>
</html>