Skip to content

manishchh/EcoSim-GameSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

EcoSim is an object-oriented Python project simulating a dynamic predator-prey ecosystem with graphical visualization. It demonstrates core OOP principles including inheritance, encapsulation, polymorphism, and exception handling, all built on a custom game engine using Python and Tkinter.

In this simulation, wombats and snakes interact within a 12x10 grid of land tiles (dirt and sand). Wombats graze on grass, while snakes hunt wombats. Grass spreads over dirt tiles, creating a balanced and evolving ecosystem.


Features

  • Object-Oriented Design
    Implements abstraction, inheritance, polymorphism, and encapsulation across animals, plants, and tiles.

  • Graphical Interface
    Uses a custom game engine built with Tkinter to render real-time simulation graphics.

  • Dynamic Ecosystem
    Animals move autonomously, seek food, reproduce, and interact realistically.

  • Exception Handling
    Custom OutOfBoundsException ensures animals remain within simulation bounds.

  • Extensible Architecture
    Easily add new animals, plants, or terrain types following established OOP patterns.


Installation and Running Instructions

Prerequisites

  • Python 3.7 or higher installed
    Check Python version and package(pip) by running:
    python --version
    pip --version
  • Install Pillow package
    pip install pillow
    

Running the Simulation

  • Start the program with:
    python ecosim.py
    

Testing

Unit test are implemented for the vector2D class. To run the unittest:

python -m unittest vector2DTestCase.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages