My son and I are trying to write a trading game, similar in format to Drug Wars, but without the drugs and set in feudal Japan. The idea is to move from place to place buying and selling goods, building up capital, investing in larger transports, etc.
The problem is we also want to have costs involved. The idea is to base it on a 3x3 grid (maybe larger when we understand the concept), with a cost of x to move to an adjacent square, and 2x to move to a square 2 spaces away. Using Tic-Tac-Toe as an example, if the player is in the middle square, all others are only 1 space away; if they're in a corner square, there are 3 others just one space away, and 5 that are 2 spaces away. For the life of us we can't see how to set up the calculations.
Does anyone have any advice, please? We realise it'd involve tagging each port and using a distance matrix of some sort, but don't see how to code it into Sugarcube.
Any advice gratefully received!