예제 #1
0
 public WordPlacer(IStringMeasurer measurer, ICollisionMap map, int width, int height, Random rand, FontFamily fontFamily,
                   int minimumFontSize, int compactness)
 {
     Measurer        = measurer;
     Map             = map;
     Width           = width;
     Height          = height;
     Rand            = rand;
     FontFamily      = fontFamily;
     MinimumFontSize = minimumFontSize;
     Compactness     = compactness;
 }
예제 #2
0
파일: Level.cs 프로젝트: tukraus/cspacman
        public Level(IBoard b, IList <NPC> ghosts, IList <Square> startPositions,
                     ICollisionMap collisionMap)
        {
            Debug.Assert(b != null);
            Debug.Assert(ghosts != null);
            Debug.Assert(startPositions != null);

            this.Board      = b;
            this.inProgress = false;
            this.npcs       = new Dictionary <NPC, CancellationTokenSource>();
            foreach (NPC g in ghosts)
            {
                npcs[g] = null;
            }
            this.startSquares     = startPositions;
            this.startSquareIndex = 0;
            this.players          = new List <Player>();
            this.collisions       = collisionMap;
            this.observers        = new List <ILevelObserver>();
        }