ok, now I got somehing like this:
private void FormGame_KeyDown(object sender, KeyEventArgs e)
key = e.KeyCode;
I'm trying to think of a way to block the option to move to the opposite direction, because now he can move left and just by a click - move right.
private void timer1_Tick(object sender, EventArgs e)
snake.ReDraw(); // Re-Draws the new head and erases the previous tail
Should I save the previous direction?
I have another problem: When he start a new game, I just do:
but it leaves the previous snake drawn. How can I create a function that clean the traces which would be called when the snake object is disposed?
snake = new Snake(this.CreateGraphics());
key = Keys.Left;