The Navy project aims to learn us how to use the kill function, and therefore send some signals to comunicate between processes. You have to provide a map, which is a file containing your boats dispositions. The map needs to be configured like :
2:B1:B2
3:C1:E1
4:H1:H5
Obviously, the boats must not overlap. The first number corresponds to the length's boat. The first coordinates corresponds to where the boat begins at, and the seconds is to notify its end : it is useful for the direction (either horizontal or vertical) of the boat.
This project aimed at make us learn the signal between process, therefore we are using sigaction
wrapper.
To start : open two tabs, for the first one run ./navy map ; you pid will appear, and for the second one just run : ./navy map pid_player1.
Then, enter some coordinates in order to sink your opponent !
Maybe an ncurses application !
Enjoy!