def resetLivingState(self):
<EOL>must_delete = []<EOL>l = len(self.ls)<EOL>for idx, ls in zip(range(l), self.ls):<EOL><INDENT>ids = id(ls[<NUM_LIT:1>].thestate())<EOL>if ids == id(ls[<NUM_LIT:0>]) and (ls[<NUM_LIT:1>].have_finish or not ls[<NUM_LIT:1>].alive):<EOL><INDENT>must_delete.append(idx)<EOL><DEDENT>elif ls[<NUM_LIT:1>].alive:<EOL><INDENT>ls[<NUM_LIT:1>].alive = False<EOL><DEDENT><DEDENT>for delete in reversed(must_delete):<EOL><INDENT>self.ls.pop(delete)<EOL><DEDENT>self.init_all()<EOL>
Only one Living State on the S0 of each StateRegister