halma/src/Game/Halma/AI/Ignorant.hs

Summary

Maintainability
Test Coverage

Use guards
Open

ignorantFixedDepth n opts team board =
  if n <= 0 then
    rateTeam team board
  else if hasFinished board team then
    WinIn 0
Severity: Minor
Found in halma/src/Game/Halma/AI/Ignorant.hs by hlint

Found

ignorantFixedDepth n opts team board
  = if n <= 0 then rateTeam team board else
      if hasFinished board team then WinIn 0 else
        beingSomewhatGreedy (rateTeam team board) $
          maximum $
            map (ignorantFixedDepth (n - 1) opts team . outcome board) $
              allLegalMoves opts board team

Perhaps

ignorantFixedDepth n opts team board
  | n <= 0 = rateTeam team board
  | hasFinished board team = WinIn 0
  | otherwise =
    beingSomewhatGreedy (rateTeam team board) $
      maximum $
        map (ignorantFixedDepth (n - 1) opts team . outcome board) $
          allLegalMoves opts board team

There are no issues that match your filters.

Category
Status