Browse Source

app.js

master
michel.wang 3 years ago
parent
commit
a72ef06761
  1. 14
      app.js
  2. 4
      index.html

14
app.js

@ -23,14 +23,22 @@ var player_coins = 100
function nbAlea() {
return Math.floor(Math.random() * 10);
}
var tirage = [nbAlea(), nbAlea(), nbAlea()]
function gain(tirage) {
if (tirage == [9,9,9]) {
player_coins = player_coins + machine_coins
machine_coins = 0
} else if {
} else if(tirage[0] == tirage[1] == tirage[2]) {
} else if {
} else if(tirage[0] == tirage[1] || tirage[1] == tirage[2] || tirage[0] == tirage[2]) {
}
}
var button = document.createElement("BUTTON");
var button_1 = document.createTextNode("CLICK ME");
function regle() {
btn.appendChild(button_1);
document.body.appendChild(button);
}

4
index.html

@ -1,11 +1,13 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<link href="style.css" rel="stylesheet">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="app.js"></script>
<h1 onclick="regle()">MACHINE A SOUS NSI</h1>
<script src="app.js"></script>
</body>
</html>
Loading…
Cancel
Save