Skip to content

Commit

Permalink
fix package naming
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmiglio committed Sep 16, 2024
1 parent c035d29 commit c0ac53e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions clashnetlib/demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from .implements.fight_decision_maker import FightDecisionMaker, FightDecision

import numpy as np


def sendImageToAPI(image: np.ndarray) -> FightDecision:
# returns some json response object
return FightDecision({"cardIndex": 0, "location": (0, 0)})


class ClientFightDecisionMaker(FightDecisionMaker):
def make_decision(self) -> FightDecision:
image = self.inputs[-1]
response = sendImageToAPI(image)

# process response and return decision
return response

def main() -> None:
decision_maker = ClientFightDecisionMaker()
image = np.random.rand(100, 100)
decision_maker.add_input(image)
decision = decision_maker.make_decision()
print(decision)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "clash-net-lib"
packages = [{ include = "src" }]
packages = [{ include = "clashnetlib" }]
version = "v0.0.0"
description = "The API for Clash Net"
readme = "README.md"
Expand Down

0 comments on commit c0ac53e

Please sign in to comment.