diff options
Diffstat (limited to 'example/example.cpp')
| -rw-r--r-- | example/example.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/example.cpp b/example/example.cpp index c7ec982..3fa7d66 100644 --- a/example/example.cpp +++ b/example/example.cpp | |||
| @@ -6,18 +6,18 @@ extern "C" { | |||
| 6 | #include "../cube.h" | 6 | #include "../cube.h" |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | cube_t apply_alg(cube_t cube, std::vector<move_t> *moves) { | 9 | cube_t apply_alg(cube_t cube, std::vector<move_t>& moves) { |
| 10 | auto ret = cube; | 10 | auto ret {cube}; |
| 11 | 11 | ||
| 12 | for (auto m : *moves) | 12 | for (auto m : moves) |
| 13 | ret = cube_move(ret, m); | 13 | ret = cube_move(ret, m); |
| 14 | 14 | ||
| 15 | return ret; | 15 | return ret; |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | int main() { | 18 | int main() { |
| 19 | auto cube = cube_new(); | 19 | auto cube {cube_new()}; |
| 20 | auto moves = new std::vector<move_t> { R, U, R3, U3 }; | 20 | std::vector<move_t> moves { R, U, R3, U3 }; |
| 21 | char cstr[500]; | 21 | char cstr[500]; |
| 22 | 22 | ||
| 23 | std::cout << "The solved cube looks like this in H48 notation:\n"; | 23 | std::cout << "The solved cube looks like this in H48 notation:\n"; |
