Implement is_game_over() and material counting.
Work around invalid C++ compiler flag.