So in what way does it "not work"? By output I mean something like what it looks like and why it is wrong
That is an example output of the program snippet you showed, given appropriate values for the array - i'll use '.' to represent spaces. So what's wrong with it?Code:.X.|...|... ---+---+--- ...|.O.|... ---+---+--- ...|...|...