Open sfogarty opened 2 hours ago
mill :: Point -> Board -> Player -> Bool mill pieceLoc board pl = let adjacentMills = [mill | mill <- allMills, pieceLoc `elem` mill] playerFilled mill = all (\l -> lookup l board == Just pl) mill in any playerFilled adjacentMills
Use this in makeMove/actionResult on the destination of whatever piece (for a put or move, but not a remove), if it's true then don't swap the player and set the "must remove" bool to true.
makeMove/actionResult