Пример #1
0
    public bool MoveRight(Field field, out SearchNode sn)
    {
        Vector2Int newPos = mino.position;
        Mino       tmp    = mino.Clone();
        bool       ok     = false; //是否不能再往右了

        newPos.x++;
        if (field.IsValid(mino, newPos))
        {
            tmp.Move(1);
            ok = true;
        }
        sn = new SearchNode(tmp, op + "r");
        return(ok);
    }