Königsberg

From Esolang
Jump to navigation Jump to search

Königsberg is a esolang created by User:Yayimhere that uses a Graph. the name comes from the Königsberg bridge problem. it has pointers lines and nodes on a graph, where pointer creates nodes and line

syntax

3 things can be created:

(x, y, n)A create a node at x, y, with value n. this node is called A
{A, B}C a line between node A and node B. this line is called C
[A] create a pointer at node A

these are the rules. they will be executed after the definitions has been created:

  • a pointer, will move to the nearest node, drawing a line between each node it moves to
  • if there is the same distance between two nodes, it will split into two pointers, and each will move, to a different node
  • if a line connects two nodes, with the same number, that line will be deleted
  • if a line intersect another one, a node will be created where they cross
  • if the number of one node(lets call it n) is where k is the value of the other node the program will halt
  • if the pointer is on is a midpoint of n other nodes, a pointer will form on all of those nodes