Skip to content

Commit

Permalink
Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
BJClarke committed May 1, 2014
1 parent 6e3e607 commit 32d25ca
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 1 deletion.
Binary file modified Project Files/bin/classes/cs2114/ultimatetic/AIGrid.class
Binary file not shown.
Binary file modified Project Files/bin/classes/cs2114/ultimatetic/AIGridTest.class
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions Project Files/src/cs2114/ultimatetic/AIGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,11 @@ public boolean playOppositeCorner()
}


// ----------------------------------------------------------
/**
* Plays empty corner
* @return true if played
*/
public boolean playEmptyCorner()
{
if (this.getCell(board[0], board[1]) == Cell.EMPTY)
Expand Down
6 changes: 5 additions & 1 deletion Project Files/src/cs2114/ultimatetic/AIGridTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,11 @@ public void testPlayOppositeCorner()
assertTrue(AI.playOppositeCorner());
}

public void testEmptyCorner()
// ----------------------------------------------------------
/**
* Tests playEmptyCorner()
*/
public void testPlayEmptyCorner()
{
String grid = "BEBEEEBEE";
AI.getBoard(2, 2).fromString(grid);
Expand Down
18 changes: 18 additions & 0 deletions Project Files/src/cs2114/ultimatetic/RandomAIGridTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

import student.TestCase;

// -------------------------------------------------------------------------
/**
* Random AI
*
* @author Brian Clarke
* @version Apr 30, 2014
*/
public class RandomAIGridTest extends TestCase
{

/**
* random generator
*/
RandomAIGrid random;

/*public RandomAIGridTest()
Expand All @@ -18,11 +28,19 @@ public void setUp()
random = new RandomAIGrid();
}

// ----------------------------------------------------------
/**
* tests setCell()
*/
public void testSetCell()
{
assertTrue(random.setCell(0, 0));
}

// ----------------------------------------------------------
/**
* tests undoMove()
*/
public void testUndoMove()
{
assertFalse(random.undoMove());
Expand Down

0 comments on commit 32d25ca

Please sign in to comment.