Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/RenderOpts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ data RenderOpts = RenderOpts {
output :: FilePath,
host:: String,
port :: Int,
scoreEstimate :: Bool
scoreEstimate :: Bool,
alternatePlays :: Bool
} deriving (Show)

-- Define the custom parser
Expand Down Expand Up @@ -59,5 +60,9 @@ parseOpts = RenderOpts <$>
( long "score-estimate"
<> short 's'
<> help "Whether to estimate the score of the game using KataGo")
<*> switch
( long "alternate-plays"
<> short 'a'
<> help "Whether to alternate lines of play using KataGo")


3 changes: 3 additions & 0 deletions src/KataGoApi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ translateMoves boardSize = let bp = makeBoardPoint boardSize
in map (\(color, x,y, movenumber) -> bp x y)


getMoves :: String -> Int -> Integer -> [(GoStone, Integer, Integer, Integer)] -> IO [(GoStone, Integer, Integer, Integer)]
getMoves host apiPort boardSize moves = return []

getScore :: String -> Int -> Integer -> [(GoStone, Integer, Integer, Integer)] -> IO Double
getScore host apiPort boardSize moves =
let boardMoves = translateMoves boardSize moves
Expand Down