Re-factored the code for calculating movement, by introducing a new method for calculating the heuristic distance to the target, and storing the distance of each cell by trial and error through a for loop for the 3x3 grid of cells available for movement around the Unit.
Re-increased the delay between frame updates to 1000ms.
Finally implemented a successful first draft for the Unit to follow a straight line to it's destination. Also first minor iteration for the weighted cells. So far, only gradient and distance-to-target are implemented.
Multiple destinations are now held in a hard coded array. A few new methods have been added to more easily access these destinations, and in doing so, I have also implemented a means for new Units to be spawned in during cycle time. Transferring away from an Array of the Units, they are now contained within an ArrayList, allowing for dynamic resizing depending on how many are currently in existence. Units that reach their destination are terminated and a replacement Unit is spawned.
Created a spread trample method contained within the Grid class, allowing it to be called to spread trample damage to neighbouring grassPatches based on current grass height missing.