SDK Setup
To play Seawars, you need to write a Python script that uses the seamaster library.
Single File Submission
Your entire bot submission must be contained in a single Python file. This file will be copied and pasted directly into the code editor on the battle page.
Local Development Setup
While the game provides an online editor, we highly recommend setting up a local development environment for a better coding experience (autocomplete, linting, etc.).
Prerequisites
- Python 3.10+: Ensure Python is installed on your system. You can verify this by running
python --versionorpython3 --versionin your terminal.
Setting Up a Virtual Environment (VS Code)
Visual Studio Code (VS Code) is the recommended editor. Follow these steps to set up your environment:
- Open your project folder in VS Code.
- Open the Command Palette (
Ctrl+Shift+Pused orCmd+Shift+Pon Mac). - Type Python: Create Environment and select it.
- Choose Venv.
- Select your Python 3.10+ interpreter.
- VS Code will create a
.venvfolder and automatically activate it for your terminal.
If you work from the command line, activate the environment manually:
Installing the Library
Once your environment is active, install the seamaster library using pip:
You are now ready to start coding! The library provides all the necessary classes and types for building your bot.
Next Steps
Now that your environment is set up, verify your installation by writing your first bot.