├── css └── main.css ├── READEME.md ├── index.html └── js └── main.js /css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: monospace; 3 | font-size: 20px; 4 | text-align: center; 5 | background: black; 6 | color: lime; 7 | margin: 3em; 8 | } 9 | 10 | strong { 11 | text-decoration: underline; 12 | } 13 | 14 | button { 15 | background: lime; 16 | color: black; 17 | border: none; 18 | padding: 10px 15px; 19 | font-size: 1.2em; 20 | font-family: monospace; 21 | font-weight: bold; 22 | } 23 | button:active { 24 | background: green; 25 | } 26 | 27 | .scoreboard { 28 | width: 14em; 29 | margin: auto; 30 | border: 1px solid lime; 31 | } 32 | .scoreboard h2 { 33 | border-bottom: 1px solid lime; 34 | margin: 0; 35 | padding: 10px; 36 | } 37 | .scoreboard table { 38 | margin: 10px auto; 39 | width: 100%; 40 | border-collapse: collapse; 41 | } 42 | .scoreboard th, .scoreboard td { 43 | text-align: center; 44 | } 45 | .scoreboard td { 46 | font-size: 3em; 47 | padding: 0 20px; 48 | } 49 | 50 | #status { 51 | margin-top: 20px; 52 | } -------------------------------------------------------------------------------- /READEME.md: -------------------------------------------------------------------------------- 1 | # Rock-Paper-Scissors! 2 | A great Website that allows you to play the classic Rock-Paper-Scissors game against the computer!! 3 | 4 | **Link to project:** http://kordellatimer.github.io/Rock_Paper_Scissors 5 | 6 | ## How It's Made: 7 | 8 | **Tech used:** HTML, CSS, JavaScript (Vanilla) 9 | 10 | Used a black background and bright green text. I also created a scoreboard using HTML and CSS. Then I used a the Math.random() method to get a random number between 0-1. Then I broke up the range into 3 parts. Then I used an If-statement to assign what the computer will choose based on the random number and which range it falls into. Then I used the JavaScript to update the scoreboard and to output a response of what the computer chose and if you won or not. 11 | 12 | ## Lessons Learned: 13 | 14 | I learned how effective JQuery could be. First with the methods that are tied with JQuery, and how simple the syntax is compared to vanilla JavaScript. 15 | 16 | ## Examples: 17 | Take a look at these couple examples that I have in my own portfolio: 18 | 19 | **Horoscope:** https://kordellatimer.github.io/Horoscope 20 | 21 | **Lottery-App:** https://kordellatimer.github.io/Lottery-App 22 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |A steam-powered bot has challenged you to a game. Rock beats scissors, scissors beats paper, and paper beats rock.
20 | 21 || 0 | 27 |0 | 28 |
| You | 33 |Bot | 34 |
|---|