add test framework

This commit is contained in:
randomuser 2022-07-09 18:45:03 -05:00
parent 8c55d05404
commit 845a0bcaad
2 changed files with 61 additions and 0 deletions

10
TODO Normal file
View File

@ -0,0 +1,10 @@
TODO
----
- make an interface for picking moves
- make an interface, period
BUGS
----
- test framework makes mistake

51
test.py Normal file
View File

@ -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())