moved gamemap generation functions to state namespace