Skip to content

Commit cf3a526

Browse files
committed
adding README.md for main executable
1 parent 351b089 commit cf3a526

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

demo/8-interaction/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Basic Usage
2+
3+
## Ubuntu
4+
5+
```bash
6+
./test.out 11 120000
7+
```
8+
9+
## Windows
10+
11+
```bash
12+
./test.exe 11 120000
13+
```
14+
15+
The first two arguments are seed parameters. Minor changes to these parameters will result in a new terrain layout at the start of simulation. Running the simulation twice with same parameters will produce the same terrain layout.
16+
17+
For best results, we recommend keeping seed parameters at the same orders of magnitude shown above.
18+
19+
If arguments are not specified, a set of default seed parameters will be used. This will run a simulation starting from a default world that's used to test how changes to code affect simulation behavior.
20+
21+
On Windows, you can simply click the executable. This will run a simulation starting from the default world.

demo/8-interaction/_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,11 @@ namespace minerals{
113113

114114
int main(int argc, char *argv[]) {
115115
std::vector<std::string> arguments(argv, argv + argc);
116-
std::cout << std::to_string(argc) << std::endl;
117116
float seed1(argc<=1? 12.0f : std::stoi(arguments[1]));
118117
float seed2(argc<=2? 1.1e4f : std::stoi(arguments[2]));
119118

119+
std::cout << "seed parameters: " << std::to_string(seed1) << ", " << std::to_string(seed2) << std::endl;
120+
120121
// initialize GLFW
121122
if (!glfwInit()) {
122123
std::cout << stderr << " ERROR: could not start GLFW3" << std::endl;

0 commit comments

Comments
 (0)