I need to create a heads or tails project where the computer will guess randomly up to 5 times, but on the sixth time it will look into the playersGuessHistory variable setup as a string to see if it can find a match for a pattern of 4 entires. If there is a pattern found the computer will guess the next character after the pattern.
For example, given the sequence HHTTH the pattern is HHTT so the computer would guess H for the sixth turn. My only problem is that I'm having difficulty setting up the project so that it will look through the playersguesshistory and find the patterns and guess the next character in the history. Any suggestions?