diff --git a/algorithms/basic_logic.bf b/algorithms/basic_logic.bf new file mode 100644 index 0000000..48f7b25 --- /dev/null +++ b/algorithms/basic_logic.bf @@ -0,0 +1,4 @@ +Endless loop +Affect: cell(ptr) + ++[ >< ] diff --git a/algorithms/basic_math.bf b/algorithms/basic_math.bf index 5f4c5d7..4e1df68 100644 --- a/algorithms/basic_math.bf +++ b/algorithms/basic_math.bf @@ -12,7 +12,3 @@ Subtraction: cell(ptr) = cell(ptr) _ cell(ptr x 1) Using: cell(ptr); cell(ptr x 1) > [ <->- ] < - -Conditional: if (cell(ptr) greater 0) then do stuff - -[ > *do stuff here* < [-] ] diff --git a/algorithms/rice_board.bf b/algorithms/rice_board.bf new file mode 100644 index 0000000..a2dbfea --- /dev/null +++ b/algorithms/rice_board.bf @@ -0,0 +1,5 @@ +, set the first cell +[ > ++ > + << - ] copy cell(ptr) to cell(ptr x 2) and two times to cell(ptr x 1) +>>[ << + >> - ] << move cell(ptr x2) back to cell(ptr) and move to cell(ptr) +> move forward to restart (not working, as no nested loops are implemented) +. output the double