Canva interview question

Build an Algorithm to detect a win on a board game.