diff --git a/doc/Cardinal.html b/doc/Cardinal.html index db45496..d4b8b45 100644 --- a/doc/Cardinal.html +++ b/doc/Cardinal.html @@ -1,11 +1,11 @@ - + Cardinal - + diff --git a/doc/Color.html b/doc/Color.html index f01d1fc..cdcd0e1 100644 --- a/doc/Color.html +++ b/doc/Color.html @@ -1,11 +1,11 @@ - + Color - + diff --git a/doc/ConsoleRenderer.html b/doc/ConsoleRenderer.html new file mode 100644 index 0000000..7253e33 --- /dev/null +++ b/doc/ConsoleRenderer.html @@ -0,0 +1,204 @@ + + + + +ConsoleRenderer + + + + + + + + + + + + + + +
+ +
+
+ +
+ +
+

Class ConsoleRenderer

+
+
java.lang.Object +
GomokuRenderer +
ConsoleRenderer
+
+
+
+
+
+
public class ConsoleRenderer +extends GomokuRenderer
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ConsoleRenderer

      +
      +
      public ConsoleRenderer()
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+ + diff --git a/doc/Coordinate.html b/doc/Coordinate.html index 55c35e0..be28403 100644 --- a/doc/Coordinate.html +++ b/doc/Coordinate.html @@ -1,11 +1,11 @@ - + Coordinate - + diff --git a/doc/GomokuAI.html b/doc/GomokuAI.html index b23a150..5636d18 100644 --- a/doc/GomokuAI.html +++ b/doc/GomokuAI.html @@ -1,11 +1,11 @@ - + GomokuAI - + @@ -78,6 +78,7 @@ loadScripts(document, 'script');
  • Method Details
    1. chooseMove(GomokuBoard)
    2. +
    3. GetCellPoint(GomokuBoard)
  • @@ -88,13 +89,15 @@ loadScripts(document, 'script');

    Class GomokuAI

    java.lang.Object +
    Player
    GomokuAI
    +

    public class GomokuAI -extends Object
    +extends Player
    @@ -110,11 +113,18 @@ loadScripts(document, 'script');
    Description
    (package private) int
    difficulty
    -
     
    +
    +
    The difficulty of the GomokuAI
    +
    (package private) Random
    random
    -
     
    +
    +
    The random initialization
    + +
    +

    Fields inherited from class Player

    +color
    @@ -141,12 +151,22 @@ loadScripts(document, 'script');
    Modifier and Type
    Method
    Description
    -
    Coordinate
    +
    GomokuCell
    chooseMove(GomokuBoard board)
    -
     
    +
    +
    Return the coordinate of the move played by the Gomoku AI.
    +
    +
    Map<GomokuCell, Integer>
    +
    GetCellPoint(GomokuBoard board)
    +
    +
    Return a Map of all Cell playable, and their point.
    + +
    +

    Methods inherited from class Player

    +getColor, getName, Player

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    @@ -166,6 +186,7 @@ loadScripts(document, 'script');

    random

    Random random
    +
    The random initialization
    @@ -174,6 +195,7 @@ loadScripts(document, 'script');

    difficulty

    int difficulty
    +
    The difficulty of the GomokuAI
    @@ -205,7 +227,31 @@ loadScripts(document, 'script');

    chooseMove

    -
    public Coordinate chooseMove(GomokuBoard board)
    +
    public GomokuCell chooseMove(GomokuBoard board)
    +
    Return the coordinate of the move played by the Gomoku AI.
    +
    +
    Specified by:
    +
    chooseMove in class Player
    +
    Parameters:
    +
    board - The actual Gomoku board.
    +
    Returns:
    +
    The Cell of the move played.
    +
    +
    +
    + +
  • +
    +

    GetCellPoint

    +
    +
    public Map<GomokuCell, Integer> GetCellPoint(GomokuBoard board)
    +
    Return a Map of all Cell playable, and their point.
    +
    +
    Parameters:
    +
    board - The actual Gomoku board.
    +
    Returns:
    +
    the Map of all Cell playable, and their point.
    +
  • diff --git a/doc/GomokuBoard.html b/doc/GomokuBoard.html index bcb6ccb..5d02e38 100644 --- a/doc/GomokuBoard.html +++ b/doc/GomokuBoard.html @@ -1,11 +1,11 @@ - + GomokuBoard - + @@ -67,18 +67,26 @@ loadScripts(document, 'script');
  • Field Details
    1. firstCell
    2. -
    3. boardWith
    4. -
    5. bordHeight
    6. +
    7. boardWidth
    8. +
    9. boardHeight
  • Constructor Details
    1. GomokuBoard(int, int)
    2. +
    3. GomokuBoard(int, int, Color[][])
  • Method Details
      +
    1. main(String[])
    2. +
    3. genCells(int, int, Color[][])
    4. get(int, int)
    5. +
    6. getAllsCells()
    7. +
    8. getPlayableCells()
    9. +
    10. countAlignedCells(GomokuCell)
    11. +
    12. countMax(Map)
    13. +
    14. toString()
  • @@ -110,14 +118,20 @@ loadScripts(document, 'script');
    Field
    Description
    private int
    -
    boardWith
    -
     
    +
    boardHeight
    +
    +
    The height of the GomokuBoard.
    +
    private int
    -
    bordHeight
    -
     
    +
    boardWidth
    +
    +
    The width of the GomokuBoard.
    +
    private GomokuCell
    firstCell
    -
     
    +
    +
    The firstcell in the board, at the top left of the board.
    +
    @@ -131,7 +145,15 @@ loadScripts(document, 'script');
    Description
    GomokuBoard(int width, int height)
    -
     
    +
    +
    This constructor take the width and the height to creat a board of gomoku.
    +
    +
    GomokuBoard(int width, + int height, + Color[][] colors)
    +
    +
    This constructor take the width and the height to creat a board of gomoku.
    +
    @@ -140,22 +162,60 @@ loadScripts(document, 'script');

    Method Summary

    -
    +
    Modifier and Type
    Method
    Description
    - -
    get(int x, + + +
    +
    This method return a Map of number aligned cells.
    +
    +
    int
    + +
    +
    This method return the number max of the aligned Cells.
    +
    +
    private void
    +
    genCells(int width, + int height, + Color[][] colors)
    +
    +
    This method gen all cells in the board and link each other.
    +
    + +
    get(int x, int y)
    -
     
    +
    +
    This method get a cell in specific position in the board.
    +
    +
    private GomokuCell[][]
    + +
    +
    This method return all cells in the board in the order.
    +
    + + +
    +
    This method return a list of playable cell.
    +
    +
    static void
    +
    main(String[] args)
    +
     
    + + +
    +
    This method print the board cell by cell with change line when + the line is finished.
    +

    Methods inherited from class java.lang.Object

    -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    @@ -172,22 +232,25 @@ loadScripts(document, 'script');

    firstCell

    private GomokuCell firstCell
    +
    The firstcell in the board, at the top left of the board.
  • -
    -

    boardWith

    +
    +

    boardWidth

    -
    private int boardWith
    +
    private int boardWidth
    +
    The width of the GomokuBoard.
  • -
    -

    bordHeight

    +
    +

    boardHeight

    -
    private int bordHeight
    +
    private int boardHeight
    +
    The height of the GomokuBoard.
  • @@ -205,6 +268,29 @@ loadScripts(document, 'script');
    public GomokuBoard(int width, int height)
    +
    This constructor take the width and the height to creat a board of gomoku.
    +
    +
    Parameters:
    +
    width - Size of width.
    +
    height - Size of height.
    +
    +
    + + +
  • +
    +

    GomokuBoard

    +
    +
    public GomokuBoard(int width, + int height, + Color[][] colors)
    +
    This constructor take the width and the height to creat a board of gomoku.
    +
    +
    Parameters:
    +
    width - Size of width.
    +
    height - Size of height.
    +
    colors - Is colors of cells after load a game.
    +
  • @@ -217,11 +303,114 @@ loadScripts(document, 'script');

    Method Details