Skip to content

Terminal Breach

Contract terminal_breach. Extends Contract with:

The alien security terminal.

Returns: AlienTerminal

Test a list of exactly 15 whole-number digits (1-5) and get a GuessResult. Exact-position matches are removed first; .misplaced then counts shared remaining occurrences without over-counting duplicates (Mastermind scoring).

Returns: GuessResult · Raises: TypeError / ValueError

Whole-number code length (15).

Returns: number

MemberReturnsMeaning
.correctnumberDigits in the correct position
.misplacednumberCorrect digits in wrong positions

Approach: deduce digit counts first (constant guesses of all-1s through all-5s), then resolve positions; transmit the code.