[jgogears commit] r41 - in trunk/jgogears/jgogears: . engine

4 views
Skip to first unread message

codesite...@google.com

unread,
Feb 20, 2008, 11:21:13 PM2/20/08
to jgog...@googlegroups.com
Author: syeates
Date: Wed Feb 20 20:20:25 2008
New Revision: 41

Modified:
trunk/jgogears/jgogears/Board.java
trunk/jgogears/jgogears/BoardI.java
trunk/jgogears/jgogears/FastBoard.java
trunk/jgogears/jgogears/FasterBoard.java
trunk/jgogears/jgogears/GTPInterface.java
trunk/jgogears/jgogears/GTPParserUtils.java
trunk/jgogears/jgogears/GTPParserUtilsTest.java
trunk/jgogears/jgogears/GlobalTests.java
trunk/jgogears/jgogears/GnuGoEngineTest2.java
trunk/jgogears/jgogears/Vertex.java
trunk/jgogears/jgogears/ZobristTest.java
trunk/jgogears/jgogears/engine/VertexLineariser.java

Log:
fix a lot of warnings. unused variables, unused imports, missing/extra
javadoc @params

Modified: trunk/jgogears/jgogears/Board.java
==============================================================================
--- trunk/jgogears/jgogears/Board.java (original)
+++ trunk/jgogears/jgogears/Board.java Wed Feb 20 20:20:25 2008
@@ -1,6 +1,6 @@
package jgogears;

-import java.util.*;
+


