The objective of this project is to create an application, that lets two players roll a dice and displays the result.
This project has been written in programming languages, like HTML which is used to create the basic skeleton of the pages and CSS which is used to style it.This languages ore dependent on each other in order for a web page to appear fully backed. The logical part of the application is created out of javascript, which is used to collect user answers and then display their score.
Css is used to style there appearance of website on the web. Thus this project was a good exercise to help me understand how best to style a page. The project also tested my ability to use an external cascading style sheet for the whole project.
This refers to the formatting of HTML and CSS. It is easy to read code that is well formatted and work on it on a later date than it is on one that is not. Thus the project tested my ability to apply this.
It is important that when collaborating or doing an independent project to be able to track the changes and revert to a previous stable state in case of the local copy being damaged.
To use events to control when the logical part of the application is called.
The following are the particulars that the application sets out to meet:
- The application should offer the users choice to play as player1 or player2.
- Give the user the ability to roll a dice.
- Calculate the final score by adding the value generated from rolling the dice.
- Inform the user when 1 is rolled and their score is 0, the pass the roll opportunity to the next player.
- clear the default score when player2 rolls
- Display the final score.
- Choose a winner when the score for either reaches 100.
To use the application on the web follow the outlined steps:
- vist the following page (https://dun-njuguna.github.io/Pig-Dice/).
- Roll the dice
- As you roll a message will be displayed declaring the winner when the sore reaches 100.
To run this project on your local machine, simply download it navigate to the folder and open the index.html file with any web browser(preferably chrome).
Will add the ability for the application to tell the user which questions he or she has passed or failed at.
As of witting, there are no Known bugs.
Here is a link to the live site on git-hub pages(https://dun-njuguna.github.io/Pig-Dice/)
If you require to use or make any changes to this project, then reach out to me on the email below.
For any questions or suggestions please feel free to reach out to me at [email protected]
MIT License
Copyright (c) [2018] [Duncan Kariuki]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.