Exemplo n.º 1
0
    public void DoMove(string move)
    {
        switch (move)
        {
        case "R":
            RotateR();
            solver.R();
            break;

        case "F":
            RotateF();
            solver.F();
            break;

        case "L":
            RotateL();
            solver.L();
            break;

        case "U":
            RotateU();
            solver.U();
            break;

        case "D":
            RotateD();
            solver.D();
            break;

        case "B":
            RotateB();
            solver.B();
            break;

        case "R'":
            RotateRi();
            solver.Ri();
            break;

        case "L'":
            RotateLi();
            solver.Li();
            break;

        case "U'":
            RotateUi();
            solver.Ui();
            break;

        case "B'":
            RotateBi();
            solver.Bi();
            break;

        case "D'":
            RotateDi();
            solver.Di();
            break;

        case "F'":
            RotateFi();
            solver.Fi();
            break;

        case "R2":
            RotateR2();
            solver.R2();
            break;

        case "F2":
            RotateF2();
            solver.F2();
            break;

        case "L2":
            RotateL2();
            solver.L2();
            break;

        case "U2":
            RotateU2();
            solver.U2();
            break;

        case "D2":
            RotateD2();
            solver.D2();
            break;

        case "B2":
            RotateB2();
            solver.B2();
            break;

        case "M":
            RotateM();
            solver.M();
            break;

        case "M'":
            RotateMi();
            solver.Mi();
            break;

        case "M2":
            RotateM2();
            solver.M2();
            break;
        }
        if (IsSolved())
        {
            Debug.Log("YOU SOLVED IT WTF");
            winParticles.Play();
        }
        // solver.PrintCurrentCube();
        //Debug.Log(IsSolved());
        Debug.Log("solver says: " + solver.IsSolved());
    }