basic snake logic implemented