- or download this
// Organism.h
// Simple implementation of Conway game of life in standard C++11.
...
};
#endif /* ORGANISM_H */
- or download this
// tbench1.cpp. Simple benchmark of Organism class.
// g++ compile on Linux:
...
RunTest(fname, nticks);
return 0;
}
- or download this
package Organism;
...
}
1;
- or download this
# tbench1.pl - Simple benchmark of Organism class.
# Generate blinker test file with, for example:
...
my $ncells = $org->count();
print "cell count at end = $ncells\n";
warn "time taken: $taken secs\n";
- or download this
# Create blinker test data for load testing, e.g.:
# perl createblinker.pl 500000 -100000 10 >x.tmp 2>y.tmp
...
blink( $x2, $y-1 );
$x += $gap;
}
- or download this
# tgol2.t - Simple blinker test of Conway Game of Life Organism class
# Generate file blinker.txt with:
...
$org->tick();
test_one( $org, "blinker $i", $i % 2 ? \@sblinker2 : \@sblinker1 );
}
- or download this
# tgol.t - Simple blinker test of Conway Game of Life Organism class
use strict;
...
$org->tick();
test_one( $org, "blinker $i", $i % 2 ? \@sblinker2 : \@sblinker1 );
}
- or download this
# tbench1-infinite.pl - Simple benchmark.
# Uses Game::Life::Infinite::Board
...
my $ncells = $org->statistics->{'liveCells'};
print "cell count at end = $ncells\n";
warn "time taken: $taken secs\n";