home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1997-04-28 | 566 b | 21 lines | [TEXT/3PRM] |
- definition module Life
-
- from deltaPicture import DrawFunction, Picture
-
- :: Generation
- :: LifeCell
- :: CellSize :== Int
- :: ClickPoint :== (!Int,!Int)
-
- MakeGeneration :: Generation
- MakeLifeCell :: !ClickPoint !CellSize -> LifeCell
-
- DrawCells :: !(LifeCell -> DrawFunction) !Generation -> [DrawFunction]
- DrawCell :: !CellSize !LifeCell !Picture -> Picture
- EraseCell :: !CellSize !LifeCell !Picture -> Picture
-
- InsertCell :: !LifeCell !Generation -> Generation
- RemoveCell :: !LifeCell !Generation -> Generation
-
- LifeGame :: !Generation -> (!Generation,!Generation)
-