So currently I am working on a school project where we learn C# by ourselves and make a game of our choice. My group has decided to create a game of "battleship". The problem we are having is that we need to update every single square (on a 10x10 image box board) with an image, but the way in which we are doing it is EXTREAMLY lengthy and inefficient.

We have created an enumerated type array of all the possiblities in a givin square (ship directions, if the user shoots and misses, ect ect). Now for us to sucessfully print each square we have been using the following code.

switch (square)
{
case 0:
//switch into the possiblities of what can be in this square
switch (playersSquares[0, 0])
{
case ShipPart.topShip: square00.Image = ShipTopImage.Image;
break;
case ShipPart.bottomShip: square00.Image = ShipBottomImage.Image;
break;
case ShipPart.leftShip: square00.Image = ShipLeftImage.Image;
break;
case ShipPart.rightShip: square00.Image = ShipRightImage.Image;
break;
case ShipPart.middleHorizontal: square00.Image = ShipHMiddleImage.Image;
break;
case ShipPart.middleVirticle: square00.Image = ShipVMiddleImage.Image;
break;
case ShipPart.empty: square00.Image = EmptyImage.Image;
break;
case ShipPart.miss: square00.Image = ShipMissImage.Image;
break;
case ShipPart.hit: square00.Image = ShipHitImage.Image;
break;
}
break;
case 1:
//switch into the possiblities of what can be in this square
switch (playersSquares[0, 1])
{
case ShipPart.topShip: square01.Image = ShipTopImage.Image;
break;
case ShipPart.bottomShip: square01.Image = ShipBottomImage.Image;
break;
case ShipPart.leftShip: square01.Image = ShipLeftImage.Image;
break;
case ShipPart.rightShip: square01.Image = ShipRightImage.Image;
break;
case ShipPart.middleHorizontal: square01.Image = ShipHMiddleImage.Image;
break;
case ShipPart.middleVirticle: square01.Image = ShipVMiddleImage.Image;
break;
case ShipPart.empty: square01.Image = EmptyImage.Image;
break;
case ShipPart.miss: square01.Image = ShipMissImage.Image;
break;
case ShipPart.hit: square01.Image = ShipHitImage.Image;
break;
}
break;
case 2:
//switch into the possiblities of what can be in this square
switch (playersSquares[0, 2])
{
case ShipPart.topShip: square02.Image = ShipTopImage.Image;
break;
case ShipPart.bottomShip: square02.Image = ShipBottomImage.Image;
break;
case ShipPart.leftShip: square02.Image = ShipLeftImage.Image;
break;
case ShipPart.rightShip: square02.Image = ShipRightImage.Image;
break;
case ShipPart.middleHorizontal: square02.Image = ShipHMiddleImage.Image;
break;
case ShipPart.middleVirticle: square02.Image = ShipVMiddleImage.Image;
break;
case ShipPart.empty: square02.Image = EmptyImage.Image;
break;
case ShipPart.miss: square02.Image = ShipMissImage.Image;
break;
case ShipPart.hit: square02.Image = ShipHitImage.Image;
break;
}
break;
}

As you can see we would need to create 200 cases the way we are doing it and would cause us lots of unesacary code. This code works by a function that generates a loop and sends the value (0,1,2,3,4,5,ectect) to this function. it then changes each square respectivly.

What I was thinking could work was doing sqaure[row,col].image but I KNOW this doesn't work. What we are trying to get around is the fact that ever imagebox has a differnt code (square00, square01, square02, ect ect) and we can't figure out how to load the images faster/easier. Does anyone have a suggestion that would find a way to update the images on my board?

I'm using Microsoft visual studio 2008 express. If you need anymore information about my code please let me know! (I did the math and if I do the code the way im doing it I will have to create 4600 lines of code to generate the pictures in both the human and the computers boards.)
If needed I will attach/send you the full length of my code if you do not understand.