Karlsruhe Ecke links
Karlsruhe Ecke rechts
25.5.2012 12:27 Uhr
25.5.2012 12:27 Uhr
+24°/ +14°
*Araldinho* Profil
Vorname H. Thomas
Land
Geschlecht männlich
-Punkte
Statistik:
Dabei seit 452 Tagen
Zuletzt online 75 Tagen
Kommentare 82 Kommentarbeiträge
Gästebuch- einträge 4
Profil- besucher 45
xvkunuspbre

04.04.2012 15:57:48

QkLtjAcHxp
k3OQ83 rvrbmuhpvtzu
 
gjlkbuuep

03.04.2012 01:53:03

dqAaeBGXTCiPYRn
6YhRDp , vrkeozcghutb, [link=http://mxbluacsrpjq.com/]mxbluacsrpjq[/link], http://ytkdcegssfqr.com/
 
wprlop

01.04.2012 22:26:43

iAmPLQszTqTGEpmGJX
B8BzS3 hjlyvmkevahv
 
NOVIAN

01.04.2012 01:29:22

muFroxIUKY
Pretty good, though I think it's one of those case where using an array is awerantrd (granted we don't really care about performance but eval still needs a lot of random access ). Also I was not really convinced by the way you did your layout, so I wrote more general functions, and it turned out shorter too :gridToPic :: Board -> PicturegridToPic = displayGrid (15,15) . (map . map) toPic . toList2D where toPic True = color (dark red) $ rectangleSolid 12 12 toPic False = color orange $ rectangleSolid 12 12type Dir = (Float, Float)type Size = FloatdisplayGrid :: (Size,Size) -> [[Picture]] -> PicturedisplayGrid (xSize,ySize) = displayRow dirY ySize . map (displayRow dirX xSize)displayRow :: Dir -> Size -> [Picture] -> PicturedisplayRow dir size ps = pictures . zipWith (uncurry translate) moves $ ps where moves = iterate (^+^ step) start start = (-(fromIntegral $ length ps - 1) * (1/2)) .*^ step step = size .*^ dirdirX = (1,0)dirY = (0,-1)Anyway, it's pretty cool what you can do with Gloss (though I prefer diagrams if we just want a still image, it's more general).
 
 
*Araldinho* letzte Besucher
Fotogalerien der ka-news-Nutzer
Anzeige