MCPcopy Create free account
hub / github.com/Virtual-Protocol/virtuals-python / throw_fruit

Function throw_fruit

examples/game/test_agent.py:112–123  ·  view source on GitHub ↗

Function to throw fruits.

(object: str, **kwargs)

Source from the content-addressed store, hash-verified

110 return FunctionResultStatus.FAILED, f"Cannot sit on {object} - not a sittable object", {}
111
112def throw_fruit(object: str, **kwargs) -> Tuple[FunctionResultStatus, str, dict]:
113 """
114 Function to throw fruits.
115 """
116 fruits = {"apple", "banana", "orange", "pear", "mango", "grape"}
117
118 if not object:
119 return FunctionResultStatus.ERROR, "No fruit specified", {}
120
121 if object.lower() in fruits:
122 return FunctionResultStatus.DONE, f"Successfully threw the {object} across the room!", {}
123 return FunctionResultStatus.ERROR, f"Cannot throw {object} - not a fruit", {}
124
125def throw_furniture(object: str, **kwargs) -> Tuple[FunctionResultStatus, str, dict]:
126 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected