refactored snake movement direction
fixed bug in eating food