forked from Ihsara/WarLight.AI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBotFactory.cs
More file actions
30 lines (28 loc) · 944 Bytes
/
BotFactory.cs
File metadata and controls
30 lines (28 loc) · 944 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WarLight.Shared.AI
{
public static class BotFactory
{
public static readonly string[] Names = new[] { "Wunderwaffe", "Prod", "ProdRandom", "Cowzow" };
public static IWarLightAI Construct(string name)
{
switch (name.ToLower())
{
case "wunderwaffe":
return new Wunderwaffe.Bot.BotMain();
case "prod":
return new Prod.BotMain(false);
case "prodrandom":
return new Prod.BotMain(true);
case "cowzow":
return new Cowzow.Bot.CowzowBot();
default:
throw new Exception("No bot found named " + name + ", supported names are: " + Names.JoinStrings(", "));
}
}
}
}