Add sound to teleportation
This commit is contained in:
parent
f6e30ed37e
commit
d39470e3ca
BIN
assets/teleportation.mp3
Normal file
BIN
assets/teleportation.mp3
Normal file
Binary file not shown.
@ -285,6 +285,8 @@ async function startGame(gameID) {
|
|||||||
|
|
||||||
case TELEPORTATION:
|
case TELEPORTATION:
|
||||||
|
|
||||||
|
playAudio("assets/teleportation.mp3");
|
||||||
|
|
||||||
// Teleport the snake to the other cell
|
// Teleport the snake to the other cell
|
||||||
const possibleDestinations = teleportationCells.filter((v) => v[0] != newHead[0] && v[1] != newHead[1]);
|
const possibleDestinations = teleportationCells.filter((v) => v[0] != newHead[0] && v[1] != newHead[1]);
|
||||||
const chosenDestination = possibleDestinations[randInt(0, possibleDestinations.length)];
|
const chosenDestination = possibleDestinations[randInt(0, possibleDestinations.length)];
|
||||||
|
Loading…
Reference in New Issue
Block a user