34 lines
911 B
C#
34 lines
911 B
C#
using System;
|
|
|
|
namespace MafiaServer
|
|
{
|
|
internal static class MafiaServer
|
|
{
|
|
private static Server _server;
|
|
private static bool _breakFlag;
|
|
public static Game Game;
|
|
|
|
private static void Main(string[] args)
|
|
{
|
|
Settings.Initialize();
|
|
Settings.Save();
|
|
Game = new Game();
|
|
_server = new Server();
|
|
while (!_breakFlag)
|
|
{
|
|
var input = Console.ReadLine();
|
|
if(input == null) continue;
|
|
switch (input.Split(" ")[0].ToLower())
|
|
{
|
|
case "stop":
|
|
_server.Stop("Manual stop");
|
|
_breakFlag = true;
|
|
break;
|
|
case "start":
|
|
Game.Start();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |