Refactor: concept of triples. Make rows, cols and diagonals private.