//interprets the sentences of file
 static void interpretFile(Script script)
 {
     while (!script.done)
     {
         //get where we are in the file and shove the current phrase through the switch
         Coord current = script.currentPositions[script.currentPositions.Count - 1];
         Sentence currSentence = script.sentences[current.sentenceIndex];
         Phrase currPhrase = currSentence[current.phraseIndex];
         switch(currPhrase.command)
         {
             case ("room"):
                 doRoom(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("print"):
                 doPrint(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("println"):
                 doPrintln(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("goto"):
                 doGoto(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("end"):
                 doEnd(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("prompt"):
                 doPrompt(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("on"):
                 doOn(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("set"):
                 doSet(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("clear"):
                 doClear(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("if"):
                 doIf(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("unless"):
                 doUnless(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("visit"):
                 doVisit(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("return"):
                 doReturn(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("wait"):
                 doWait(modifyInfo(currPhrase.info, script), script);
                 break;
             case ("chance"):
                 doChance(modifyInfo(currPhrase.info, script), script);
                 break;
             default:
                 InvalidCommandException e = new InvalidCommandException();
                 e.command = currPhrase.command;
                 throw e;
         }
     }
     return;
 }
        //interprets the sentences of file
        static void interpretFile(Script script)
        {
            while (!script.done)
            {
                //get where we are in the file and shove the current phrase through the switch
                Coord    current      = script.currentPositions[script.currentPositions.Count - 1];
                Sentence currSentence = script.sentences[current.sentenceIndex];
                Phrase   currPhrase   = currSentence[current.phraseIndex];
                switch (currPhrase.command)
                {
                case ("room"):
                    doRoom(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("print"):
                    doPrint(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("println"):
                    doPrintln(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("goto"):
                    doGoto(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("end"):
                    doEnd(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("prompt"):
                    doPrompt(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("on"):
                    doOn(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("set"):
                    doSet(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("clear"):
                    doClear(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("if"):
                    doIf(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("unless"):
                    doUnless(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("visit"):
                    doVisit(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("return"):
                    doReturn(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("wait"):
                    doWait(modifyInfo(currPhrase.info, script), script);
                    break;

                case ("chance"):
                    doChance(modifyInfo(currPhrase.info, script), script);
                    break;

                default:
                    InvalidCommandException e = new InvalidCommandException();
                    e.command = currPhrase.command;
                    throw e;
                }
            }
            return;
        }