Skip to content

Commit 518d476

Browse files
committed
removed unused imports & vars
1 parent c7a81a8 commit 518d476

File tree

17 files changed

+245
-41
lines changed

17 files changed

+245
-41
lines changed

package-lock.json

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
"@testing-library/jest-dom": "^5.16.4",
88
"@testing-library/react": "^13.3.0",
99
"@testing-library/user-event": "^13.5.0",
10+
"@types/jest": "^28.1.6",
11+
"@types/node": "^18.0.6",
12+
"@types/react": "^18.0.15",
13+
"@types/react-dom": "^18.0.6",
1014
"csstype": "^3.1.0",
1115
"postcss-cli": "^10.0.0",
1216
"react": "^18.2.0",
@@ -16,6 +20,7 @@
1620
"react-spring": "8.0.27",
1721
"react-three-fiber": "4.0.12",
1822
"three": "0.112.1",
23+
"typescript": "^4.7.4",
1924
"zustand": "^4.0.0-rc.1"
2025
},
2126
"devDependencies": {

src/Utility/setupTests 2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@testing-library/jest-dom';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var directions = new Array();
2+
directions.push({x: 0, y: 0.5});
3+
directions.push({x: 0.5, y: 0});
4+
directions.push({x: 0, y: -0.5});
5+
directions.push({x: -0.5, y: 0});
6+
7+
export {directions};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {useState} from 'react';
2+
3+
4+
5+
6+
export default function useMaze({board, mazeType}) {
7+
const [maze, setMaze] = useState(board);
8+
const [mazeSize, setMazeSize] = useState(null);
9+
const [mazeSolved, setMazeSolved] = useState(false);
10+
const [mazeSolving, setMazeSolving] = useState(false);
11+
const [mazeSolvingError, setMazeSolvingError] = useState(false);
12+
13+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// const gridPrototye = {};
2+
//
3+
//
4+
// function Grid() {
5+
//
6+
// }
7+
//
8+
//
9+
// Object.assign(Grid.prototype, gridPrototye);
10+
//
11+
//
12+
// export default class GridState {
13+
// constructor(grid, type) {
14+
// this.grid = grid;
15+
// this.type = type;
16+
// this.size = grid.size;
17+
// }
18+
//
19+
//
20+
// getGrid() {
21+
// return this.grid;
22+
// }
23+
//
24+
//
25+
// setGrid(grid) {
26+
// this.grid = grid;
27+
// }
28+
//
29+
//
30+
// // changeGrid(grid, type) {
31+
// // if (type === this.type) {
32+
// // return;
33+
// // }
34+
// // switch (type) {
35+
// // case 'circular':
36+
// // // this.circularLayout(board);
37+
// // break;
38+
// // case 'grid':
39+
// // default: {
40+
// // // this.standardLayout(board);
41+
// // }
42+
// // }
43+
// // }
44+
//
45+
//
46+
// getType() {
47+
// return this.type;
48+
// }
49+
//
50+
//
51+
// setType(type) {
52+
// this.type = type;
53+
// }
54+
//
55+
//
56+
// updateGrid(grid) {
57+
// this.grid = grid;
58+
// }
59+
//
60+
//
61+
// // // Peter Beshai's iddea for the creation and animation of a board-like grid section
62+
// // // https://codesandbox.io/s/r3f-demo-2-prj0b
63+
// // standardLayout(board) {
64+
// // const numPoints = board.length;
65+
// // const numCols = Math.ceil(Math.sqrt(numPoints));
66+
// //
67+
// // for (let i = 0; i < numPoints; ++i) {
68+
// // const datum = board[i];
69+
// // const col = (i % numCols) - numCols / 2;
70+
// // const row = Math.floor(i / numCols) - numCols / 2;
71+
// //
72+
// // datum.x = col * 1.05;
73+
// // datum.y = row * 1.05;
74+
// // datum.z = 0;
75+
// // }
76+
// // }
77+
// //
78+
// //
79+
// // circularLayout(board) {
80+
// // let theta = 0;
81+
// // for (let i = 0; i < board.length; ++i) {
82+
// // const datum = board[i];
83+
// // const radius = Math.max(1, Math.sqrt(i + 1) * 0.8);
84+
// // theta += (Math.asin(1 / radius));
85+
// //
86+
// // datum.x = radius * Math.cos(theta);
87+
// // datum.y = radius * Math.sin(theta);
88+
// // datum.z = 0;
89+
// // }
90+
// // }
91+
// }
92+
//
93+
//
94+
//
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.board {
2+
/*z-index: 50;*/
3+
/*background-color: black;*/
4+
}

src/components/Canvas/Canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component } from 'react'
22
import { CONSTANTS } from '../../Utility/config.js';
33
import ShowValue from './ShowValue.js';
4-
import SortingCanvasDescription from './Description//SortingCanvasDescription.js';
4+
import SortingCanvasDescription from './Description/SortingCanvasDescription.js';
55
import './style.css'
66
class Canvas extends Component {
77

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
function BoldParagraph({text}) {
4+
return (
5+
<p className="inline font-semibold dark:text-lightBlue2 text-lightGreen">{text}</p>
6+
)
7+
}
8+
9+
export default BoldParagraph
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
function NormalParagraph({text}) {
4+
return (
5+
<p className="font-medium text-[1.1em] text-gray-700 dark:text-textGray inline">{text}</p>
6+
)
7+
}
8+
9+
export default NormalParagraph

0 commit comments

Comments
 (0)