Canva Interview Question

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