Simple implementation of the classic Battleship game in C using the SDL library.
- Install C compiler, build system if applicable, and dependencies
- Clone repository
- Compile
-
Install
gcc
,make
, and SDL librarysudo apt install -y gcc make libsdl2-2.0-0 libsdl2-dev libsdl2-image-2.0-0 libsdl2-image-dev libsdl2-ttf-dev
-
Clone repository
git clone https://github.com/delta-12/battleship.git
-
Make
bin
andobj
directories in the cloned repositorycd battleship && mkdir bin obj
-
Compile the game with
make
make
-
The binary will placed in the
bin
directory and can be run using the following commandbin/battleship
-
Install
gcc
andmake
-
Clone repository
git clone https://github.com/delta-12/battleship.git
-
Run the build script
cd battleship/macOS && chmod +x build.sh && ./build.sh
-
The binary will placed in the
bin
directory and can be run using the following commandbin/battleship
-
Install a GCC compiler for Windows such as tdm-gcc
-
Clone repository
git clone https://github.com/delta-12/battleship.git
-
Run the build script
cd battleship\windows && build.bat
-
The binary will placed in the
bin
directory and can be run by double-clicking or running the following commandbin\battleship.exe