diff --git a/Snake/Game.cs b/Snake/Game.cs index 1e9788e..3376fb5 100644 --- a/Snake/Game.cs +++ b/Snake/Game.cs @@ -139,6 +139,18 @@ namespace Snake public void Die() { form.timer.Enabled = false; + Restart(); + } + + public void Restart() + { + form.timer.Enabled = true; + Cell startCell = new Cell(10, 10, CellTypes.Snake); + map = new Map(mapSize, mapSize); + map.SetCell(startCell); + worm = new Worm(startCell); + startCell.Color = ColorFromHue(0f); + SpawnApple(); } public Color ColorFromHue(float hue)