Checks if a game ended before reporting errors

Fixes #233