Alien-Invasion is a simulation of hypothetical situation (or maybe near future :P), where N
number of aliens are unleashed on us. They kill each other if present in same city and destroy the city as well during the brutal fight. The final state of our planet is the map as stored in output file as defined in config.json
. You can read the entire situation here
Video demonstration of the simulation
- Install golang
- Clone this repository.
git clone git@github.com:souvikhaldar/alien-invasion.git
- Get into the repository.
cd alien-invasion/
. - Install the dependencies using
go mod tidy
. - Run the simulation 5 aliens or any number you want
go run cmd/ai/main.go -N=5
- By default it uses the credentials present in
config.json
present in the root. You can provide other configuration file by using the flag-conf=<file-name
. - The output file is
output_map.txt
intestfiles
dir if not specified otherwise.