types
Configuration ::
gridSide : int
sleepTime : int
pop : Conway`Population;
functions
generations_animate: nat1 * Configuration -> seqof Conway`Population
generations_animate(n,conf) == let - = initialise(conf.gridSide, conf.sleepTime) in let patterns = Conway`generations(n, conf.pop) in
animate_step(patterns);
animate_step : seqof Conway`Population -> seqof Conway`Population
animate_step(pop) == if pop = [] then [] else let - = {newLivingCell(cell.x, cell.y)| cell insethd pop} in let - = newRound() in
animate_step(tl pop) measure measure_animate_step;
measure_animate_step: seqof Conway`Population -> nat
measure_animate_step(list) == len list;
initialise: nat1 * nat1 -> int
initialise(gridSideCount, sleepTime)== isnotyetspecified;
newLivingCell: int * int -> int
newLivingCell(x,y)== isnotyetspecified;
newRound: () -> int
newRound()== isnotyetspecified;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.