Giter Site home page Giter Site logo

galaxy_game's Introduction

The Erlang Galaxy is under attack!! It is key for the future of the language to keep the planets safe. In order to maximize their chances, you have been assigned to provide a simulator that can help the Erlang Army understand how to defend themselves from the attack of the bugs. Your simulator must be an erlang application, and should model the following components:

  • Planets, modeled as erlang processes.
  • Planetary Shields, modeled as trap_exits, which can protect one planet from the shot of a cannon.
  • Interplanetary alliances, modeled as links, which bind the future of the allied planets together.
  • Enemy lasers, modeled as exit signals, which are able to destroy planets without an interplanetary shield.
  • Enemy nuclear cannons, modeled as exit signals, which are able to destroy planets even if those have a planetary shield.

Your application should be able to spawn a galaxy, fire some lasers and/or nuclear cannons and explain in words what is remaining of the galaxy under the attack. i.e.

  • Initial Galaxy: 2 planets with an interplanetary alliance, both of them with a planetary shield.
  • Enemy Action: The bug shoots a nuclear cannon at one of the planets
  • Result: The shot planet is destroyed, but the other remains intact.

Considerations:

Use Erlang R15B03 to implement your galactic battle simulator
Use only standard Erlang/OTP modules
Any way of interacting with the simulator is valid as long as the output is clear: shell interface, http interface, GUI...
Document the API of your application

Helpers:

  • make compiles your source code
  • make test runs the unit tests on it

galaxy_game's People

Watchers

Areski Belaid avatar James Cloos avatar  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.