Thief, Police and the Building

From Esolang
Jump to navigation Jump to search

Thief, Police and the Building is a newly invented programming language but it isn't started to use by programmers, possibly because it's not so convenient.

The expanation of the commands are written in natural language. Here is the list:

Code

Init (You must write these)

  • A thief on [number]/F : It means that there is a thief on [number] /F, especially, when [number] is G , it means that the thief is on the ground floor. When [number] is a negative number, it means the thief is in the basement.
  • Set SoE -> [number]F/s : Set the speed of elevator to [number] floors per second.
  • Set SoS -> [number]F/s : Set the speed of climbing stairs to [number] floors per second.
  • top: [number]-th floor : Claim that the top floor is [number] -th floor.([number] >0 or [number] = G)
  • btm: [number]-th floor : Claim that the bottom floor is [number] -th floor. ([number] <0 or [number] = G)
[n/F char 1] [n/F char 2] [n/F char 3] ... [n/F char m]
[n-1/F char 1] [n-1/F char 2] [n-1/F char 3] ... [n-1/F char m]
[n-2/F char 1] [n-2/F char 2] [n-2/F char 3] ... [n-2/F char m]
...
[1/F char 1] [1/F char 2] [1/F char 3] ... [1/F char m]
G/F [G/F char 1] [G/F char 2] [G/F char 3] ... [G/F char m]
[-1/F char 1] [-1/F char 2] [-1/F char 3] ... [-1/F char m]
[-2/F char 1] [-2/F char 2] [-2/F char 3] ... [-2/F char m]
...
[-t/F char 1] [-t/F char 2] [-t/F char 3] ... [-t/F char m]

These bunch of things means all rooms from the n-th floor to basement t-th floor. Each floor has m rooms. Each room is a char.

Movement

  • He gets into the elevator and gets [string(up/down)]: The thief gets into the elevator and gets [string(up/down)].
  • He stays in the elevator for [number]s: The thief stays in the elevator for [number] seconds. In other words, he gets up/down [number] * SoE floors.
  • He gets into the stair room and gets [string(up/down)]: The thief gets into the elevator and gets [string(up/down)].
  • He stays in the elevator for [number]s: The thief stays in the stair room for [number] seconds. In other words, he gets up/down [number] * SoS floors.
  • He gets out.: The thief gets out from the elevator/stair room.
  • He climbs into [number]-th room and steals: The thief steals the [number]-th room on the floor. So a char was in his bag. This char is the same as the char in the Init part you just read:
  • The police have come: Print all the chars in the thief's bag in the order that he steals.

Example

Hello, World!

A thief on G/F
Set SoE -> 3F/s
Set SoS -> 1F/s
top: G-th floor
btm: -3-th floor
G/F H e l l o ,
a b c d e f
2 3 j k l m
W o r l d !
He climbs into 1-th room and steals
He climbs into 2-th room and steals
He climbs into 3-th room and steals
He climbs into 4-th room and steals
He climbs into 5-th room and steals
He climbs into 6-th room and steals
He gets into the elevator and gets down
He stays in the elevator for 1s
He gets out
He climbs into 1-th room and steals
He climbs into 2-th room and steals
He climbs into 3-th room and steals
He climbs into 4-th room and steals
He climbs into 5-th room and steals
He climbs into 6-th room and steals
The police have come