I'm doing this project here its actually a puzzle game and is require for numbers to be place is a ASCII BOX . The numberS will randomly displayed in a 6x6 grid. They are randomly generated and therefore not sorted initially .it should be enclosed in a ASCII box
I've come out with this solution but I think still can be improvised therefore I'm here to ask any suggestion that I can improve on it? Here's the solution. Still a beginner in programming though. Only able to thought of the desired process on generating random numbers and how to obtain a 6x6 grid.
To able to obtain random number generated in 6x6 grid, firstly it needs a 2d array method to get the 36 random numbers in a 6x6 grid base structure.
Next is to group them in cells using ASCII box cells. Using the specific special characters for the box design which can be found in this link
http://www.theasciicode.com.ar/extended-ascii-code/box-drawing-character-single-line-lower-left-corner-ascii-code-192.html
A function should be created so as to loop the 36 random generated numbers and store it in 2d array form.
eg:
void main()
{
rand()
}
Next is to use functions consisting of for loops to evaluate.
The functions are:
- The display of the input that needs to be key in above the grid box
- The display of the random values in the grid box
- The display of the outcome of the result of the number swapping below the grid box
Hope to have some advices on how to improve on my current suggestions.