Skip to content

Commit

Permalink
Hotfix to allow for scouting matches with surrogate robots
Browse files Browse the repository at this point in the history
  • Loading branch information
Cow-Van committed Apr 16, 2024
1 parent 65db09f commit 248a2fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pages/matchscout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class RobotPositionChip extends Container {
alignment: Alignment.topCenter,
child: Center(child: Text(position.ordinal.toString())));

static final _robotPositionPattern = RegExp(r'^(?<color>red|blue)(?<number>[1-3])$');
static final _robotPositionPattern = RegExp(r'^(?<color>red|blue)(?<number>[1-9])$');
static MatchRobotPositionInfo robotPositionFromString(String posStr, {int scouters = 0}) {
RegExpMatch? patternMatch = _robotPositionPattern.firstMatch(posStr);
if (patternMatch == null) throw Exception("Malformed Robot Position '$posStr'");
Expand Down

0 comments on commit 248a2fe

Please sign in to comment.