Skip to content

Commit 8394e87

Browse files
authored
Merge branch 'master' into trait-template
2 parents dd9421f + 88513ef commit 8394e87

3 files changed

Lines changed: 93 additions & 70 deletions

File tree

source/Evolve/World.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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.

source/hardware/EventDrivenGP.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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() {

0 commit comments

Comments
 (0)