void RotBack(int situation)
    {
        switch (situation)
        {
        case 0:
            break;

        case 1:
            teris1.RotBack();
            teris2.RotBack();

            break;

        case 2:
            teris2.RotBack();
            teris2.CheckRotClash(teris1, true);

            break;

        case 3:
            teris1.RotBack();
            teris1.CheckRotClash(teris2, true);
            break;
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (Game.Instance.gameOver)
        {
            return;
        }
        if (!waitingForNextRound)
        {
            if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.A))
            {
                if (teris1 != null)
                {
                    teris1.Move(new Vector3(-1, 0, 0));
                }
                if (teris2 != null)
                {
                    teris2.Move(new Vector3(-1, 0, 0));
                }
                int valid = ValidMove();
                if (valid != 1)
                {
                    Sound.Instance.PlayEffect("移动");
                }
                MoveBack(valid, false);

                teris1.Move(new Vector3(-1, 0, 0));
                teris2.Move(new Vector3(-1, 0, 0));
                MoveBack(ValidMove(), false);
            }
            else if (Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.D))
            {
                if (teris1 != null)
                {
                    teris1.Move(new Vector3(1, 0, 0));
                }
                if (teris2 != null)
                {
                    teris2.Move(new Vector3(1, 0, 0));
                }
                int valid = ValidMove();
                if (valid != 1)
                {
                    Sound.Instance.PlayEffect("移动");
                }
                MoveBack(valid, false);
            }
            else if (Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.W))
            {
                if (teris1 != null)
                {
                    teris1.Rot();
                }
                if (teris2 != null)
                {
                    teris2.Rot();
                }
                int  valid   = ValidMove();
                bool rotable = teris1.CheckRotClash(teris2, false);
                if (valid != 1 && rotable)
                {
                    Sound.Instance.PlayEffect("旋转");
                }


                teris1.Move(new Vector3(1, 0, 0));
                teris2.Move(new Vector3(1, 0, 0));

                MoveBack(ValidMove(), false);
            }
            else if (Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.W))
            {
                teris1.Rot();
                teris2.Rot();

                RotBack(ValidMove());
                teris1.CheckRotClash(teris2, false);
            }

            if (Time.time - previousTime > (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S) ? falltime / 10 : falltime))
            {
                if (teris1 != null)
                {
                    teris1.Move(new Vector3(0, -1, 0));
                }
                if (teris2 != null)
                {
                    teris2.Move(new Vector3(0, -1, 0));
                }
                int valid = ValidMove();

                teris1.Move(new Vector3(0, -1, 0));
                teris2.Move(new Vector3(0, -1, 0));


                MoveBack(ValidMove(), true);

                previousTime = Time.time;
            }
        }
    }