type Position = (Int,Int) type Image = (Picture,Position) -- Ein Bild mit Positionsinformation konstruieren makeImage :: Position -> Picture -> Image makeImage x y = (y,x) -- Die Position eines positionierten Bildes neu definieren changePosition :: Position -> Image -> Image changePosition z (x,y) = (x,z) -- Die Position eines Bildes um dx und dy verändern moveImage :: Int -> Int -> Image -> Image moveImage dx dy (p,(x,y)) = (p,(x+dx,y+dy)) -- Ein positioniertes Bild darstellen printImage :: Image -> IO() printImage (p,(x,y)) = (printPicture . padout y 0 0 x) p