Skip to content

Instantly share code, notes, and snippets.

@donalmacc
Created May 16, 2012 19:20
Show Gist options
  • Save donalmacc/2713220 to your computer and use it in GitHub Desktop.
Save donalmacc/2713220 to your computer and use it in GitHub Desktop.
Why, for zach
function resetDailyStats()
//EFFECTS: Creates a new object to store in the array of stats,
// resets the various station's stats
{
console.log("resetDailyStats() was called");
App.tempStats = App.Stats.create();
var day = App.SimObject.get('simDay');
console.log(day);
console.log(App.tempStats.get('greenIdle'));
App.SimObject.set(simStats[day], App.tempStats);
App.stationA.set('dailyIdleTime', 0);
App.stationA.set('dailySetupTime', 0);
App.stationA.set('dailyProductTime', 0);
App.stationA.set('dailyTransferTime', 0);
App.stationB.set('dailyIdleTime', 0);
App.stationB.set('dailySetupTime', 0);
App.stationB.set('dailyProductTime', 0);
App.stationB.set('dailyTransferTime', 0);
App.stationC.set('dailyIdleTime', 0);
App.stationC.set('dailySetupTime', 0);
App.stationC.set('dailyProductTime', 0);
App.stationC.set('dailyTransferTime', 0);
App.stationD.set('dailyIdleTime', 0);
App.stationD.set('dailySetupTime', 0);
App.stationD.set('dailyProductTime', 0);
App.stationD.set('dailyTransferTime', 0);
App.stationE.set('dailyIdleTime', 0);
App.stationE.set('dailySetupTime', 0);
App.stationE.set('dailyProductTime', 0);
App.stationE.set('dailyTransferTime', 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment