-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathentrypoint.cpp
More file actions
46 lines (39 loc) · 1.24 KB
/
Copy pathentrypoint.cpp
File metadata and controls
46 lines (39 loc) · 1.24 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
//
// main.cpp
// StackRabbit
//
// Created by Greg Cannon on 7/27/21.
//
#include <iostream>
#include "src/cpp_modules/src/main.cpp"
#include "src/cpp_modules/src/game_simulation.cpp"
/*
I = 0
O = 1
L = 2
J = 3
T = 4
S = 5
Z = 6
board | level | lines | curPiece | nextPiece | inputTimeline
*/
char const * testInput = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111100001111110101111011110111101111011110111101111101111111110111111111011111111101111111110111|19|200|0|6|X.....X.....X..X.....|";
int runGames(){
std::cout.imbue(std::locale("en_US.UTF-8")); // Allow for commas in printed numbers
std::vector<std::pair<int, int>> games;
int numGames = 100;
int playoutCount = 0;
int playoutLength = 1;
simulateGamesThreaded(numGames, "X.....", 19, /* maxLines= */ 230, playoutCount, playoutLength, games);
for (int i = 0; i < numGames; i++){
printf("Game %d: %d points, %d lines\n", i, games[i].first, games[i].second);
}
return 0;
}
int main(int argc, const char * argv[]) {
// printf("%s\n", mainProcess(testInput, GET_LOCK_VALUE_LOOKUP).c_str());
// printf("%s\n", mainProcess(testInput, GET_MOVE).c_str());
runGames();
// testAdjustments();
return 0;
}