-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (26 loc) · 751 Bytes
/
main.cpp
File metadata and controls
34 lines (26 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "Timer.h"
#include "BoardLoader.cpp"
#include "SolverC.h"
#include <iostream>
static const std::string boardName = "Tetris4.txt";
void SolveTetrisCube() {
std::shared_ptr<Board> board;
try {
board = BoardLoader::LoadFile(boardName);
}
catch (std::string& error) {
// std::cout << "Error loading Tetris4.txt: " << error;
// std::cout << "\nLoading default problem set..." << std::endl;
board = BoardLoader::LoadDefault();
}
Timer t;
t.Start();
SolverC solver(board);
t.Lap("init");
solver.Solve();
std::cout << std::endl << "Total solutions found: " << (int)solver.solutions.size() << std::endl;
t.Lap("completion");
}
int main() {
SolveTetrisCube();
}