summaryrefslogtreecommitdiff
path: root/include/tak.c
diff options
context:
space:
mode:
Diffstat (limited to 'include/tak.c')
-rw-r--r--include/tak.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/tak.c b/include/tak.c
index 85d04d4..1c47aeb 100644
--- a/include/tak.c
+++ b/include/tak.c
@@ -1,7 +1,7 @@
#include "tak.h"
enum E_RESULT
-try_ptn(char *ptn) {
+do_ptn(char *ptn) {
enum E_RESULT res;
uint8_t location;
@@ -11,8 +11,10 @@ try_ptn(char *ptn) {
enum MOVE_DIRECTION direction;
res = parse_move(board_size, ptn, &location,
&direction, &steps, drops);
- if (res == PTN_VALID)
+ if (res == PTN_VALID) {
+ if (turn < 2) return A_ILLEGAL;
res = try_move(location, direction, steps, drops);
+ }
} else {
enum STONE_VARIANT stone;
res = parse_place(board_size, ptn, &location, &stone);