Straight from the PBE book... with the addition of a 'reset' method to set all the cells (morphs) to 'off' state.