Use an ostringstream for the output and make the test actually confirm the results.

This commit is contained in:
Zed A. Shaw 2024-08-12 13:33:36 -04:00
parent 38104f60f3
commit 4227ee1cdc
3 changed files with 13 additions and 4 deletions

View file

@ -121,7 +121,7 @@ void Brainfucker::run(int ticks) {
data[dp] = data[dp] - 1;
break;
case '.':
cout << (char)data.at(dp);
out << (char)data.at(dp);
break;
case ',':
print(ERROR, "Not implemented.\n");
@ -162,7 +162,6 @@ void Brainfucker::reset() {
data.fill(0);
}
GameEngine::GameEngine(int hp) : hit_points(hp) {};
int GameEngine::determine_damage(string &type) {