|
What are the criteria of the assignment? I had a connect 4 game assignment in java back in college but I also designed a GUI for it. This seems like a bit of an advanced problem for a teacher to assign in a beginning java programming course.
The key to this is to use an array to keep track of the board pieces. And you will have to write methods that check for available spots on the board as well as a winning move which means checking for 4 pieces in a row which can be vertical, horizontal or diagonal.
I also don't really see how you can do this without having some kind of GUI. You have to be able to see where you want to put your piece. By not having a GUI does that also mean not having any kind of board layout display via the DOS/terminal window?
Greetings.
|