JS OOP snake base