This repository was archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
51 lines (41 loc) · 1.49 KB
/
Program.cs
File metadata and controls
51 lines (41 loc) · 1.49 KB
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
namespace NationStates.NET.Example
{
using NationStates.NET;
using System;
public class Program
{
public static void Main(string[] args)
{
// With NS.NET, you can interact with your nation.
CreateADispatch();
// You can also get information about nations, regions, the world and the world assembly.
GetInformation();
}
public static void CreateADispatch()
{
// Initialise the nation.
Nation n = new("dabberwocky");
// Set the nation's password.
n.Pin = "totallyLegitPassword";
// Create a dispatch
string title = "An interesting title.";
string text = "Hello world!";
DispatchCategory category = DispatchCategory.Meta;
DispatchMeta subCategory = DispatchMeta.Reference;
n.AddDispatch(title, text, category, subCategory);
}
public static void GetInformation()
{
// Get a nation's population
Nation n = new("dabberwocky");
Console.WriteLine(n.Population);
// Get a region's delegate
Region r = new("the united federations");
Console.WriteLine(r.Delegate);
// Get the number of nations in the world.
Console.WriteLine(World.NumNations);
// Get the number of World Assembly Delegates.
Console.WriteLine(WorldAssembly.NumDelegates);
}
}
}