created rewardEveryNCorrect code

Signed-off-by: Lindsey <glickfeld@neuro.duke.edu>