

Related to the above point: in printGameBoard you are setting freeSpace to false and true multiple times: it may go from one to the other and back. It is better to initialise these two as false at the start of gameWinCheck and only have them set to true afterwards (when winning lines are detected) - never again to false. While(counter <=1 & winCheckX = false & winCheckO) could be OK, but then why is not the same done for winCheckO. GameBoard = new String //allows X's and O's to be placed on the board The problem seems to be in the gameWinCheck method: //creating a two dimensional array I thought about trying with a nested for loop, but I've only used it for iterating two dimensional arrays. This problem occurred earlier on and then I fixed it with a while loop, but it's back and now I'm unsure what to do.

When checking for a win with "X", it completely skips over the winning line, even though there is a three in a row.
