Skip to content

Commit

Permalink
Copy to non-playground fe (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
takumihara authored Nov 13, 2023
1 parent 51df6cc commit 17a8ee9
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 0 deletions.
32 changes: 32 additions & 0 deletions web/html/online-pong-v1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html>

<head>
<meta charset="utf-8" />
<title>Canvas tutorial</title>
<script src="https://cdn.socket.io/4.3.2/socket.io.min.js"
integrity="sha384-KAZ4DtjNhLChOB/hxXuKqhMLYvx3b5MlT55xPEiNmREKRzeEm+RVPlTnAn0ajQNs"
crossorigin="anonymous"></script>

<script src="pong.js"></script>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>

<body onload="init();">
<div>
<button onclick="start();">Start</button>
<button onclick="game.switch_battle_mode();">Battle</button>
<button onclick="game.switch_practice_mode();">Practice</button>
<div id="fps">FPS: 0</div>
<div id="speed">Speed: 0</div>
<div>player1: <span id="player1">0</span></div>
<div>player2: <span id="player2">0</span></div>
</div>
<canvas id="tutorial" width="256" height="512"></canvas>
</body>

</html>
Loading

0 comments on commit 17a8ee9

Please sign in to comment.