Exemplo n.º 1
0
        public PianoKey[] GetNextKeyLine(int numberInWidth, Note note)
        {
            var keyWithNote = rnd.Next(numberInWidth);
            var keyLine     = new PianoKey[numberInWidth];

            for (var i = 0; i < numberInWidth; i++)
            {
                keyLine[i] = new PianoKey();
            }
            keyLine[keyWithNote] = new PianoKey(note);
            return(keyLine);
        }
Exemplo n.º 2
0
        public PianoKey[] GetNextKeyLine(int numberInWidth, Note note)
        {
            var keyLine = new PianoKey[numberInWidth];

            for (var i = 0; i > numberInWidth; i++)
            {
                keyLine[i] = new PianoKey();
            }
            var keyWithNote = combination[index] % numberInWidth;

            keyLine[keyWithNote] = new PianoKey(note);
            index = index + 1 < combination.Length ? index + 1 : 0;
            return(keyLine);
        }