Skip to content

diligentaf/aliens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alien invasion

Simulates aliens randomly attacking various regions

Get Started

1. Prerequisites

// cloning repository
$ git clone [email protected]:vuegoman/aliens.git

// download dependencies
$ cd aliens
$ go mod tidy

2. Running the program

  • Now it's ready to run the simulation
// run the command
$ go run main.go
  • You get to choose the map.

  • choose a number between 0 - 4

  • The maps are located in /map directory

  • Once you chose a map, type in the number of aliens you want to generate

  • The simulation has started and aliens randomly landed on empty spaces\

  • 🌊 : wave (aliens can't cross rivers)

  • 🌉 : bridge (aliens can cross bridges unless it's burned down by near fire)

  • 🌲 : Tree (aliens can't cross and it turns into ashes if fire is within reach)

  • 🔥 : Fire (aliens can't bypass fire)

  • The bottom of the simulation displays the status of the current scenario (map, duration, alien status)

  • While the simulation continues, the logs are stored in /history/logBook.txt* The logs indicate the pairs of combat aliens and the location of the destroyed region

  • When the simulation ends, the logs are displayed in terminal

  • Press "ESC" to stop the simulation while it's running

  • When the region is destroyed after aliens clash it makes an ashes around bridges and trees

  • Aliens cannot cross burnt trees or bridges

  • This often traps and isolates the aliens from confronting other aliens

  • the config file is located in configs/config.json

  • You can update emojis, speed of the simulation, and turn on debug mode

  • "duration" : updates the number of iteration

  • "time" : updates the speed of simulation

  • "debug_mode" : when it's true, it turns off the cbreak mode and runs vscode debugger

3. Maps

  1. Dr. Strange
  2. Flood
  3. Forest
  4. Hell
  5. IGNITE
  6. San Francisco
  7. You can make your own map and save it in /map directory

The game is written in single file, main.go

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages