Skip to content

Instantly share code, notes, and snippets.

@crabcrabcam
Created April 4, 2017 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crabcrabcam/266741408823b6f881f6bf279d50cf31 to your computer and use it in GitHub Desktop.
Save crabcrabcam/266741408823b6f881f6bf279d50cf31 to your computer and use it in GitHub Desktop.
Making some tea with Psudocode
#Making tea
getStuffReady(stuff: [teaBag, teaCup, kettle, water, milk, sugar,
spoon])
kettle.boil()
teaBag.put(in: teaCup)
while (kettle.water.state != boiled) {
wait(for: "boiledWater")
}
teaCup.add(kettle.water)
teaBag.strain(with: spoon)
while (sugar < sugarTotal / 2) {
teaCup.add(sugar)
}
teaCup.stir(with: spoon)
teaCup.remove(teaBag)
#Teabag in sink, spoon in bin
teaBag.put(in: bin)
if (milkWanted) {
milk.add(to: cup)
}
teaCup.stir(with: spoon)
while (sugar < sugarTotal) {
teaCup.add(sugar)
}
teaCup.stir(with: spoon)
while (!teaCup.isEmpty) {
teaCup.drink(teaCup.contents)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment