static void HardLevelQuestions(char[,] fretBoard, int fret, ref int correct) { Random rand = new Random(); int rootString = 0; int n = 4; int[] scrambleQuestions = RandomQuestions(n); int[] randomFrets = new int[4]; string[,] notes = Scales.Notes(); for (int i = 0; i < 4; ++i) { randomFrets[i] = rand.Next() % 6 + 1; } for (int i = 0; i < 4; ++i) { Console.WriteLine("Question{0}", i + 1); fret = randomFrets[i]; switch (scrambleQuestions[i]) { case 1: fretBoard = Scales.ReturnAMajorScale(OpenChords.ResetFretBoard(fretBoard), ref rootString); DisplayFretBoard(fretBoard, fret); Console.WriteLine("What kind of scale is this?" + '\n' + "(1)Major (2)Minor (3)Major Pentatonic (4)Minor Pentatonic"); int ans11 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[rootString, fret + 1], notes[rootString, fret + 2], notes[rootString, fret + 3]); int ans12 = int.Parse(Console.ReadLine()); if (ans11 != 1 || ans12 != 1) { Console.WriteLine("Wrong answer! This is a Major scale with root note {0}.", notes[rootString, fret + 1]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 2: fretBoard = Scales.ReturnAMinorScale(OpenChords.ResetFretBoard(fretBoard), ref rootString); DisplayFretBoard(fretBoard, fret); Console.WriteLine("What kind of scale is this?" + '\n' + "(1)Major (2)Minor (3)Major Pentatonic (4)Minor Pentatonic"); int ans21 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[rootString, fret], notes[rootString, fret - 1], notes[rootString, fret + 1]); int ans22 = int.Parse(Console.ReadLine()); if (ans21 != 2 || ans22 != 3) { Console.WriteLine("Wrong answer! This is a Minor scale with root note {0}.", notes[rootString, fret + 1]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 3: fretBoard = Scales.ReturnAMajorPentatonicScale(OpenChords.ResetFretBoard(fretBoard), ref rootString); DisplayFretBoard(fretBoard, fret); Console.WriteLine("What kind of scale is this?" + '\n' + "(1)Major (2)Minor (3)Major Pentatonic (4)Minor Pentatonic"); int ans31 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[rootString, fret + 2], notes[rootString, fret + 1], notes[rootString, fret + 3]); int ans32 = int.Parse(Console.ReadLine()); if (ans31 != 3 || ans32 != 2) { Console.WriteLine("Wrong answer! This is a Major pentatonic scale with root note {0}.", notes[rootString, fret + 1]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 4: fretBoard = Scales.ReturnAMinorPentatonicScale(OpenChords.ResetFretBoard(fretBoard), ref rootString); DisplayFretBoard(fretBoard, fret); Console.WriteLine("What kind of scale is this?" + '\n' + "(1)Major (2)Minor (3)Major Pentatonic (4)Minor Pentatonic"); int ans41 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[rootString, fret - 1], notes[rootString, fret], notes[rootString, fret + 1]); int ans42 = int.Parse(Console.ReadLine()); if (ans41 != 4 || ans42 != 3) { Console.WriteLine("Wrong answer! This is a minor pentatonic scale with root note {0}.", notes[rootString, fret + 1]); } else { Console.WriteLine("Correct!"); ++correct; } break; } } }
static void MediumLevelQuestions(char[,] fretBoard, int fret, ref int correct) { int n = 10; Random rand = new Random(); int[] chosenQuestions = RandomQuestions(n); int[] randomFrets = new int[4]; string[,] notes = Scales.Notes(); for (int i = 0; i < 4; ++i) { randomFrets[i] = rand.Next() % 6 + 1; } for (int i = 0; i < 4; ++i) { Console.WriteLine("Question{0}", i + 1); fret = randomFrets[i]; switch (chosenQuestions[i]) { case 1: fretBoard = BarreChords.String6Major(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans11 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[5, fret + 1], notes[4, fret + 2], notes[5, fret]); int ans12 = int.Parse(Console.ReadLine()); if (ans11 != 1 || ans12 != 3) { Console.WriteLine("Wrong answer! This is a E Major shape with root note {0}.", notes[5, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 2: fretBoard = BarreChords.String6Minor(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans21 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[5, fret], notes[4, fret + 2], notes[5, fret + 1]); int ans22 = int.Parse(Console.ReadLine()); if (ans21 != 2 || ans22 != 1) { Console.WriteLine("Wrong answer! This is a E minor shape with root note {0}.", notes[5, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 3: fretBoard = BarreChords.String5Major(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans31 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[5, fret], notes[4, fret + 1], notes[4, fret]); int ans32 = int.Parse(Console.ReadLine()); if (ans31 != 1 || ans32 != 3) { Console.WriteLine("Wrong answer! This is a A Major shape with root note {0}.", notes[4, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 4: fretBoard = BarreChords.String5Minor(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans41 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[4, fret + 2], notes[4, fret], notes[5, fret]); int ans42 = int.Parse(Console.ReadLine()); if (ans41 != 2 || ans42 != 2) { Console.WriteLine("Wrong answer! This is a A minor shape with root note {0}.", notes[4, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 5: fretBoard = BarreChords.String6Seventh(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans51 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[5, fret + 3], notes[5, fret], notes[4, fret + 1]); int ans52 = int.Parse(Console.ReadLine()); if (ans51 != 3 || ans52 != 2) { Console.WriteLine("Wrong answer! This is a E7 shape with root note {0}.", notes[5, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 6: fretBoard = BarreChords.String6MinorSeventh(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans61 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[4, fret + 1], notes[4, fret + 3], notes[5, fret]); int ans62 = int.Parse(Console.ReadLine()); if (ans61 != 4 || ans62 != 3) { Console.WriteLine("Wrong answer! This is a Em7 shape with root note {0}.", notes[5, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 7: fretBoard = BarreChords.String6MajorSeventh(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans71 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[5, fret], notes[4, fret + 1], notes[5, fret + 4]); int ans72 = int.Parse(Console.ReadLine()); if (ans71 != 5 || ans72 != 1) { Console.WriteLine("Wrong answer! This is a Emaj7 shape with root note {0}.", notes[5, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 8: fretBoard = BarreChords.String5Seventh(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans81 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[5, fret + 1], notes[4, fret], notes[4, fret + 2]); int ans82 = int.Parse(Console.ReadLine()); if (ans81 != 3 || ans82 != 2) { Console.WriteLine("Wrong answer! This is a A7 shape with root note {0}.", notes[4, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 9: fretBoard = BarreChords.String5MinorSeventh(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans91 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[4, fret], notes[5, fret], notes[5, fret + 2]); int ans92 = int.Parse(Console.ReadLine()); if (ans91 != 4 || ans92 != 1) { Console.WriteLine("Wrong answer! This is a Am7 shape with root note {0}.", notes[4, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; case 10: fretBoard = BarreChords.String5MajorSeventh(OpenChords.ResetFretBoard(fretBoard)); DisplayFretBoard(fretBoard, fret); Console.WriteLine("Which shape is this?" + '\n' + "(1)Major (2)Minor (3)Seventh (4) Minor Seventh (5)Major Seventh"); int ans101 = int.Parse(Console.ReadLine()); Console.WriteLine("Which is the root note?" + '\n' + "(1) {0} (2) {1} (3) {2}", notes[4, fret + 2], notes[4, fret], notes[5, fret]); int ans102 = int.Parse(Console.ReadLine()); if (ans101 != 5 || ans102 != 2) { Console.WriteLine("Wrong answer! This is a Amaj7 shape with root note {0}.", notes[4, fret]); } else { Console.WriteLine("Correct!"); ++correct; } break; } } }