Skip to content

Puchinni/Object-oriented-programming-Python

Repository files navigation

Object-oriented-programming-Python

World simulation in Python

Description of the task in files(OOP_project_task)

Brief description:

The aim of the project is to implement a program in the nature of a virtual world simulator, which is to have the structure of a two-dimensional lattice of any user-specified size NxM (for 4 points you can stop at a fixed size of 20x20). In this world there will be exist simple life forms with different behavior. Each organism occupies exactly one field in the array, each field can contain at most one organism (in the case of collision one of them should be removed or moved). The simulator is to be turn-based. In each turn, all organisms existing in the world are to perform an action appropriate to their type. Some of them will move (animalы), some will be stationary (plantы). In the event of a collision (one of the organisms will be on the same field as another) one of the organisms wins, killing (e.g. wolf) or chasing away (e.g. turtle) the competitor. The order in which the organisms move in a turn depends on their initiative. The animals with the highest initiative are the first to move. In the case of animals with the same initiative, the order is determined by the seniority principle (the first to move is the longer living). Victory at an encounter depends on the strength of the organism, although there will exceptions to this rule. At equal strength, the organism that attacked wins. The specific type of animal is to be Human. Unlike animals, humans do not move in a manner that is random. The direction of his movement is determined before the start of the turn using the keys arrow keys on the keyboard. Man also has a special skill, which can be activated with a separate button. The activated skill remains active for 5 consecutive turns, after which it is deactivated. After deactivation, the skill cannot be activated before the expiration of 5 consecutive turns. At the start of the program, the board should appear several pieces of all types of animals and plants each. The program window should contain a field where information about the results of battles, consumption of plants and other events occurring in the world.

About

World simulation Python project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages