Skip to content

branched and answered a couple questions - #1

Merged
ch-ance merged 4 commits into
masterfrom
jacob-angulo
Jan 24, 2019
Merged

ch-ance merged 4 commits into
masterfrom
jacob-angulo

Conversation

@jacobAngulo

Copy link
Copy Markdown
Owner

No description provided.

@jacobAngulo
jacobAngulo requested a review from ch-ance January 23, 2019 22:09

@ch-ance ch-ance left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! Stretch looks awesome! Next week after we learn DOM manipulation, it would be really cool to come back to this and add some visual elements!

Comment thread assignments/prototypes.js
if (target.healthPoints > 0) {
console.log(`${this.name} attacked ${target.name} for ${damage} points! ${target.name} now has ${target.healthPoints} health`)
} else {
console.log(`${this.name} attacked ${target.name} for ${damage} points and destroyed ${target.name}!`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use the destroy and takeDamage functions you already have for these

Comment thread assignments/prototypes.js
console.log(`${this.name} attacked ${target.name} for ${damage} points and destroyed ${target.name}!`)
}
} else {
console.log(`${this.name} kicked ${target.name}'s dead body`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Comment thread assignments/this.js

// code example for Window Binding

const name = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Window Binding is just using this without binding it first.

@ch-ance
ch-ance merged commit bb4d64d into master Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants