We require a parsing method to parse user input and filter out driver-related tasks from generic commands. We can either implement this method in Game.java, Util.java, or Risk.java.
All 3 have drawbacks:
Having it in Game.java doesn't really make logical sense as a game (like a board) shouldn't be parsing input
Having it in Util.java requires map access for certain commands, but we wanted Util.java for very generic tasks, without needing something like a map beforehand
Having it in Risk.java makes the most logical sense to us, but Risk.java is a driver file and we're not sure if it's ok to define a method in a driver file, let alone make the game a private var
We're defining the parse method in Game.java for convenience, but open to change.
We require a parsing method to parse user input and filter out driver-related tasks from generic commands. We can either implement this method in Game.java, Util.java, or Risk.java.
All 3 have drawbacks:
We're defining the parse method in Game.java for convenience, but open to change.