Advertisement
Guest User

game.html

a guest
Oct 19th, 2019
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <script src="game.js"></script>
  5.     <style>
  6.         table{
  7.             margin:auto;
  8.             width:100%;
  9.         }
  10.        
  11.         tr.spacer{
  12.             height:55px;
  13.         }
  14.    
  15.         div#header{
  16.             width: 100%;
  17.             text-align: right;
  18.         }
  19.        
  20.         div#wrapper{
  21.             /*border: solid red 1px;*/
  22.             width: 750px;
  23.             margin:auto;
  24.             text-align:center;
  25.         }
  26.        
  27.         div.dealer,div.player{
  28.             float:left;
  29.             background-image:url("cards.png");
  30.             width:74px;
  31.             height:99px;
  32.             /* move 1 card right is -73px */
  33.             /* move 1 card down is -98px */
  34.             background-position:0px 0px ;
  35.            
  36.             margin-left:15px;
  37.             margin-right:15px;
  38.         }
  39.         img{
  40.             width:214px;
  41.             height:196px;
  42.         }
  43.  
  44.         input[type='button']{
  45.             width: 201px;
  46.             height:75px;
  47.             background-color : #4CAF50;
  48.             text-align:center;
  49.             margin: 25px;
  50.         }
  51.        
  52.         input#reload{
  53.             margin: 7px 35px;
  54.            
  55.         }
  56.     </style>
  57. </head>
  58.  
  59. <body onload="deal();">
  60.     <div id="header">
  61.         <input id="reload" type = "button" value="Start a new Game" onclick="location.reload();">
  62.     </div>
  63.    
  64.     <div id="wrapper">
  65.         <table border=0 id="blackjacktable">
  66.             <tr class="spacer"></tr>
  67.  
  68.             <tr>
  69.                 <th id="dealerLabel" colspan=2 >Dealer  </th>
  70.             </tr>
  71.             <tr>
  72.                 <th colspan=2 id="dealerScore"></th>
  73.             </tr>
  74.             <tr>
  75.                 <td id="dealerHand">
  76.                     <img id="dealer1" src="" width="107" height="98">
  77.                     <img id="dealer2" src="" width="107" height="98">
  78.                 </td>
  79.  
  80.             </tr>
  81.            
  82.             <tr class="spacer"></tr>
  83.            
  84.             <tr>
  85.                 <th id="playerLabel" colspan=2>Player   </th>
  86.             </tr>
  87.             <tr>
  88.                 <th colspan=2 id="playerScore"></th>
  89.             </tr>
  90.             <tr>
  91.                 <td>
  92.                     <input id="btnDraw" type="button" onclick="requestPlayerCard();" value="Draw 1 more Card">
  93.                     <input id="btnHold" type="button" onclick="completeDealerHand();" value="Hold">
  94.                 </td>
  95.             </tr>
  96.             <tr>
  97.                 <td id="playerHand">
  98.                     <img id="player1" src="" width="107" height="98">
  99.                     <img id="player2" src="" width="107" height="98">
  100.                 </td>
  101.             </tr>
  102.         </table>
  103.     </div>
  104. </body>
  105. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement