I was tasked with making a tictactoe game that takes a string of inputs and then generates the board and the state of the game. B's are blanks and then the regular X and O. I used a two dimensional array to create the program and it executes fine and generates the board perfectly but for some reason it only recognizes the "if statement" to announce a winner if the winner has three X's in the top row.
The way you have your if-statements arranged, if the top left corner is an "X," no other if statement will run. For-loops would be the way to go here, but if you insist on using if-statements, consider using the "&&" operator rather than nested ifs.