Sometimes in the past..
Our marrying machine's programState: Stopped
1
System.Today = new DateTime("17.11.2007");
2
AllInvolved = Gabuse, Pepa, Sabina, Mol, Parents, Brothers, ...;
3
 
4
foreach(Person p in AllInvolved)
5
p.DressYourself();
6
 
7
AllInvolved.MoveToChurch();
8
 
9
while(Ceremony.Running)
10
{
11
if (Priest.Talking)
12
{
13
AllInvolved.ListenToHim();
14
}
15
else
16
{
17
if (Priest.ExpectingYes)
18
{
19
if (Pepa.SayYes() && Gabuse.SayYes())
20
Priest.FinishCeremony()
21
else
22
{
23
AllInvolved.ForgetLastMinute();
24
(Pepa+Gabuse).ConcentrateMore();
25
}
26
}
27
else
28
{
29
// priest is still and we are not supposed to say "Yes"
30
// what is happening?
31
AllInvolved.Wait();
32
Priest.TryMore();
33
}
34
}
35
}
36
 
37
Console.WriteLine("Success");
38
 
39
AllInvolved.MoveToFeast();
40
while(!Gabuse.IsTired && !Pepa.IsTired)
41
{
42
while(!AllInvolved.Full)
43
AllInvolved.Eat();
44
 
45
if (Feast.IsDancingTime)
46
{
47
AllInvolved.MakePairs();
48
AllInvolved.Dance();
49
}
50
}
51
 
52
53
AllInvolved.GoHome();
54
(Gabuse+Pepa).Enjoy();
Output