Class BoardData

java.lang.Object
featurecat.lizzie.rules.BoardData

public class BoardData extends Object
  • Field Details

    • moveNumber

      public int moveNumber
    • moveMNNumber

      public int moveMNNumber
    • lastMove

      public Optional<int[]> lastMove
    • moveNumberList

      public int[] moveNumberList
    • blackToPlay

      public boolean blackToPlay
    • dummy

      public boolean dummy
    • lastMoveColor

      public Stone lastMoveColor
    • stones

      public Stone[] stones
    • zobrist

      public Zobrist zobrist
    • verify

      public boolean verify
    • winrate

      public double winrate
    • engineIndex

      public int engineIndex
    • komi

      public double komi
    • scoreMean

      public double scoreMean
    • bestMoves

      public List<MoveData> bestMoves
    • blackCaptures

      public int blackCaptures
    • whiteCaptures

      public int whiteCaptures
    • comment

      public String comment
  • Constructor Details

    • BoardData

      public BoardData(Stone[] stones, Optional<int[]> lastMove, Stone lastMoveColor, boolean blackToPlay, Zobrist zobrist, int moveNumber, int[] moveNumberList, int blackCaptures, int whiteCaptures, double winrate, int playouts, double scoreMean)
  • Method Details

    • empty

      public static BoardData empty(int width, int height)
    • addProperty

      public void addProperty(String key, String value)
      Add a key and value
      Parameters:
      key -
      value -
    • getProperty

      public String getProperty(String key)
      Get a value with key
      Parameters:
      key -
      Returns:
    • getOrDefault

      public String getOrDefault(String key, String defaultValue)
      Get a value with key, or the default if there is no such key
      Parameters:
      key -
      defaultValue -
      Returns:
    • getProperties

      public Map<String,String> getProperties()
      Get the properties
      Returns:
    • addProperties

      public void addProperties(Map<String,String> addProps)
      Add the properties
    • addProperties

      public void addProperties(String propsStr)
      Add the properties from string
    • propertiesString

      public String propertiesString()
      Get properties string
      Returns:
    • getWinrate

      public double getWinrate()
    • tryToClearBestMoves

      public void tryToClearBestMoves()
    • tryToSetBestMoves

      public void tryToSetBestMoves(List<MoveData> moves)
    • getWinrateFromBestMoves

      public static double getWinrateFromBestMoves(List<MoveData> bestMoves)
    • getScoreMean

      public double getScoreMean()
    • getScoreMeanFromBestMoves

      public static double getScoreMeanFromBestMoves(List<MoveData> bestMoves)
    • bestMovesToString

      public String bestMovesToString()
    • setPlayouts

      public void setPlayouts(int playouts)
    • getPlayouts

      public int getPlayouts()
    • sync

      public void sync(BoardData data)
    • clone

      public BoardData clone()
      Overrides:
      clone in class Object
    • isSameCoord

      public boolean isSameCoord(int[] coord)