Example #1
0
        public void MafiaWins()
        {
            var settings = new Settings(Settings.DefaultWinCondition,
                                        new Dictionary <Role, int> {
                [new MafiaRole()] = 60
            }, 0);
            var city = new City(settings.GeneratePopulation(new[]
            {
                "Timofey",
                "Леночка",
                "Android",
                "Дыня",
                "God",
                "Степан"
            },
                                                            new Random(4))
                                .ToHashSet(),
                                settings.CityName);
            var inter = new StringInterface();
            var game  = new Game(settings, city, inter);

            game.StartGame().Wait();
            game.GetGameStatus().Should().Be(WinState.MafiaWins);
            Approvals.Verify(inter.GetGameProcess());
        }
Example #2
0
 public void copyParametersTo(StringInterface dest)
 {
     OgrePINVOKE.SkeletonPtr_copyParametersTo(swigCPtr, StringInterface.getCPtr(dest));
     if (OgrePINVOKE.SWIGPendingException.Pending)
     {
         throw OgrePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #3
0
 public void copyParametersTo(StringInterface dest)
 {
     OgrePINVOKE.UnifiedHighLevelGpuProgramPtr_copyParametersTo(swigCPtr, StringInterface.getCPtr(dest));
     if (OgrePINVOKE.SWIGPendingException.Pending)
     {
         throw OgrePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #4
0
        public StringInterface __deref__()
        {
            global::System.IntPtr cPtr = OgrePINVOKE.StringInterfacePtr___deref__(swigCPtr);
            StringInterface       ret  = (cPtr == global::System.IntPtr.Zero) ? null : new StringInterface(cPtr, false);

            if (OgrePINVOKE.SWIGPendingException.Pending)
            {
                throw OgrePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Example #5
0
        public void PsychoWins()
        {
            var settings = new Settings(Settings.SaneWinCondition, Settings.CrazyNosyBizarreTown.PlayerDistribution,
                                        0);
            var city = new City(settings.GeneratePopulation(new[]
            {
                "Timofey",
                "Леночка",
                "Android",
                "Дыня",
                "Степан"
            },
                                                            new Random(4))
                                .ToHashSet(),
                                settings.CityName);
            var inter = new StringInterface();
            var game  = new Game(settings, city, inter);

            game.StartGame().Wait();
            game.GetGameStatus().Should().Be(WinState.PsychoWins);
            Approvals.Verify(inter.GetGameProcess());
        }
Example #6
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StringInterface obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }