File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -323,11 +323,11 @@ namespace emp {
323323 // / @CAO: Technically, we should set this up with any number of coordinates.
324324 ORG & GetOrg (size_t x, size_t y) { return GetOrg (x+y*GetWidth ()); }
325325
326- // / Retrive a pointer to the contents of a speciefied cell; will be nullptr if the cell is
326+ // / Retrive a pointer to the contents of a specified cell; will be nullptr if the cell is
327327 // / not occupied.
328328 const Ptr<ORG> GetOrgPtr (size_t id) const { return pop[id]; }
329329
330- // / Retrieve a reference to the organsim as the specified position in the NEXT population.
330+ // / Retrieve a reference to the organism at the specified position in the NEXT population.
331331 // / Will trip assert if cell is not occupied.
332332 ORG & GetNextOrg (size_t id) {
333333 emp_assert (id < pops[1 ].size ()); // Next pop must be large enough.
Original file line number Diff line number Diff line change @@ -722,6 +722,13 @@ namespace emp {
722722 program.Clear ();
723723 }
724724
725+ // / clear program, this also requires resetting hardware
726+ void ResetProgram () {
727+ emp_assert (!is_executing);
728+ ResetHardware ();
729+ program.Clear ();
730+ }
731+
725732 // / Reset only hardware, not program.
726733 // / Not allowed to reset hardware during execution.
727734 void ResetHardware () {
You can’t perform that action at this time.
0 commit comments