summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Api/Games/Extensions/GameManagerExtensions.cs
blob: 9a5a2b4f1eb29b646bf0b4541d0d02c4b57c9957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Linq;
using Impostor.Api.Games.Managers;
using Impostor.Api.Innersloth;

namespace Impostor.Api.Games
{
    public static class GameManagerExtensions
    {
        public static int GetGameCount(this IGameManager manager, MapFlags map)
        {
            return manager.Games.Count(game => map.HasFlag((MapFlags)(1 << game.Options.MapId)));
        }
    }
}