Advancing the Design With Two-letter Combinations

We can proceed to add tests aimed at getting the code to handle two-letter combinations. This is an obvious step to take after getting the code to work with a single letter. To do this, we will need to introduce a new concept into the code: a letter can be present in the word, but not in the position we guessed it to be.

Let’s begin by writing a test for a second letter that is in the wrong position:

Get hands-on with 1200+ tech skills courses.