From VisualWorks® NonCommercial, 7.3 of December 3, 2004 on March 6, 2006 at 6:36:56 am CormasNS.Kernel.CormasModel landscapeIndices randomFreeCell "return a random cell not occuppied of the grid" ^self randomCellConstrainedBy: [: cell | cell noOccupant] CormasNS.Kernel.CormasModel landscapeIndices randomCellConstrainedBy: aBlock "return a random cell of the grid. The cell verifies the block condition. Ex: self randomCellConstrainedBy: [:cell | state=#land] or self randomCellConstrainedBy: [: cell | cell energy > 1] " ^Cormas selectRandomlyFrom: (self theESE select: [:c | aBlock value: c]) CormasNS.Kernel.CormasModel landscapeIndices randomCell "return a random cell of the grid" ^Cormas selectRandomlyFrom: self theESE