Пример #1
0
 static void Main(string[] args)
 {
     using (Quadris quadris = new Quadris())
     {
         quadris.Run();
     }
 }
Пример #2
0
        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;
        }
Пример #3
0
        /// <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();
        }
Пример #4
0
 public Tetromino(Quadris game) : this(game, (TetrominoShape) new Random().Next(7))
 {
 }
Пример #5
0
        static void Main(string[] args)
        {
            Quadris newQuadris = new Quadris();

            newQuadris.StartGame();
        }