Completed for the MA-20 - Application of C, at CPNV.
- The player has 10 minutes to sink all the computer boats
- At the first start, the program will create text files in the folder where it is run to save scores and players list.
- Download the main. c file to a local folder
- In this local folder, create a new folder and call it "grids" (without quotes)
- In the grids folder, create text files "grille01.txt", "grille02.txt", etc. up to 20.
- Open each grid file and write in it according to this legend:
- 1 Aircraft carrier (5 boxes), represented by the character "1"
- 1 Cruiser (4 boxes), represented by the character "2"
- 1 Destroyer (3 boxes), represented by the character "3"
- 1 Submarine (3 boxes), represented by the character "4"
- 1 torpedo boat (2 boxes), represented by the character "5"
- Fill in the character "0" all the rest of the grid to have 10 lines of 10 characters.
- Compile main.c file. I recommend using a C compiler from a popular IDE like CLion or Eclipse. Alternatively, you can install MinGW, a minimalist open-source C compiler for Windows and compile with GCC.
- Run main.exe that has been produced.
