diff options
Diffstat (limited to 'src/ctaklm.c')
| -rw-r--r-- | src/ctaklm.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ctaklm.c b/src/ctaklm.c index d7fd7c1..885da7a 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -6,24 +6,23 @@ int main(int argc, char **argv) { reset_state(5); - enum ACTION_RESULT res = try_place(0, 0x0001, STONE_FLAT); - res = try_place(1, 0x0001, STONE_FLAT); - const uint8_t d[1] = {1}; - res = try_move(1, M_LEFT, 1, d); + enum E_RESULT r = try_place(0, C_BLACK, STONE_FLAT); + r = try_place(1, C_BLACK, STONE_FLAT); + uint8_t drops[5] = {1,0,0,0,0}; + r = try_move(1, M_LEFT, 1, drops); uint8_t location; enum STONE_VARIANT stone; - enum PTN_PARSE_RESULT pr = parse_place(5, "Cb3", &location, &stone); + r = parse_place(5, "Cb3", &location, &stone); - printf("Place <%d>: stone %d at (%d,%d)\n",pr,stone,location%5,location/5); + printf("Place <%d>: stone %d at (%d,%d)\n",r,stone,location%5,location/5); enum MOVE_DIRECTION direction; uint8_t steps; - uint8_t drops[5]; - pr = parse_move(5, "3c2+12", &location, &direction, &steps, drops); + r = parse_move(5, "3c2+12", &location, &direction, &steps, drops); printf("Move <%d>: from (%d,%d) step %d sequence [%d,%d,%d,%d,%d]\n", - pr,location%5,location/5, + r,location%5,location/5, steps,drops[0],drops[1],drops[2],drops[3],drops[4]); char buf[10]; |
