# Pizza Delivery

Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Pizza Delivery is yet another esolang by Cortex designed to be similar to the logic of other Cortex languages, but more concise. It is named after the Spider-Man 2 Pizza Theme (despite having no real relation), and it is ideal that you play the song on loop while coding in Pizza Delivery. Its data model is technically a 2-dimensional array of cells, but Cortex prefers to call it a square. It might be a finite-state automaton.

## Squares

The square is a 16x16 "grid" of numbers. Each "tile" in the square can have a value from 0 to 255. For the sake of brevity, this explanation will use a 4x4 square instead of the standard 16x16. At the start of the program, the square would look like this (an asterisk indicates the location of the pointer):

```[*0,0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
```

When a tile is selected, you can read and write to the value of the tile.

## Commands

Character What it does
`wasdqezc` Move the pointer in the square north, west, south, east, northwest, northeast, southwest, or southeast
`?` Get a number from user input and write it to the selected tile.
``` Print the value of the selected tile (which will from here on be referred to as L) as an ASCII value
`+-*` Increment, decrement, or double the selected tile
`:`
Next character Value written to L
`P` Whether L is prime or not. (0 for false, 1 for true)
`E` Whether L is even.
`R` Pseudocode: charCode(rot13(String.fromCharCode(L)))
Example Example
Example Example
Example Example
Any sequence of hex digits from 0-F Write that number to the selected tile. (letters must be capital)
`@` Interpret L as Pizza Delivery code.
`.` End the program.
`/`, `\`, and any whitespace Nop.
`[` While L is nonzero
`(` While L is zero
`]` End while
`{` Toggle `[` and `(` between while and if statements
`#` Begin or end a comment

## Examples

### Hello, World!

```21d64d72d57d20d2Cd6Fd6Cd65d48`a`a``a`a`a`a`ddd`aaaa`ddddd`aaaaaa`a`.
```

### 1 character cat program

Input must be the character's ASCII value.

```?`.
```

### Truth-machine

```?[31`]30`.
```

```?:P`.
```