Snake game rafactor task