Grid layout demo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mastermind implementation | |
from itertools import * | |
# functions for AI | |
# 1. calculate the response for a guess, given the true code | |
def responseToGuess(guess, true_code): | |
N = len(guess) | |
assert N == len(true_code), "Guess is not the same length as true code." | |
correct_pos = 0 |
NewerOlder