示例#1
0
 public TetrisBlockHolder(float x, float y, Locatable relativeTo)
 {
     this.X          = x;
     this.Y          = y;
     this.RelativeTo = relativeTo;
     Width           = ((float)Tetrimino.Size.Width * 5);
     Height          = ((float)Tetrimino.Size.Height * 5);
 }
示例#2
0
        public Tetrimino(Color color, float x, float y, Locatable relativeTo = null)
        {
            X           = x;
            Y           = y;
            this.Color  = color;
            this.Width  = (float)Size.Width;
            this.Height = (float)Size.Height;
            RelativeTo  = relativeTo;

            graphic = getGraphic(color);
        }
示例#3
0
        public TetrisBag(Random random = null, float x = 0, float y = 0, Locatable relativeTo = null)
        {
            if (random == null)
            {
                this.random = new Random();
            }
            else
            {
                this.random = random;
            }
            List <TetrisBlock> bag = new List <TetrisBlock>();

            this.X          = x;
            this.Y          = y;
            this.RelativeTo = relativeTo;
            bag.AddRange(generateBag());
            bag.AddRange(generateBag());
            bag.ForEach(zx => tetriminos.Enqueue(zx));
            Width  = ((float)Tetrimino.Size.Width * 5);
            Height = ((float)Tetrimino.Size.Height * 5 * DisplayCount);
        }
示例#4
0
 public TetrisScoreKeeper(float x, float y, Locatable relativeTo)
 {
     this.X          = x;
     this.Y          = y;
     this.RelativeTo = relativeTo;
 }