I have decided to work on a console based snake game. I am able to draw grid but the last grid I am trying to draw one grid that animates the snake on it.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace snakegame
{
class Program
{
static void Main(string[] args)
{
char[,] board = new char[17, 17];
int count = 5;
for (int i = 0; i <= 16; i++)
{
for (int j = 0; j <= 16; j++)
{
board[i, j] = '.';
}
}
while (count < 11)
{
Console.Clear();
board[8, count] = '*';
board[8, count + 1] = '*';
board[8, count + 2] = '*';
board[8, count + 3] = '*';
board[8, count + 4] = '*';
board[8, count + 5] = '*';
board[8, count + 6] = '*';
for (int i = 0; i <= 16; i++)
{
for (int j = 0; j <= 16; j++)
{
Console.Write(board[i, j]);
}
Console.WriteLine();
}
count++;
}
}
}
}