Refactored to try and make the code more readable

This mainly introduces the GameGrid Iterate function which can help
reduce some duplication.