Add server logic for snake.