summaryrefslogtreecommitdiff
path: root/algo1w4d2/main.cpp
blob: 1892fbcb93b1e0e45ed77c34747ecdc4138029af (plain)
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
#include <iostream>

#define BRACKET_CHECK

#ifdef WINKEL_SIM
#include "WinkelSim.h"

int main() {
	WinkelSim sim;

	for (unsigned t = 0; t < MAX_TIME_STEPS; t++) {
		sim.step();
		std::cout << "tijd: " << t << std::endl << sim << std::endl;
	}

	return 0;
}
#endif

#ifdef BRACKET_CHECK
#include "BracketCheck.h"

int main() {
	unsigned i = 0;
	std::string input;

	while(getline(std::cin, input)) {
		i++;
		if (input.size() == 0) {
			std::cout << std::endl;
			continue;
		}
		BracketCheck parser(input);
		std::cout << "line " << i << " is " << (parser.input_valid() ? "valid" : "invalid") << std::endl;
	}
	return 0;
}
#endif