Fishing agent first draft
This commit is contained in:
+8
-12
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user