A simple brainfuck interpreter for the game's idea.

This commit is contained in:
Zed A. Shaw 2024-08-10 03:21:11 -04:00
parent 984031bf33
commit 1fb99618bf
3 changed files with 132 additions and 1 deletions

View file

@ -1,8 +1,25 @@
#include <string>
#include <map>
#include <vector>
#include <array>
using namespace std;
class Brainfucker {
size_t dp = 0;
size_t ip = 0;
public:
array<int, 100> data = {};
string code = {};
Brainfucker();
void run(int count);
void set_code(string &code);
void reset();
};
class GameEngine {
int hit_points = 0;
map<string, int> damage_types{