Ejemplo n.º 1
0
import argparse

from game import Game
from player import HumanPlayer, RandomPlayer
from ai_player import AIPlayer
from venus import AIPlayer as VenusAI

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--p1", default="player 1")
    parser.add_argument("--p2", default="player 2")
    parser.add_argument("--rows", default="6", type=int)
    parser.add_argument("--cols", default="7", type=int)
    parser.add_argument("--num", default="4", type=int)
    args = parser.parse_args()

    player1 = RandomPlayer()
    player1.name = args.p1
    player2 = AIPlayer()
    player2.name = args.p2
    game = Game(player1, player2, args.cols, args.rows, args.num, verbose=True)
    game.run()
Ejemplo n.º 2
0
import argparse

from game import Game
from player import HumanPlayer, RandomPlayer
from ai_player import AIPlayer


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('--p1', default='player 1')
    parser.add_argument('--p2', default='player 2')
    parser.add_argument('--rows', default='6', type=int)
    parser.add_argument('--cols', default='7', type=int)
    parser.add_argument('--num', default='4', type=int)
    args = parser.parse_args()

    player1 = AIPlayer()
    player1.name = args.p1
    player2 = RandomPlayer()
    player2.name = args.p2
    game = Game(player1, player2, args.cols, args.rows, args.num, verbose=True)
    game.run()