Giter Club home page Giter Club logo

moreoop's Introduction

More OOP

Sample project for Lab More OOP at the Object-oriented programming course at Ukrainian Catholic University.

Continuous Integration

The workflow is ci.yaml file in the .github/workflows directory of this repository.

This workflow performs the following steps:

  1. The checkout step downloads a copy of your repository on the runner.
  2. The setup-java step configures the Java 11 JDK by Adoptium.
  3. The "Build with Maven" step runs the Maven package target in non-interactive mode to ensure that your code builds, tests pass, and a package can be created.

Task

Implement the heroes game in text mode

  • class Character
    • attributes: int power, in hp
    • methods: void kick(Character c), boolean isAlive()
  • class Hobbit
    • attributes: int power=0, int hp=3
    • methods: void kick(Character c) { toCry() }
  • class Elf
    • attributes: int power=10, int hp=10
    • methods: void kick(Character c) { kill everybody weaker than him, otherwise decrease the power of character by 1 }
  • class King
    • attributes: int power=from 5 to 15, int hp=from 5 to 15
    • methods: void kick(Character c) { decrease number of hp of the enemy by random number which will be in the range of his power }
  • class Knight
    • attributes: int power=from 2 to 12, int hp=from 2 to 12
    • methods: void kick(Character c) { like King }
  • class CharacterFactory
    • methods: Character createCharacter() { returns random instance of any existing character }
  • class GameManager
    • methods: void fight(Character c1, Character c2) { to provide fight between to characters and explain via command line what happens during fight, till both of the characters are alive }

moreoop's People

Contributors

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