Duck Duck Goose

Duck Duck Goose is an esoteric programming language created by User:Vriskanon (inspired by a joke made by Connor Lawman), with function inspired, in part, by Chicken and brainfuck. The only input commands are 'Duck', 'Goose' and '\n'. The code is made up of integer variables called 'duck's, a pointer called the 'goose' and an integer variable that is outside of the circle of ducks called the 'teacher'.

Program entities

 * Duck
 * Variable with position in the code. Must have integer value. Starts at 0.


 * Goose
 * Non-Variable with ability to become duck (ducks can become geese). Cannot hold any values. Acts as centre of command.


 * Teacher
 * A single variable that is not a duck or goose and is not in the circle.

How to use
The first line sets the number of ducks in the code. E.g:

"duck duck duck goose" would create three ducks and a goose in the code. The line must end with goose. There is always exactly one goose.

The ducks and goose are in a circle, meaning that the position of every duck is always relative to the goose.

Further commands follow this format:

N ducks (e.g. "duck duck" would cause N to be two) followed by \n.

OPTIONAL: Y ducks. Some commands require a Y value as well as an N. This is followed with \n.

A blank line causes N or Y (Y if N is already set) to be 0.

Command line. This is a number of ducks (e.g. one for print). End with "goose" and \n.

Examples
The code to print the ascii character corresponding with the duck two to the left of the goose is:

duck duck #This is 'N'

duck goose #This is the command

The code to add the values of the Ducks one and two to the left of the Goose is:

duck #This is 'N'

duck duck #This is 'Y'

duck duck goose #This is the command

Duck duck goose is not case sensitive. All strings that are not 'duck' and 'goose' are ignored as well as ALL strings after a #. Therefore, the code could look like this:

DuCk ghfhghdgdfhfhdh DUCK duckfffffffffduckddddddducgooSE&&&&@@

However, for ease of reading it is conventional to code in all lower case with a single space between ducks and geese.

Duck inputs
(Nth duck = Nth duck to the left of the goose.

Yth duck = Yth duck to the left of the goose.)

Hello World
duck duck duck duck duck duck duck duck goose

duck duck

duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck duck duck duck duck duck duck duck

duck

duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck duck duck duck

duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck

duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck duck goose

duck duck

duck duck duck duck duck duck duck

duck duck goose

duck duck duck duck duck duck duck

duck duck duck duck duck

duck duck goose

duck duck

duck goose

duck duck duck

duck duck duck duck duck duck duck

duck duck goose

duck duck duck duck duck duck

duck goose

duck

duck duck duck duck

duck duck duck goose

duck duck duck duck duck duck duck duck

duck duck duck

duck duck duck goose

duck

duck goose

duck

duck goose

duck

duck duck duck duck

duck duck goose

duck duck duck duck duck duck duck duck

duck duck duck

duck duck goose

duck

duck duck duck duck

duck duck goose

duck duck duck duck duck duck duck duck

duck goose

duck duck duck duck duck duck

duck duck duck

duck duck goose

duck duck duck

duck duck duck duck duck duck

duck duck goose

duck duck duck duck duck duck

duck goose

duck

duck duck duck

duck duck duck goose

duck duck duck duck duck duck duck duck

duck goose

duck duck duck duck duck duck duck

duck goose

duck duck duck duck duck duck duck

duck duck

duck duck goose

duck duck

duck duck duck duck duck duck

duck duck goose

duck duck duck duck duck duck duck

duck duck

duck duck goose

duck duck

duck goose

duck duck duck

duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck duck duck duck duck duck

duck duck

duck duck duck duck duck duck duck duck duck goose

duck duck duck duck duck duck duck duck

duck duck

duck duck duck goose

duck

duck duck

duck duck duck goose

duck duck duck duck duck duck

duck

duck duck duck goose

duck duck duck

duck duck duck duck duck

duck duck goose

duck duck

duck duck duck duck duck duck duck duck duck duck goose

duck duck duck duck duck duck duck duck

duck goose

duck duck duck

duck

duck duck duck goose

duck duck duck duck duck duck

duck goose

goose

Cat program
duck duck goose

duck

duck

duck duck goose

duck

duck

duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck goose

duck

duck goose

duck

duck duck duck duck duck duck duck duck duck duck goose

goose

Truth-machine
duck duck duck goose

duck

duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck duck

duck duck duck

duck duck duck duck goose

duck duck duck

duck duck

duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck goose

duck duck

duck

duck duck duck duck duck duck duck duck duck duck duck goose

duck duck duck

duck duck

duck duck duck goose

duck

duck

duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck duck

duck duck goose

duck duck duck

duck

duck duck goose

duck

duck goose

duck duck duck duck duck duck duck duck duck duck goose

duck

duck duck

duck duck goose

duck duck duck

duck goose