DEV Community

Cover image for Build a Snake Game in functional JavaScript - Part 0

Build a Snake Game in functional JavaScript - Part 0

Patricio Ferraggi on March 25, 2020

If you are interested in reading this article in Spanish, check out my blog The Developer's Dungeon If you have been following my latest articles ...
Collapse
 
jlrxt profile image
Jose Luis Ramos T.

Hey amigo primero lo primero: gracias.
Justo en lo que estoy documentando me. Quiero crear un juego clásico ping Pong. Pero como estoy empezando con JS, créame , se a que se refiere con las frustraciones. Me despido con la siguiente pregunta ¿ Este juego estará basado solo en Javascript o también HTML5?. Gracias/ te sigo ahora. Saludos desde cdmx 🇲🇽

Collapse
 
patferraggi profile image
Patricio Ferraggi

Hola como estas? me alegro mucho que te haya gustado. Por el momento solo estoy haciendolo en consola, de cualquiera manera la idea seria que el codigo del juego este separado del codigo de la consola por lo que escribir una version para mostrar en una pagina web seria sumamente sencillo. Podria agregarlo luego de la serie :)

Collapse
 
jlrxt profile image
Jose Luis Ramos T.

Gracias. Estaré pendiente.

Collapse
 
youpiwaza profile image
max

Good effort,and pretty well explained. Can't wait to see the next post :p

I just don't get the ramda import. What is it, and why use it ? ^^'

Collapse
 
patferraggi profile image
Patricio Ferraggi

Hey Max, I am glad you liked it, hopefully I can get the next one done in the upcoming week.

Well, most of the functions I used like pipe, thunkify, map and repeat they don't come by default with JavaScript, in order not implement them myself (as it is not the goal of this project) I used a library called Ramda.js, you can check the documentation here ramdajs.com/docs/. So in order to use this library inside node.js, I first need to import it, otherwise, methods are no visible. If this would be done directly in a browser I could have used the 'import' syntax or just put a reference for the ramda.js file inside the html.