cjpappas / MacSim

A repository containing an IDE to test and develop algorithms for the Virtual RobotX Competition
2 stars 1 forks source link

craft.act behaviour is broken #39

Closed cjpappas closed 2 years ago

cjpappas commented 2 years ago

Only works if you start the simulation from the tab - won't work if you refresh page. Need to have a check to determine if a sim is running -> call craft.act

cjpappas commented 2 years ago

Looks like we will address this by integrating the act function within the init method

const init = (...) => {
  ...
  craft = { ..., act, ... }
  setInterval(() => ... act() ..., 1000);
  return craft
}
cjpappas commented 2 years ago

Fixed in 884fdf2cbcef6b5a39eacd492ecbacfcc1990e08

cjpappas commented 2 years ago

craft.act cannot be reassigned for some reason

cjpappas commented 2 years ago

Fixed again in 335e19059fc781d0b9ff7676e23d99cb9b331489