-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathAutomatedActionFactory.cs
More file actions
44 lines (41 loc) · 1.36 KB
/
AutomatedActionFactory.cs
File metadata and controls
44 lines (41 loc) · 1.36 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
using System;
using System.Collections.Generic;
using System.Text;
using DevChatter.Bot.Core.Games.DealNoDeal;
using DevChatter.Bot.Core.Systems.Chat;
using DevChatter.Bot.Core.Util;
namespace DevChatter.Bot.Core.Automation
{
public class AutomatedActionFactory : IAutomatedActionFactory
{
private readonly DealNoDealGame _dealNoDealGame;
private readonly IChatClient _chatClient;
public AutomatedActionFactory(DealNoDealGame dealNoDealGame, IChatClient chatClient)
{
_dealNoDealGame = dealNoDealGame;
_chatClient = chatClient;
}
public IIntervalAction GetIntervalAction(DealNoDealGameState gameState)
{
switch (gameState)
{
case DealNoDealGameState.ChosingStartingBoxes:
{
return new ChoseStartingBoxesAction(_dealNoDealGame, _chatClient);
}
case DealNoDealGameState.PickingBoxes:
{
return new PickBoxesAction(_dealNoDealGame, _chatClient);
}
case DealNoDealGameState.MakingADeal:
{
return new OfferDealAction(_dealNoDealGame, _chatClient);
}
default:
{
return null;
}
}
}
}
}