Exemplo n.º 1
0
 private void TranslateStrip(StripArgs start, StripArgs end)
 {
     for (int i = 0; i < start.length; i++)
     {
         Overwrite(start.x + i * start.xstep, start.y + i * start.ystep, end.x + i * end.xstep, end.y + i * end.ystep);
     }
 }
Exemplo n.º 2
0
    private void StripRotation(int index, int sign, int startpos)
    {
        StripArgs leftargs  = new StripArgs(startpos, index, 1, 0, cubewidth);
        StripArgs rightargs = new StripArgs((startpos + move + index) % triplemove, cubewidth_, 0, -1, cubewidth);
        StripArgs storage   = new StripArgs(triplemove, index, 1, 0, cubewidth);

        StripArgs[] OOP = { storage, leftargs, rightargs.ShoveAndInvert(), leftargs.ShoveAndInvert(), rightargs };

        // produces two orders of operations based on the sign, to relocate all the strips
        int count = 0; if (sign <= 0)

        {
            count = 5;
        }

        for (int i = 0; i < 5; i++)
        {
            TranslateStrip(OOP[(count += sign) % 5], OOP[(count + -1 * sign) % 5]);
        }
    }