Hi there,
I am making a clone of the classic game of Battleships but I am making some
enhancements to the gameplay. It is a console program and the grid in which it
is played on is stored in a 2D array. I assign each square in the array a
different number which represents something in particular eg. 1,4 is an empty
water tile so its data value is 0 etc. The thing is, it can get quite
difficult for the user to see what is going on when it is all coordinates.
What I would like to be able to do is create an image with a 9x9 colour coded
square representing a 1x1 area in the array. So in the end up the user would
be able to see their side of the battlefield each turn and what they have
revealed of the enemy battlefield.
Is there any way to do this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I am making a clone of the classic game of Battleships but I am making some
enhancements to the gameplay. It is a console program and the grid in which it
is played on is stored in a 2D array. I assign each square in the array a
different number which represents something in particular eg. 1,4 is an empty
water tile so its data value is 0 etc. The thing is, it can get quite
difficult for the user to see what is going on when it is all coordinates.
What I would like to be able to do is create an image with a 9x9 colour coded
square representing a 1x1 area in the array. So in the end up the user would
be able to see their side of the battlefield each turn and what they have
revealed of the enemy battlefield.
Is there any way to do this?
Also, I would like to change the size of an array at runtime to a value a user
wants.
Thanks!