Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 36ba79b7 authored by 62160286's avatar 62160286
Browse files

Add methods checkRow and checkCol

parent bc9e7c14
No related branches found
No related tags found
No related merge requests found
......@@ -69,10 +69,20 @@ export default {
}
},
checkRow (row) {
for (let col = 0; col < 3; col++) {
if (this.table[row][col] !== this.turn) {
return false
}
}
return true
},
checkCol (col) {
for (let row = 0; row < 3; row++) {
if (this.table[row][col] !== this.turn) {
return false
}
}
return true
},
checkX1 () {
return false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment