Let's say that we would like to implement the loadGame() method. This method would take a file we already created (we'll discuss how later), or, at the least, the following will be required:
- At least two HQs will fave to be created (otherwise, the game is already won)
- Each HQ will have to produce the buildings it had
- Each building will have to produce the units it had
- All units will have to magically teleport to the positions they were at when the game was saved
- If there were any commands given to units (like obliterating all enemy bases), they should resume executing them
We'll discuss how we actually give commands to our units in the next chapter, with the Command design pattern. Stay tuned.
Now, usually, it's not just ...