Using an adjacency matrix for winner calculation