home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IO Examples / Life / Life.dcl next >
Encoding:
Modula Definition  |  1997-04-28  |  566 b   |  21 lines  |  [TEXT/3PRM]

  1. definition module Life
  2.  
  3. from    deltaPicture    import DrawFunction, Picture
  4.  
  5. ::    Generation
  6. ::    LifeCell
  7. ::    CellSize    :==    Int
  8. ::    ClickPoint    :== (!Int,!Int)
  9.  
  10. MakeGeneration    :: Generation
  11. MakeLifeCell    :: !ClickPoint !CellSize -> LifeCell
  12.  
  13. DrawCells        :: !(LifeCell -> DrawFunction) !Generation -> [DrawFunction]
  14. DrawCell        :: !CellSize !LifeCell !Picture -> Picture
  15. EraseCell        :: !CellSize !LifeCell !Picture -> Picture
  16.  
  17. InsertCell        :: !LifeCell !Generation -> Generation
  18. RemoveCell        :: !LifeCell !Generation -> Generation
  19.  
  20. LifeGame        :: !Generation -> (!Generation,!Generation)
  21.