Example #1
0
 def __init__(self, testCB):
     self.testCB = testCB
     self.wrestlerFiles = getModules("Wrestlers")
     self.numWrestlers = len(self.wrestlerFiles)
     self._exceptions = ["E:\\pws\\Wrestlers\\TestAndreTheGiant.py",
                         "E:\\pws\\Wrestlers\\TestAndreTheGiant.pyc",
                         "E:\\pws\\Wrestlers\\TestHulkHogan.py",
                         "E:\\pws\\Wrestlers\\TestHulkHogan.pyc"]
     self.buildTests()
Example #2
0
 def runMatch(self, teams, dq=0, timelimit=30):
     t1 = spw.getTeamList(teams[0], 0)
     t2 = spw.getTeamList(teams[1], 1)
     matches = getModules("Matches")
     for match in matches:
         if matches[match].name == "Boot Camp":
             m = matches[match]
     match = m.SpecialtyMatch
     #match = spw.Match
     m = match(t1, t2, dqEnabled=dq, timeLimit=timelimit)
     m.useStrategyPinChart(1)
     from lib.Interface import DramaQueen
     d = DramaQueen(0,0,0,0)
     self.testCB(m, d)
Example #3
0
 def setMatchType(self, evt=None):
     matchname = self.matchChoice.GetStringSelection()
     self.matchSetupObj.setMatchType(matchname)
     if matchname != "Regular":
         matchModules = getModules("Matches")
         for matchModule in matchModules:
            if matchModules[matchModule].name == matchname:
                matchmod = matchModules[matchModule]
                break
         if not matchmod.dq:
             self.dqEnabled.Enable(0)
             self.dqEnabled.SetValue(0)
             self.matchSetupObj.setDQ(0)
     else:
         if "dqEnabled" not in self.stayDisabled:
             self.dqEnabled.SetValue(1)
             self.dqEnabled.Enable(1)
             self.matchSetupObj.setDQ(1)
Example #4
0
    def buildMatchControlGUI(self, matchSetupObj):
        self.matchSetupObj = matchSetupObj

        self.matchSetupSzr = wxBoxSizer(wxVERTICAL)
        self.matchSetupSzr.Add((makeBold(wxStaticText(self.parent, -1,
                                                      "Match Setup",
                                                      style=wxALIGN_CENTER),
                                         18)), 0, wxEXPAND)
        self.matchSetupSzr.Add((0, 5))
        self.matchSetupSzr.Add(wxStaticLine(self.parent, -1), 0,
                               wxEXPAND|wxLEFT|wxRIGHT, border=5)
        self.matchSetupSzr.Add((0, 20))
        matchTypeSzr = wxBoxSizer(wxHORIZONTAL)
        matchTypeSzr.Add(makeBold(wxStaticText(self.parent, -1,
                                               "Match Type")), 0,
                         wxEXPAND|wxALIGN_CENTER)

        matchModules = getModules("Matches")
        matchNames = []
        for file in matchModules.keys():
            matchNames.append(matchModules[file].name)
        matchNames.sort()
        matchTypes = ["Regular"] + matchNames

        matchTypeSzr.Add((10, 0))
        
        cID = wxNewId()
        self.matchChoice = wxChoice(self.parent, cID, choices=matchTypes)
        self.matchChoice.SetSelection(0)
        self.matchControlWidgets.append(self.matchChoice)
        
        matchTypeSzr.Add(self.matchChoice, 0, wxEXPAND|wxALIGN_CENTER)
        self.matchSetupSzr.Add(matchTypeSzr, 0, wxEXPAND|wxLEFT|wxRIGHT,
                               border=5)
        self.matchSetupSzr.Add((0, 20))

        timeLimitSzr = wxBoxSizer(wxHORIZONTAL)
        timeLimitSzr.Add(makeBold(wxStaticText(self.parent, -1,
                                               "Time Limit")), 0, wxEXPAND)
        timeLimitSzr.Add((10, 0))
        self.timeLimitEntry = wxIntCtrl(self.parent, value=30, size=(30,20))
        self.matchControlWidgets.append(self.timeLimitEntry)
        timeLimitSzr.Add(self.timeLimitEntry, 0, wxEXPAND)
        timeLimitSzr.Add((15, 0))
        cbID = wxNewId()
        self.noTimeLimitChkbox = wxCheckBox(self.parent, cbID, "No Time Limit")
        self.matchControlWidgets.append(self.noTimeLimitChkbox)
        timeLimitSzr.Add(self.noTimeLimitChkbox, 0, wxEXPAND)

        self.matchSetupSzr.Add(timeLimitSzr, 0,
                               wxEXPAND|wxLEFT|wxRIGHT, border=5)
        self.matchSetupSzr.Add((0, 20))
                
        self._addCheckboxToSetupSizer("DQ Enabled", 1, "dqEnabled")
        self.matchSetupSzr.Add((0, 10))

        self._addCheckboxToSetupSizer("Dramatic Pause", 1, "dramaticPause")
        self._addCheckboxToSetupSizer("Real Time Pin Counts", 1,
                                      "realtimePins")
        self._addCheckboxToSetupSizer("Real Time Count Outs", 1,
                                      "realtimeCountouts")
        self._addCheckboxToSetupSizer("Submission Drama", 1,
                                      "submissionDrama")
        self.matchSetupSzr.Add((0, 10))

        self._addCheckboxToSetupSizer("Strategy Pin Chart", 0, "strategyChart")
        self._addCheckboxToSetupSizer("Pin Only On P/A Roll", 0, "pinOnlyOnPA")
        self.matchSetupSzr.Add((0, 10))
        
        # Team Box
        teamSzr = wxBoxSizer(wxHORIZONTAL)
        teamSzr.Add(self._getTeamSelectionSizer(0), 1,
                    wxEXPAND|wxLEFT|wxRIGHT, border=5)
        teamSzr.Add(makeBold(wxStaticText(self.parent, -1, "VS"), 16), 0 ,
                    wxALIGN_CENTER|wxBOTTOM, border=20)
        teamSzr.Add(self._getTeamSelectionSizer(1), 1,
                    wxEXPAND|wxLEFT|wxRIGHT, border=5)
        self.matchSetupSzr.Add(teamSzr, 0, wxEXPAND)