GithubHelp home page GithubHelp logo

tower-defense-game's Introduction

Tower Defense Game

This Game is written by java 8. It consists of a small graphical Tower Defense game. You can find the javadoc documentation and class UML diagram in docs folder . Following design patterns are used in the project

  • Strategy
  • Factory
  • State
  • Decorator
  • Singleton

Details

In this game, we will have four main game entity classes. Monster class for simulating the monsters and TowerRegular, TowerIce, and TowerPoison classes for defense towers you will place. You will use these towers to destroy waves of enemies until you lose all three of your lives. The monsters will circle the tower and upon reaching their spawn point again, the player will lose a life.

  • Game: Singleton class that contains the main method. It is the responsible class for managing the simulation, and storing the required entities.
  • Display: Singleton class that represents the display on which animation entities, the remaining lives, current gold, total kills and the current wave number are repeatedly drawn.
  • IPaintable: Interface for paintable game objects.
  • Entity: Represents the abstract base class for the animation entities. Towers and Monster are the subclasses of the base class.
  • Monster: The concrete class for Monster entities in the game. Hold all of their information.
  • Tower: Abstract class for different Tower classes. Holds basic information.
  • TowerRegular, TowerPoison, TowerIce: The concrete classes that extend the Tower class.
  • TowerDecorator: An abstract base class for TowerDecoratorGrade1, TowerDecoratorGrade2, TowerDecoratorGrade3.
  • TowerDecoratorGrade1, TowerDecoratorGrade2, TowerDecoratorGrade3: The concrete decorator classes that extend the TowerDecorator class that are responsible to draw the symbols indicating kill counts of the towers.
  • ITowerFactory: An interface for different tower factories.
  • TowerRegularFactory, TowerPoisonFactory, TowerIceFactory: The concrete factory classes that implements the ITowerFactory interface.
  • IMonsterStrategy: An interface for the strategy pattern to implement different monster movement strategies.
  • MonsterZigZagStrategy, MonsterCircularStrategy: The concrete strategy classes that im- plements the IMonsterStrategy interface.
  • MonsterState: The abstract class representing state pattern for monster upon receiving special damage.
  • MonsterPoisonState, MonsterIceState: The concrete state classes extend the MonsterState class.

UML DIAGRAM

Since it is rendered with low quality go to docs/uml.png to see the uml hd Screenshot

Example images from the game

Screenshot Screenshot Screenshot Screenshot

Run (You need java to be installed)

tower-defense-game's People

Contributors

gundwane21 avatar

Watchers

 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.