Skip to content

Instantly share code, notes, and snippets.

@morgankenyon
Created May 3, 2020 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morgankenyon/b73acd09dcf2b19dce85bc292bd34167 to your computer and use it in GitHub Desktop.
Save morgankenyon/b73acd09dcf2b19dce85bc292bd34167 to your computer and use it in GitHub Desktop.
from ttt.player import Player
from ttt.game import Game
from ttt.random_bot import RandomBot
from ttt.invincibot import InvinciBot
from datetime import datetime
def main():
dateTimeObj = datetime.now()
print(dateTimeObj)
xbot = InvinciBot(Player.x)
obot = RandomBot(Player.o)
game = Game(15)
print ("invincibot (x) vs randombot (o)")
game.simulate(xbot, obot)
xbot = RandomBot(Player.x)
obot = InvinciBot(Player.o)
game = Game(15)
print ("randombot (x) vs invincibot (o)")
game.simulate(xbot, obot)
xbot = InvinciBot(Player.x)
obot = InvinciBot(Player.o)
game = Game(15)
print ("invincibot (x) vs invincibot (o)")
game.simulate(xbot, obot)
dateTimeObj = datetime.now()
print(dateTimeObj)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment