public Laser BuildLaser(string laserDef) { Match location = _locationRegex.Match(laserDef); Match orientationMatch = _orientationRegex.Match(laserDef); int xLoc = Convert.ToInt32(location.Groups[0].Value.Substring(0, 1)); int yLoc = Convert.ToInt32(location.Groups[0].Value.Substring(2, 1)); LaserOrientation orientation = GetOrientation(orientationMatch.Groups[0].Value.Substring(0, 1)); return(new Laser(xLoc, yLoc, orientation)); }
public Maze(int width, int height, Room entryRoom, LaserOrientation lazerOrientation) : this(width, height) { EntryRoom = entryRoom; LazerOrientation = lazerOrientation; }