Kaynağa Gözat

more documentation

Zoadian 10 yıl önce
ebeveyn
işleme
f1bcf510fb
1 değiştirilmiş dosya ile 34 ekleme ve 34 silme
  1. 34 34
      README.md

+ 34 - 34
README.md

@@ -2,37 +2,37 @@
 A programming game.
 
 # Instructions
-|Command            |Req InstSet | Req Mobile | Description                                     |
-|-------------------|------------|------------|-------------------------------------------------|
-|CREATE a,b,c       | 2          | 0          |                                                 |
-|MOVE               | 0          | 1          |                                                 |
-|DIE                | 0          | 0          |                                                 |
-|TRANS a,b          | 1          | 0          |                                                 |
-|RTRANS a,b         | 1          | 0          |                                                 |
-|TURN a             | 0          | 0          |                                                 |
-|JUMP a             | 0          | 0          |                                                 |
-|AJUMP a            | 0          | 0          |                                                 |
-|BJUMP a,b	        | 0          | 0          |                                                 |
-|SCAN #a            | 1          | 0          |                                                 |
-|FARSCAN #a, #b, c  | 1          | 0          |                                                 |
-|SET #a,b           | 0          | 0          | #a = b                                          |
-|ADD #a,b           | 0          | 0          | #a = #a + b                                     |
-|SUB #a,b           | 0          | 0          | #a = #a - b                                     |
-|MUL #a,b           | 0          | 0          | #a = #a * b                                     |
-|DIV #a,b           | 0          | 0          | #a = #a / b                                     |
-|MOD #a,b           | 0          | 0          | #a = #a % b                                     |
-|MIN #a,b           | 0          | 0          | #a = min(#a, b)                                 |
-|MAX #a,b           | 0          | 0          | #a = max(#a, b)                                 |
-|RANDOM #a,b,c      | 0          | 0          | #a = b + (rand() % (c - b + 1))                 |
-|IF a,b             | 0          | 0          | Execute next instruction if a == b else skip it |
-|IFN a,b            | 0          | 0          | Execute next instruction if a != b else skip it |
-|IFG a,b            | 0          | 0          | Execute next instruction if a > b else skip it  |
-|IFL a,b            | 0          | 0          | Execute next instruction if a < b else skip it  |
-|IFGE a,b           | 0          | 0          | Execute next instruction if a >= b else skip it |
-|IFLE a,b           | 0          | 0          | Execute next instruction if a <= b else skip it |
-|INIT a,b           | 0          | 0          |                                                 |
-|BREAK              | 0          | 0          |                                                 |
-|RESUME             | 0          | 0          |                                                 |
-|SEIZE              | 0          | 0          |                                                 |
-|SLEEP              | 0          | 0          |                                                 |
-|QUIT               | 0          | 0          |                                                 |
+| Command            | InstSet | Mobile | Description                                             | Failures |
+|--------------------|---------|--------|---------------------------------------------------------|----------|
+| CREATE a, b        | 2       | 0      | Create a new pogram with: instSet a; b banks; c mobile  |          |
+| MOVE               | 0       | 1      | Move the program one field                              |          |
+| DIE                | 0       | 0      | Destroy the program                                     |          |
+| TRANS a, b         | 1       | 0      |                                                         |          |
+| RTRANS a, b        | 1       | 0      |                                                         |          |
+| TURN a             | 0       | 0      | Turn by 90°; Turn right if a >= 0 else left             |          |
+| JUMP a             | 0       | 0      | Realtive jump for a instructions                        |          |
+| AJUMP a            | 0       | 0      | Jump to instruction a in current bank                   |          |
+| BJUMP a, b	     | 0       | 0      | Jump to instruction b in bank a                         |          |
+| SCAN #a            | 1       | 0      | Scan 1 field in front.<br> Set a to: 0 if empty; 1 if enemy; 2 if friend                         |          |
+| FARSCAN #a, #b, c  | 1       | 0      | Scan n fields in front.<br> Set a to: 0 if empty; 1 if enemy; 2 if friend;<br> Set b to distance |          |
+| SET #a, b          | 0       | 0      | #a = b                                                  |          |
+| ADD #a, b          | 0       | 0      | #a = #a + b                                             |          |
+| SUB #a, b          | 0       | 0      | #a = #a - b                                             |          |
+| MUL #a, b          | 0       | 0      | #a = #a * b                                             |          |
+| DIV #a, b          | 0       | 0      | #a = #a / b                                             |          |
+| MOD #a, b          | 0       | 0      | #a = #a % b                                             |          |
+| MIN #a, b          | 0       | 0      | #a = min(#a, b)                                         |          |
+| MAX #a, b          | 0       | 0      | #a = max(#a, b)                                         |          |
+| RANDOM #a, b, c    | 0       | 0      | #a = b + (rand() % (c - b + 1))                         |          |
+| IF a, b            | 0       | 0      | Execute next instruction if a == b else skip it         |          |
+| IFN a, b           | 0       | 0      | Execute next instruction if a != b else skip it         |          |
+| IFG a, b           | 0       | 0      | Execute next instruction if a > b else skip it          |          |
+| IFL a, b           | 0       | 0      | Execute next instruction if a < b else skip it          |          |
+| IFGE a, b          | 0       | 0      | Execute next instruction if a >= b else skip it         |          |
+| IFLE a, b          | 0       | 0      | Execute next instruction if a <= b else skip it         |          |
+| INIT a, b          | 0       | 0      | Start a new task at bank a instruction b                |          |
+| BREAK              | 0       | 0      | Stops other tasks, gives current task 100%              |          |
+| RESUME             | 0       | 0      | Resume all other tasks suspended by SEIZE               |          |
+| SEIZE              | 0       | 0      | Stops other tasks, gives current task 100% until RESUME |          |
+| SLEEP a            | 0       | 0      | Suspend current task a cycles                           |          |
+| QUIT               | 0       | 0      | Stops current task                                      |          |