static SquareVisitedState() { Last = new SquareVisitedState("Previous state"); Explored = new SquareVisitedState("Explored state"); Unexplored = new SquareVisitedState("Unexplored state"); list = new List <SquareVisitedState>(); list.Add(Last); list.Add(Explored); list.Add(Unexplored); }
//Pretty sure this isn't necessary since a constructor can just do this public void copyStatus(SquareBoardBase copyFrom) { UnitsPresent = new Dictionary <UnitBase, bool>(); foreach (var i in copyFrom.UnitsPresent) { UnitsPresent.Add(i.Key, i.Value); } visitedState = copyFrom.visitedState; beerCanPresent = copyFrom.beerCanPresent; x = copyFrom.x; y = copyFrom.y; }
public SquareBoardBase(int setX, int setY) { visitedState = SquareVisitedState.Unexplored; //Deafult //Initialize units present UnitsPresent = new Dictionary <UnitBase, bool>(); foreach (var i in UnitType.List) { UnitsPresent.Add(i, false); } x = setX; y = setY; }