Liquorice-0.0.1: Algorithmic Doom map generation

Copyright© Jonathan Dowland 2020
LicenseGPL-3
Maintainerjon+hackage@dow.land
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell98

Liquorice.Line

Description

The Point and Line data-types and functions for manipulating Lines.

Synopsis

Documentation

data Line Source #

The Line data-type corresponds closely to the Doom equivalent but has with unboxed fields.

Constructors

Line 
Instances
Eq Line Source # 
Instance details

Defined in Liquorice.Line

Methods

(==) :: Line -> Line -> Bool #

(/=) :: Line -> Line -> Bool #

Ord Line Source # 
Instance details

Defined in Liquorice.Line

Methods

compare :: Line -> Line -> Ordering #

(<) :: Line -> Line -> Bool #

(<=) :: Line -> Line -> Bool #

(>) :: Line -> Line -> Bool #

(>=) :: Line -> Line -> Bool #

max :: Line -> Line -> Line #

min :: Line -> Line -> Line #

Show Line Source # 
Instance details

Defined in Liquorice.Line

Methods

showsPrec :: Int -> Line -> ShowS #

show :: Line -> String #

showList :: [Line] -> ShowS #

Arbitrary Line Source # 
Instance details

Defined in Liquorice.Line

Methods

arbitrary :: Gen Line #

shrink :: Line -> [Line] #

type Point = (Int, Int) Source #

A 2D coordinate.

flipline :: Line -> Line Source #

Swap a Line's direction.

splitLine :: Line -> Line -> [Line] Source #

Split a Line by another; return the bits.

checkIntersect :: Line -> Line -> Bool Source #

Do the supplied Lines intersect?

splitLines :: [Line] -> Line -> [Line] Source #

Split Lines in a list with a splitter line (which we don't insert)