static void Main(string[] args) { using (Quadris quadris = new Quadris()) { quadris.Run(); } }
public Tetromino(Quadris game, TetrominoShape shape) { Owner = game; Shape = shape; _shapes = Tetrominos[(int)shape]; var rnd = new Random(); Orientation = (Orientation)rnd.Next(4); bool hasPixelsOnFirstColumn = HasPixelsOnFirstColumn(); int width = Pixels[0].Length - (hasPixelsOnFirstColumn ? 0 : 1); X = rnd.Next(Quadris.FieldWidth - width) - (hasPixelsOnFirstColumn ? 0 : 1); Y = -Pixels.Length; }
/// <summary> /// Entry point called by the ConsoleBootLoader project /// </summary> /// <param name="args">Array of object references to the hardware features</param> public static void Run(object[] args) { var thread = new Quadris(new ConsoleHardwareConfig(args)).Run(); thread.Join(); }
public Tetromino(Quadris game) : this(game, (TetrominoShape) new Random().Next(7)) { }
static void Main(string[] args) { Quadris newQuadris = new Quadris(); newQuadris.StartGame(); }