You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
952 B
Dart
35 lines
952 B
Dart
import 'package:aoc2020/aoc20201201.dart';
|
|
import 'dart:mirrors';
|
|
|
|
import 'package:aoc2020/aocbase.dart';
|
|
|
|
class aoc2020 {
|
|
final String dayParam;
|
|
final String subdayParam;
|
|
|
|
aoc2020({this.dayParam, this.subdayParam});
|
|
|
|
static List<AOCBase> aocDays = [
|
|
AOC20201201(),
|
|
];
|
|
|
|
static void list() async {
|
|
print('Days available:');
|
|
for (var index = 0; index < aocDays.length; index++) {
|
|
var aocReflect = reflect(aocDays[index]);
|
|
var classString = aocReflect.toString().split("'")[1];
|
|
|
|
print('${index + 1} : ${classString ?? 'null'}');
|
|
var myclass = aocDays[index];
|
|
await myclass.a(test: true);
|
|
await myclass.b(test: true);
|
|
print('$index : ${myclass.answerA ?? 'null'}');
|
|
print('$index : ${myclass.answerB ?? 'null'}');
|
|
await myclass.a();
|
|
await myclass.b();
|
|
print('$index : ${myclass.answerA ?? 'null'}');
|
|
print('$index : ${myclass.answerB ?? 'null'}');
|
|
}
|
|
}
|
|
}
|