TIY-LR-FEE-2015-June / assignments

0 stars 3 forks source link

5.4 - Turn Based Game - Corbin Otwell #160

Open cbotwell opened 8 years ago

cbotwell commented 8 years ago

Deliverables

cbotwell commented 8 years ago
the iron yard - 4
cbotwell commented 8 years ago

Features

cbotwell commented 8 years ago

:link: Corbin's 5.4 Pull Request

rtablada commented 8 years ago

@cbotwell in general, you are having to do a lot of $().html() for every attribute on the page. Since you have an instance of Game, which has your hero, enemy, and turns you could instead make it so that you send this game object to the template and then you can just rerender the entire game board any time things change.

This does make one problem: you will have to set your click handlers on the .game-target div and provide a selector to the on function from jQuery so that you don't have to redeclare your click handlers every time you render the battle screen.

As for checking on the game over status, try adding a isGameOver to your Game.prototype. This would allow you to check

if (game.isGameOver()) {
  // render end screen
} else {
  // re-render battle screen
}
rtablada commented 8 years ago

Also if the game had a function called chooseAttack then the game object could set the attack on the player, make the AI attack and then send an event saying that it is ready for user input again.

cbotwell commented 8 years ago

:link: Corbin's 5.4 GH Page

cbotwell commented 8 years ago

Still having issues with:

Additional goals:

rtablada commented 8 years ago

@cbotwell let's set up a time so we can look at the hard mode requirements and the health percentage