Diff
Not logged in

Differences From Artifact [b071b446f6e834b9]:

To Artifact [d4577900b4db97c1]:


129 129 130 private: 130 private: 131 void setup_keyhandling() 131 void setup_keyhandling() 132 { 132 { 133 noMessageFilter(); 133 noMessageFilter(); 134 this.keyDown ~= &my_keydown; 134 this.keyDown ~= &my_keydown; 135 } 135 } > 136 > 137 void do_manual_command(char c) > 138 { > 139 solver.force(c); > 140 fn(c); > 141 } 136 142 137 void my_keydown(Control c, KeyEventArgs ev) 143 void my_keydown(Control c, KeyEventArgs ev) 138 { 144 { 139 switch(ev.keyCode) 145 switch(ev.keyCode) 140 { 146 { 141 case Keys.DOWN: fn('D'); break; | 147 case Keys.DOWN: do_manual_command('D'); break; 142 case Keys.UP: fn('U'); break; | 148 case Keys.UP: do_manual_command('U'); break; 143 case Keys.LEFT: fn('L'); break; | 149 case Keys.LEFT: do_manual_command('L'); break; 144 case Keys.RIGHT: fn('R'); break; | 150 case Keys.RIGHT: do_manual_command('R'); break; 145 case Keys.W: fn('W'); break; | 151 case Keys.W: do_manual_command('W'); break; 146 case Keys.S: fn('S'); break; | 152 case Keys.S: do_manual_command('S'); break; 147 case Keys.A: fn('A'); break; | 153 case Keys.A: do_manual_command('A'); break; 148 case Keys.G: fn(solver.single_step()); break; 154 case Keys.G: fn(solver.single_step()); break; 149 default: break; 155 default: break; 150 } 156 } 151 } 157 } 152 158 153 Solver solver; 159 Solver solver; 154 } 160 }