-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathConvoySubversion.cpp
44 lines (38 loc) · 1.18 KB
/
ConvoySubversion.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
//==============================================================================
//
// ConvoySubversion.cpp
//
// Diplomacy AI Client - Part of the DAIDE project (www.daide.org.uk).
//
// (C) David Norman 2002 [email protected]
// (C) Greg Utas 2019-2025 [email protected]
//
// This software may be reused for non-commercial purposes without charge,
// and without notifying the authors. Use of any part of this software for
// commercial purposes without permission from the authors is prohibited.
//
#include "ConvoySubversion.h"
//------------------------------------------------------------------------------
namespace Diplomacy
{
ConvoySubversion::ConvoySubversion() :
subverted_army(NIL_PROVINCE),
number_of_subversions(0),
subversion_type(UNSUBVERTED_CONVOY)
{
}
//------------------------------------------------------------------------------
void ConvoySubversion::clear() // <b>
{
number_of_subversions = 0;
subversion_type = UNSUBVERTED_CONVOY;
}
//------------------------------------------------------------------------------
void ConvoySubversion::decrement()
{
if(--number_of_subversions == 0)
{
subversion_type = UNSUBVERTED_CONVOY;
}
}
}