示例#1
0
    /// <summary>
    /// 可置换的房间
    /// </summary>
    public static bool CheckExchangeRoom(ShipPutInfo S1, ShipPutInfo S2)
    {
        if (S1 == null || S2 == null)
        {
            return(false);
        }
        if (S1.type != S1.type)
        {
            return(false);
        }
        if (S1.type == (int)ShipBuildType.Soldier)
        {
            return(true);
        }
        if (S1.type == (int)ShipBuildType.BuildStair)
        {
            return(false);
        }
        if (S1.m_DeckRoom != S2.m_DeckRoom)
        {
            return(false);
        }
        ShapeType t1 = S1.GetPutRoomShape();
        ShapeType t2 = S2.GetPutRoomShape();

        return(ShapeType.CheckShapeSame(t1, t2));
    }