Exemplo n.º 1
0
def addRadioButtonsOption(values, text: str = ''):
    return Main.addOption(('radioButtons', (values, str), text))
Exemplo n.º 2
0
def getThisPlayerIndex():
    Main.getGameObject().thisPlayerIndex
Exemplo n.º 3
0
def showMessageLaterForAll(title, text):
    return Main.showMessageLater(title, text, all=True)
Exemplo n.º 4
0
def addCheckBoxOption(text: str, defaultValue: bool = False):
    return Main.addOption(('checkBox', text, defaultValue))
Exemplo n.º 5
0
def getCurrentPlayerIndex():
    return Main.getGameObject().currentPlayerIndex
Exemplo n.º 6
0
def showMessageLater(title, text):
    return Main.showMessageLater(title, text, all=False)
Exemplo n.º 7
0
def getPlayerTitles():
    return Main.getGameObject().playerTitles
Exemplo n.º 8
0
def getPlayerNames():
    return Main.getGameObject().players
Exemplo n.º 9
0
def getPlayerCount():
    return Main.getGameObject().getPlayerCount()
Exemplo n.º 10
0
def run(gameName=None, minPlayerCount=2, maxPlayerCount=2, players=None, autoStart=False, playerTitles=None, \
        titlesAreChoosable=False, hostGame=False, hostingName=None, sessionSecret=None):
    Main.run(locals())
Exemplo n.º 11
0
# class Option:
#     def __init__(self):
#         self.value = None


# adds a checkbox option - text will be shown next to the checkbox
# value will be True if checked and False otherwise
def addCheckBoxOption(text: str, defaultValue: bool = False):
    return Main.addOption(('checkBox', text, defaultValue))


# add several radio buttons - values must be a list of strings which will be shown next to the buttons
# text is an optional string shown above the buttons
# value will be the text of the selected button
def addRadioButtonsOption(values, text: str = ''):
    return Main.addOption(('radioButtons', (values, str), text))


##################### releveant for network mode only! #####################


# in local mode same as getCurrentPlayerIndex(), in network mode the index of the player
# who runs the participating program, thus it does not change in network mode throughout the game!
def getThisPlayerIndex():
    Main.getGameObject().thisPlayerIndex


# when running this file directly the directory will be searched for games and you can select among the found games
if __name__ == "__main__":
    Main.selectGame()