Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set up dice game #49205

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions client/i18n/locales/english/intro.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@
"learn-functional-programming-by-building-a-spreadsheet": {
"title": "Learn Functional Programming by Building a Spreadsheet",
"intro": ["", ""]
},
"learn-debugging-by-building-a-dice-game": {
"title": "Learn Debugging By Building A Dice Game",
"intro": ["", ""]
}
}
},
Expand Down Expand Up @@ -434,10 +438,7 @@
"In these projects, you'll need to fetch data and parse a dataset, then use D3 to create different data visualizations. Finish them all to earn your Data Visualization certification."
]
},
"d3-dashboard": {
"title": "D3 Dashboard",
"intro": ["", ""]
}
"d3-dashboard": { "title": "D3 Dashboard", "intro": ["", ""] }
}
},
"relational-database": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Introduction to the Learn Debugging By Building A Dice Game
block: learn-debugging-by-building-a-dice-game
superBlock: Responsive Web Design
isBeta: true
---

## Introduction to the Learn Debugging By Building A Dice Game

This is a test for the new project-based curriculum.
3 changes: 2 additions & 1 deletion client/utils/help-category-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,6 @@
"build-a-cash-register-project": "JavaScript",
"build-a-palindrome-checker-project": "JavaScript",
"build-a-roman-numeral-converter-project": "JavaScript",
"build-a-telephone-number-validator-project": "JavaScript"
"build-a-telephone-number-validator-project": "JavaScript",
"learn-debugging-by-building-a-dice-game": "JavaScript"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Learn Debugging By Building A Dice Game",
"isUpcomingChange": true,
"usesMultifileEditor": true,
"hasEditableBoundaries": true,
"dashedName": "learn-debugging-by-building-a-dice-game",
"order": 5,
"time": "5 hours",
"template": "",
"required": [],
"superBlock": "2022/javascript-algorithms-and-data-structures",
"superOrder": 4,
"isBeta": true,
"challengeOrder": [["63d8593b3d25181af838bf78", "Step 1"]]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
id: 63d8593b3d25181af838bf78
title: Step 1
challengeType: 0
dashedName: step-1
---

# --description--

step 1 instructions

# --hints--

Test 1

```js

```

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dice Game</title>
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<div class="container">
<div id="dice1" class="dice">0</div>
<div id="dice2" class="dice">0</div>
<button type="button" id="roll">Roll Dice</button>
<span id="status"></span>
</div>
<div class="container">
<p>
Roll Counter Total
<button type="button" id="toggle">Toggle # or %</button>
</p>
<div class="chart">
<div>
<span class="numbers">2</span>
<span class="bar" id="2">0</span>
</div>
<div>
<span class="numbers">3</span>
<span class="bar" id="3">0</span>
</div>
<div>
<span class="numbers">4</span>
<span class="bar" id="4">0</span>
</div>
<div>
<span class="numbers">5</span>
<span class="bar" id="5">0</span>
</div>
<div>
<span class="numbers">6</span>
<span class="bar" id="6">0</span>
</div>
<div>
<span class="numbers">7</span>
<span class="bar" id="7">0</span>
</div>
<div>
<span class="numbers">8</span>
<span class="bar" id="8">0</span>
</div>
<div>
<span class="numbers">9</span>
<span class="bar" id="9">0</span>
</div>
<div>
<span class="numbers">10</span>
<span class="bar" id="10">0</span>
</div>
<div>
<span class="numbers">11</span>
<span class="bar" id="11">0</span>
</div>
<div>
<span class="numbers">12</span>
<span class="bar" id="12">0</span>
</div>
</div>
Total Doubles: <span id="doubles">0</span>
</div>
<script src="./script.js"></script>
</body>
</html>

```

```css
.container {
margin: 30px;
width: 400px;
}

.dice {
background-color: lightblue;
border: 1px solid black;
padding: 10px 15px;
font-size: 24px;
text-align: center;
margin: 5px;
border-radius: 5px;
display: inline;
}

.chart {
background-color: antiquewhite;
}

.bar {
display: inline-block;
font: 12px sans-serif;
text-align: right;
margin: 1px;
color: black;
}

.numbers {
display: inline-block;
text-align: center;
width: 20px;
background-color: yellow;
font-weight: bold;
}

#doubles {
font-weight: bold;
}

#status {
color: red;
}
```

```js
--fcc-editable-region--

--fcc-editable-region--
```