added main.py

This commit is contained in:
2026-01-29 12:08:39 -05:00
parent 3bc745dffa
commit bdc5759f16

View File

@@ -0,0 +1,18 @@
from Solitaire import Solitaire
def main():
wins = 0
for games in range(1, 10001):
game = Solitaire()
if game.playGame():
wins += 1
if games % 1000 == 0:
percent = (wins / games) * 100
print(f"{wins}/{games} games won = {percent:.2f}%")
if __name__ == "__main__":
main()