-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
53 lines (42 loc) · 1.13 KB
/
main.cpp
File metadata and controls
53 lines (42 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include <iostream>
#include <thread>
#include <windows.h>
#include "worldmap.h"
#include "random.h"
#include <exception>
#include "random.h"
using namespace std;
int main(void){
int x = 70;
int y = 35;
int resident_amount = 4;
worldmap m;
Random r;
while( true ){
resident_amount = r.range(2,20); // random resident amount
try{
m = worldmap(x,y);
m.set_debug( true );
m.setstate( true ); // Show Map
/* The 4 Kingdoms Test
dot b(m._x_min,m._y_max-1, '*');
dot c(m._x_max-1, 0, '@' );
dot a(0,0,'.');
dot d(m._x_max-1, m._y_max-1, '+' );
m.add( a );
m.add( b );
m.add( c );
m.add( d );
*/
m.auto_add_residents( resident_amount );
m.display_newmap(); // print the entire base map
m.display();
}
catch ( ... ){
cout << "Current: " << m.generations << ". Restarting..." << endl;
getchar();
}
}
return 0;
}