Skip to content

Commit

Permalink
Merge pull request #16 from greggameplayer/Error-Correction
Browse files Browse the repository at this point in the history
Decrease complexity #2
  • Loading branch information
greggameplayer authored Dec 11, 2017
2 parents 4374f45 + 2d156a7 commit 106d2e4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/Functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ if((slot1 === slot2 || slot1 === slot3 || slot2 === slot3) && (slot1 !== slot2 |

window.alert("Vous avez gagné 2 fois la mise !");
credit = credit + (bet * 2);
document.getElementById("credit").innerHTML = "Crédit: " + credit;
}else if(slot1 === slot2 && slot1 === slot3 && slot2 === slot3){
document.getElementById("credit").innerHTML = "Crédit: " + credit;
}else{
if(slot1 === slot2 && slot1 === slot3 && slot2 === slot3){
window.alert("Vous avez gagné 10 fois la mise !");
credit = credit + (bet * 10);
document.getElementById("credit").innerHTML = "Crédit: " + credit;
}else{
}else{
window.alert("vous avez perdu !");
document.getElementById("credit").innerHTML = "Crédit: " + credit;
}
}
}
}
function drawImages(canvasslot, imgsrc, topspin)
{
Expand All @@ -32,4 +33,4 @@ function ClearCanvas(canvasslot)
var c=document.getElementById(canvasslot);
var context=c.getContext("2d");
context.clearRect(0, 0, c.width, c.height);
}
}

0 comments on commit 106d2e4

Please sign in to comment.