Exemplo n.º 1
0
 public Octopus(Octipodes collection, int x, int y, int energy)
 {
     this.x          = x;
     this.y          = y;
     this.energy     = energy;
     this.collection = collection;
 }
Exemplo n.º 2
0
    public void Part01()
    {
        var o = new Octipodes(input);

        foreach (var i in Enumerable.Range(0, 100))
        {
            o.Step();
        }
        o.FlashCount().Should().Be(1743);
    }
Exemplo n.º 3
0
    public void Part02()
    {
        var o     = new Octipodes(input);
        var count = 0;

        do
        {
            o.Step();
            count++;
        }while(!o.Synced);
        count.Should().Be(364);
    }