Package featurecat.lizzie.rules
Class SGFParser
java.lang.Object
featurecat.lizzie.rules.SGFParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddProperties(Map<String, String> props, String propsStr) Add the properties from stringstatic voidAdd the properties by mutating the propsstatic voidAdd a key and value to the propsstatic int[]static Stringstatic StringGet a value with key, or the default if there is no such keystatic booleanisListProperty(String key) static booleanisMarkupProperty(String key) static booleanstatic booleanstatic booleanloadFromString(String sgfString) static StringnodeString(String key, String value) Get node string by the key and valuestatic intparseBranch(BoardHistoryList history, String value) static BoardHistoryListstatic StringpassPos()static StringpropertiesString(Map<String, String> props) Get properties string by the propsstatic voidstatic String
-
Constructor Details
-
SGFParser
public SGFParser()
-
-
Method Details
-
load
- Throws:
IOException
-
loadFromString
-
passPos
-
isPassPos
-
convertSgfPosToCoord
-
saveToString
- Throws:
IOException
-
save
- Throws:
IOException
-
isListProperty
-
isMarkupProperty
-
getOrDefault
Get a value with key, or the default if there is no such key- Parameters:
key-defaultValue-- Returns:
-
addProperty
Add a key and value to the props- Parameters:
key-value-
-
addProperties
Add the properties by mutating the props -
addProperties
Add the properties from string -
propertiesString
Get properties string by the props- Returns:
-
nodeString
Get node string by the key and value- Parameters:
key-value-- Returns:
-
Escaping
-
parseSgf
-
parseBranch
-