I'm going to tag every math wizard I know on this forum for this one xD
Yann, R0J0hound, cvp, Tobye
Firstly, this is for a board game I am developing. The idea is that once a user clicks on a unit, all available move spaces are shown on the board, just like in this game here:
<img src="http://img.photobucket.com/albums/v413/jaimeastorga2000/Spybot.png" border="0">
In the image above, the selected unit is allowed to move 4 spaces on the game board, so every possible place the program can move is highlighted.
For my board game (you can see what I currently have in development here: CoHackTest), I want to implement the same thing, but I'm not sure where to begin.
Each program is in a family called PlayerPrograms, which has 4 instance variables. The one that's relevant to our problem is the 'Move' variable, which stores the number of spaces our program will be allowed to move. The four instance variables are displayed upon program spawn:
<img src="http://i.imgur.com/FABieCM.png" border="0">
<img src="http://i.imgur.com/j1LaEfe.png" border="0">
Does anyone know how one might calculate the maximum movable spots? There is an unused sprite in the 'ObjectDump' layout called 'MoveIndicator' that I intend to use to display the movable spots.
Any, and I literally mean any, help or ideas on how to do this are appreciated.
BoardGame.capx
My initial thoughts are that I need an array to cover the entire game board spaces (each space is 64x64 in size), and then mark which spaces are empty and which ones are walls or currently occupied by another program.