Add bounds checking to gameState