From a72ef067612063b1a372bf0b96f6f5f6589e5e0c Mon Sep 17 00:00:00 2001 From: "michel.wang" Date: Thu, 24 Mar 2022 09:14:50 +0100 Subject: [PATCH] app.js --- app.js | 14 +++++++++++--- index.html | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index a80421e..d999150 100644 --- a/app.js +++ b/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); } \ No newline at end of file diff --git a/index.html b/index.html index 0a98982..9ad9729 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,13 @@ + Document - +

MACHINE A SOUS NSI

+ \ No newline at end of file