Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
timhaj committed May 1, 2024
1 parent ecadee8 commit 66882fb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions color.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css.css">
<link rel="icon" type="image/x-icon" href="/favicon/favicon.ico">
<title>What the style?!</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function generateRandomColors(): string[] {
let arr: string[] = [];
let randomColor: string = "#";
for (let i: number = 0; i < 5; i++) {
for (let i: number = 0; i < 6; i++) {
for (let j: number = 0; j < 6; j++) {
randomColor += available[Math.floor(Math.random() * available.length)]
}
arr[i] = randomColor;
Expand Down
1 change: 1 addition & 0 deletions font.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css.css">
<link rel="icon" type="image/x-icon" href="/favicon/favicon.ico">
<title>What the style?!</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions js/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function check(element) {
info.innerHTML = "You're correct!";
containerDiv.replaceChild(info, containerDiv.childNodes[2]);
let a = document.createElement("a");
a.setAttribute("href", "/");
a.setAttribute("href", "/color.html");
info = document.createElement("button");
info.setAttribute("id", "btn");
info.innerHTML = "NEW GAME";
Expand All @@ -68,7 +68,7 @@ function generateRandomColors() {
let arr = [];
let randomColor = "#";
for (let i = 0; i < 5; i++) {
for (let i = 0; i < 6; i++) {
for (let j = 0; j < 6; j++) {
randomColor += available[Math.floor(Math.random() * available.length)];
}
arr[i] = randomColor;
Expand Down
2 changes: 1 addition & 1 deletion js/font.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function handle(selected) {
element.innerHTML = "You're correct!";
container.replaceChild(element, container.childNodes[2]);
let a = document.createElement("a");
a.setAttribute("href", "/");
a.setAttribute("href", "/font.html");
element = document.createElement("button");
element.setAttribute("id", "btn");
element.innerHTML = "NEW GAME";
Expand Down

0 comments on commit 66882fb

Please sign in to comment.