Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion 01 - Drum Kit/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import sys;
import transformers;
import test;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these imports?

const keys = Array.from(document.querySelectorAll('.key'));

const keyCode = {
A: 65,
S: 83,
D: 68,
D: 68,
F: 70,
G: 71,
H: 72,
Expand Down
9 changes: 6 additions & 3 deletions 10 - Emoji Switcher like Discord/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ const emojis = [];


const emojiAddFunction = async () => {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this?

let res = await fetch('https://emoji-api.com/emojis?access_key=1ce9b701f975ba7b63dd065ab1e09f26e3d1e83d')
res = await res.json()
for(let i=0 ; i<res.length ; i++){

for (let i = 0; i < res.length; i++) {
emojis.push(res[i].character);
}
}

emojiAddFunction();

emojiAddFunction();
emojiAddFunction();

btn.addEventListener('mouseover', () => {
btn.innerText = emojis[Math.floor(Math.random() * emojis.length)];
})
Expand Down
26 changes: 23 additions & 3 deletions 100 - Coin Game/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,26 @@ window.addEventListener("keydown", function (event) {
}
});

function generateTeste() {
const minimumGap = 30;
const maximumGap = 150;

// X coordinate of the right edge of the furthest tree
const lastTree = trees[trees.length - 1];
let furthestX = lastTree ? lastTree.x : 0;

const x =
furthestX +
minimumGap +
Math.floor(Math.random() * (maximumGap - minimumGap));

const treeColors = ["#6D8821", "#8FAC34", "#98B333"];
const color = treeColors[Math.floor(Math.random() * 3)];

trees.push({ x, color });
}


window.addEventListener("mousedown", function (event) {
if (phase == "waiting") {
lastTimestamp = undefined;
Expand Down Expand Up @@ -294,9 +314,9 @@ function thePlatformTheStickHits() {
if (
platformTheStickHits &&
platformTheStickHits.x + platformTheStickHits.w / 2 - perfectAreaSize / 2 <
stickFarX &&
stickFarX &&
stickFarX <
platformTheStickHits.x + platformTheStickHits.w / 2 + perfectAreaSize / 2
platformTheStickHits.x + platformTheStickHits.w / 2 + perfectAreaSize / 2
)
return [platformTheStickHits, true];

Expand Down Expand Up @@ -502,7 +522,7 @@ function getHillY(windowX, baseHeight, amplitude, stretch) {
const sineBaseY = window.innerHeight - baseHeight;
return (
Math.sinus((sceneOffset * backgroundSpeedMultiplier + windowX) * stretch) *
amplitude +
amplitude +
sineBaseY
);
}
Expand Down
29 changes: 27 additions & 2 deletions 109 - Number Facts/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
<!DOCTYPE html>
<html lang="en">

<head>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this section.

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Number Facts</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>
<section>
<div class="container">
<form >
<form>
<input type="number" placeholder="Enter a number">
<button type="submit">Submit</button>
</form>
<div class="number-fact">Enter a number here to know some interesting info 😎 .</div>
</div>
</section>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this?

<section>
<div class="container">
<form>
<input type="number" placeholder="Enter a number">
<button type="submit">Submit</button>
</form>
<div class="number-fact">Enter a number here to know some interesting info 😎 .</div>
</div>
</section>



<section>
<div class="container">
<form>
<input type="number" placeholder="Enter a number">
<button type="submit">Submit</button>
</form>
Expand All @@ -18,4 +42,5 @@
</section>
<script src="./app.js"></script>
</body>
</html>

</html>
Loading