Hi,
I am writing some C++ code, and the problem is analogous to the
following situation:
Take a Chess Board of 8x8 (nxn) blocks and I have 8 (n) horses. Like
in chess, the horses are placed at a distance of 2 and a half blocks
apart from the preceding horse. For example, Horse B is at a distance
of 2 and a half blocks from horse A, Horse C is at a distance of 2 and
a half blocks from horse B and so on. If one of the horses is moved
to any different block on the board, the other horses should realign
themselves so that the distances between the horse and the preceding
horse should always be 2 and a half blocks.
So, how can I ensure this?
Thanks!
Paul.