Coder Social home page Coder Social logo

oop-project's Introduction

OOP-project

Life simulation is a program written in Java that was a final project for my Object Oriented Programming Course at AGH UST.


Life Simulation

I had to implement some Darwin Life's rules into random generated world with animals that want to just reproduce, eat and survive the next day. Full project information can be seen here.

Starting Parameters

  • map width - the width of both maps
  • map height - the height of both maps
  • start energy - the amount of energy that animals spawn with
  • move energy - the amount of energy it costs to move
  • plant energy - the amount of energy the plant gives to an animal
  • jungle ratio - percentage of the map which is covered by jungle
  • grass magic evolution - makes it possible to spawn 1 copy of each animal if the amount of animals falls to 5 on GrassField
  • rectangular magic evolution - makes it possible to spawn 1 copy of each animal if the amount of animals falls to 5 on RectangularMap
  • animals at start - the amount of animals spawned at start

Game Rules

  • Animal can act only if its energy is above 0
  • Animal can reproduce only if it has 50% or more energy (based on max capacity)
  • Animal gets greener the more it eats
  • Animal gets more blueish when it is close to death
  • Maximum of 2 plants can spawn each era (one in jungle area, one outside jungle area)
  • There can be more than 1 animal on each square
  • If there are more than 1 animal on square on which plant has grown - the plant is evenly distributed between most healthy animals
  • Only 1 pair of animals can reproduce per square per era
  • And some more not mentioned rules

The Final Result


oop-project's People

Contributors

mamikula avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

fwojtowiczagh

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.