Fishing agent first draft

This commit is contained in:
2024-09-03 00:23:14 -04:00
parent eedc65f853
commit 05c04e3bac
14 changed files with 90 additions and 45 deletions
+8 -12
View File
@@ -1,10 +1,12 @@
import cv2 as cv
from core.Logger import Logger
class CLIAgent:
def __init__(self, mainAgent) -> None:
self.isRunning = False
self.logger = Logger("CliAgent")
if (not mainAgent):
raise Exception("CLI: Main agent not found...")
raise Exception("Main agent not found...")
self.mainAgent = mainAgent
def printMenu(self):
@@ -18,26 +20,20 @@ class CLIAgent:
self.isRunning = True
self.printMenu()
while self.isRunning:
while self.isRunning is True:
userInput = input()
userInput = str.lower(userInput).strip()
if (userInput == "f"):
print("Starting Fishing bot...")
self.mainAgent.startScreenCaptureThread()
break
# fishingAgent = FishingAgent(mainAgent)
# fishingAgent.run()
self.logger.log("Starting Fishing bot...")
self.mainAgent.startFishBot()
elif (userInput == "h"):
self.printMenu()
break
elif (userInput == "q"):
cv.destroyAllWindows()
print("Exiting application...")
self.logger.log("Exiting application...")
self.isRunning = False
break
else:
print("Unknown Command.")
self.logger.log("Unknown Command.")
self.printMenu()
break