GithubHelp home page GithubHelp logo

open-world-project-java's Introduction

Java-Open-World-Project

Swing

The project was created to simulate a world consisting of a hero, plants and animals on a square board using object-oriented design. Below is a description of the classes and their activities. The project was implemented due to my student task, therefore the names of classes, some methods and variables are in Polish. I will try to explain them here.

Swiat (World)

The world is the main class that manages all elements of the world. It has boards(plansza), objects that participate in the simulation and variables to handle the turn. It has methods for introducing new objects to the boards (zmienaktualnygatunek), making turns (wykonajTure), drawing the world (rysujSwiat) and saving and loading it from / to the file.

Organism(Organizm)

It is an abstract class representing the organism on the board. It has abstract collision(kolizja) methods to react to collisions with another organism, reaction(reakcja) to response to collisions and action(akcja). There is also a method to multiplication(rozmnoz) the organism and to use it on the board.

Animal(Zwierze)

The animal is the descendant of the organism. It implement his basic methods. Animals, unlike organisms, can move around the board. Specific classes of animals have been implemented:
  • Antelope(Antylopa)
  • cyber-sheep(Cyberowca)
  • Man(Człowiek)
  • Fox(Lis)
  • Sheep(Owca)
  • Wolf(Wilk)
  • Turtle(Zolw)

Man(Czlowiek)

Specific subclass of Animal is Man, this is like our hero on board. We have speciall skill to use by x-key. We can also decide where he has to go. He has implemented like other animals but with keyboard support.

Plant(Roslina)

Analogously to the animal. Plants can not move, but they reproduce better. Subclasses:
  • Sosnowski's borscht(BSosnowskiego)
  • Guraana
  • Sow-thistle(Mlecz)
  • Grass(Trawa)
  • Wolf berries(WilczeJagody)

Support classes

Logs

Class to support for game logs.

Quee(Kolejka)

Implement of priority Quee to handle the order in the turn.

Kill(Zabij)

Handle of events after dead of some organism.

Main script

Script containing gui in swing, supporting the addition of the organism with the mouse and creating objects of classes such as the world(Swiat).

open-world-project-java's People

Contributors

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