summaryrefslogtreecommitdiffstats
path: root/labb1
diff options
context:
space:
mode:
Diffstat (limited to 'labb1')
-rw-r--r--labb1/src/life.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/labb1/src/life.cpp b/labb1/src/life.cpp
index cf5c6c9..1f582f6 100644
--- a/labb1/src/life.cpp
+++ b/labb1/src/life.cpp
@@ -11,7 +11,7 @@
* Print a representation of the grid.
* Alive cells show as 'X', dead show as '-'.
*/
-void printGrid(Grid<bool> &grid) {
+void printGrid(const Grid<bool> &grid) {
for (int y = 0; y < grid.numRows(); y++) {
for (int x = 0; x < grid.numCols(); x++) {
if (grid.get(y, x)) {
@@ -27,7 +27,7 @@ void printGrid(Grid<bool> &grid) {
/*
* Return 1 if (x, y) is in bounds and alive, otherwise 0.
*/
-int checkPoint(Grid<bool> &grid, int y, int x) {
+int checkPoint(const Grid<bool> &grid, int y, int x) {
return grid.inBounds(y, x) && grid.get(y, x) ? 1 : 0;
}