Shaun basicBoard

From Mindstab AI

Jump to: navigation, search
basicBoard.java

This is the fundamental tidbit of my go AI's - the board.


Class Summary

  1. Keeps track of the board state
  2. Allows moves to be made on the board
    1. Checks to see if said moves are valid (Doesn't check Ko - yet)
  3. Removes dead stones and keeps track of prisoners for both sides


Brief Method Summary

   //Make a move on the board with a basicMove
   public boolean move(basicMove thisMove)
   //Copy an existing board into this board
   public void copy(basicBoard thisBoard)
   //See if a board is equal to another board
   public boolean equal(basicBoard thisBoard)
   //Check the legality of a move
   public boolean isLegal(char colour, int x, int y)
   //Check to see if a particular stone or group is dead
   public boolean isDead(char colour, int x, int y)
   //Check for dead stones around x and y and remove them
   public void deadCleanup(int x, int y)
   //Remove a Group
   public void removeStones(char colour, int x, int y)
   //Get a specific point on the board
   public char getPoint(int x, int y)
   //Get the size of the board
   public int getSize()
   //To String - output the board to show it
   //DEBUG
   public void outputBoard()
   //Input a current board from a file
   public void inputBoardFromFile(String fileName)
Personal tools