-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (46 loc) · 1.24 KB
/
Copy pathmain.cpp
File metadata and controls
51 lines (46 loc) · 1.24 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
#include <iostream>
#include <cstdlib>
#include <sstream>
#include "screen.hpp"
#include "world.hpp"
#include "sheep.hpp"
#include "human.hpp"
#include "wolf.hpp"
#include "grass.hpp"
#include "dandelion.hpp"
#include "guarana.hpp"
#include "nightshade.hpp"
#include "hogweed.hpp"
#include "turtle.hpp"
#include "fox.hpp"
#include "antelope.hpp"
//mistake the size should be in config
//mistake sheep should eat grass and dandelion
const int M = 30;
const int N = 60;
int main(){
//mistake should generate randomly
Screen mScreen(M, N);
World world(mScreen, M, N);
world.addOrganism<Sheep>();
world.addOrganism<Antelope>();
world.addOrganism<Antelope>();
world.addOrganism<Turtle>();
world.addOrganism<Turtle>();
world.addOrganism<Turtle>();
world.addOrganism<Wolf>();
world.addOrganism<Wolf>();
world.addOrganism<Fox>();
world.addOrganism<Fox>();
world.addOrganism<Fox>();
world.addOrganism<Hogweed>();
world.addOrganism<Dandelion>();
world.addOrganism<Nightshade>();
world.addOrganism<Human>();
world.addOrganism<Grass>();
world.addOrganism<Guarana>();
mScreen.PrintMessage("Controls: arrows move human, a activate ability, s save, r load, q quit, PgUp/PgDn scroll log");
world.DrawWorld();
world.Simulate();
return 0;
}