implemented collision with game field border