mirror of
https://github.com/Febbweiss/js-yahtzee.git
synced 2026-03-04 14:15:43 +00:00
Added content & functionality
Added a top banner, current score lines for top and bottom, imported bootstrap for responsive functionality.
This commit is contained in:
747
index.html
747
index.html
@@ -1,3 +1,4 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2013 Fabrice ECAILLE aka Febbweiss
|
Copyright (c) 2013 Fabrice ECAILLE aka Febbweiss
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -21,367 +22,439 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
<link href='http://fonts.googleapis.com/css?family=Zeyada' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Zeyada' rel='stylesheet' type='text/css'>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Fredericka+the+Great" rel="stylesheet">
|
||||||
<script src="lib/jquery-1.7.1.min.js" type="text/javascript" ></script>
|
<script src="lib/jquery-1.7.1.min.js" type="text/javascript" ></script>
|
||||||
|
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.bundle.min.js">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
<link href="css/yahtzee.css" type="text/css" rel="stylesheet" media="screen, projection" />
|
<link href="css/yahtzee.css" type="text/css" rel="stylesheet" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="width: 50%;float: left;">
|
<div id="banner"class="col-xs-12">
|
||||||
<div class="dice empty" id="dice1"></div>
|
<h1>FEBBWEISS' YAHTZEE!</h1>
|
||||||
<div class="dice empty" id="dice2"></div>
|
</div>
|
||||||
<div class="dice empty" id="dice3"></div>
|
<div class="container">
|
||||||
<div class="dice empty" id="dice4"></div>
|
<div class="row">
|
||||||
<div class="dice empty" id="dice5"></div>
|
<div class="col-xs-12 col-xl-4">
|
||||||
<div class="dice empty" id="dice6"></div>
|
|
||||||
<div class="clear"></div>
|
<div>
|
||||||
<div>
|
<dl><br>
|
||||||
<span>Launch</span>
|
<dt>Three of a kind</dt>
|
||||||
<span id="launch"></span>
|
<dd>Three dice showing the same face (Ex. Three 3's)</dd>
|
||||||
</div>
|
<dd>Scoring: Sum of all dice</dd>
|
||||||
<a href="javascript:void(0)" id="launchBtn">Launch</a>
|
<br>
|
||||||
<div>
|
<dt>Four of a kind</dt>
|
||||||
<dl>
|
<dd>Four dice showing the same face (Ex. Four 5's)</dd>
|
||||||
<dt>Three of a kind</dt>
|
<dd>Scoring: Sum of all dice</dd>
|
||||||
<dd>Three dice showing the same face</dd>
|
<br>
|
||||||
<dd>Sum of all dice</dd>
|
<dt>Full House</dt>
|
||||||
<dt>Four of a kind</dt>
|
<dd>A three-of-a-kind and a pair (Ex. Three 1's and Two 4's)</dd>
|
||||||
<dd>Four dice showing the same face</dd>
|
<dd>Scoring: 25 points</dd>
|
||||||
<dd>Sum of all dice</dd>
|
<br>
|
||||||
<dt>Full</dt>
|
<dt>Small straight</dt>
|
||||||
<dd>A three-of-a-kind and a pair</dd>
|
<dd>Four sequential dice (Ex. 2, 3, 4, 5)</dd>
|
||||||
<dd>25 points</dd>
|
<dd>Scoring: 30 points</dd>
|
||||||
<dt>Small straight</dt>
|
<br>
|
||||||
<dd>Four sequential dice</dd>
|
<dt>Large straight</dt>
|
||||||
<dd>30 points</dd>
|
<dd>Five sequential dice (Ex. 2, 3, 4, 5, 6)</dd>
|
||||||
<dt>Large straight</dt>
|
<dd>Scoring: 40 points</dd>
|
||||||
<dd>Five sequential dice</dd>
|
<br>
|
||||||
<dd>40 points</dd>
|
<dt>Yahtzee</dt>
|
||||||
<dt>Yahtzee</dt>
|
<dd>Five dice showing the same face (Ex. Five 4's)</dd>
|
||||||
<dd>Five dice showing the same face</dd>
|
<dd>Scoring: 50 points</dd>
|
||||||
<dd>50 points</dd>
|
<br>
|
||||||
<dt>Chance</dt>
|
<dt>Chance</dt>
|
||||||
<dd>Sum of all dice</dd>
|
<dd>Scoring: Sum of all dice</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div id="scorePanel" style="display: none;">
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<tr>
|
|
||||||
<td>Upper grid score</td>
|
</div>
|
||||||
<td id="upperScore" style="text-align: center"></td>
|
|
||||||
</tr>
|
<div class="col-xs-12 col-xl-4">
|
||||||
<tr>
|
|
||||||
<td>Bonus</td>
|
<table border="1">
|
||||||
<td id="bonus" style="text-align: center"></td>
|
<thead>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th style="text-align: center;">Combination</th>
|
||||||
<td>Lower grid score</td>
|
<th style="text-align: center;" width="84px">
|
||||||
<td id="lowerScore" style="text-align: center"></td>
|
Score
|
||||||
</tr>
|
</th>
|
||||||
<tr>
|
<th style="text-align: center;" width="100px">Options</th>
|
||||||
<td><b>Total</b></td>
|
</tr>
|
||||||
<td id="totalScore" style="text-align: center"><b></b></td>
|
</thead>
|
||||||
</tr>
|
<tbody>
|
||||||
</table>
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="oneLabel">
|
||||||
|
Ones
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="oneScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="oneKeep" data-id="one" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="oneTrash" data-id="one" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="twoLabel">
|
||||||
|
Twos
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="twoScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="twoKeep" data-id="two" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="twoTrash" data-id="two" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="threeLabel">
|
||||||
|
Threes
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="threeScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="threeKeep" data-id="three" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="threeTrash" data-id="three" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="fourLabel">
|
||||||
|
Fours
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="fourScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="fourKeep" data-id="four" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="fourTrash" data-id="four" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="fiveLabel">
|
||||||
|
Fives
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="fiveScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="fiveKeep" data-id="five" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="fiveTrash" data-id="five" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="sixLabel">
|
||||||
|
Sixes
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="sixScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="sixKeep" data-id="six" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="sixTrash" data-id="six" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span>
|
||||||
|
Upper Score
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span class="score" id="topScore"></span>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="btn">
|
||||||
|
<a href="javascript:void(0)" id="launchBtn">Roll the Dice</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<span>Dice Roll #:</span>
|
||||||
|
<span id="launch"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<div class="dice empty" id="dice1"></div>
|
||||||
|
<div class="dice empty" id="dice2"></div>
|
||||||
|
<div class="dice empty" id="dice3"></div>
|
||||||
|
<div class="dice empty" id="dice4"></div>
|
||||||
|
<div class="dice empty" id="dice5"></div>
|
||||||
|
<div class="dice empty" id="dice6"></div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-xl-4">
|
||||||
|
<table border="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align: center;">Combination</th>
|
||||||
|
<th style="text-align: center;">Probability</th>
|
||||||
|
<th style="text-align: center;" width="84px">
|
||||||
|
Score
|
||||||
|
</th>
|
||||||
|
<th style="text-align: center;" width="100px">Options</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="threeOfAKindLabel">
|
||||||
|
Three of a kind
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="threeOfAKindBar"></div>
|
||||||
|
<span id="threeOfAKindProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="threeOfAKindScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="threeOfAKindKeep" data-id="threeOfAKind" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="threeOfAKindTrash" data-id="threeOfAKind" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="fourOfAKindLabel">
|
||||||
|
Four of a kind
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="fourOfAKindBar"></div>
|
||||||
|
<span id="fourOfAKindProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="fourOfAKindScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="fourOfAKindKeep" data-id="fourOfAKind" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="fourOfAKindTrash" data-id="fourOfAKind" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="fullLabel">
|
||||||
|
Full House
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="fullBar"></div>
|
||||||
|
<span id="fullProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="fullScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="fullKeep" data-id="full" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="fullTrash" data-id="full" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="smallStraightLabel">
|
||||||
|
Small Straight
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="smallStraightBar"></div>
|
||||||
|
<span id="smallStraightProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="smallStraightScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="smallStraightKeep" data-id="smallStraight" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="smallStraightTrash" data-id="smallStraight" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="largeStraightLabel">
|
||||||
|
Large Straight
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="largeStraightBar"></div>
|
||||||
|
<span id="largeStraightProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="largeStraightScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="largeStraightKeep" data-id="largeStraight" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="largeStraightTrash" data-id="largeStraight" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="yahtzeeLabel">
|
||||||
|
Yahtzee
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="yahtzeeBar"></div>
|
||||||
|
<span id="yahtzeeProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="yahtzeeScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="yahtzeeKeep" data-id="yahtzee" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="yahtzeeTrash" data-id="yahtzee" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span id="luckLabel">
|
||||||
|
Chance
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar" id="luckBar"></div>
|
||||||
|
<span id="luckProbability" style="padding-left: 1px;"> </span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="luckScore" class="score"> </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)"id="luckKeep" data-id="luck" class="keep">Keep</a>
|
||||||
|
<a href="javascript:void(0)"id="luckTrash" data-id="luck" class="trash">Trash</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span>
|
||||||
|
Lower Score
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<span id="bottomScore" class="score"></span>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<div id="scorePanel" style="display: none;">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th>Final Score</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Upper grid score</td>
|
||||||
|
<td id="upperScore" style="text-align: center"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bonus</td>
|
||||||
|
<td id="bonus" style="text-align: center"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Lower grid score</td>
|
||||||
|
<td id="lowerScore" style="text-align: center"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Total</b></td>
|
||||||
|
<td id="totalScore" style="text-align: center"><b></b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 50%;float: left;">
|
|
||||||
|
|
||||||
<table border="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: center;">Combinaison</th>
|
|
||||||
<th style="text-align: center;" width="84px">
|
|
||||||
Score
|
|
||||||
</th>
|
|
||||||
<th style="text-align: center;" width="100px"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="oneLabel">
|
|
||||||
One
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="oneScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="oneKeep" data-id="one" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="oneTrash" data-id="one" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="twoLabel">
|
|
||||||
Two
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="twoScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="twoKeep" data-id="two" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="twoTrash" data-id="two" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="threeLabel">
|
|
||||||
Three
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="threeScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="threeKeep" data-id="three" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="threeTrash" data-id="three" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="fourLabel">
|
|
||||||
Four
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="fourScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="fourKeep" data-id="four" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="fourTrash" data-id="four" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="fiveLabel">
|
|
||||||
Five
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="fiveScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="fiveKeep" data-id="five" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="fiveTrash" data-id="five" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="sixLabel">
|
|
||||||
Six
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="sixScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="sixKeep" data-id="six" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="sixTrash" data-id="six" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table border="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="text-align: center;">Combinaison</th>
|
|
||||||
<th style="text-align: center;">Probability</th>
|
|
||||||
<th style="text-align: center;" width="84px">
|
|
||||||
Score
|
|
||||||
</th>
|
|
||||||
<th style="text-align: center;" width="100px"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="threeOfAKindLabel">
|
|
||||||
Three of a kind
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="threeOfAKindBar"></div>
|
|
||||||
<span id="threeOfAKindProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="threeOfAKindScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="threeOfAKindKeep" data-id="threeOfAKind" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="threeOfAKindTrash" data-id="threeOfAKind" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="fourOfAKindLabel">
|
|
||||||
Four of a kind
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="fourOfAKindBar"></div>
|
|
||||||
<span id="fourOfAKindProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="fourOfAKindScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="fourOfAKindKeep" data-id="fourOfAKind" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="fourOfAKindTrash" data-id="fourOfAKind" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="fullLabel">
|
|
||||||
Full
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="fullBar"></div>
|
|
||||||
<span id="fullProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="fullScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="fullKeep" data-id="full" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="fullTrash" data-id="full" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="smallStraightLabel">
|
|
||||||
Small straight
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="smallStraightBar"></div>
|
|
||||||
<span id="smallStraightProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="smallStraightScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="smallStraightKeep" data-id="smallStraight" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="smallStraightTrash" data-id="smallStraight" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="largeStraightLabel">
|
|
||||||
Large straight
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="largeStraightBar"></div>
|
|
||||||
<span id="largeStraightProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="largeStraightScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="largeStraightKeep" data-id="largeStraight" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="largeStraightTrash" data-id="largeStraight" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="yahtzeeLabel">
|
|
||||||
Yahtzee
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="yahtzeeBar"></div>
|
|
||||||
<span id="yahtzeeProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="yahtzeeScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="yahtzeeKeep" data-id="yahtzee" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="yahtzeeTrash" data-id="yahtzee" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span id="luckLabel">
|
|
||||||
Chance
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="bar" id="luckBar"></div>
|
|
||||||
<span id="luckProbability" style="padding-left: 1px;"> </span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<span id="luckScore" class="score"> </span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="javascript:void(0)"id="luckKeep" data-id="luck" class="keep">Keep</a>
|
|
||||||
<a href="javascript:void(0)"id="luckTrash" data-id="luck" class="trash">Trash</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!-- End of span9 -->
|
|
||||||
|
|
||||||
<script src="js/yahtzee.js" type="text/javascript" ></script>
|
<script src="js/yahtzee.js" type="text/javascript" ></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function ()
|
||||||
$(".dice").click(function(evt) {
|
{
|
||||||
|
$(".dice").click(function(evt)
|
||||||
|
{
|
||||||
if( $(this).hasClass("selected") )
|
if( $(this).hasClass("selected") )
|
||||||
$(this).removeClass("selected");
|
$(this).removeClass("selected");
|
||||||
else
|
else
|
||||||
$(this).addClass("selected");
|
$(this).addClass("selected");
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".keep").click(function(evt) {
|
$(".keep").click(function(evt)
|
||||||
|
{
|
||||||
console.log("Keeping " + $(this).attr('data-id'));
|
console.log("Keeping " + $(this).attr('data-id'));
|
||||||
Yahtzee.keep($(this).attr('data-id'));
|
Yahtzee.keep($(this).attr('data-id'));
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".trash").click(function(evt) {
|
$(".trash").click(function(evt)
|
||||||
|
{
|
||||||
console.log("Trashing " + $(this).attr('data-id'));
|
console.log("Trashing " + $(this).attr('data-id'));
|
||||||
Yahtzee.trash($(this).attr('data-id'));
|
Yahtzee.trash($(this).attr('data-id'));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#launchBtn").click(function() {
|
$("#launchBtn").click(function()
|
||||||
|
{
|
||||||
Yahtzee.shuffle();
|
Yahtzee.shuffle();
|
||||||
Yahtzee.findCombinaisons();
|
Yahtzee.findCombinations();
|
||||||
if( Yahtzee.launch < 3 )
|
if( Yahtzee.launch < 3 )
|
||||||
Yahtzee.findPossibilities();
|
Yahtzee.findPossibilities();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user