/**
@@ -42,6 +42,7 @@
* constructor of specially sized boards.
*
* @param size the size
+ * @param zobrist true if we're using zobrist hashes
*/
public Board(int size, boolean zobrist) {
super(zobrist);
@@ -76,6 +77,7 @@
*
* @param size the size
* @param rule the rule
+ * @param zobrist true if we're using zobrist hashes
*/
public Board(int size, RuleSet rule, boolean zobrist) {
super(zobrist);
@@ -100,7 +102,6 @@
* @param board the move
* @param move the move
*
- * @return the new board
*/
public Board(Board board , Move move) {
this.size = board.getSize();
@@ -179,7 +180,6 @@
* @param column the column
* @param colour the colour
*
- * @return the previous colour
*/
public void setColour(int row, int column, short colour) {


Modified: trunk/jgogears/jgogears/BoardI.java
==============================================================================
--- trunk/jgogears/jgogears/BoardI.java (original)
+++ trunk/jgogears/jgogears/BoardI.java Wed Feb 20 20:20:25 2008
@@ -1,7 +1,7 @@
package jgogears;

import java.util.*;
-import java.lang.reflect.*;
+


/**
@@ -96,8 +96,8 @@
*
* @param row the row
* @param column the column
+ * @param colour the colour to set this to
*
- * @return the colour
*/
public abstract void setColour(int row, int column, short colour);

@@ -169,7 +169,6 @@
*
* @param move the move
*
- * @return the new board
*/
protected void copydata(BoardI old , Move move) {
size = old.getSize();

Modified: trunk/jgogears/jgogears/FastBoard.java
==============================================================================
--- trunk/jgogears/jgogears/FastBoard.java (original)
+++ trunk/jgogears/jgogears/FastBoard.java Wed Feb 20 20:20:25 2008
@@ -47,7 +47,6 @@
* @param board the move
* @param move the move
*
- * @return the new board
*/
public FastBoard(FastBoard board , Move move) {
this.size = board.getSize();

Modified: trunk/jgogears/jgogears/FasterBoard.java
==============================================================================
--- trunk/jgogears/jgogears/FasterBoard.java (original)
+++ trunk/jgogears/jgogears/FasterBoard.java Wed Feb 20 20:20:25 2008
@@ -44,7 +44,6 @@
* @param board the move
* @param move the move
*
- * @return the new board
*/
public FasterBoard(FasterBoard board , Move move) {
this.size = board.getSize();

Modified: trunk/jgogears/jgogears/GTPInterface.java
==============================================================================
--- trunk/jgogears/jgogears/GTPInterface.java (original)
+++ trunk/jgogears/jgogears/GTPInterface.java Wed Feb 20 20:20:25 2008
@@ -1,6 +1,6 @@
package jgogears;

-import java.util.TreeSet;
+
// TODO: Auto-generated Javadoc

/**

Modified: trunk/jgogears/jgogears/GTPParserUtils.java
==============================================================================
--- trunk/jgogears/jgogears/GTPParserUtils.java (original)
+++ trunk/jgogears/jgogears/GTPParserUtils.java Wed Feb 20 20:20:25 2008
@@ -49,8 +49,6 @@
do {
// System.err.println("parseVertexList(\"" + s + "\")");
Vertex v = null;
- short row = -1;
- short column = -1;
while ((s.indexOf(' ') == 1) || (s.indexOf(' ') == 0)) {
s = s.substring(1);
}

Modified: trunk/jgogears/jgogears/GTPParserUtilsTest.java
==============================================================================
--- trunk/jgogears/jgogears/GTPParserUtilsTest.java (original)
+++ trunk/jgogears/jgogears/GTPParserUtilsTest.java Wed Feb 20 20:20:25 2008
@@ -100,6 +100,7 @@
try {
this.engine.initialise();
BoardI board = this.engine.showBoard();
+ assertNotNull(board);
// TODO actually test the generated board here...
this.engine.quit();
} catch (Throwable t) {

Modified: trunk/jgogears/jgogears/GlobalTests.java
==============================================================================
--- trunk/jgogears/jgogears/GlobalTests.java (original)
+++ trunk/jgogears/jgogears/GlobalTests.java Wed Feb 20 20:20:25 2008
@@ -24,6 +24,8 @@
public static Test suite() {
TestSuite suite = new TestSuite("all tests in project");
suite.addTestSuite(NodeIteratorTest.class);
+ suite.addTestSuite(TreeIteratorTest.class);
+ suite.addTestSuite(NodeTest.class);
suite.addTestSuite(ModelTest.class);
suite.addTestSuite(VertexLineariserTest.class);
suite.addTestSuite(MoveTest.class);

Modified: trunk/jgogears/jgogears/GnuGoEngineTest2.java
==============================================================================
--- trunk/jgogears/jgogears/GnuGoEngineTest2.java (original)
+++ trunk/jgogears/jgogears/GnuGoEngineTest2.java Wed Feb 20 20:20:25 2008
@@ -438,6 +438,7 @@
try {
this.engine.initialise();
BoardI board = this.engine.showBoard();
+ assertNotNull(board);
// TODO
this.engine.quit();
} catch (Throwable t) {

Modified: trunk/jgogears/jgogears/Vertex.java
==============================================================================
--- trunk/jgogears/jgogears/Vertex.java (original)
+++ trunk/jgogears/jgogears/Vertex.java Wed Feb 20 20:20:25 2008
@@ -134,7 +134,7 @@
/**
* Comparison operator to ensure that (in)equality operators work as expected.
*
- * @param o the o
+ * @param v the v
*
* @return the int
*/

Modified: trunk/jgogears/jgogears/ZobristTest.java
==============================================================================
--- trunk/jgogears/jgogears/ZobristTest.java (original)
+++ trunk/jgogears/jgogears/ZobristTest.java Wed Feb 20 20:20:25 2008
@@ -16,6 +16,7 @@
public void testEachNotEqual() {
// this is needed to initialise the random numbers
Zobrist z = new Zobrist();
+ assertNotNull(z);

for (int i = 0; i < Zobrist.MAX_BOARD_SIZE; i++)
for (int j = 0; j < Zobrist.MAX_BOARD_SIZE; j++)
@@ -155,6 +156,8 @@
for (int i=0;i<Zobrist.MAX_BOARD_SIZE;i++){
BoardI board = new Board(19,true);
BoardI board2 = new Board(i,true);
+ assertNotNull(board);
+ assertNotNull(board2);
}

}

Modified: trunk/jgogears/jgogears/engine/VertexLineariser.java
==============================================================================
--- trunk/jgogears/jgogears/engine/VertexLineariser.java (original)
+++ trunk/jgogears/jgogears/engine/VertexLineariser.java Wed Feb 20
20:20:25 2008
@@ -225,7 +225,11 @@
public void remove() {
throw new java.lang.UnsupportedOperationException();
}
-
+ /**
+ * Invert a colour. Used when white is to play
+ * @param colour
+ * @return the inverted colour
+ */
public Short invert(Short colour){
switch (colour.shortValue()){
case BoardI.VERTEX_BLACK:

Reply all
Reply to author
Forward
0 new messages