summaryrefslogtreecommitdiff
path: root/src/List.cpp
blob: 86049a3a2ae28926da2b5c1f135dac48eb95686d (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
29
30
31
32
#include "List.hpp"

List::List(vector <Location> i)
{
    for(int i = 0; i < 3; i++)
    {
        Location L;
        L.x = 150;
        L.y = 150+i;
        Character x ('@',4,L);
        men.push_back(x); 
    } 
    impassable = i;
}

void List::draw(WINDOW * w)
{
    for(int i = 0; i < men.size(); i++)
        men[i].draw(w);
}

void List::action()
{
    for(int i = 0; i < men.size(); i++)
        men[i].action(men,impassable);
}

void List::order(Location l)
{
    for(int i = 0; i < men.size(); i++)
        men[i].giveOrder(l);
}