#!/usr/bin/python ## ## Simple web game by William D. Colburn ## http://infohost.nmt.edu/~schlake/ ## 505 480 9406 ## schlake@nmt.edu ## import cgi import cgitb import os import sys import random def strfry( l ): c = [ x for x in l ] r = [] while c: x = random.choice( c ) c.remove( x ) r.append( x ) return r names = ['Eric', 'Sonia', 'Phillip', 'Mary', 'Jonathon', 'Lisa' ] letters = 'abcdef' n = {'a':names[0], 'b':names[1], 'c':names[2], 'd':names[3], 'e':names[4], 'f':names[5] } l = {names[0]:'a', names[1]:'b', names[2]:'c', names[3]:'d', names[4]:'e', names[5]:'f' } def emitDead( data ): for i in range( 1, 6 + 1): # Python is Stupid if data[i].isupper(): print n[data[i].lower()], 'is laying on the floor.' print '
' def emitStepForm( data ): print '