diff --git a/DealorNoDeal.css b/DealorNoDeal.css index c415248..6e7c2ae 100644 --- a/DealorNoDeal.css +++ b/DealorNoDeal.css @@ -6,8 +6,8 @@ body { } p{ - font-size: 24pt; - font-family: fantasy; + font-size: 20pt; + font-family: monospace; } input{ @@ -17,12 +17,12 @@ input{ h1{ font-size: 50pt; - font-family: cursive; + font-family:inherit; } h2{ font-family: sans-serif; - font-size: 50pt; + font-size: 20pt; color: darkgreen; } h3{ diff --git a/DealorNoDeal.js b/DealorNoDeal.js index 245f7a8..d8872c8 100644 --- a/DealorNoDeal.js +++ b/DealorNoDeal.js @@ -40,6 +40,9 @@ function myFunction(buttonP){ var x=buttonP; if (typeof x != 'undefined'){ //document.getElementById("message").innerHTML = cases[x-1]; + if(cases[x-1]!=0) + document.getElementById("case").innerHTML = + "That case was valued at: $"+cases[x-1]; cases[x-1]=0; } @@ -55,7 +58,23 @@ function myFunction(buttonP){ var average; average=(sum-1)/(howmany-1); document.getElementById("message").innerHTML = "$"+average.toFixed(2); - + + var result = []; + for(var p=1;p<26;p++){ + if(cases[p-1]!=0){ + result.push(cases[p-1]); + } + } + + result.sort(function(a, b){return a-b}) + var theAnswer=""; + for(var p=1;p

- Deal or No Deal Round 1 + Deal or No Deal

+
+

Remain

+
+

- - - - - + + + + +
- - - - - + + + + +
- - - - - + + + + +
- - - - - + + + + +
- - - - - + + + + +

+

Case Value

Offer

+