Water Waves is a simulation of ships transporting packages between cities. The goal of the program is to transport all the required packages to their destinations in the shortest amount of time possible.
To run Water Waves, download the Python file and save it on your computer. The program requires Python version 3 or higher.
Run the program using the command:
python water_waves.py
The program reads input from a file called "input.txt" located in the same directory as the Python file. The format of the input file is:
packages number: {pakage number}
BARCELONA have {number_of_ships} ship , each ship {ship_capacity} capacity
MARSEILLE have {number_of_ships} ship , each ship {ship_capacity} capacity
GENOA have {number_of_ships} ship , each ship {ship_capacity} capacity
NAPLES have {number_of_ships} ship , each ship {ship_capacity} capacity
The departure and destination cities should be one of the following: "BARCELONA", "MARSEILLE", "GENOA", "NAPLES", or "MESSINA". The number of packages should be an integer.
Once the program is running, ships will sail between cities to transport packages. The program will output information about each ship's movements and actions.
This program was developed by Gdpouya using Python and threading library for os class.