Add a macro of game state observing fuction.