Add main agent, cli and opencv image template comparison test

This commit is contained in:
2024-09-02 21:11:02 -04:00
parent 377dd629ed
commit eedc65f853
21 changed files with 857 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
import cv2 as cv
class CLIAgent:
def __init__(self, mainAgent) -> None:
self.isRunning = False
if (not mainAgent):
raise Exception("CLI: Main agent not found...")
self.mainAgent = mainAgent
def printMenu(self):
print("Enter a command:")
print("\tH\tHelp.")
print("\tF\tStart the fishing agent.")
print("\tQ\tQuit.")
print("$>> ", end='')
def run(self):
self.isRunning = True
self.printMenu()
while self.isRunning:
userInput = input()
userInput = str.lower(userInput).strip()
if (userInput == "f"):
print("Starting Fishing bot...")
self.mainAgent.startScreenCaptureThread()
break
# fishingAgent = FishingAgent(mainAgent)
# fishingAgent.run()
elif (userInput == "h"):
self.printMenu()
break
elif (userInput == "q"):
cv.destroyAllWindows()
print("Exiting application...")
self.isRunning = False
break
else:
print("Unknown Command.")
self.printMenu()
break