private void NewGame(string gameName, bool twoPlayer) { Game = new BaseGame(gameName); Game.TwoPlayer = twoPlayer; if (Game.TwoPlayer) { colHighScore.Width = new GridLength(0, GridUnitType.Star); colPlayer2.Width = new GridLength(2, GridUnitType.Star); } else { colHighScore.Width = new GridLength(2, GridUnitType.Star); colPlayer2.Width = new GridLength(0, GridUnitType.Star); } NewRound(); this.DataContext = Game; //This tells it where to look for dependency properties }
private void NewGame(string gameName) { Game = new BaseGame(gameName); Game.TwoPlayer = true; Game.ActivePlayer.BallsLeft = 2; board.Children.Clear(); lblDraw.Visibility = Visibility.Hidden; this.DataContext = Game; //This tells it where to look for dependency properties }
private void NewGame(string gameName) { Game = new BaseGame(gameName); this.DataContext = Game; //This tells it where to look for dependency properties }