Finished up game

This commit is contained in:
maxwes08
2026-02-03 13:44:30 +01:00
parent df6832419f
commit 46816d3dbf
5 changed files with 105 additions and 24 deletions

View File

@@ -63,7 +63,7 @@ namespace Snake
}
else if (cell.Type == CellTypes.Snake)
{
brush.Color = Color.Green;
brush.Color = cell.Color;
}
else if (cell.Type == CellTypes.Food)
{
@@ -72,9 +72,10 @@ namespace Snake
int totalHeight = CELL_SIZE * _h;
graphics.FillRectangle(brush,
x * 20,
totalHeight - y * 20,
graphics.FillRectangle(
brush,
x * CELL_SIZE,
totalHeight - (y + 1) * CELL_SIZE,
CELL_SIZE,
CELL_SIZE
);