It took me the afternoon but I got a LSP working

This commit is contained in:
2023-12-02 16:16:57 +01:00
parent a36a4ccbe9
commit eedd910d67
8 changed files with 35 additions and 31 deletions

View File

@@ -5,13 +5,13 @@ import Commons
checkRoundsPossible :: [Round] -> Bool
checkRoundsPossible [] = True
checkRoundsPossible (round: t) = red round <= 12 && green round <= 13 && blue round <= 14 && (checkRoundsPossible t)
checkRoundsPossible (round: t) = red round <= 12 && green round <= 13 && blue round <= 14 && checkRoundsPossible t
checkGamePossible :: Game -> Bool
checkGamePossible Game{rounds=rounds} = checkRoundsPossible rounds
getPossibleIds :: [Game] -> [Int]
getPossibleIds [] = []
getPossibleIds (game: t) = if (checkGamePossible game)
then (gid game: getPossibleIds t)
else do getPossibleIds t
getPossibleIds (game: t) = if checkGamePossible game
then gid game: getPossibleIds t
else getPossibleIds t