finishing up the main functionality. an error on iOS emulator causes the server to crash after you play one round