#include "tak.h" enum E_RESULT try_ptn(char *ptn) { enum E_RESULT res; uint8_t location; if (likely_move(ptn)) { uint8_t steps, drops[5]; enum MOVE_DIRECTION direction; res = parse_move(board_size, ptn, &location, &direction, &steps, drops); if (res == PTN_VALID) res = try_move(location, direction, steps, drops); } else { enum STONE_VARIANT stone; res = parse_place(board_size, ptn, &location, &stone); if (res == PTN_VALID) res = try_place(location, current_colour, stone); } if (res == A_OK) { next_turn(); if (turn > 1) return check_win(); } return res; }