Skip to content

Repository files navigation

OOP Combat Simulation — Python

An object-oriented combat simulation system built as part of an Intro to Computer Science course at Ben-Gurion University.

Overview

Implements a multi-layered class hierarchy using abstract base classes, inheritance, and polymorphism. Models entity attributes, type-effectiveness logic, state transitions, evolution chains, and two-agent battle orchestration across 13 interdependent classes.

Class Structure

Pokemon (Abstract Base Class)
├── Fire (Abstract)
│   ├── Charmander
│   ├── Charmeleon
│   └── Charizard
├── Water (Abstract)
│   ├── Squirtle
│   ├── Wartortle
│   └── Blastoise
└── Electric (Abstract)
    └── Pikachu

Trainer
Battle

Key Concepts Demonstrated

  • Abstract base classes (ABC, @abstractmethod)
  • Multi-level inheritance and method overriding
  • Encapsulation with private/protected attributes
  • Polymorphism via type-effectiveness system
  • Evolution logic with object transformation
  • Operator overloading (__eq__, __gt__, __add__, etc.)
  • Deep/shallow copy management

Type Effectiveness

Attacker Strong Against Weak Against
Fire Water
Water Fire Electric
Electric Water

Languages

Python 3

About

Object-oriented combat simulation in Python — 13-class hierarchy with abstract base classes, inheritance, polymorphism, and operator overloading (BGU ECE)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages