correctly working winning state verification, AI implemented