Snake implemented with Javascript