makhidkarun / traveller_pyroute

Traveller trade route generator
MIT License
14 stars 5 forks source link

Tighten starline regex's position sub-match #84

Closed CyberiaResurrection closed 12 months ago

CyberiaResurrection commented 12 months ago

Previously, any four digits would match the position sub-match. This was done for simplicity's sake, and has worked brilliantly up until now.

With the rest of parsing getting belted, position has fallen behind a bit. The highest valid column in a position is 32, and highest valid row is 40. Thus, a tens column digit of 4+ is prima facie nonsensical, likewise a tens row digit of 5+.

Since we can catch those at the starline regex stage, do so.