This repository has been archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Program.cs
71 lines (59 loc) · 2.22 KB
/
Program.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
using SteamBotLite.ApplicationInterfaces.HTTP_Discord;
using System;
using System.Collections.Generic;
using System.Threading;
namespace SteamBotLite
{
internal class Program
{
public static void AssignConnection(UserHandler userhandler, ApplicationInterface applicationinterface)
{
userhandler.AssignAppInterface(applicationinterface);
applicationinterface.AssignUserHandler(userhandler);
}
public void DoWork(ApplicationInterface Bot)
{
bool Running = true;
while (Running)
{
Bot.tick();
}
}
private static void Main(string[] args)
{
Console.WriteLine("RUNNING");
ConsoleUserHandler consolehandler = new ConsoleUserHandler();
MediaBot MediaHandler = new MediaBot();
VBot vbot_instance = new VBot();
GhostChecker ghostchecker = new GhostChecker();
List<UserHandler> user_handlers = new List<UserHandler>() {
consolehandler, MediaHandler, vbot_instance, ghostchecker
};
HttpInterface Test_Bot = new HttpInterface();
SteamAccountVBot SteamPlatformInterface = new SteamAccountVBot();
List<ApplicationInterface> services = new List<ApplicationInterface>() {
SteamPlatformInterface, Test_Bot
};
foreach(UserHandler handler in user_handlers)
{
foreach(ApplicationInterface service_instance in services)
{
AssignConnection(handler, service_instance);
}
}
Thread[] BotThreads = new Thread[services.Count];
//Start looping and iterating//
for (int x = 0; x < services.Count; x++)
{
BotThreads[x] = new Thread(new ThreadStart(services[x].StartTickThreadLoop));
BotThreads[x].Priority = ThreadPriority.BelowNormal;
BotThreads[x].Start();
}
bool Running = true;
while (Running)
{
System.Threading.Thread.Sleep(30000);
}
}
}
}