25 lines
456 B
C#
25 lines
456 B
C#
namespace Snake
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
private Game _game;
|
|
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
_game = new Game(this);
|
|
_game.Start();
|
|
}
|
|
|
|
private void timer_Tick(object sender, EventArgs e)
|
|
{
|
|
_game.Update();
|
|
Invalidate();
|
|
}
|
|
}
|
|
}
|