石头剪刀的游戏逻辑
s2t2-game-utils的Python项目详细描述
石头剪刀游戏逻辑(python)
安装
根据需要,使用以下命令之一安装软件包:
# from PyPI (recommended): pip install s2t2-game-utils # from PyPI Test server: pip install -i https://test.pypi.org/simple/ s2t2-game-utils # from GitHub source (HTTPS version): pip install git+https://github.com/s2t2/game-utils-py.git # from GitHub source (SSH version): pip install git+ssh://git@github.com/s2t2/game-utils-py.git # from local source (after downloading the repo): pip install -e path/to/game-utils-py/
用法
fromgame_utils.rock_paper_scissorsimport*print(WELCOME_MESSAGE)#> Hi. Welcome to my Rock-Paper-Scissors game!determine_winner("rock","paper")#> "paper"