#!/usr/local/bin/python
# -*- coding: UTF-8 -*-

import Cookie
import cgi
import cgitb; cgitb.enable()  # for troubleshooting
import Player
import os

thecookie = os.environ.get('HTTP_COOKIE')
C = Cookie.SimpleCookie()
C.load(thecookie)

enemy = C["enemy"].value
me = C["username"].value
bf = C["field"].value
outcome = C["outcome"].value

if os.path.exists("%s.txt"%bf):
	os.remove("%s.txt"%bf)

print C

print 'Location: http://students.washington.edu/zbadgerm/Math480/lobby.cgi\n'



		