Skip to content
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

Closed
wants to merge 56 commits into from
Closed

#67Added Binding Properties Pattern #1776

wants to merge 56 commits into from

Conversation

Apeiria01
Copy link

Binding Properties pattern
Added binding properties pattern

@Apeiria01 Apeiria01 marked this pull request as draft June 6, 2021 11:39
Apeiria01 and others added 5 commits June 6, 2021 19:40
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>
@ohbus ohbus linked an issue Jun 14, 2021 that may be closed by this pull request
@Apeiria01 Apeiria01 marked this pull request as ready for review July 13, 2021 03:37
@Apeiria01 Apeiria01 requested a review from iluwatar July 15, 2021 05:33
Copy link
Owner

@iluwatar iluwatar left a 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.

binding-properties/README.md Outdated Show resolved Hide resolved
binding-properties/README.md Outdated Show resolved Hide resolved
binding-properties/pom.xml Outdated Show resolved Hide resolved
Comment on lines +26 to +56
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();
}
}
}
Copy link
Owner

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?

Apeiria01 and others added 3 commits July 29, 2021 20:54
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2021

@Apeiria01 Apeiria01 marked this pull request as draft September 14, 2021 09:01
@iluwatar
Copy link
Owner

iluwatar commented Oct 9, 2021

Hey @llyyaa are you still working on this?

@Apeiria01
Copy link
Author

Hey @llyyaa are you still working on this?

Yes, it might be finished within this month

@iluwatar
Copy link
Owner

Thanks, looking forward to your updates on this

@iluwatar
Copy link
Owner

The pull request has remained inactive and is about to be closed. Please comment if you're still working on it.

@iluwatar iluwatar added the status: stale issues and pull requests that have not had recent interaction label Sep 21, 2022
@iluwatar iluwatar added this to the 1.26.0 milestone Sep 21, 2022
@iluwatar iluwatar closed this Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: stale issues and pull requests that have not had recent interaction status: under review
2 participants