Im working on a project for school, im suppose to make a console application which will show a Cinema system with 20 seats on 15 rows. I am very green on c# - so any help, Critism, or general thoughts are much appreciated!
I got a 2d array set up now, functionally and with space in between items so its not a mess to look at..
Im trying to take the program to the next level now, my program must show which seats are available, and which are taken,
and the program must let you book certain seats, and random seats.
I was thinking to make all the available seats green, and once you booked your seats they should go red -
How can i start doing this proberly?
I think im looking for background Color, and maybe If / else statements?
Here is how my program looks so far:
Console.WriteLine("|--------------------------CINEMA--------------------------|\n");
int[,] pladser = new int[,]
{
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},
};
for (int x = 0; x < pladser.GetLength(0); x++)
{
for (int y = 0; y < pladser.GetLength(1); y++)
{
Console.Write("{0,3}",pladser[x, y]);
}
Console.WriteLine();
|