def test_template(self): # load all the screenshots and make sure each one is as it should be #for f in self.files: for i in range(len(self.tests)): cards = processCards.extractCards(self.files[i]) meaning = processCards.getMeaningFromCards(cards) self.assertEqual(sorted(meaning.values()), sorted(self.tests[i]))
def main(): print "Beginning the Solitaire Solver..." # Give some time to open the window... time.sleep(5) s = SolitaireSolver.SolitaireSolver() #cards = processCards.extractCards() #topRowInfo, wasteCardInfo, bottomRowInfo = SolitaireSolver.produceOrderedListsOfCardRows(cards) while True: cards = processCards.extractCards() if len(cards) == 0: break meaning = processCards.getMeaningFromCards(cards) retValue = s.makeMove(meaning) if retValue == False: print "makeMove Returned false" break if retValue == -1: break