-
If in the same city there are two aliens, then they will fight. If there are three or more is an assumption that the could have a good relationship.
-
The file containing the names of cities in the non-existent world of X will be at the root of the project, if is needed to test with a new file please update the constant
worldMap
with the name of the file.
The file will be read, and the data parsed in order to extract only the valuable information, each line of the file that contains the main city and its adjacent cities will be saved on a map of maps in Go. The directions will not be saved.
An example of this, consider that if the file cities_list.txt
found in this repository is to be read by the program:
A possible map of the firts cities (main cities) that appers in each line of the file cities_list.txt
, will be the following:
A possible map of the adjacents cities for the main city Foo
To run the program please clone this repository:
git clone https://github.com/mariajdab/alien-invasion.git
run the file main.go
it will need the argument of the number of aliens
go run main.go <number_of_aliens>