Skip to content

Instantly share code, notes, and snippets.

View JoshuaPaulBarnard's full-sized avatar
:atom:

Joshua Paul Barnard JoshuaPaulBarnard

:atom:
View GitHub Profile
@kweimann
kweimann / mastermind.py
Last active March 22, 2021 17:36
Mastermind board game (with guessing algorithm)
import random
class CodeMaker(object):
def make_code(self):
"""
code maker invents a secret code
"""
raise NotImplemented()
## Empty list -- just use the empty environment for this.
nil <- function() {
emptyenv()
}
## Test if a list is the empty list:
is_empty <- function(lis) {
identical(lis, nil())
}