GithubHelp home page GithubHelp logo

virus-simulation's Introduction

Virus Simulation

In this Project I simulated a laboratory experiment as a life game.

Description

We have a habitat that contains randomly distributed entities. In our experiment our habitat will be a NxN square place.

Each entity has 5 different gates which can be named from { A,B,C,D,E,F,G,H } set.

The Spreading V can infect an entity if the entity has A or B gate. If the entity has 3 gates which are named as A,B,C,D than this entity will die after 14 turns otherwise it will recover and get immune to Spreading V. after 30 turns. Dead entities stay in habitat for five turns and be infectious. They can not move.

Spreading V can infect from one entity to other if they are closer than 3 units (in square form). An entity becomes infectious after 3 turn.

Usage

Simulation will take the start information from input.txt file which will be on the same file with executable. This file include information about habitat constants, entities and their movements in turns.

Simulation will write an output.txt file which will show the infected and died entities and last situation of the habitat. Also, after each turn you will fill another file “turns.txt”. This file shows a brief outcome for each turn.

There must be a INPUT.txt file in same folder with executable.

Example of INPUT.txt, OUTPUT.txt and TURNS.txt added to repo.

WARNING: This project one of the first big project I coded. So there is no naming convention, no proper use of OOP. Im planning to rewrite in the future.

virus-simulation's People

Contributors

haliluzer 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.