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!"
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 | |
''' | |
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. |
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!"
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 play a game against Malory, in which you choose points on the 2D plane and Malory wins if she can cover them by using non-overlapping pennies (disks of radius 1). Show a minimal set of points that guarantees you a win.
At low numbers of dots, Malory is favoured (if there is 1 dot, just cover it with 1 circle), and at high numbers of dots you are favoured (e.g. by using a grid approach like https://www.desmos.com/calculator/gwwcn40xcp)
Here's something that'll let you test out your theories: https://www.desmos.com/calculator/ifhtfwhnqm
In some future time, once bars may open again, Alice and her partner Bob head over to indulge in this way of socializing again. There are four other couples in the bar which, eager for social contact, do these cute footshakes with each person they haven't met before. After this initial mingling, Alice asks everyone how many people they did footshakes with. As some people knew each other beforehand, she gets nine different answers back.
How many footshakes did Bob do?
#include <iostream> | |
// This class was named X to be consistent with http://www.gotw.ca/gotw/076.htm | |
// | |
// Its primary purpose is to hold a private value which no one should be able | |
// to accidentally modify. | |
class X { | |
public: | |
X() : private_(1) { /*...*/ } | |
int getValue() { return private_; } |
#include <iostream> | |
// File x.h | |
// This class was named X to be consistent with http://www.gotw.ca/gotw/076.htm | |
// | |
// Its primary purpose is to hold a private value which no one should be able | |
// to accidentally modify. | |
class X | |
{ | |
public: |
from inputs import get_gamepad # pip install inputs | |
import threading | |
def deadzone(normalized_axis): | |
if abs(normalized_axis) < 0.1: return 0.0 | |
return normalized_axis | |
class ControllerInput: | |
def __init__(self): | |
# self.fThrottle = 0.0 |