mirror of
https://github.com/MaciejkaG/statki.git
synced 2024-11-30 04:52:55 +01:00
dbb3ad0f1d
- Players can now successfully get into a game - None of the game view features don't work yet - Optimisation changes - Improved file naming - A game will automatically end if either of the players disconnect - Players will start the game synchronously as the server will wait for both of them to connect - Timer and game state updating works really well
13 lines
282 B
JavaScript
13 lines
282 B
JavaScript
document.addEventListener("keydown", (e) => {
|
|
switch (e.code) {
|
|
case "KeyB":
|
|
switchBoards();
|
|
break;
|
|
case "KeyS":
|
|
switchShips();
|
|
break;
|
|
case "KeyR":
|
|
switchRotation();
|
|
break;
|
|
}
|
|
}); |