def run(self):
        max_unit = 0
        for i in range(self.ran):
            print("Generation ", i)
            gen = Generation(self.p)
            #gen.hand.print_cards()
            gen.assign_unit_value(0)
            #gen.print_stats()
            gen.calc_fitness(self.step, 0)

            #for i in range(p.size):
            #    print(gen.population.units[i].fitness)

            if (i == self.ran - 1):
                break

            max_val = 0
            for i in range(gen.population.size):
                if (gen.population.units[i].fitness > max_val):
                    max_unit = gen.population.units[i]
                    max_val = gen.population.units[i].fitness

            print(max_unit.fitness)
            s = Step(gen)
            gen.population.units = s.generate_mating_pool()

        max_val = 0
        max_unit = 0
        for i in range(gen.population.size):
            if (gen.population.units[i].fitness > max_val):
                max_unit = gen.population.units[i]
                max_val = gen.population.units[i].fitness

        print(max_unit.weights)
        return max_unit.weights
from deck import Deck
from step import Step

w = []
'''
d = Driver(50, 100, 10, 5)
w = d.run()
'''

money = 1000

p = Population(1, len(w), 0)
g = Generation(p)

while True:
    g.assign_unit_value(0)
    g.hand.print_cards()

    my_cards = g.deck.deal_cards(2)

    my_cards[0].print_short()
    my_cards[1].print_short()

    print("\nHow much Money would you like to bet?")
    print("You Have", money, "Dollars")
    bet = int(input())

    eval = g.calc_hand(0, my_cards)

    print("\n")