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 after getting the code to work with a single letter. To do this, we’ll 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’s in the wrong position:

Get hands-on with 1200+ tech skills courses.