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); }
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); }
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); }
public TetrisScoreKeeper(float x, float y, Locatable relativeTo) { this.X = x; this.Y = y; this.RelativeTo = relativeTo; }