Skip to content

Commit 2f09fb7

Browse files
committed
Thursday!
1 parent 8a79c6a commit 2f09fb7

17 files changed

+277
-136
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,4 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161-
src/grid/grid.py
162161
src/profiler.txt

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/grid-engine.iml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12-dev

README.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,59 @@
1-
# grid-engine
1+
# grid-engine
2+
3+
## Description
4+
5+
The **grid-engine** package provides classes for generating and manipulating grids. The grid-engine package is divided into two subpackages: **grid blueprint** and **grid**. The **grid blueprint** subpackage provides classes for generating and manipulating blueprints, which are the foundation of Grid objects created using this module. The **grid** subpackage provides classes for generating and manipulating Grid objects, which are the foundation of the grid engine.
6+
7+
## Usage
8+
9+
To use this package, import the necessary classes and functions. Here's an example:
10+
11+
```python
12+
import grid_engine
13+
from grid_engine import grid
14+
15+
# Create a grid
16+
grid = grid.Grid(cell_size=10, grid_dimensions=(1000, 1000))
17+
18+
# Save a grid
19+
grid.save_grid()
20+
21+
# Load a grid
22+
loaded_grid = grid.Grid.load_grid(1)
23+
```
24+
25+
grid-engine also provides a command line interface. To use it, run the following command:
26+
27+
```bash
28+
python -m grid_engine --help
29+
30+
# Output:
31+
# usage: grid [-h] [-i] [-b BLUEPRINT] [--ascii] [-l LOAD] [-t] [-ns NOISE_SCALE] [-no NOISE_OCTAVES] [-nr NOISE_ROUGHNESS] [-r ROWS] [-c COLUMNS] [-s SIZE] [-S] [-T TYPE] [-v]
32+
33+
# Generate a visualized grid from a blueprint. For producing a blueprint, see the blueprint module.
34+
35+
# options:
36+
# -h, --help show this help message and exit
37+
# -i, --interactive Run an interactive session
38+
# -b BLUEPRINT, --blueprint BLUEPRINT
39+
# Load a blueprint from a file
40+
# --ascii Print the grid as ascii
41+
# -l LOAD, --load LOAD Load a grid from a file
42+
# -t, --terrain Whether to generate terrain with the grid.
43+
# -ns NOISE_SCALE, --noise-scale NOISE_SCALE
44+
# Noise scale
45+
# -no NOISE_OCTAVES, --noise-octaves NOISE_OCTAVES
46+
# Noise octaves
47+
# -nr NOISE_ROUGHNESS, --noise-roughness NOISE_ROUGHNESS
48+
# Noise roughness
49+
# -r ROWS, --rows ROWS Number of rows in the grid
50+
# -c COLUMNS, --columns COLUMNS
51+
# Number of columns in the grid
52+
# -s SIZE, --size SIZE Size of each cell in the grid
53+
# -S, --save Save the grid object to a file
54+
# -T TYPE, --type TYPE Type of file to save the grid as
55+
# -v, --verbose Verbose output
56+
``````
57+
58+
![grid](src/grid/terrain_grids/test_joe6.png)
59+

0 commit comments

Comments
 (0)