コード例 #1
0
        static void Main(string[] args)
        {
            // make jail
            Jail jail = new Jail();

            // make thief
            Thief thief = new Thief("Dyon Altena");
            // make cop
            Cop cop = new Cop();

            // cop puts thief in jail
            cop.Catch(thief);

            Console.WriteLine(jail);
            Console.WriteLine(cop);
            Console.WriteLine(thief);

            Console.Read();
        }
コード例 #2
0
ファイル: Jail.cs プロジェクト: jorisbakx/TheChasing
 public void Imprison(Thief thief)
 {
     prisoner.Catch();
 }
コード例 #3
0
 public void Catch(Thief thief)
 {
     thief.Catch();
 }