Skip to content

andriyka/advanced-programming-with-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdvancedProgramming1

The first assignment for the Advanced Programming course. The whole folder was submitted to the repo, so it could be just downloaded and run. Three tasks (in the src/java...):

Task 1

Never use switch. In a separate package there is a replacement with polymorphism used instead and another example in the CharactersFactory where switch is replaced by the dictionary of methods.

Task 2

Guess Game To run - uncomment part of code in the main method. Each time you've guessed the number - it will output you your best score ever!

Task 3

Heroes game

The default code in the main method - simulating the fight between two Characters Some tricky moments

  • What should goCry() method do for Hobbit? Currently it just printing some message. If two Hobbits should fight Game manager will stop the fight because it will never end.
  • If two Elfs are suppose to fight, what should be done(they are equal in power)? Currently, GameManager will stop the game as well.
  • How should be determined the power of king & knight in fight. Should they have dynamic or static power? Currently they have some static power in the range determined in the constructor. But in the fight they are kicking with power from MIN to that static value.

Releases

No releases published

Packages

No packages published

Languages