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:
parent
5f4ffae179
commit
5ca036975b
1 changed files with 1 additions and 5 deletions
|
@ -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 = " "
|
||||
|
||||
|
|
Loading…
Reference in a new issue