コード例 #1
0
        public void Initialize()
        {
            var input   = new FakeIInput(Input.NoInput);
            var display = new FakeIDisplay();

            _main = new TetfuzaBackend(input, display, 0);
        }
コード例 #2
0
        public void DrawGameplayScreen(TetfuzaBackend gameInfo)
        {
            RedrawFrame();
            Console.CursorVisible = false;

            //WriteText("Level: " + gameState.Level,1m,1m);
            //WriteText("Score: " + CommasInNumber(gameState.Score), 1m, 1m);
            //DrawNextPiece(gameState.AfterPiece);


            // Convert playField string to an array of strings
            // and convert all block characters to appear the same
            string[] board = gameInfo.ToString().Split(")");

            // Display Board
            DrawBoardCentered(board);

            // Display Next Piece
            PreviewNextPiece(gameInfo.NextPiece, .25m, .5m);

            // Display Score
            Console.CursorTop = 22;
            DisplayStat("Score", CommasInNumber(gameInfo.Score));

            // Display Level
            DisplayStat("Level", gameInfo.Level.ToString());

            // Display Line Count
            DisplayStat("Lines", gameInfo.Lines.ToString());

            // Display Next Piece
        }
コード例 #3
0
 public void DrawGameplayScreen(TetfuzaBackend gameInfo)
 {
     DrawGameplayScreenCalled = true;
 }