add flytrials #4

Merged
Quaternions merged 2 commits from staging into master 2023-03-19 00:30:54 +00:00
Owner

I've never coded in javascript so review my untested code thanks

I've never coded in javascript so review my untested code thanks
Quaternions added 2 commits 2023-03-08 20:39:19 +00:00
Quaternions force-pushed staging from 3213bfdd91 to 5681e21fbe 2023-03-08 20:42:50 +00:00 Compare
fiveman1 reviewed 2023-03-08 20:46:33 +00:00
@ -4,0 +7,4 @@
deathrun: "files/deathrun_submissions.csv",
flytrials: "files/flytrials_submissions.csv",
};
var commandChoices = [];
Collaborator

use const instead of var

use const instead of var
fiveman1 reviewed 2023-03-08 20:47:20 +00:00
@ -4,0 +8,4 @@
flytrials: "files/flytrials_submissions.csv",
};
var commandChoices = [];
for (const [game, file] of Object.entries(gameDict)) {
Collaborator

I would use Object.keys rather than Object.entries since you aren't using the values

I would use Object.keys rather than Object.entries since you aren't using the values
fiveman1 reviewed 2023-03-08 20:49:41 +00:00
@ -10,3 +18,1 @@
else if (game === "surf") fname = "files/surf_submissions.csv";
else if (game === "deathrun") fname = "files/deathrun_submissions.csv";
else {
let fname = gameDict[game];
Collaborator

should be const fname rather than let fname since it won't be reassigned now

should be const fname rather than let fname since it won't be reassigned now
fiveman1 reviewed 2023-03-08 20:50:01 +00:00
@ -11,2 +18,2 @@
else if (game === "deathrun") fname = "files/deathrun_submissions.csv";
else {
let fname = gameDict[game];
if (fname === undefined) {
Collaborator

if (!fname) is probably a bit more straightforward

if (!fname) is probably a bit more straightforward
fiveman1 reviewed 2023-03-08 20:52:56 +00:00
@ -6,0 +9,4 @@
deathrun: "files/deathrun_submissions.csv",
flytrials: "files/flytrials_submissions.csv",
};
var commandChoices = [];
Collaborator

any changes need to be applied to each file. would probably be possible to make a new file and move the duplicate code there but not a big deal

any changes need to be applied to each file. would probably be possible to make a new file and move the duplicate code there but not a big deal
Author
Owner

doing this now

doing this now
fiveman1 requested changes 2023-03-08 20:54:48 +00:00
fiveman1 left a comment
Collaborator

did this on my phone, only suggestions are just code style

did this on my phone, only suggestions are just code style
Quaternions force-pushed staging from 5681e21fbe to 8fa05099be 2023-03-08 21:19:55 +00:00 Compare
Author
Owner

I've incorporated most of the suggestions but redid the whole thing to use a centralized module. I hope I wrote the module export stuff correctly

I've incorporated most of the suggestions but redid the whole thing to use a centralized module. I hope I wrote the module export stuff correctly
Quaternions force-pushed staging from 8fa05099be to 770118d937 2023-03-08 21:24:29 +00:00 Compare
fiveman1 approved these changes 2023-03-08 21:37:17 +00:00
fiveman1 left a comment
Collaborator

Looks good

Looks good
Quaternions force-pushed staging from 770118d937 to ace8e05b67 2023-03-08 22:19:25 +00:00 Compare
Quaternions force-pushed staging from ace8e05b67 to b44dd98976 2023-03-08 22:23:33 +00:00 Compare
Quaternions merged commit 85fd5e9de9 into master 2023-03-19 00:30:54 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: StrafesNET/maptest-bot#4
No description provided.