Exemple #1
0
        public override void Init()
        {
            label = RandomUtil.Int(4);
            color = RandomUtil.Int(4);
            Log($"Button: {ColorNames[color]} {Labels[label]}");

            solRequiresHold =
                color == 2 && label == 1 ? true :
                BombInfo.GetBatteryCount() > 1 && label == 1 ? false :
                color == 3 && BombInfo.IsIndicatorOn(Indicator.CAR) ? true :
                BombInfo.GetBatteryCount() > 2 && BombInfo.IsIndicatorOn(Indicator.FRK) ? false :
                color == 1 ? true :
                color == 0 && label == 2 ? false :
                true;

            Log($"Solution: " + (solRequiresHold ? "HOLD" : "PRESS"));
        }
 public string GetEdgeworkString()
 {
     if (!BombInProgress)
     {
         return("Bomb not in progress");
     }
     else
     {
         BombInfo bombInfo = CurrentBomb.BombInfo;
         return("{0}b {1}h // {2} {3} // {4} // {5}".FormatThis(
                    bombInfo.GetBatteryCount(),
                    bombInfo.GetBatteryHolderCount(),
                    String.Join(" ", bombInfo.GetOnIndicators().Select(x => "*" + x)),
                    String.Join(" ", bombInfo.GetOffIndicators()),
                    String.Join(" ", bombInfo.GetPortPlates().Select(x => "[" + String.Join(", ", x) + "]")),
                    bombInfo.GetSerialNumber()
                    ));
     }
 }