Notes:
- Canvas will make the rectangle from the position you give.
- For example, if you give (0, 0, width=20, height=20), it will start from 0, 0 and draw till 20 in width and 20 in height.
References:
- Canvas tag: https://www.w3schools.com/html/html5_canvas.asp
- Creating box in canvas (rectangle): https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/canvas
- Listening for keyboard key press events: https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event
- Animating snake movement: https://www.w3schools.com/js/js_htmldom_animate.asp
- How to align body element to center: https://stackoverflow.com/questions/6464592/how-to-align-entire-html-body-to-the-center
- Css Id sector: https://www.w3schools.com/cssref/sel_id.php
- Css Opacity: https://www.w3schools.com/css/css_image_transparency.asp
- Css Transition Fade Out Effect: https://stackoverflow.com/questions/15907079/css3-transition-fade-out-effect