Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
2  src/main/java/com/leokom/chess/MainRunner.java
@@ -55,7 +55,7 @@ public void onPlayerMoved( String move ) {
anotherPlayer.onPlayerMoved( "d2d4" );
//NOTE: interesting to implement - how much do we need to wait for result?
//NOTE2: it's not recommended way to offer draw after the move.
- anotherPlayer.onDrawOfferred();
+ anotherPlayer.onDrawOffered();
break;
default:
anotherPlayer.onResigned();
View
4 .../leokom/chess/framework/DrawOfferredListener.java → ...m/leokom/chess/framework/DrawOfferedListener.java
@@ -4,6 +4,6 @@
* Author: Leonid
* Date-time: 26.11.12 22:46
*/
-public interface DrawOfferredListener {
- void onDrawOfferred();
+public interface DrawOfferedListener {
+ void onDrawOffered();
}
View
2  src/main/java/com/leokom/chess/framework/Player.java
@@ -6,7 +6,7 @@
* (independent of the fact the player is represented by a chess engine,
* a human or a winboard-protocol )
*/
-public interface Player extends PlayerMovedListener, DrawOfferredListener, ResignListener {
+public interface Player extends PlayerMovedListener, DrawOfferedListener, ResignListener {
//may create attach - now it's over-projecting - 1 is OK
//TODO: rename to new vision
void setOnMoveListener( PlayerMovedListener playerMovedListenerToSet );
View
3  src/main/java/com/leokom/chess/gui/winboard/WinboardCommander.java
@@ -11,8 +11,7 @@
void startInit();
/**
- * TODO: think if it's needed in interface
- * enable usermove prefixes for moves for easier parsing
+ * Enable usermove prefixes for moves for easier parsing
*/
void enableUserMovePrefixes();
View
3  src/main/java/com/leokom/chess/gui/winboard/WinboardCommanderImpl.java
@@ -16,7 +16,7 @@
* Date-time: 10.11.12 21:22
*/
class WinboardCommanderImpl implements WinboardCommander {
- private Communicator communicator;
+ private final Communicator communicator;
private ProtoverListener protoverListener;
private QuitListener quitListener;
private GoListener goListener;
@@ -121,7 +121,6 @@ public void processInputFromServer() {
goListener.execute();
}
- //TODO: not fully test-covered
if ( whatToReceive.startsWith( "usermove" ) && userMoveListener != null ) {
userMoveListener.execute();
}
View
2  src/main/java/com/leokom/chess/gui/winboard/WinboardPlayer.java
@@ -110,7 +110,7 @@ public void onPlayerMoved( String move ) {
}
@Override
- public void onDrawOfferred() {
+ public void onDrawOffered() {
commander.offerDraw();
}

No commit comments for this range

Something went wrong with that request. Please try again.