Giter VIP home page Giter VIP logo

snake's People

Contributors

ldgit avatar

Stargazers

 avatar

Watchers

 avatar  avatar

snake's Issues

Game rarely crashes after snake eats the food

Screenshot:
image

Error message:

 Uncaught TypeError: headCoordinates is undefined
    getNewHeadCoordinates moveSnake.js:82
    moveSnake moveSnake.js:8
    startTimer snake.js:20
    update index.mjs:43
    startTimer snake.js:19
    setInterval handler*startTimer snake.js:16
    changeDelayBetweenMoves snake.js:35
    update App.svelte:14
    update index.mjs:760
    flush index.mjs:732
    promise callback*schedule_update index.mjs:707
    make_dirty index.mjs:1442
    ctx index.mjs:1477
    restartGame bundle.js:3615
    dispose GameOver.svelte:16
    listen index.mjs:238
    listen_dev index.mjs:1608
    mount bundle.js:3227
    update bundle.js:3305
    update index.mjs:764
    flush index.mjs:732
    promise callback*schedule_update index.mjs:707
    make_dirty index.mjs:1442
    ctx index.mjs:1477
    update App.svelte:13
    set index.mjs:35
    update index.mjs:43
    startTimer snake.js:19
    setInterval handler*startTimer snake.js:16
    changeDelayBetweenMoves snake.js:35
    update App.svelte:14
    update index.mjs:760
    flush index.mjs:732
    promise callback*schedule_update index.mjs:707
    make_dirty index.mjs:1442
    ctx index.mjs:1477
    restartGame bundle.js:3615
    dispose GameOver.svelte:16
    listen index.mjs:238
    listen_dev index.mjs:1608
moveSnake.js:82:22
    getNewHeadCoordinates moveSnake.js:82
    moveSnake moveSnake.js:8
    startTimer snake.js:20
    update index.mjs:43
    startTimer snake.js:19
    (Async: setInterval handler)
    startTimer snake.js:16
    changeDelayBetweenMoves snake.js:35
    update App.svelte:14
    update index.mjs:760
    flush index.mjs:732
    (Async: promise callback)
    schedule_update index.mjs:707
    make_dirty index.mjs:1442
    ctx index.mjs:1477
    restartGame bundle.js:3615
    dispose GameOver.svelte:16
    (Async: EventListener.handleEvent)
    listen index.mjs:238
    listen_dev index.mjs:1608
    mount bundle.js:3227
    update bundle.js:3305
    update index.mjs:764
    flush index.mjs:732
    (Async: promise callback)
    schedule_update index.mjs:707
    make_dirty index.mjs:1442
    ctx index.mjs:1477
    update App.svelte:13
    set index.mjs:35
    update index.mjs:43
    startTimer snake.js:19
    (Async: setInterval handler)
    startTimer snake.js:16
    changeDelayBetweenMoves snake.js:35
    update App.svelte:14
    update index.mjs:760
    flush index.mjs:732
    (Async: promise callback)
    schedule_update index.mjs:707
    make_dirty index.mjs:1442
    ctx index.mjs:1477
    restartGame bundle.js:3615
    dispose GameOver.svelte:16
    (Async: EventListener.handleEvent)
    listen index.mjs:238
    listen_dev index.mjs:1608

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.