eating
This commit is contained in:
@@ -20,5 +20,20 @@ namespace Snake
|
||||
_game.Update();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private void Form1_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.W:
|
||||
_game.UpdateInput(Directions.Up); break;
|
||||
case Keys.A:
|
||||
_game.UpdateInput(Directions.Left); break;
|
||||
case Keys.S:
|
||||
_game.UpdateInput(Directions.Down); break;
|
||||
case Keys.D:
|
||||
_game.UpdateInput(Directions.Right); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user