author | truebrain |
Wed, 23 Apr 2008 12:05:32 +0000 | |
branch | noai |
changeset 10308 | 0c81dfce3e9b |
parent 10196 | aecabd927420 |
permissions | -rw-r--r-- |
9452
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
1 |
/* $Id$ */ |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
2 |
|
9833
89a64246458f
(svn r12496) [NoAI] -Documentation: give the .cpp files a nice uniform format too
truebrain
parents:
9452
diff
changeset
|
3 |
/** @file ai_accounting.cpp Implementation of AIAccounting. */ |
9452
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
4 |
|
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
5 |
#include "ai_accounting.hpp" |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
6 |
|
10196
aecabd927420
(svn r12728) [NoAI] -Codechange: always let functions return Money when they return something that can be quantified as money.
rubidium
parents:
9833
diff
changeset
|
7 |
Money AIAccounting::GetCosts() |
9452
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
8 |
{ |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
9 |
return this->GetDoCommandCosts(); |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
10 |
} |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
11 |
|
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
12 |
void AIAccounting::ResetCosts() |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
13 |
{ |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
14 |
this->SetDoCommandCosts(0); |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
15 |
} |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
16 |
|
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
17 |
AIAccounting::AIAccounting() |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
18 |
{ |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
19 |
this->last_costs = this->GetDoCommandCosts(); |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
20 |
this->SetDoCommandCosts(0); |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
21 |
} |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
22 |
|
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
23 |
AIAccounting::~AIAccounting() |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
24 |
{ |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
25 |
this->SetDoCommandCosts(this->last_costs); |
4c5eedbc3ba9
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff
changeset
|
26 |
} |