Skip to content
Snippets Groups Projects
Commit b81def0c authored by Jan Matoušek's avatar Jan Matoušek
Browse files

Fix drill string compare, fix missing arguments case, rethink levels.

parent 0885004e
Branches part2
No related tags found
No related merge requests found
......@@ -33,24 +33,28 @@ int main(int argc, char* argv[]) {
g.typeNames.add(std::string("") + c + (char)(s[0] - 0x20) + (s+1), 1/32.0);
}
}
if(argc > 1 && std::string(argv[1]) == '1') {
if(argc > 1 && std::string(argv[1]) == "1") {
g.templates.add(std::shared_ptr<Template>(new ConstantAssignmentTemplate(
0, 1,
0, 2
)), 1.0);
}
if(argc > 1 && std::string(argv[1]) == '2') {
else if(argc > 1 && std::string(argv[1]) == "2") {
g.templates.add(std::shared_ptr<Template>(new ConstantAssignmentTemplate(
1, 2,
1, 3,
1, 3
)), 1.0);
}
if(argc > 1 && std::string(argv[1]) == '3') {
else if(argc > 1 && std::string(argv[1]) == "3") {
g.templates.add(std::shared_ptr<Template>(new ConstantAssignmentTemplate(
1, 3,
1, 4
1, 5,
1, 5
)), 1.0);
}
else {
std::cerr << "Missing argument 1, 2 or 3" << std::endl;
return 1;
}
std::cout << "\x1B[2J\x1B[H";
for(int i = 0; i < 10; ++i) {
std::unique_ptr<Problem> p(g.generate(g.templates)->generateProblem(g));
......@@ -66,4 +70,5 @@ int main(int argc, char* argv[]) {
std::cout << "-------------------------------------------------" << std::endl;
std::cout << "\x1B[2J\x1B[H";
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment