Skip to content

Instantly share code, notes, and snippets.

View DomNomNom's full-sized avatar

DomNomNom DomNomNom

View GitHub Profile

You arrive to the island of New Three Land where King Threeodore has a peculiar problem: He likes to take a tour from his castle through the country by only taking alternating left and right turns at intersections. Due to the consitution (the Charters of Threedom) all intersections must have exactly three roads leading in/out and dead ends are forbidden. These tours have always lead him back to the castle and he is worried that changing his place of residency may mean an end to this tradition.

Can you assure King Theeodore that no matter where he starts, a left/right tour will return him to the same spot?

You enter the dungeon on via the west entrance and spot nine magical Torches in an arrangement like so

..T.T.T
.......
@.T.T.T
.......
..T.T.T

The walls rumble! You hear "Ignite all torches or the ceiling will crumble!"

'''
This is a logic puzzle which allows you to check your solution using Python.
Alice and Bob have once again been imprisoned under the watch of a crazy logician warden
who promises to let them free if they can solve the puzzle or otherwise they face a terrible fate.
The warden picks five cards from a standard playing card deck and gives them to Alice.
Alice may stack the cards in any order then give them back to the warden.
The warden will give the top four cards of the stack to Bob.
Bob must now deduce which card the warden is still holding.
@DomNomNom
DomNomNom / light_horn.py
Created May 22, 2022 14:35
A visualization of a curve that tries to effectively trap light (slow it down quickly)
import pyqtgraph as pg
import numpy as np
import sys
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QApplication, QHBoxLayout, QLabel, QSizePolicy, QSlider, QSpacerItem, \
QVBoxLayout, QWidget