Esempio n. 1
0
def main():
    if len(sys.argv) != 2:
        print "Usage:"
        print "  RunBjSimulation.py <inputConfigurationFile>"
        return
    else:
        # Get inputConfigurationFile and outputFile
        inputConfigFile = sys.argv[1]

        # Input configuration must be python syntax to set values
        config = {}
        execfile(inputConfigFile, config)
        bjsim = BjSimulation(config)

        # Go!
        bjsim.runSimulation()

        print "Done."
        return
Esempio n. 2
0
def main():
    if len(sys.argv) != 2:
        print "Usage:"
        print "  RunBjSimulation.py <inputConfigurationFile>"
        return
    else:
        # Get inputConfigurationFile and outputFile
        inputConfigFile = sys.argv[1]

        # Input configuration must be python syntax to set values
        config = {}
        execfile(inputConfigFile, config)
        bjsim = BjSimulation(config)

        # Go!
        bjsim.runSimulation()
        
        print "Done."
        return
Esempio n. 3
0
#!/usr/bin/env python
import os
import sys
from BjSimulation import *

sys.argv = ['RunBjSimulation.py', 'config.py']

if len(sys.argv) != 2:
    print "Usage:"
    print "  RunBjSimulation.py <inputConfigurationFile>"
else:
    # Get inputConfigurationFile and outputFile
    inputConfigFile = sys.argv[1]

    # Input configuration must be python syntax to set values
    config = {}
    execfile(inputConfigFile, config)
    bjsim = BjSimulation(config)

    # Go!
    bjsim.runSimulation()
    
    print "Done."
Esempio n. 4
0
if len(sys.argv) != 2:
    print "Usage:"
    print "  RunBjSimulation.py <inputConfigurationFile>"
else:
    # Get inputConfigurationFile and outputFile
    inputConfigFile = sys.argv[1]

    # Input configuration must be python syntax to set values
    config = {}
    execfile(inputConfigFile, config)
    config["rounds_to_play"] = 1
    bjsim = BjSimulation(config)

    # Go!
    bjsim.runSimulation()
    bjsim.curr_game.shoe.cards[0] = Card(1, 2)
    bjsim.curr_game.shoe.cards[1] = Card(1, 2)
    bjsim.curr_game.shoe.cards[2] = Card(1, 2)
    bjsim.curr_game.shoe.cards[3] = Card(1, 2)
    bjsim.curr_game.shoe.cards[4] = Card(1, 2)
    bjsim.curr_game.shoe.cards[5] = Card(1, 2)
    bjsim.curr_game.shoe.cards[6] = Card(1, 2)
    bjsim.curr_game.shoe.cards[7] = Card(1, 2)
    bjsim.curr_game.shoe.cards[8] = Card(1, 2)
    bjsim.curr_game.shoe.cards[9] = Card(1, 2)
    bjsim.curr_game.shoe.cards[10] = Card(1, 2)
    bjsim.curr_game.shoe.cards[11] = Card(1, 2)
    bjsim.curr_game.shoe.cards[12] = Card(1, 2)
    bjsim.curr_game.shoe.cards[13] = Card(1, 2)
    bjsim.curr_game.shoe.cards[14] = Card(1, 2)