Skip to content

Commit 7177254

Browse files
author
TehPers
committed
More changes
1 parent 4d2d856 commit 7177254

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Unchanged from normal Cubically
165165
| 5_ | `P`| `Q`| `R`| `S`| `T`| `U`| `V`| `W`| `X`| `Y`| `Z`| `[`| `\`| `]`| `^`| `_`|
166166
| 6_ | `` ` `` | `a`| `b`| `c`| `d`| `e`| `f`| `g`| `h`| `i`| `j`| `k`| `l`| `m`| `n`| `o`|
167167
| 7_ | `p`| `q`| `r`| `s`| `t`| `u`| `v`| `w`| `x`| `y`| `z`| `{`|`\|`| `}`| `~`| |
168-
| 8_ | ``| ``| ``| ``| ``| ``| ``| ``| ``| ``| `×`| `÷`| ``| ``| ``| ``|
168+
| 8_ | ``| ``| ``| ``| ``| ``| ``| ``| ``| ``| ``| ``| ``| `ċ`| ``| `Ċ`|
169169
| 9_ | ``| `¹`| `²`| `³`| ``| ``| ``| ``| ``| ``| `¬`| `«`| `»`| | | |
170170
| A_ | `𝟘`| `𝟙`| `𝟚`| `𝟛`| `𝟜`| `𝟝`| `𝟞`| `𝟟`| `𝟠`| `𝟡`| | | | | | |
171171
| B_ | `½`| | | | | | | | | | | | | | | |

cube.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function Cube:index(x, y)
3232
end
3333

3434
function Cube:solved()
35-
return self:value(0) == 0 and self:value(1) == 18 and self:value(2) == 27
35+
return self:value(0) == 0 and self:value(1) == self.size ^ 2 and self:value(2) == 2 * self.size ^ 2
3636
end
3737

3838
local function rotateFace(cube, face)

cubically.lua

+2-8
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ function C:exec(program)
5151
self.didCommand = true
5252
self.doElse = false
5353
end
54-
elseif self.codepage:faceindex(b) then
55-
-- Face-valued index selection
56-
error("Unexpected superscript")
57-
elseif self.codepage:constindex(b) then
58-
-- Constant index selection
59-
error("Unexpected subscript")
6054
elseif self.conditionFailed then
6155
-- Command being skipped by a conditional
6256

@@ -168,7 +162,7 @@ function C:value(n, index)
168162
elseif n == 7 then
169163
return self.input
170164
elseif n == 8 then
171-
return self.cube:solved() and 1 or 0
165+
return self.cube:solved() and 0 or 1
172166
else
173167
return 0
174168
end
@@ -295,7 +289,7 @@ C.commands = {
295289
[')'] = function(self, n)
296290
local label = table.remove(self.loops)
297291
if label then
298-
if (not n or n ~= 0) and (not label.args or table.iterator(label.args).any(function(arg) return self:value(arg) ~= 0 end)) then
292+
if (not n or n ~= 0) and (not label.args or table.iterator(label.args):any(function(arg) return self:value(arg) ~= 0 end)) then
299293
-- Jump to the `(`
300294
self.ptr = label.ptr
301295
return

input.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
2

program.cb

+17-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
R'DR$:7+0"6
1+
₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉
2+
𝟘 𝟙 𝟚 𝟛 𝟜 𝟝 𝟞 𝟟 𝟠 𝟡
3+
⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹
4+
UR'UF'D2
5+
■:𝟘
6+
7+
$:7(UR'UF'D𝟚-𝟙)6
8+
(
9+
D𝟚FU'RU'
10+
:7(𝟛₂-𝟙)6
11+
:7(𝟛₅-𝟙)6
12+
:7(𝟛₂-𝟙)6
13+
:7(𝟛₅-𝟙)6
14+
𝟙₀
15+
"8
16+
#
17+
)8

0 commit comments

Comments
 (0)