moved keyPress logic inside Snake class;
moved the direction variables inside Snake class