Open IoannisMDamalas opened 5 months ago
We'll use the function rand() and divide it in 4 equal parts, we'll make it so each part is detected as a direction for the stormtroopers and then as it checks if the stormtrooper is allowed to move on that direction, if he's not allowed to then we simply goto rand() and draw another number from 1 of the 4 parts and repeat until a valid number appears