More helpfully: Try writing it out in very plain language. For example:
1) Simon plays a short melody (How short?)
2) Player responds with...
Be as specific as you possibly can. Each step should be as small of an action as possible. Hopefully, this description will suggest some programming. If not, it will be a list of specific questions that somebody else (such as myself) could answer.