Skip to content

Instantly share code, notes, and snippets.

View DanielSherlock's full-sized avatar

Daniel Sherlock DanielSherlock

View GitHub Profile
@DanielSherlock
DanielSherlock / readme.md
Last active October 18, 2018 15:34
PuzzleScript N Queens Puzzle
@DanielSherlock
DanielSherlock / readme.md
Last active October 18, 2018 15:41
PuzzleScript Knight's Tour
@DanielSherlock
DanielSherlock / readme.md
Last active April 18, 2018 20:30
PuzzleScript Towers of Hanoi
@DanielSherlock
DanielSherlock / readme.md
Last active April 17, 2018 22:23
PuzzleScript Solitaire
@DanielSherlock
DanielSherlock / tmp2.py
Last active August 29, 2015 14:11
challenge8b_tmp1.py
phase = "phaseeight"
txtcl = ['aosriliaoeddaitihpkywnraa', 'ffiwppssaeiystascplneopha', 'cietascgoeeiaeoiedyaieaae', 'aolaatidtinedrlihislneoup', 'erhntooecdagnltittostlltr', 'utleelhdtifdnicyuegnedinr', 'ososxeiobslnthiieasvgottc', 'tdsrefpeboemhtysintsoiocr']
def shift_crib_to_letter(col, letter):
result = []
i = 0
len_cond = len(col)
while i < len_cond:
@DanielSherlock
DanielSherlock / die.py
Created November 13, 2014 17:08
The die and dicebag libraries, (roughly) according to: http://redd.it/2luobv - written in python, though was originally written in racket (hence the unpythonic nature of some parts). Suggestions for improvements welcome.
import random
class die(object):
def __init__(self, faces = 6, colour = False):
self.value = False
self.held = False
self.colour = colour
@DanielSherlock
DanielSherlock / die-dicebag.rkt
Last active August 29, 2015 14:09
The die and dicebag libraries, (roughly) according to: http://redd.it/2luobv - written in racket be a (mainly)beginner of the language. Suggestions for improvements welcome.
#lang racket
;; Dicebag library, (roughly) as according to:
;; http://redd.it/2luobv
;; ---------------------------------
;; To include, use (require "die-dicebag.rkt")
;; - must be in the same directory as die.rkt
;; - using the dicebag library auto-includes the die library
(require "die.rkt")