<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 12: Reversi board</title><link href="https://sourceforge.net/p/csjava/feature-requests/12/" rel="alternate"/><link href="https://sourceforge.net/p/csjava/feature-requests/12/feed.atom" rel="self"/><id>https://sourceforge.net/p/csjava/feature-requests/12/</id><updated>2005-05-09T22:46:04Z</updated><subtitle>Recent changes to 12: Reversi board</subtitle><entry><title>Reversi board</title><link href="https://sourceforge.net/p/csjava/feature-requests/12/" rel="alternate"/><published>2005-05-09T22:46:04Z</published><updated>2005-05-09T22:46:04Z</updated><author><name>Toby Donaldson</name><uri>https://sourceforge.net/u/tobydonaldson/</uri></author><id>https://sourceforge.net31ec2d3d19726b103ad78a80385031d3320d38fe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Do you know the game reversi? It turns out thats a&lt;br /&gt;
good programming project for beginning courses.&lt;/p&gt;
&lt;p&gt;What you could do is make a class that displays an&lt;br /&gt;
8-by-8 Reversi board. It should let you set any square&lt;br /&gt;
to be either a black piece, a white piece, or blank.&lt;br /&gt;
The pieces could be just black and white circles; or&lt;br /&gt;
even better, they could be generic icons that&lt;br /&gt;
programmer using the class could set to be whatever&lt;br /&gt;
they want. But in any case, the black and white circles&lt;br /&gt;
should always be available to use.&lt;/p&gt;
&lt;p&gt;Of course, the nicer the board looks, the better. It&lt;br /&gt;
only needs to be 8-by-8, but if you can get it to be&lt;br /&gt;
n-by-n for any reasonable value of n, that would be good.&lt;/p&gt;
&lt;p&gt;The board should should also have a scoreboard showing&lt;br /&gt;
the number of black and white pieces on  the board. I&lt;br /&gt;
would imagine it should implement this interface:&lt;/p&gt;
&lt;p&gt;interface BoardInterface {&lt;br /&gt;
void setWhitePiece(int row, int col);&lt;br /&gt;
void setBlackPiece(int row, int col);&lt;br /&gt;
void setEmpty(int row, int col);&lt;br /&gt;
int getNumBlackPieces();&lt;br /&gt;
int getNumWhitePieces();&lt;br /&gt;
int getNumEmptySquares();&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;The board doesnt play the game or implement any rules&lt;br /&gt;
for placing pieces. Thats for another class that will&lt;br /&gt;
be written later, e.g. by the students in the course.&lt;br /&gt;
If you like, after youre finished this, you could&lt;br /&gt;
implement Reversi itself using the board, and create a&lt;br /&gt;
good artificially intelligent player. &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>