Esempio n. 1
0
        public static GameSession CreateSession(GameOption gameOption, Player[] players)
        {
            var newUID = Guid.NewGuid();
            var session = new GameSession { UID = newUID, GameOption = gameOption, Players = players, ActivePlayer = players[0] };

            foreach (var player in players)
            {
                player.PieceMoved += session.Player_PieceMoved;
            }

            session.InitializeBoardCellStatusList();

            return session;
        }
Esempio n. 2
0
 public GameViewModel(GameSession gameSession)
 {
     this.GameSession = gameSession;
 }