Skip to content

Instantly share code, notes, and snippets.

@cschubiner
cschubiner / gist:452e4cea2ab55844c77b635a73495ad0
Created April 6, 2024 22:08
VictorTaelin prompt challenge
Here is a system with 4 tokens: `A#`, `%A`, `B#` and `%B`.
One program to solve with this system is the following sequence of tokens:
B# A# B# %A B#
To *compute* a program, we must rewrite neighbor tokens, using the rules:
A# %A ... becomes ... nothing
A# %B ... becomes ... %B A#
from random import shuffle, choice
# Initialize players and cards
players = [{'hand': [], 'protected': False, 'eliminated': False} for _ in range(4)]
initial_deck = [1] * 5 + [2] * 2 + [3] * 2 + [4] * 2 + [5] * 2 + [6] * 1 + [7] * 1 + [
8] * 1 # Card counts based on Love Letter rules
def simulate_one_round(starting_card):
# Shuffle the deck and draw initial cards for players

Keybase proof

I hereby claim:

  • I am cschubiner on github.
  • I am clayschubiner (https://keybase.io/clayschubiner) on keybase.
  • I have a public key ASCSMSpiqBH_Tm4SjOZrJRpc_Z82I3nYor_9TJw9FJJLiAo

To claim this, I am signing this object:

@cschubiner
cschubiner / uncrustify.cfg
Last active August 29, 2015 14:00
uncrustify.cfg file for xcode autoformatting with BBUncrustifyPlugin-Xcode
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
@cschubiner
cschubiner / shell config.sh
Last active December 20, 2015 17:19
shell config
git clone git://zsh.git.sf.net/gitroot/zsh/zsh
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
chsh -s /bin/zsh
echo "set .zshrc plugins to 'git brew vi-mode'"
echo "Possibly also set zsh theme to 'random'"
@cschubiner
cschubiner / zshrc
Last active December 20, 2015 17:18
clay schubiner zshrc config
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
DISABLE_UPDATE_PROMPT=true