Implemented game logic for distantions