Validating a connect 4 board state

90 Views Asked by At

All connect 4 states aren't possible. For instance, the number of token of each color should be equal or at most only one should be missing for either color.

Discussing with a colleague, he told me to simply try to "unstack" them.

I saw somewhere a document stating that it was more complex than that.

Has one the reference I am looking for ?

Details :

A board is given and some token are already in. We know that white/red started and try to decide if the configuration is valid.