Пример #1
0
        static void Main(string[] args)
        {
            var logger = new LoggerConfiguration().WriteTo.Console()
                         .CreateLogger();

            Serilog.Log.Logger = logger;
            var config = ConfigurationFactory.ParseString(@"
 loglevel = DEBUG
}");

            logger.Information("Starting Actor System");
            Systems           = ActorSystem.Create("diceDistributedGame", config);
            PlayerCoordinator = Systems.ActorOf(Props.Create(() => new PlayBoardActor()));

            DisplayPlayBoardInstructions();


            while (true)
            {
                var action = System.Console.ReadLine();

                if (action.Contains("1"))
                {
                    System.Console.Write("Player Name: ");
                    var playerName = System.Console.ReadLine();
                    CreateNewGame(playerName);
                }
                else if (action.Contains("2"))
                {
                    SelectExistingsGames();
                }
                else if (action.Contains("3"))
                {
                    //DisplayPlayer(playerName);
                }
                else if (action.Contains("error"))
                {
                    //ErrorPlayer(playerName);
                }
                else
                {
                    System.Console.WriteLine("Unknown command");
                }
            }
        }