예제 #1
0
        public void Test()
        {
            Container container = new Container();

            container.InitComponentComparers();

            container.MmConfig = MatchmakingTest.TestConfig;

            int count = 100;

            for (int i = 0; i < count; ++i)
            {
                int entityId = container.CreateEntity();
                container.AddWaitingComponent(entityId, 0);
            }

            var system = new TurnSystem();

            system.Execute(container);

            for (int i = 0; i < container.WaitingComponentsCount; ++i)
            {
                if (container.TryGetWaitingTurnFromIndex(i, out int turn))
                {
                    Assert.AreEqual(1, turn);
                }
            }
        }
예제 #2
0
    public void OnNextTurnButtonClickd()
    {
        _createRoomSystem.Execute(_container);
        _turnSystem.Execute(_container);

        var builder = new StringBuilder();

        for (int i = _roomStartIndex; i < _container.RoomInfoComponentsCount; ++i)
        {
            if (_container.TryGetRoomInfoTeamAFromIndex(i, out int[] teamA) &&