forked from joshua840/snu_programming_methodology_project3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.h
More file actions
39 lines (31 loc) · 756 Bytes
/
Controller.h
File metadata and controls
39 lines (31 loc) · 756 Bytes
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
#ifndef __CONTROLLER_H_
#define __CONTROLLER_H_
#include "Food.h"
#include <iostream>
#include <vector>
#include <map>
typedef FoodInFridge *FoodPtr;
typedef map<string, vector<FoodPtr>> foodListType;
struct Shelf
{
int height;
vector<FoodPtr> vec;
Shelf(int height_) : height(height_){};
};
class Controller
{
public:
Controller(intPair, foodListType &);
void display();
virtual bool popFood(const string) = 0;
virtual bool stackFood(const string, intPair, int) = 0;
protected:
intPair size;
vector<Shelf> shelves;
foodListType &foodList;
vector<FoodPtr>::iterator findMinExpFood(const string);
private:
bool **storageGrid;
void drawFoodsInStorageGrid(int x, int y, int w, int h);
};
#endif