Ejemplo n.º 1
0
    public virtual void vote()
    {
        if (IsActive)
        {
            UpdateBlackBoxInputs(BlackBox.InputSignalArray);
            BlackBox.Activate();
            UseBlackBoxOutpts(BlackBox.OutputSignalArray);
        }

        // Debug.Log("Records from --> " + name);
        // string bits = string.Empty;
        // foreach (var player in getNeuralNetRecords().getRecords().Keys)
        // {
        //     foreach (var input in getNeuralNetRecords().getRecords()[player].Keys)
        //     {
        //         int val = (int)getNeuralNetRecords().getRecords()[player][input];
        //         if (val == 1)
        //         {
        //             Debug.Log(player + " > " + input + " == " + val);
        //         }
        //         bits += val;
        //     }
        // }
        // Debug.Log("---");
        // foreach (var certain in getNeuralNetRecords().getMyRecords().Keys)
        // {
        //     int val = (int)getNeuralNetRecords().getMyRecords()[certain];
        //     if (val == 1)
        //     {
        //         Debug.Log(certain + " == " + val);
        //     }
        //     bits += val;
        // }
        // // Debug.Log(bits);
        // Debug.Log("-----------------");
    }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var bb = new BlackBox("this is a config string");

            Console.Out.Write(bb.call(1, 2, 3));
        }
Ejemplo n.º 3
0
        public void VanishBox(BlackBox b, bool destroyed)
        {
            if(b == null)
            {
                GameManager.Cutter.WriteToLog(this, "Warning: VanishBox() called with a null parameter.");
                return;
            }

            boxesOnscreen.Remove(b);
            RenderingDevice.RemovePermanent(b);
            b.Ent.Space.Remove(b);
            b.Remove();
            if(destroyed)
            {
                MediaSystem.PlaySoundEffect(SFXOptions.Box_Success);
                score += (int)(baseBoxValue * multiplier);
                if(index + 1 == multiplierStages.Length)
                    multiplier = multiplierStages[index];
                else
                    multiplier = multiplierStages[++index];
            }
        }
Ejemplo n.º 4
0
        protected override void spawnBox()
        {
            int r = random.Next(0, 3); // one-third chance of spawning a black box
            if(blackBoxCounter > deltaBlackBox || r != 0 || BoxesRemaining == boxesMax)
            {
                base.spawnBox();
                blackBoxCounter = 0;
            }
            else // r == 0 and counter < deltaBox
            {
                blackBoxCounter++;
                spawnTimer = 0;
                BlackBox box = new BlackBox();

                if(!(spawnTimer >= spawnTime))
                    box.ExtraPoints = (spawnTime - spawnTimer) / 60;
                boxesOnscreen.Add(box);

                //BoxesRemaining--;
                RenderingDevice.Add(box);
            }
        }
Ejemplo n.º 5
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BlackBox obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Ejemplo n.º 6
0
 public BlkBxLogger(BlackBox.ILogger logger)
 {
     _logger = logger;
 }
 public MyDialog(BlackBox b) : this()
 {
     this.b             = b;
     b.messageReceived += myNewFunction;
 }
Ejemplo n.º 8
0
 protected override void WriteEntry(BlackBox.ILogEntry entry)
 {
     //do nothing
 }