diff options
Diffstat (limited to 'src/spacebot.cpp')
-rw-r--r-- | src/spacebot.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/spacebot.cpp b/src/spacebot.cpp index 7460fe3..a6c4953 100644 --- a/src/spacebot.cpp +++ b/src/spacebot.cpp @@ -4,8 +4,8 @@ #include <string> Spacebot::Spacebot(std::string outputPath) - : outputPath(std::move(outputPath)), - gameState(std::ifstream(outputPath+"/map.txt")) + : outputFilename(outputPath+"/move.txt"), + gameState(outputPath+"/map.txt") { } @@ -27,7 +27,7 @@ Move Spacebot::chooseMove() void Spacebot::writeMove(const Move& move) { - std::ofstream resultStream(outputPath+"/move.txt"); + std::ofstream resultStream(outputFilename); switch (move) { case Move::NOTHING: |