/// <summary> /// Determine an exit direction based on the current placement logic /// </summary> /// <param name="logic"></param> /// <param name="startDir"></param> /// <returns></returns> public CompassDirection ExitDirection(ExitPlacement logic, CompassDirection startDir) { if (logic == ExitPlacement.Opposite || logic == ExitPlacement.Opposite_Side) { return(startDir); } else if (logic == ExitPlacement.Not_Opposite_Side) { return(startDir.RandomTurn(_RNG)); } else { return(startDir.Reverse().RandomOther(_RNG)); } }
public void SetExit(ExitPlacement exitPlacement, int x = 1, int y = 1) { switch (exitPlacement) { case ExitPlacement.RandomCorner: exitRandomCorner(); break; case ExitPlacement.Random: exitRandom(); break; case ExitPlacement.Fixed: ex = x; ey = y; break; } cMap[ex, ey] = 'e'; DrawRectangleInCell(ex, ey, Brushes.Lime); }
public Level(int[,] GridStartLocations, ExitPlacement exitLocation) { GridStartLocations = GridStartLocations; ExitLocation = exitLocation; }