コード例 #1
0
ファイル: Person.cs プロジェクト: mstaessen/Primers
 public bool Likes(Person other)
 {
     return Friends.Contains(other);
 }
コード例 #2
0
ファイル: Person.cs プロジェクト: mstaessen/Primers
 public void SetLikes(Person other)
 {
     Friends.Add(other);
 }
コード例 #3
0
ファイル: Spot.cs プロジェクト: mstaessen/Primers
 public int ScoreIfPersonSwappedWith(Person other)
 {
     return Neighbours.Values.Count(neighbour => other.Friends.Contains(neighbour.Person));
 }