-
Notifications
You must be signed in to change notification settings - Fork 5
Parts of a Shapes program
Before shapes and paths, colors! So the program knows what things means. Put colors for shapes on the far left edge. Put colors for paths on the far right edge. Put background colors in bottom edge. background colors will be ignore by the interpreter. Shape colors and path Colors can't have a color in common.
There are soooooo many shapes! Shapes have sides. Shapes can be convex or concave. Shapes can be circular as well. Shapes can also have other shapes inside of them as holes. Words are hard so here are examples.
As you can see, saying "concave four sided shape with a convex seven sided hole" every time, is not fun.
Introducing, Niko Shape Notation (NSN)!
{number of sides of shape} {is shape convex?}: {number of holes of shape}
{number of sides of shape} {is shape convex?}: {does the shape have any holes?}
{number of sides of shape} {is shape convex?}: {number of sides of first hole of shape} {is the first hole of shape convex?}, {number of sides of second hole of shape} {is the second hole of shape convex?}, ..., {number of sides of last hole of shape} {is the last hole of shape convex?}
NSN | English |
---|---|
1 yes : 3 yes | Convex 1 sided shape with one convex 3 sided hole. |
6 yes : 4 idk | Convex 6 sided shape with one 4 sided hole. |
8 no : no | Concave 8 sided shape with no holes |
7 no : yes | Concave 7 sided shape with more than zero holes |
8 no : idk idk | Concave 8 sided shape with one any sided hole, convex or concave |
6 yes : 3 | Convex 6 sided shape with 3 holes |
6 yes : idk | Convex 6 sided shape with any number of holes |
idk means it could be anything. If this answers "the number of holes", it means it could have any number of holes. If this answers "is shape convex?", the shape could be convex or concave.
BTW, i don't know if I'm using the term "Instruction pointer" right. Feel free to create an issue to correct this. You can also do this to correct any part of this wiki.
Path connects shapes. By default, the Instruction pointer decides where to move by the following algorithm:
- If this is start, go to only connecting shape.
- If not start, for every connecting point that is not where I came from, let p be the farthest path from the connecting point that I came from.
- for every shape connected with p, go to the nearest one
- If I can't go anywhere else but go back to where I am from, end program by dead end.
The program above should print "1"
Thank you for reading all the way :)