def test_play(self): """ Tests if the play build up correctly """ game = BowlingGame(['test']) game.play([2, 3, 6, 4, 8, 1, 10, 3, 0, 10, 10, 10, 10, 1, 9, 5], verbose=False) self.assertEqual(len(game.frames['test']), 10) self.assertEqual(BowlingGame.computeScoreOnFrames(game.frames['test']), 164)
import sys from bowling.game import BowlingGame if __name__ == '__main__': players = ["Player1"] if len(sys.argv) > 1: players = sys.argv[1:] game = BowlingGame(players) game.play()