Files
paper-game-golf/README.md
2026-07-23 10:32:19 +01:00

32 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Paper Golf Course Generator
A small Python application that makes a printable A4 PDF containing randomised paper-golf courses. Each page holds four 3" × 5" cut cards, each with a 16 × 26 straight dotted play grid, tee and cup placed on fairway grid dots at least 12 intervals apart (targeting 18), multiple non-overlapping naturally grown light-grey fairway pieces, dark-grey water, shaded sand traps, and larger groups of simple trees—all aligned to the dot grid. Extra terrain and most tree groups favour the area between tee and cup. Connected terrain cells render as a single seamless vector area with rounded exposed corners and straight joined corners, with a Courier typewriter-style score line. The PDF creates as many pages as required and leaves room above the top cards for stapling.
It has no third-party dependencies: it writes a clean vector PDF with Python's standard library. It requires Python 3.10 or later (with Tk included, as it is in the standard Windows installer).
## Use it
Double-click `golf_course_generator.py`, or run:
```powershell
python golf_course_generator.py
```
Enter how many courses to create and an optional whole-number seed, then select **Generate A4 PDF**. Four courses are placed on each page—for example, 36 courses produces a nine-page PDF. Leaving the seed blank makes a new random set. Once generated, the seed is shown so the same set can be made again later.
For command-line use:
```powershell
python golf_course_generator.py --output paper-golf-courses.pdf
python golf_course_generator.py --output paper-golf-courses.pdf --seed 20260723
python golf_course_generator.py --output paper-golf-courses.pdf --courses 36
```
Print the generated PDF at **Actual size** (or 100%), rather than fitting it to the printable area.
## Check it
```powershell
python -m unittest -v
```