// Copyright 2016, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Hannah Bast <bast@cs.uni-freiburg.de>,
// Axel Lehmann <lehmanna@cs.uni-freiburg.de>.
#ifndef PROJEKT_SOKOBANHELPER_H_
#define PROJEKT_SOKOBANHELPER_H_
#include <gtest/gtest.h>
#include <string>
#include <vector>
namespace sokoban {
class SokobanDisplay {
public:
// Creates a Displayclass which uses ncurses internally.
SokobanDisplay();
// endwin() and cleanup
virtual ~SokobanDisplay();
// Initializes ncurses - should only be needed once.
void initTerminal() const;
// Draw the field after the given move sequence. If errors occured they will
// be printed on the screen and false will be returned. True is returned if
// all did go well.
bool visualize(const std::string filename, const std::string moves);
};
class SokobanEvaluate {
public:
// Calls the evaluation for the set of moves. One std::string per level, if
// less then 155 strings are given, only the first n level will be evaluated.
// True is returned iff enough leves are solved correctly.
bool evaluate(const std::vector<std::string> movesPerInstance);
private:
// Internal function doing the evaluation.
bool evaluate(const std::string filename, const std::string moves);
};
} // namespace sokoban
#endif // PROJEKT_SOKOBANHELPER_H_