Which class do I use to build a game board for console output?

If I want to make a game board like tic tac toe, should I use string + concatenations, stringbuilder, console.print? Something else?

Please don’t write it for me. I wand to do it :). But what would you use to build a board from regular ascii characters?

hmmm… I would just use

System.out.println(); 

Wait or maybe…

Make a class and name it tile. Then have a class that holds all the tiles in an array list. Then in that class you could have a draw method. And in each tile there would be a draw method.

In that draw method would be something like this:

System.out.printf("|%s|", value);

S being the value of the tile. (X or O)

Hope this helped! :stuck_out_tongue:

Just use string concatenation and System.out.println()'s, the string your’e printing is so short it won’t matter.
As for characters and layout, maybe something like this: (ignore the automatic red highlighting)


X | O | X
---------
O | X | O
---------
O | X | O

Also, Jacob, there’s no need for multiple classes and all the OOP BS for a simple tic-tack-toe game that can probably be written in < 50 lines.

Ok, but OOP != BS.

Sorry if that’s how I came across, I didn’t mean OOP is BS (should practice better phrasing), but in this context I’d say many of it’s principles are highly unnecessary.