コード例 #1
0
ファイル: Program.cs プロジェクト: florinleon/ActressMas
        private static void Main(string[] args)
        {
            var env = new IPDEnvironment(noTurns: 10);

            var prisonerAgent1 = new TitForTatPrisonerAgent();
            var prisonerAgent2 = new TitForTatPrisonerAgent();

            //var prisonerAgent1 = new ConfessPrisonerAgent();
            //var prisonerAgent2 = new RandomPrisonerAgent();

            env.Add(prisonerAgent1, $"p1-{prisonerAgent1.GetType().Name}");
            env.Add(prisonerAgent2, $"p2-{prisonerAgent2.GetType().Name}");

            var policeAgent = new PoliceAgent();

            env.Add(policeAgent, "police");

            env.Start();
        }