GithubHelp home page GithubHelp logo

alien_attack's Introduction

Alien Attack

alien attack is a simple program to simulate alien attack on the world(Concurrency problem)

Description

  • The alient_attack is a simple program which create map using cities.txt file in the same folder.
  • Accepts no. of aliens as first argument and simulate attack
  • It assigns random city to each alient and start attack. Once the attack is over it prints the map of the world.
  • The attack is only over if the aliens are stuck of got killed or travelled more than 10000 times.
  • The program will return error if there is no file present or input no. of aliens is invalid.

Installation

  • Requirements:-
    • Without Golang
      curl -sf https://gobinaries.com/ganeshdipdumbare/alien_attack | sh
    • With Golang - Go 1.12+
      • To install the tool, just run the following command
      go install github.com/ganeshdipdumbare/alien_attack@latest
  • To run the program
    alien_attack 2
    where 2 is number of aliens
    • Try different files from the test_samples folder.

Assumptions

  • The input file for the map will have all the required data
  • The alien will destroy cities and all the links to the cities.
  • Output is printed in the same format as input.
  • The program will print in the following sequence
    • before attack world
    • destroyed cities by aliens
    • after attack world

alien_attack's People

Contributors

ganeshdipdumbare avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.