-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemotion.cpp
50 lines (41 loc) · 1.2 KB
/
emotion.cpp
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
// name: emotion.cpp
// version: 1.0
// description: creates emotions
// libraries
#include <iostream>
#include <fstream>
#include <sstream>
#include <string.h>
#include <stdlib.h>
// namespaces
using namespace std;
// emotion class header
#include "emotion.h"
/*
// constructors
emotion::emotion() {
food.AddConnector(health, increase_dramatically);
food.AddConnector(love, increase_slightly);
sleep.AddConnector(health, increase_dramatically);
health.AddConnector(sleep, decrease_slightly);
}
emotion::emotion(char *raw) { storage = raw; }
// operators
void emotion::operator=(char *raw) { storage = raw; }
// functions
void connector::AddConnector(connector &C, type_of_affection afc) {
// something here
}
void connector::ChangeValue(double newvalue) {
double delta_value = newvalue - value;
for (int i = 0; i < connections.size(); ++i) {
connections[i].pAffect->Affect(delta_value,
connections[i].afc);
}
}
void connector::Affect(double deltavalue, type_of_affection afc) {
// ...add/decr this->value depending on type of affection
// Don't use "ChangeValue" for circle-connections
// or handle circle conenctions better
}
*/