Skip to content

mathieu-gilardet/dojo-2-objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Worms Arena

Two worms fight into an arena : there can be only one !

  • Each worm has a name, life and attack points. [ok]

  • fight

    • When a fight begins, each worm attack in turn,
    • until one of them doesn't have any life point : life remaining is equals to current life point minus adversary attack.
    • The rules stipulate that each turn, the worms with the lowest life points attacks first. If equal, the worm in first argument begins.
  • Return the name of the victorious worm !

You'll have to complete both Worm and Arena classes.

The arena only accepts worms with valid name, life and attack points : no need to check !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published