TheFabulousPika / everybodys-golf-coins-and-gems-locator

A tool for locating the holes that coins and gems appear on for each golf course in the PS4 game Everybody's Golf
1 stars 0 forks source link

Keep observed data in separate file outside of main code #13

Closed TheFabulousPika closed 3 years ago

TheFabulousPika commented 3 years ago

Item hole number and date checked should be separated from main code (index.js). Item hole number and date definition lines should be updated for more intuitive entry.

current

//Resynchronize here if tool is out of sync with actual game
//Launch the game, get on Eagle City Out map. Take note of Item Hole number and the date in Golf Island Time
//If hole 4 in Eagle City Out is the item hole for September 11, 2019 in Golf Island Time, the following lines should look like this:
//const eagleCityOutItemHoleNumOnSyncDate = 4;
//const lastSyncDateInGolfIslandTime = new Date(Date.UTC(2019,08,11));
//Update accordingly
const eagleCityOutItemHoleNumOnSyncDate = 4;
const lastSyncDateInGolfIslandTime = new Date(Date.UTC(2021,04,02));

proposed data.js

const monthChecked = 5;
const dateChecked = 2;
const yearChecked = 2021;
const eagleCityOutItemHoleNum = 4;

index.js

const lastSyncDateInGolfIslandTime = new Date(Date.UTC(yearChecked,monthChecked-1,dateChecked));