diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-04-13 09:24:47 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-04-13 09:24:47 +0200 |
| commit | ae055f1fc993d406939f57f11553d218e1efde82 (patch) | |
| tree | 4a9e03d6eb9afc38cfd7e1735f7b70f17bdcf0d3 /utils/invert.c | |
| parent | 72e018b066bd5cc3ce0181b43865a227e8b9b6ec (diff) | |
| download | cubecore-ae055f1fc993d406939f57f11553d218e1efde82.tar.gz cubecore-ae055f1fc993d406939f57f11553d218e1efde82.zip | |
Simplified moves and trans
Diffstat (limited to 'utils/invert.c')
| -rw-r--r-- | utils/invert.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/invert.c b/utils/invert.c new file mode 100644 index 0000000..ff01bee --- /dev/null +++ b/utils/invert.c | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | #include <inttypes.h> | ||
| 3 | #include <stdbool.h> | ||
| 4 | |||
| 5 | #include "../cube.h" | ||
| 6 | |||
| 7 | #define STRLENMAX 1000 | ||
| 8 | |||
| 9 | int main(void) { | ||
| 10 | char str[STRLENMAX]; | ||
| 11 | cube_t cube; | ||
| 12 | |||
| 13 | fgets(str, STRLENMAX, stdin); | ||
| 14 | cube = readcube("H48", str); | ||
| 15 | writecube("H48", inverse(cube), str); | ||
| 16 | fputs(str, stdout); | ||
| 17 | |||
| 18 | return 0; | ||
| 19 | } | ||
