added the game state evaluation function