public void SameTeam() { Team teamA = new Team(1, 0, 0, 0); Team teamB = new Team(1, 0, 0, 0); Assert.IsTrue(teamA.IsFriendly(teamB)); Assert.IsTrue(teamB.IsFriendly(teamA)); }
public bool IsHostile(Team other) { return ((_team | _hostile) & other._team) == other._team; }
public bool IsNeutral(Team other) { return ((_team | _neutral) & other._team) == other._team; }
public bool IsFriendly(Team other) { return ((_team | _friendly) & other._team) == other._team; }