Domino Crisis

From Esolang
Jump to navigation Jump to search
The title of this article is not correct because of technical limitations. The correct title is actually .

I don't have enough figure, so I can only made by textual.

Domino Crisis is a NON-TEXTUAL Esolang based on Dominoes.

It may be difficult to understand, but you can write a program as long as you follow the text program.

Intro

I.E., you have a lot of stuff around you that you can program.

Syntax

The Red domino is output. You need a sticky note to show the comment and format.

The Blue domino is define variables. You need a LEGO(any color) to define a variable(The premise is that you have enough variable identifiers). You may also need a sticky note, too(to show its type (and value)).

The White domino is input. You need a LEGO and a sticky note to show format and comment.

The Light Blue domino is assignment. You need a LEGO(any color if it is defined) to assignment a variable(The premise is that you have enough same variable identifiers). You may also need a sticky note, too(to show its type and value).

The Light Green is NOP.

The Orange is binary operator. You need purple to show its type.

Binary operators
The number of purples Code
1 +
2 -
3 *
4 /
5 ==
6 >
7 <
8 >=
9 <=
10 !=
11 &&
12 ||

The Dark Green is !(with black reversi piece) or ~(with white reversi piece).

There are three special variables: Brown(True), Pink(False) and Black(User input).

You can use these script to get while-cycle. (Use white domino, Vertical bar is Vertically domino, Minus is Horizontally domino.)

 -----Conditional expression------ 
|       cycled script             |
 --------------------------------- 

You can use these script to get for-cycle. (Use red domino, Capital I is Vertically domino, Underline is Horizontally domino.)

 _____Control variable initialization expression__________ 
I              (for-cycle script)                         I
 _____Conditional expression___Incremental expressions____ 

You can use these script to get if-block. (Use white domino, Vertical bar is Vertically domino, Minus is Horizontally domino.)

   Conditional expression
              |
------------------------------
|                            |
[First block]   [Second block]

Or these.

         Expression
              |
 ----------------------------
 |     |     |              |
[1]   [2]   [3]   [...]    [n]
# Every branch needs a expression.

There are a lot of syntax, here are just a few of them.

Programs

Hello, world

Red
["Hello, world!"]

A+B

Blue (White)(Red)(Blue)[int]

White    White
[(Red)]  [(Blue)]

Light Blue (White)--[(Red) Orange{1 purple} (Blue)]

Red
[(White)]

99 bottles of beers

 __________________________________<Blue (Y-Green)[int, 99]>_________________________________________ 
I<Maroon ["%d bottles of beers on the wall, \n", (Y-Green)]>                                         I
I<Maroon ["%d bottles of beers. \n", (Y-Green)]>                                                     I
I<Red ["Take 1 down, pass it around, \n"]>                                                           I
I<Maroon ["%d bottles of beers on the wall. \n", ((Y-Green) Orange{2 Purple} [1])]>                  I
 _____<(Y-Green) Orange{6 Purple} [0]>___<Light Blue (Y-Green)--[(Y-Green) Orange{2 Purple} [1]]>____ 
Red ["No more bottles of the beers on the wall, \nNo more bottles of the beers.\n"]
Red ["Go to the store and buy some more, \n99 bottles of the beers on the wall."]

Truth Machine

Blue (Red)[int]
White [(Red)]
   <(Red)Orange Purple*5[0]>
               |
 ------------------------------
 |                            |
 Red ["0"]                    |
-------------------------------
|
|
---------------------------------------------------
                                                  |
  _____________________________________________<[1]>__________________________________________________ 
 I<Red ["1"]>                                                                                         I
  _________________________________________<Light Green>______________________________________________ 

Implementation

Never.