Files
python-bootcamp/simulation/__pycache__/Simulation.cpython-311.pyc
T

23 lines
2.2 KiB
Plaintext
Raw Normal View History

§
Óqedãó2—ddlmZmZGd„de¦«ZdS)é)ÚABCÚabstractmethodcó‚—eZdZed„¦«Zedefd„¦«Zed„¦«Zed„¦«Zed„¦«Z dS)Ú
Simulationcó—dS)zStart the simulated object.N©©Úselfs ú7C:\Users\94473\python-bootcamp\simulation\Simulation.pyÚstartzSimulation.startó €ð
ˆóÚreturncó—dS)z¥
Simulate one clock tick.
Returns:
bool: True if the simulation could advance one clock tick, or False if the object is expired.
Nrr s r ÚtickzSimulation.tick s €ð
ˆrcó—dS)aQ
Return the uses of the simulated object. These are verb strings which are passed to the `use()` method.
Returns:
tuple: A dict of key-value pairs, where the keys are strings of
verbs to be passed to `use`, and the values are strings explaining
what the verb does in English.
Nrr s r Úget_useszSimulation.get_usess€€€rcó—dS)aY
Use the simulated object.
Args:
args (tuple): A tuple of verbs to be used on the object.
kwargs (dict): A dictionary of key-value pairs of arguments to the verb(s).
Returns:
True if the action succeeded, False if the action did not succeed and the object needs to be expired.
Nr)r
ÚargsÚkwargss r ÚusezSimulation.uses €ð