Exemple #1
0
        internal static void AbortGame(string gameId)
        {
            var game = TronGameService.GetExistingGame(gameId);

            //TODO: Abort game
            //game.Abort()

            TronGameService.RemoveGame(gameId);
        }
Exemple #2
0
        internal static void StartGame(HubMediator mediator, string gameId, ushort borderWidth, ushort borderHeight)
        {
            var tronGame = new Tron(mediator, gameId, borderWidth, borderHeight);

            tronGame.GameOver  += GameOver;
            tronGame.TurnMoved += TurnMoved;

            TronGameService.AddNewGame(gameId, tronGame);

            tronGame.Play();
        }
Exemple #3
0
        internal static void KeyPressed(string gameId, Keys keyPressed)
        {
            var game = TronGameService.GetExistingGame(gameId);

            game.ChangePlayerDirection(keyPressed);
        }