Remove unnecessary helper function for xor

Loosing my edge... slowly... but surely...

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2020-11-18 23:24:19 +01:00
parent 5f4ffae179
commit 5ca036975b
No known key found for this signature in database
GPG Key ID: DE0CF444096A468D
1 changed files with 1 additions and 5 deletions

View File

@ -15,10 +15,6 @@ data Karel = Karel
}
deriving (Eq)
xor :: Bool -> Bool -> Bool
xor True a = not a
xor False a = a
getHeader :: Karel -> String
getHeader karel = unlines [
printf " %8s %s %s %s" "POSITION" "FACING" "BEEP-BAG" "BEEP-POS",
@ -73,7 +69,7 @@ mapWall karel x y = leftPart <> rightPart
| northWall && wallEnds && verticalWall = "-|"
| wallEnds || (northWall && eastWallAbove) = "-+"
| northWall = "--"
| (verticalWall && northWallOnRight) || (eastWall `xor` eastWallAbove) = " +"
| (verticalWall && northWallOnRight) || (eastWall /= eastWallAbove) = " +"
| verticalWall = " |"
| otherwise = " "