forked from kyordhel/GPSRCmdGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFactory.cs
197 lines (181 loc) · 9.14 KB
/
Factory.cs
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
using System;
using System.Collections.Generic;
namespace GPSRCmdGen
{
/// <summary>
/// Helper class that produces lists and containers with predefined example data
/// </summary>
public static class Factory
{
/// <summary>
/// Gets a list with predefined gestures.
/// </summary>
/// <returns>A list with predefined gestures.</returns>
public static List<Gesture> GetDefaultGestures ()
{
List<Gesture> gestures = new List<Gesture> ();
gestures.Add (new Gesture("waving", DifficultyDegree.Easy));
gestures.Add (new Gesture("rising left arm", DifficultyDegree.Easy));
gestures.Add (new Gesture("rising right arm", DifficultyDegree.Easy));
gestures.Add (new Gesture("pointing left", DifficultyDegree.Easy));
gestures.Add (new Gesture("pointing right", DifficultyDegree.Easy));
return gestures;
}
/// <summary>
/// Gets a list with predefined locations.
/// </summary>
/// <returns>A list with predefined locations.</returns>
public static List<Room> GetDefaultLocations ()
{
List<Room> tmp = new List<Room>();
Room bedroom = new Room("bedroom");
bedroom.AddBeacon("chair");
bedroom.AddPlacement("bin");
bedroom.AddLocation("bed", true, true);
tmp.Add(bedroom);
tmp.Add (new Room ("bathroom"));
tmp.Add(new Room("dining room"));
tmp.Add(new Room("hall"));
tmp.Add(new Room("kitchen"));
tmp.Add(new Room("corridor"));
return tmp;
}
/// <summary>
/// Gets a list with predefined names.
/// </summary>
/// <returns>A list with predefined names.</returns>
public static List<PersonName> GetDefaultNames ()
{
List<PersonName> names = new List<PersonName> ();
string[] male = new string[] {
"Alfred",
"Charles",
"Daniel",
"James",
"John",
"Luis",
"Paul",
"Richard",
"Robert",
"Steve"
};
string[] female = new string[] {
"Anna",
"Beth",
"Carmen",
"Jennifer",
"Jessica",
"Kimberly",
"Kristina",
"Laura",
"Mary",
"Sarah"
};
foreach(string s in female)
names.Add(new PersonName(s, Gender.Female));
foreach(string s in male)
names.Add(new PersonName(s, Gender.Male));
return names;
}
/// <summary>
/// Gets a GPSRObjectManager which contains example GPSRObjects grouped by category.
/// </summary>
/// <returns>A GPSRObjectManager with default objects.</returns>
public static List<Category> GetDefaultObjects ()
{
List<Category> tmp = new List<Category>();
SpecificLocation shelf = SpecificLocation.Placement("shelf");
shelf.Room = new Room("dining room");
Category beverages = new Category ("beverages", shelf);
beverages.AddObject ("milk", GPSRObjectType.Known );
beverages.AddObject ("coke", GPSRObjectType.Known );
beverages.AddObject ("orange juice", GPSRObjectType.Known );
beverages.AddObject ("beer", GPSRObjectType.Known, DifficultyDegree.High );
tmp.Add (beverages);
SpecificLocation kitchenTable = SpecificLocation.Placement("kitchen table");
kitchenTable.Room = new Room("kitchen");
Category fruits = new Category ("fruits", kitchenTable);
fruits.AddObject ("apple", GPSRObjectType.Alike );
fruits.AddObject ("banana", GPSRObjectType.Alike );
fruits.AddObject ("orange", GPSRObjectType.Alike );
fruits.AddObject ("pear", GPSRObjectType.Alike );
tmp.Add (fruits);
SpecificLocation dinnerTable = SpecificLocation.Placement("dinner table");
dinnerTable.Room = new Room("dining room");
Category snacks = new Category ("snacks", dinnerTable);
snacks.AddObject ("lays", GPSRObjectType.Known, DifficultyDegree.Moderate );
snacks.AddObject ("crackers", GPSRObjectType.Known );
snacks.AddObject ("pringles", GPSRObjectType.Known );
snacks.AddObject ("chocolate", GPSRObjectType.Known );
tmp.Add (snacks);
SpecificLocation bathroomLocker = SpecificLocation.Placement("bathroom locker");
bathroomLocker.Room = new Room("bathroom");
Category cleaningStuff = new Category ("cleaning stuff", bathroomLocker);
cleaningStuff.AddObject ("cloth", GPSRObjectType.Alike, DifficultyDegree.High );
cleaningStuff.AddObject ("detergent", GPSRObjectType.Known, DifficultyDegree.High);
cleaningStuff.AddObject ("sponge", GPSRObjectType.Known );
cleaningStuff.AddObject ("brush", GPSRObjectType.Known, DifficultyDegree.High );
tmp.Add (cleaningStuff);
return tmp;
}
/// <summary>
/// Gets a list with predefined questions.
/// </summary>
/// <returns>A list with predefined questions.</returns>
internal static List<PredefindedQuestion> GetDefaultQuestions()
{
List<PredefindedQuestion> q = new List<PredefindedQuestion>();
q.Add(new PredefindedQuestion("How many rings has the Olympic flag?", "Five"));
q.Add(new PredefindedQuestion("Who was the first man in space?", "Yuri Gagarin"));
q.Add(new PredefindedQuestion("In which year RoboCup was founded?", "1997"));
q.Add(new PredefindedQuestion("Who played and lost against Deep Blue in 1996?", "Gary Kaspárov"));
q.Add(new PredefindedQuestion("What is the name of the Simpson's oldest daughter?", "Lisa"));
q.Add(new PredefindedQuestion("How many countries are in Europe?", "50"));
q.Add(new PredefindedQuestion("Who was Aristotle's teacher?", "Plato"));
q.Add(new PredefindedQuestion("What is the capital of Japan?", "Tokyo"));
q.Add(new PredefindedQuestion("What is the capital of Poland?", "Warsaw"));
q.Add(new PredefindedQuestion("What time is it?", "(Robot must answer with the current time)"));
q.Add(new PredefindedQuestion("What is the name of the USS Enterprise's commander?", "James T. Kirk"));
q.Add(new PredefindedQuestion("What is the name of Luke Skaywalker's father?", "Anakin Skywalker / Darth Vader"));
q.Add(new PredefindedQuestion("What's the name of the composer of The Four Seasons?", "Antonio Vivaldi"));
q.Add(new PredefindedQuestion("For which name is better known La Gioconda?", "Mona Lisa"));
q.Add(new PredefindedQuestion("What was the first James Bond film?", "Dr No"));
q.Add(new PredefindedQuestion("What was discovered in 1922 by Howard Carter?", "Tutankamen tomb"));
q.Add(new PredefindedQuestion("What is the national flower of Japan?", "Chrysanthemum"));
q.Add(new PredefindedQuestion("Where in France do claret wines come from?", "Bordeaux"));
q.Add(new PredefindedQuestion("What is your name?", "(Robot must answer with its own name)"));
q.Add(new PredefindedQuestion("What is your team's name?", "(Robot must answer with the team name)"));
q.Add(new PredefindedQuestion("What is the national national fruit of Serbia?", "Plum"));
q.Add(new PredefindedQuestion("On which national flag is there an eagle and a snake?", "Mexico"));
q.Add(new PredefindedQuestion("St Boniface is the Patron Saint of which country?", "Germany"));
q.Add(new PredefindedQuestion("A pearmain is what type of fruit?", "Apple"));
q.Add(new PredefindedQuestion("In Chinese mythology what is Taimut?", "A Dragon"));
q.Add(new PredefindedQuestion("What is ikebana?", "Flower arranging"));
q.Add(new PredefindedQuestion("A bind is a group of what type of fish?", "Salmon"));
q.Add(new PredefindedQuestion("Which leader lives in the Potola?", "Dalai Lama"));
q.Add(new PredefindedQuestion("Who saved Andromeda from the sea monster?", "Perseus"));
q.Add(new PredefindedQuestion("What is the answer to the ultimate question about life, the universe and everything?", "42"));
q.Add(new PredefindedQuestion("What is the oldest most widely used drug on earth?", "Alcohol"));
q.Add(new PredefindedQuestion("What is the worlds most popular green vegetable?", "Lettuce"));
q.Add(new PredefindedQuestion("What is Erse?", "Irish Gaelic language"));
q.Add(new PredefindedQuestion("Which famous person invented the cat flap?", "Isaac Newton"));
q.Add(new PredefindedQuestion("Which country grows the most potatoes?", "Russia"));
q.Add(new PredefindedQuestion("What fish can hold objects in its tail?", "Sea Horse"));
q.Add(new PredefindedQuestion("Greek mathematician cylinder enclosed sphere carved on grave?", "Archimedes"));
q.Add(new PredefindedQuestion("Who was Agrippa's son?", "Nero"));
q.Add(new PredefindedQuestion("An alloy of Iron - Chromium and Nickel makes what?", "Stainless Steel"));
q.Add(new PredefindedQuestion("Freyr was the Norse god of what?", "Fertility"));
q.Add(new PredefindedQuestion("Who was known as the Little Brown Saint?", "Ghandi"));
q.Add(new PredefindedQuestion("Who was the Goddess of the rainbow?", "Iris"));
q.Add(new PredefindedQuestion("What is a quadriga?", "Roman 4 horse chariot"));
q.Add(new PredefindedQuestion("Which country grew the first Orange?", "China"));
q.Add(new PredefindedQuestion("Which country was the first to introduce old age pensions?", "Germany"));
q.Add(new PredefindedQuestion("Which race destroyed Vulcan Planet?", "Romulans"));
q.Add(new PredefindedQuestion("William Hartnell was the first to play what TV character?", "Dr. Who"));
q.Add(new PredefindedQuestion("The murder of Gonzago was performed in what Shakespeare play?", "Hamlet"));
q.Add(new PredefindedQuestion("Which goddess sprang full grown from the forehead of her father Zeus?", "Athena"));
q.Add(new PredefindedQuestion("Which insect has the best eyesight?", "Dragonfly"));
return q;
}
}
}