예제 #1
0
        public GameBoardData(HashSet<Mino> SettledMinos, Polyomino FallingPolyomino, Vector2 FallingPolyominoLocation, int n, int Width, 
                             int Height, WallKickStrategy WallKickStrategy, PolyominoDealer dealer )
        {
            this.GameOver = false;
            this.SettledMinos = SettledMinos;
            this.FallingPolyomino = FallingPolyomino;
            this.FallingPolyominoLocation = FallingPolyominoLocation;
            this.n = n;
            this.Height = Height;
            this.Width = Width;
            this.WallKickStrategy = WallKickStrategy;
            this.MyPieceDealer = dealer;

            FallingRate = 700;
            FallingCooldown = FallingRate;
        }
예제 #2
0
        public GameBoardManager(int n, GamePlayer player )
        {
            this.player = player;

            // rule compliant board size
            int width = n * 2 + n / 2;
            int height = width * 2 + n / 2;

            WallKickStrategy wallKickStrategy = new WallKickStrategy();
            wallKickStrategy.getStrategyCopy(20, 0, false); // precompute

            PolyominoDealer pieceDealer = new PolyominoDealer( n );

            this.Data = new GameBoardData(new HashSet<Mino>(), null, new Vector2(0,0), n, width, height, wallKickStrategy, pieceDealer);
            FrameNumber = 0;
            FrameRate = 32;
        }