Beispiel #1
0
    // 블럭을 움직여줌
    public void Move()
    {
        switch (Console.ReadKey().Key)
        {
        case ConsoleKey.UpArrow:
            Tetris_Turn();
            break;

        case ConsoleKey.DownArrow:
            ShiftCheck(0);
            break;

        case ConsoleKey.LeftArrow:
            ShiftCheck(-1);
            break;

        case ConsoleKey.RightArrow:
            ShiftCheck(1);
            break;
        }
        for (int i = 0; i < 4; ++i)
        {
            int x = tt.CenterCur[0] + tt.ShapeCur[i][0];
            int y = tt.CenterCur[1] + tt.ShapeCur[i][1];

            Screen.SetBlock(x, y, TBlock.BLOCK);
        }
        //Screen.SetBlock(Center_X, Center_Y, BlockType);
    }
Beispiel #2
0
    public void Move()
    {
        Input();

        for (int y = 0; y < 4; ++y)
        {
            for (int x = 0; x < 4; ++x)
            {
                if (Arr[y][x] == "□")
                {
                    continue;
                }
                Screen.SetBlock(Y + y, X + x, Arr[y][x]);
            }
        }
    }
Beispiel #3
0
 public void Move()
 {
     Input();
     screen.SetBlock(Y, X, "■");
 }