Skip to content
/ Navy Public

Navy game in C between two different processes !

Notifications You must be signed in to change notification settings

lambdina/Navy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Navy

Table of content

Introduction

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.

Features

This project aimed at make us learn the signal between process, therefore we are using sigaction wrapper.

How to run it

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 !

Going further

Maybe an ncurses application !

Contributors

Enjoy!

About

Navy game in C between two different processes !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published