Example #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();
        }
Example #2
0
 public void Imprison(Thief thief)
 {
     prisoner.Catch();
 }
Example #3
0
 public void Catch(Thief thief)
 {
     thief.Catch();
 }