def test(request):

	run(57012)

	turns = Turn.objects.all()
	tiers = Tier.objects.all()
	devices = Device.objects.all()
	regions = Region.objects.all()

	return render_to_response('index.html', {
		'turns' : turns,
		'tiers' : tiers,
		'devices' : devices,
		'regions' : regions
	})
def start_game(request):
	"""Starts the game"""
	result = {
		'status' : 'error',
		'message' : 'Could not start the game. Please try again'
	}
	successful_start = run(63334)
	if successful_start:
		result = {
			'status' : 'success',
			'message' : 'Successfully started the game!'
		}
	return HttpResponse(json.dumps(result), content_type="application/json")
def main():
    controller.run()
Exemple #4
0
def main():
    controller.save()
    controller.run()
    print('test')
    exit(0)
def main():
    run()
Exemple #6
0
def main():
    Control.run()
Exemple #7
0
            # Text
            elif opt in ('-t', '--text'):
                text_args['text'] = arg

            # File
            elif opt in ('-f', '--file'):

                if not os.path.exists(arg):
                    sys.exit("Could not find the file specified.")

                else:
                    text_args['fname'] = arg

    if sum(bool(a) for a in text_args.values()) > 1:
        sys.exit('Supply either the demo mode flag, text, or filename,'
                 ' but not more than one.')

    return text_args


#===============================================================================
# Run
#===============================================================================

if __name__ == '__main__':

    # Grab options and run!
    text_args = _get_opts(sys.argv[1:])
    controller.run(DEMOS, **text_args)