Game Agent Driven by Free-Form Text Command: Using LLM-based Code Generation and Behavior Branch