Skip to content

Commit ad55907

Browse files
committed
putStatsFile.
1 parent cb59d61 commit ad55907

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AI/AlphaBeta/Persistent.hs

+6
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@ putRecordFile board depth side value = Metrics.timed "cache.put.file" $ do
402402
Second -> CacheItem {ciFirst = Nothing, ciSecond = Just value}
403403
putRecordFileB bstr newData
404404

405+
putStatsFile :: Board -> Stats -> Storage ()
406+
putStatsFile board stats = do
407+
let newData = PerBoardData M.empty (Just stats)
408+
bstr = encodeBoard board
409+
putRecordFileB bstr newData
410+
405411
initFile :: Storage ()
406412
initFile = do
407413
seek IndexFile 0

0 commit comments

Comments
 (0)