コード例 #1
0
ファイル: Team.cs プロジェクト: RolandMQuiros/Lost-Generation
        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));
        }
コード例 #2
0
ファイル: Team.cs プロジェクト: RolandMQuiros/Lost-Generation
 public bool IsHostile(Team other)
 {
     return ((_team | _hostile) & other._team) == other._team;
 }
コード例 #3
0
ファイル: Team.cs プロジェクト: RolandMQuiros/Lost-Generation
 public bool IsNeutral(Team other)
 {
     return ((_team | _neutral) & other._team) == other._team;
 }
コード例 #4
0
ファイル: Team.cs プロジェクト: RolandMQuiros/Lost-Generation
 public bool IsFriendly(Team other)
 {
     return ((_team | _friendly) & other._team) == other._team;
 }