From 845a0bcaad797bf57863f95fcb9811ea4b7c1855 Mon Sep 17 00:00:00 2001 From: randomuser Date: Sat, 9 Jul 2022 18:45:03 -0500 Subject: [PATCH] add test framework --- TODO | 10 ++++++++++ test.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 TODO create mode 100644 test.py diff --git a/TODO b/TODO new file mode 100644 index 0000000..b3f841e --- /dev/null +++ b/TODO @@ -0,0 +1,10 @@ +TODO +---- + +- make an interface for picking moves +- make an interface, period + +BUGS +---- + +- test framework makes mistake diff --git a/test.py b/test.py new file mode 100644 index 0000000..64aa350 --- /dev/null +++ b/test.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 + +from board2 import Board +from pos import TwoDPos + +b = Board() +print(b.possible()) +print("moving to d4") +b.append(TwoDPos(TwoDPos.g, "d4")) +print(b.possible()) +print("moving to b2") +b.append(TwoDPos(TwoDPos.g, "b2")) +print(b.possible()) +print("moving to d5") +b.append(TwoDPos(TwoDPos.g, "d5")) +print(b.possible()) +print("moving to b5") +b.append(TwoDPos(TwoDPos.g, "b5")) +print(b.possible()) +print("moving to d6") +b.append(TwoDPos(TwoDPos.g, "d6")) +print(b.possible()) +print("moving to b8") +b.append(TwoDPos(TwoDPos.g, "b8")) +print(b.possible()) +print("there should be a square captured in the middle") +print("moving to a7") +b.append(TwoDPos(TwoDPos.g, "a7")) +print(b.possible()) +print("moving to c3") +b.append(TwoDPos(TwoDPos.g, "c3")) +print(b.possible()) +print("moving to g7") +b.append(TwoDPos(TwoDPos.g, "g7")) +print(b.possible()) +print("moving to b3") +b.append(TwoDPos(TwoDPos.g, "b3")) +print(b.possible()) +print("moving to d7") +b.append(TwoDPos(TwoDPos.g, "d7")) +print(b.possible()) +print("moving to a3") +b.append(TwoDPos(TwoDPos.g, "a3")) +print(b.possible()) +print("moving to c9") +b.append(TwoDPos(TwoDPos.g, "c9")) +print(b.possible()) +print("moving to g9") +b.append(TwoDPos(TwoDPos.g, "g9")) +print(b.possible()) +