private Bell2Note OptimizeNote(Bell2Note note) { if (note.Equals(new Bell2Note(Bell2Note.Keys.Note1, Bell2Note.Octaves.High)) && CurrentOctave == Bell2Note.Octaves.Low) { note = new Bell2Note(Bell2Note.Keys.Note8, Bell2Note.Octaves.Low); } else if (note.Equals(new Bell2Note(Bell2Note.Keys.Note8, Bell2Note.Octaves.Low)) && CurrentOctave == Bell2Note.Octaves.High) { note = new Bell2Note(Bell2Note.Keys.Note1, Bell2Note.Octaves.High); } return(note); }
public override void PlayNote(Note note) { var bell2Note = Bell2Note.From(note); if (RequiresAction(bell2Note)) { if (bell2Note.Key == Bell2Note.Keys.None) { PressNote(GuildWarsControls.EliteSkill); } else { bell2Note = OptimizeNote(bell2Note); PressNote(NoteMap[bell2Note.Key]); } } }
public override void GoToOctave(Note note) { var bell2Note = Bell2Note.From(note); if (RequiresAction(bell2Note)) { bell2Note = OptimizeNote(bell2Note); while (CurrentOctave != bell2Note.Octave) { if (CurrentOctave < bell2Note.Octave) { IncreaseOctave(); } else { DecreaseOctave(); } } } }
protected bool Equals(Bell2Note other) { return(Key == other.Key && Octave == other.Octave); }
private static bool RequiresAction(Bell2Note bell2Note) { return(bell2Note.Key != Bell2Note.Keys.None); }