Git Product home page Git Product logo

multi_species_life's Introduction

This is a combined demo of C++ and Rational Rose. It is a variation on the classic Life cellular automata program. "Improvements" include using three different species, with sexes. Live cells must still have only 3, 4, or 5 neighbors to survive, but in order to generate a new lifeform, there must be a female next to the blank space, with a male of the same species somewhere next to her (not necessarily in the same direction). Searches for both the female and the male proceed as on a telephone number pad, as does the process of "time" in general (i.e., which cells get to "go").

The files are as follows:

  • wildlife.cpp, the main program

  • world.cpp and world.h, the class that holds the primary parameters

  • cell.h, the class that provides proximity services, generation of new life forms in empty spaces, etc.

  • life.h, the base class of all life forms

  • animal.cpp and animal.h, the animal life forms (eventually to be split up further, into herbivore and carnivore)

  • plant.cpp and plant.h, the plant life forms (possibly eventually to be split up further)

  • lffctory.cpp and lffctory.h, the class that creates a new life form, either randomly chosen or to duplicate an existing one

  • wildlife.ide, the Borland project file

  • wildlife.exe, the executable

  • wildlife.mdl, the Rational Rose model

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.