An exercise in implementing the logic behind the card game Hanabi.