Do you know the game reversi? It turns out thats a
good programming project for beginning courses.
What you could do is make a class that displays an
8-by-8 Reversi board. It should let you set any square
to be either a black piece, a white piece, or blank.
The pieces could be just black and white circles; or
even better, they could be generic icons that
programmer using the class could set to be whatever
they want. But in any case, the black and white circles
should always be available to use.
Of course, the nicer the board looks, the better. It
only needs to be 8-by-8, but if you can get it to be
n-by-n for any reasonable value of n, that would be good.
The board should should also have a scoreboard showing
the number of black and white pieces on the board. I
would imagine it should implement this interface:
interface BoardInterface {
void setWhitePiece(int row, int col);
void setBlackPiece(int row, int col);
void setEmpty(int row, int col);
int getNumBlackPieces();
int getNumWhitePieces();
int getNumEmptySquares();
}
The board doesnt play the game or implement any rules
for placing pieces. Thats for another class that will
be written later, e.g. by the students in the course.
If you like, after youre finished this, you could
implement Reversi itself using the board, and create a
good artificially intelligent player.