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
4 changes: 2 additions & 2 deletions .github/workflows/chatgpt-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
uses: actions/checkout@v2

- name: Chat GPT auto review
uses: JavaRip/gpt-code-review@v0.24
uses: JavaRip/gpt-code-review@v0.32
with:
# Add required inputs for the JavaRip/gpt-code-review a31Gction here
# Add required inputs for the JavaRip/gpt-code-review action here
# For example, if it requires a GitHub token, you can pass it like this:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# Replace 'github-token' with the actual input name the action expects
Expand Down
19 changes: 17 additions & 2 deletions src/map.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Vector from './classes/Vector.js';
import Point from './classes/Point.js';

const map: Vector[] = [
interface mapsExport {
straightMap: Vector[],
circleMap: Vector[],
}

const circleMap: Vector[] = [
new Vector(new Point(50, 750), new Point(50, 250)),
new Vector(new Point(50, 250), new Point(75, 175)),
new Vector(new Point(75, 175), new Point(175, 75)),
Expand All @@ -28,4 +33,14 @@ const map: Vector[] = [
new Vector(new Point(350, 250), new Point(250, 350)),
];

export default map;
const straightMap: Vector[] = [
new Vector(new Point(50, 750), new Point(50, 250)),
new Vector(new Point(80, 750), new Point(80, 250)),
];

const maps: mapsExport = {
circleMap,
straightMap,
};

export default maps;
3 changes: 2 additions & 1 deletion src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Car from './classes/Vehicle.js';
import Visualizer from './classes/Visualizer.js';
import Point from './classes/Point.js';
import VectorLib from './classes/VectorLib.js';
import map from './map.js';
import maps from './map.js';

function delay(ms: number): Promise<void> {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -39,6 +39,7 @@ function delay(ms: number): Promise<void> {


async function main(): Promise<void> {
const map = maps.straightMap;
const targetFrameDuration = 32;
let frameStartTime;

Expand Down
5 changes: 5 additions & 0 deletions static/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ canvas {
width: 40em;
border: 1px solid black
}

button {
width: 10rem;
height: 5rem;
}
12 changes: 10 additions & 2 deletions static/map.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/map.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions static/script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/script.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.