コード例 #1
0
ファイル: Game.cs プロジェクト: MatasGos/BMAN
        public bool gameStarted = false;    //Bool showing if the game has started or ended/hasn't started yet

        public Game()
        {
            playerPicsColors = new Dictionary <int, B[, ]>();
            this.players     = new List <Player>();
            this.map         = new Map(xSize, ySize);
            this.graphics    = new GraphicsRepository <A, B>();
            this.field       = graphics.CreateGraphicsObject(xSize * unitSize, ySize * unitSize);
            this.pictures    = new PictureFlyweight <A, B>();
        }
コード例 #2
0
 public PictureFlyweight()
 {
     if (typeof(A) != typeof(Bitmap) || typeof(B) != typeof(Color))
     {
         throw new NotImplementedException();
     }
     pictures = new Dictionary <string, B[, ]>();
     graphics = new GraphicsRepository <A, B>();
 }