summaryrefslogtreecommitdiff
path: root/inc/list.hpp
blob: 64ca522945032e2a0b0ab2cad2ed6d922000ee07 (plain)
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
#ifndef list_h
#define list_h

#include <SDL2/SDL.h>
#include <list>

#include "creature.hpp"
#include "resource.hpp"
#include "window.hpp"
#include "constants.hpp"

class List
{
	public:
		List(Window m);
		void Behavior();
		void Place();
        void Remove();
		double Distance(SDL_Rect A, SDL_Rect B){return sqrt(pow(A.x-B.x,2)+pow(A.y-B.y,2));};    
        list<Entity*> getNear(Creature C);

	private:
		Window main = Window("do not create new window.");
		list<Resource> R;
		list<Creature> C;
};

#endif