Jeu de démineur sur navigateur avec p5.js
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.html 964B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE html>
  2. <html lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>p5.js example</title>
  7. <link href="./css/style.css" rel="stylesheet">
  8. <script src="./js/p5.min.js"></script>
  9. <script src="./js/cell.js"></script>
  10. <script src="./js/grid.js"></script>
  11. <script src="./js/sketch.js"></script>
  12. </head>
  13. <body>
  14. <menu>
  15. <menuitem>
  16. <label>Columns</label>
  17. <input type="number" size="5" id="columns" value="40">
  18. </menuitem>
  19. <menuitem>
  20. <label>Rows</label>
  21. <input type="number" size="5" id="rows" value="30">
  22. </menuitem>
  23. <menuitem>
  24. <label>Mines</label>
  25. <input type="number" size="5" id="mines" value="50">
  26. </menuitem>
  27. <menuitem>
  28. <label>Cell size</label>
  29. <input type="number" size="5" id="cellsize" value="20">
  30. </menuitem>
  31. <button type="button" onclick="newGame()">New game</button>
  32. </menu>
  33. <main oncontextmenu="return false;">
  34. </main>
  35. </body>
  36. </html>