Beispiel #1
0
        // registation of new local game of player vs computer for storing game movments.
        public static void RegisterNewLocalGamePlay()
        {
            GameForm form1Ref = (GameForm)Application.OpenForms["GameForm"];

            Thread thread = new Thread(delegate()
            {
                DTO_GamePlay gamePlay = new DTO_GamePlay {
                    hostPlayerID = GameController.loggedInAccountPlayerPlaying.Id, joinedPlayerID = Constants.GM_PLAYER_ID, createDate = DateTime.Now.ToLocalTime(), gameName = GameController.loggedInAccount.NAME + " VS Checkers"
                };
                GameController.currentPlayingGameID = duplexServiceClient.ClientAddGame(gamePlay);
                form1Ref.ShowAndStartLocalGamePlay();
            });

            thread.Start();
        }