private Character[,] GetGarbage(int AHeight, int AWidth) { McKayRandom LRandom = new McKayRandom(); Character[,] LReturn = new Character[AHeight, AWidth]; for (int i = 0; i < AHeight; i++) { for (int j = 0; j < AWidth; j++) { bool LRepeat; do { LRepeat = false; LReturn[i, j] = new Character(LRandom.RandomLetter()); for (int LTemp = 0; LTemp < j; LTemp++) { if (LReturn[i, j] == LReturn[i, LTemp]) { LRepeat = true; } } } while (LRepeat); } } return(LReturn); }
private object[,] GetRandomImage(int AHeight, int AWidth) { object[,] LColors = new object[AHeight, AWidth]; McKayRandom LRandom = new McKayRandom(); for (int i = 0; i < AHeight; i++) { for (int j = 0; j < AWidth; j++) { LColors[i, j] = LRandom.RandomColor(); // This stuff added for a more consistent color scheme // removed for faster rendering //LColors[i,j] = LRandom.RandomColor(Color.Green); } } return(LColors); }