summaryrefslogtreecommitdiff
path: root/Modules/towns.b
blob: c41746217cc7bce81e9d183448bef363d86cf2ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
implement Towns;

include "towns.m";

init() {
	persons = load Persons "./persons.dis";
}

mktown(): ref Town {
	return ref Town;
}

Town.stringify(t: self ref Town): string {
	Person: import persons;

	s := "Name: " + t.name + "\nSize: " + string len t.pop + "\nMembers:";

	for(i := 0; i < len t.pop; i++)
		s += "\n→ " + t.pop[i].stringify();

	return s;
}