Changeset 53:be7479f995a8
- Timestamp:
- 12/06/10 17:50:23 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface.py
r52 r53 ˆà 36 36 ˆà 37 37 def next_step(self):ˆà 38 ˆà self.draw_ step()ˆàˆà 38 self.draw_cell(automata.next_step())ˆà 39 39 ˆà 40 40 def save_file(self):ˆà òÀæ òÀæ ˆà 118 118 index = (automata.symbols[automata.field[row][column]] + 1) % len(automata.states)ˆà 119 119 automata.field[row][column] = automata.states[index].symbolˆà 120 ˆà self.draw_cell( tuple([column, row]))ˆàˆà 120 self.draw_cell([(row, column)])ˆà 121 121 ˆà 122 122 def motion1(self, event):# drawerˆà òÀæ òÀæ ˆà 125 125 index = (automata.symbols[automata.field[row][column]] + 1) % len(automata.states)ˆà 126 126 automata.field[row][column] = automata.states[index].symbolˆà 127 ˆà self.draw_cell( tuple([column, row]))ˆàˆà 127 self.draw_cell([(row, column)])ˆà 128 128 ˆà 129 129 def press3(self, event):# drawerˆà òÀæ òÀæ ˆà 132 132 index = (automata.symbols[automata.field[row][column]] + len(automata.states) - 1) % len(automata.states)ˆà 133 133 automata.field[row][column] = automata.states[index].symbolˆà 134 ˆà self.draw_cell( tuple([column, row]))ˆàˆà 134 self.draw_cell([(row, column)])ˆà 135 135 ˆà 136 136 def motion3(self, event):# drawerˆà òÀæ òÀæ ˆà 139 139 index = (automata.symbols[automata.field[row][column]] + len(automata.states) - 1) % len(automata.states)ˆà 140 140 automata.field[row][column] = automata.states[index].symbolˆà 141 ˆà self.draw_cell( tuple([column, row]))ˆàˆà 141 self.draw_cell([(row, column)])ˆà 142 142 ˆà 143 143 def press1_key(self, event):# drawerˆà òÀæ òÀæ ˆà 146 146 row = (event.y - self.offset_y * (self.cell_size + self.line_width)) / (self.cell_size + self.line_width)ˆà 147 147 automata.field[row][column] = automata.states[keys[event.char]].symbolˆà 148 ˆà self.draw_cell( tuple([column, row]))ˆàˆà 148 self.draw_cell([(row, column)])ˆà 149 149 ˆà 150 150 def motion1_key(self, event):# drawerˆà òÀæ òÀæ ˆà 153 153 row = (event.y - self.offset_y * (self.cell_size + self.line_width)) / (self.cell_size + self.line_width)ˆà 154 154 automata.field[row][column] = automata.states[keys[event.char]].symbolˆà 155 ˆà self.draw_cell( tuple([column, row]))ˆàˆà 155 self.draw_cell([(row, column)])ˆà 156 156 ˆà 157 157 def press1_ctrl(self, event):# change_offset (B1+ctrl)ˆà
Note: See TracChangeset
for help on using the changeset viewer.