-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarioKartRandom.html
More file actions
56 lines (46 loc) · 1.87 KB
/
Copy pathMarioKartRandom.html
File metadata and controls
56 lines (46 loc) · 1.87 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
<!DOCTYPE html>
<html>
<head>
<title>Mario Kart Random</title>
<br>
<div id="MKG">
<button class="btn btn-primary" v-on:click='generateRandom'>Generate Random</button>
<br>
<label id="output">
{{output}}
</label>
<br>
<ul id="list">
<li v-for="item in list"> {{ item }}</li>
</ul>
</div>
<script src="https://unpkg.com/vue@2"></script>
<script>
var MKG = new Vue({
el: "#MKG",
data: {
output: '',
list: [
],
},
methods: {
generateRandom: function (){
CHARACTERS = [
["Baby Mario", "Baby Luigi", "Baby Peach", "Baby Daisy", " Toad", "Toadette", "Koopa Troopa", "Dry Bones","Small Mii"]
,["Mario", "Luigi", "Peach", "Daisy", "Yoshi", "Birdo", "Diddy Kong", "Bowser Jr","Medium Mii"]
,["Wario", "Waluigi", "Donkey Kong", "Bowser", "King Boo", "Rosalina", "Funky Kong", "Dry Bowser","Large Mii"]
]
VEHICLES = [
["Standard Kart S", "Standard Bike S", "Booster Seat", "Bullet Bike", "Mini Beast", "Bit Bike", "Cheep Charger", "Quacker", "Tiny Titan", "Magikruiser", "Blue Falcon", "Jet Bubble"]
,["Standard Kart M", "Standard Bike M", "Classic Dragster", "Mach Bike", "Wild Wing", "Sugarscoot", "Super Blooper", "Zip Zip", "Daytripper", "Sneakster", "Sprinter", "Dolphin Dasher"]
,["Standard Kart L", "Standard Bike L", "Offroader", "Flame Runner", "Flame Flyer", "Wario Bike", "Piranha Prowler", "Shooting Star" , "Jetsetter", "Spear", "Honey Coupe", "Phantom"]
]
var size = Math.floor(Math.random() * 3);
var character = Math.floor(Math.random() * 9);
var vehicle = Math.floor(Math.random() * 12);
this.list.push(CHARACTERS[size][character] + " in the " + VEHICLES[size][vehicle]);
},
},
});
</script>
</html>