Use an ostringstream for the output and make the test actually confirm the results.
This commit is contained in:
parent
38104f60f3
commit
4227ee1cdc
3 changed files with 13 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue