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; }
public GameViewModel(GameSession gameSession) { this.GameSession = gameSession; }