public GameLogic(int max_hp, int gameTime) { gameTickTimer = new Timer(1000); gameTickTimer.Elapsed += Timer_Elapsed; bleDataLayer = new BluetoothDataLayer(); beaconFilter = new BeaconFilter(bleDataLayer); players = new Dictionary <CommandColors, int>(); players.TryAdd(CommandColors.RED, 0); players.TryAdd(CommandColors.GREEN, 0); players.TryAdd(CommandColors.BLUE, 0); players.TryAdd(CommandColors.YELLOW, 0); winPoints.TryAdd(CommandColors.RED, 0); winPoints.TryAdd(CommandColors.GREEN, 0); winPoints.TryAdd(CommandColors.BLUE, 0); winPoints.TryAdd(CommandColors.YELLOW, 0); pointState = PointState.NEUTRAL; Max_HP = max_hp; HP = Max_HP; currentOwner = CommandColors.NOBODY; elapsedTime = gameTime; gameTimeInterval = gameTime; }
public BeaconFilter(BluetoothDataLayer bluetooth) { this.bluetooth = bluetooth; BeaconDB.Initialize(); }