Esempio n. 1
0
        public PawnAdapter(PictureBox pictureBox, PawnBox pawnBox)
        {
            this.pictureBox = pictureBox;
            this.pawnBox    = pawnBox;

            this.pawnBox.Column = pictureBox.Location.X / this.size;
            this.pawnBox.Row    = pictureBox.Location.Y / this.size;

            this.pawnBox.BackgroundImage = pictureBox.BackgroundImage;
        }
        public PawnAdapter Create(PlayerEnum playerEnum, PictureBox pictureBox)
        {
            PawnBox pawnBox = new PawnBox(playerEnum, PawnTypeEnum.Normal, 0, 0, Color.Black, null, true);

            return(new PawnAdapter(pictureBox, pawnBox));
        }