How to store the path of a game pawn in a turn based game ?
- by panzerschreck
Hello,
I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not.
i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below
if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching "home" first wins.
The ones in yellow are safe-houses, i.e both the opponent pawn and the player's pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point.
Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns.
Is there any pattern to store such static information, in a elegant way ?
Thanks for your time