Skip to content

Commit 417f175

Browse files
authored
Update main.js
1 parent 7bc5e66 commit 417f175

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Other stuff/Tic tac toe/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class Board{
172172
}
173173
midpoint(square){
174174
let rect = table.childNodes[Math.floor(square/3)].childNodes[square%3].getBoundingClientRect();
175-
return({x: rect.x-scrollX+rect.width/2, y: rect.y-scrollY+rect.height/2});
175+
return({x: rect.x+scrollX+rect.width/2, y: rect.y+scrollY+rect.height/2});
176176
}
177177
cellsEqual(...cells){
178178
cells = cells.map((el)=>{return this.position[el]});

0 commit comments

Comments
 (0)