-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#67Added Binding Properties Pattern #1776
Conversation
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! I've provided some further remarks that must be addressed. In addition to the review comments, please resolve the conflict so we can do a clean merge.
var me = new MyLittleWarrior(50.0, 50.0, 2); | ||
var waspDamage = 20.0; | ||
var spellCost = 10.0; | ||
var heal = 50.0; | ||
while (me.getRemainLives() > 0) { | ||
me.displayMyStatus(); | ||
LOGGER.info("I am attacked by a furious wasp! HP - {}", waspDamage); | ||
me.damage(waspDamage); | ||
me.displayMyStatus(); | ||
|
||
LOGGER.info("I cast a spell to kill the wasp! MP - {}", spellCost); | ||
me.castSpell(spellCost); | ||
me.displayMyStatus(); | ||
|
||
LOGGER.info("I drink healing potion! HP + {}", heal); | ||
me.heal(heal); | ||
me.displayMyStatus(); | ||
|
||
LOGGER.info("I am attacked by a furious dragon! HP - 99999"); | ||
me.damage(99999.0); | ||
me.displayMyStatus(); | ||
|
||
if (me.getRemainLives() <= 0) { | ||
LOGGER.info("I am dead, no extra lives!"); | ||
} else { | ||
LOGGER.info("I am dead, now I should respawn!"); | ||
me.heal(99999.0); | ||
me.displayMyStatus(); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice little example! Could we add some simple randomness to the battle so the outcome could differ between the runs?
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed! |
Hey @llyyaa are you still working on this? |
Yes, it might be finished within this month |
Thanks, looking forward to your updates on this |
The pull request has remained inactive and is about to be closed. Please comment if you're still working on it. |
Binding Properties pattern
Added binding properties pattern