Small optimization: we can figure out is board is solved by counting