Giter Site home page Giter Site logo

fighty's Introduction

co-orouge

Little Java Game--Battle

Systematically created head-to-head game between monsters and players. Both monsters and players have their own names, birth health, attack values and number of wins. The data is stored in txt files ("player" and "monster") respectively. Players also have a list of available spells. Each spell has a name, damage range and chance of success, which is stored in the txt file "spell".

Battles are fought in Battle.java, and at the beginning of each battle, the system displays information about the monster and the player, as well as the spells the player can use. The player attacks first each turn, and if the player casts a spell she/he has learned (listed in the spell list), the monster is attacked for the damage taken by that spell and loses the corresponding amount of life. If a player casts a spell that is not listed in the spell list, that player will miss the turn. After the player attacks, the monster will automatically attack each round. The battle ends when one of the monsters' player's life value becomes 0. The party with 0 life value loses. The winning party will add 1 to the number of wins in their file.

fighty's People

Contributors

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