A
A
Aspire892012-11-28 20:35:52
Algorithms
Aspire89, 2012-11-28 20:35:52

The algorithm of the game "Auto racing"

Recently I came across the board game "Auto Racing" instruction.pdf . The game is interesting, but in order to play with friends anywhere, you need to carry a large roll of paper with a drawn track, and everyone should have 2 cars.

There was an idea to write an electronic version for a tablet, to see your strength, to show your friends the result.

image

At first glance, everything is simple, I even redrawn the simplest route by cells. I have never written logic games and here I had the first question. How to implement such a field? An array where each radius has its own weight? but what about cornering and in those places where the track narrows and widens?

image

I tried to unfold the circle in a straight line, it is perceived easier, but the question remained. How to implement movement in the place where the red path makes 1 move, and the blue one 3?

I would like to make the movement of cars with the calculation of moves for the next player.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
Urvin, 2012-11-28
@Aspire89

graph.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question