diff --git a/README.md b/README.md index f46e269586..ae8571b523 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Bowling Challenge ================= - -* Challenge time: rest of the day and weekend, and the entire of Makersbnb week if you need it, until Monday 9am * Feel free to use google, your notes, books, etc. but work on your own * If you refer to the solution of another coach or student, please put a link to that in your README * If you have a partial solution, **still check in a partial solution** @@ -11,15 +9,33 @@ Bowling Challenge ## The Task -Count and sum the scores of a bowling game for one player (in JavaScript). +**THIS IS NOT A BOWLING GAME, IT IS A BOWLING SCORECARD. DO NOT GENERATE RANDOM ROLLS. AN ACTUAL USER INTERFACE IS OPTIONAL** + +Count and sum the scores of a bowling game for one player (in JavaScript). A bowling game consists of 10 frames in which the player tries to knock down the 10 pins. In every frame the player can roll one or two times. The actual number depends on strikes and spares. The score of a frame is the number of knocked down pins plus bonuses for strikes and spares. After every frame the 10 pins are reset. +Start by looking in detail at the rules and the example of scoring for a complete game given below. + +An example of how your code might be used could be: + +```javaScript +let scorecard = new Scorecard() +scorecard.calculateScore() // returns 0 +scorecard.addFrame(2, 5) +scorecard.addFrame(3, 5) +scorecard.calculateScore() // returns 15 +``` + +But feel free to add other methods if you think they are useful. + As usual please start by * Forking this repo -* Finally submit a pull request before Monday week at 9am with your solution or partial solution. However much or little amount of code you wrote please please please submit a pull request before Monday week at 9am. And since next week is lab week you have a full extra week to work on this. +* Using test-driven development (if you decide to write a user interface, then make sure you have looked at the chapters on mocking). + +* Finally submit a pull request before Monday week at 9am with your solution or partial solution. However much or little amount of code you wrote please please please submit a pull request before Monday week at 9am. ___STRONG HINT, IGNORE AT YOUR PERIL:___ Bowling is a deceptively complex game. Careful thought and thorough diagramming — both before and throughout — will save you literal hours of your life. @@ -27,9 +43,9 @@ ___STRONG HINT, IGNORE AT YOUR PERIL:___ Bowling is a deceptively complex game. In any order you like: -* Create a nice interactive animated interface with jQuery. * Set up [Travis CI](https://travis-ci.org) to run your tests. * Add [ESLint](http://eslint.org/) to your codebase and make your code conform. +* Create a UserInterface class, allowing you to run a game from the command line. You might even want to start with ESLint early on in your work — to help you learn Javascript conventions as you go along. diff --git a/docs/review.md b/docs/review.md index c4234ba8e4..967eacfec4 100644 --- a/docs/review.md +++ b/docs/review.md @@ -2,8 +2,6 @@ Welcome to the code review for the Bowling Challenge! Again, don't worry - you are not expected to have all the answers. The following is a code-review scaffold for Bowling Challenge that you can follow if you want to. These are common issues to look out for in this challenge - but you may decide to take your own route. -If you can please use this [form](http://goo.gl/forms/cuObDCzC4v) to tick off where your reviewee has successfully has successfully incorporated these guidelines! This form helps us get an overall picture of how the whole cohort is doing - it's not an assessment of an individual student. - # Step 0: Checkout and Run tests Please checkout your reviewee's code and run their tests. Read the code and try and use the app through the web interface (if they have made one). You can also experiment with the engine in the console. How easy is it to understand the structure of their code? How readable is their code? Did you need to make any cognitive leaps to 'get it'? Is it more complicated than it needs to be? @@ -114,7 +112,7 @@ In all cases we should try to ensure that each function has a single responsibil ## Single Responsibility Principle and other SOLID issues -Ensure your objects are [solid](https://github.com/makersacademy/course/blob/master/pills/code_reviews.md#oop---are-your-objects-solid)? +Ensure your objects are [solid](https://github.com/makersacademy/course/blob/main/pills/code_reviews.md#oop---are-your-objects-solid)? For example, have you separated responsibilities of... * knowing whether a frame is a strike / spare