Start working on dumping the world (to a JSON file) for debug purposes.

This commit is contained in:
Godzil
2020-02-27 18:03:08 +00:00
parent 2926166ce6
commit c369d2fe2d
15 changed files with 116 additions and 0 deletions

View File

@@ -9,6 +9,8 @@
#ifndef DORAYME_CHECKERSPATTERN_H
#define DORAYME_CHECKERSPATTERN_H
#include <stdio.h>
class CheckersPattern : public Pattern
{
public:
@@ -20,6 +22,12 @@ public:
return (fmod(value, 2) == 0)?this->a:this->b;
}
void dumpMe(FILE *fp) {
fprintf(fp, "\"Type\": \"Checkers\",\n");
Pattern::dumpMe(fp);
}
};
#endif /* DORAYME_CHECKERSPATTERN_H */