GithubHelp home page GithubHelp logo

lifecounter's Introduction

lifecounter

I implemented the extra credit where I used only one event-listener for all the life-modifying buttons.

Stories

As a user, when I launch the application, it should show me four “players”. Each “player” should have a label for their life total, and four pushbuttons (“+”, “-“,”+5”,”-5”).

As a user, when I push the “+” pushbutton for player 1, it should increment player 1’s life total by 1. “-“ should reduce the life total by 1, “+5” should increment by 5, and “-5” should decrement by 5.

As a user, when a player's life total drops to 0 or less, it should display a label at the bottom of the app saying "Player X LOSES!"

As a user, when I rotate the device (landscape to portrait mode or vice versa), it should resize itself evenly.

As a user, when I run the app on different devices, it should seem "equally balanced" on each device, regardless of orientation. Players' life total labels should be proportional, buttons proportional, and so on.

Extra Credit:

As a user, when the application starts, it should allow for a flexible number of players, from 2 to 8. It should have an "add player" button near the top, and when pressed, it adds a new player to the game (with a starting life total of 20).

As a developer, when I look at the code, it should only have one event-listener block of code for all of the life-modifying buttons in the app. (This will require you to use the View passed in to the listener to determine which button did the click.)

lifecounter's People

Contributors

briluu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.