Skip to content

tsainez/command-line-conflict

Repository files navigation

Command Line Conflict

"Command Line Conflict" is a codename for a fast-paced, open-source real-time strategy game inspired by Starcraft, rendered entirely in charming ASCII art.

CI Tests Docs

Getting Started

This guide will walk you through setting up and running the game on your local machine, as well as development best practices.

Prerequisites

  • Python 3.8 or higher
  • pip and venv

Cross-Platform Environment Setup

To run the game manually, your system must know where to find Python. If running python --version or pip --version fails, follow these steps to add Python to your system's PATH.

Windows 11

  1. Search for "Environment Variables": Open the Start menu, type "env", and select "Edit the system environment variables".
  2. Environment Variables: Click the "Environment Variables..." button.
  3. Edit Path: In the "User variables" section, locate the row named "Path" and double-click it.
  4. Add Python Paths: Click "New" and add the paths to your Python executable and Scripts folder. They usually look like this (replace YourUsername and version number):
    • C:\Users\YourUsername\AppData\Local\Programs\Python\Python311\
    • C:\Users\YourUsername\AppData\Local\Programs\Python\Python311\Scripts\
  5. Apply: Click OK on all dialogs and restart your terminal (PowerShell or Command Prompt).

macOS

If you installed Python via the official installer, it likely set the PATH for you. If not, or if using Homebrew:

  1. Open your terminal.
  2. Edit your shell profile (e.g., ~/.zshrc or ~/.bash_profile):
    nano ~/.zshrc
  3. Add the following line (adjusting for your specific installation path):
    export PATH="/usr/local/bin:$PATH"
    # or for Homebrew on Apple Silicon:
    export PATH="/opt/homebrew/bin:$PATH"
  4. Save and exit (Ctrl+O, Enter, Ctrl+X), then reload:
    source ~/.zshrc

Linux

Most Linux distributions come with Python installed. If you installed a custom version:

  1. Open your terminal.
  2. Edit your .bashrc or .zshrc:
    nano ~/.bashrc
  3. Add the export line pointing to your Python bin directory:
    export PATH="/path/to/python/bin:$PATH"
  4. Reload the configuration:
    source ~/.bashrc

Installation

  1. Clone the repository:

    git clone https://github.com/tsainez/command-line-conflict.git
    cd command-line-conflict
  2. Create and activate a virtual environment: This isolates the project's dependencies from your system's Python installation.

    # For macOS and Linux
    python3 -m venv .venv
    source .venv/bin/activate
  3. Install the required packages:

    pip install --upgrade pip
    pip install -r requirements.txt
  4. Launch the game:

    python main.py

Windows 11 Build (PyInstaller)

The build script creates a standalone executable using PyInstaller.

.\scripts\build_windows.ps1

Optional flags:

.\scripts\build_windows.ps1 -Clean
.\scripts\build_windows.ps1 -NoVenv -Python "py"

The output executable will be in the dist folder.

(Optional) Running Tests and Linters

Before a change can be safely integrated, it must first pass through linting, automated testing, and finally a human player's assessment.

Run the checks:

```bash
# Check code formatting with Black
black --check .

# Check import sorting with isort
isort --check-only .

# Run the test suite with pytest
pytest -q
```

About

A fast-paced, open-source RTS game inspired by Starcraft, rendered entirely in charming ASCII art and designed for cross-platform play.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages