fixed length bug
This commit is contained in:
@@ -162,7 +162,7 @@ function createInterval() {
|
|||||||
|
|
||||||
|
|
||||||
if (currentCoin.value.x === snake.value.cell.x && currentCoin.value.y === snake.value.cell.y) {
|
if (currentCoin.value.x === snake.value.cell.x && currentCoin.value.y === snake.value.cell.y) {
|
||||||
snake.value.length + 10
|
snake.value.length++
|
||||||
currentCoin.value = spawnCoin()
|
currentCoin.value = spawnCoin()
|
||||||
score.value++
|
score.value++
|
||||||
|
|
||||||
@@ -225,4 +225,4 @@ window.addEventListener('keydown', keydown)
|
|||||||
width: 10px;
|
width: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user