public void SetupStartPosition() { Window newGameWindow = new NewGameUI(); if (NewGameVM.VM == null) { NewGameVM.VM = new NewGameVM(); } newGameWindow.DataContext = NewGameVM.VM; if (This.Bot != null) { NewGameVM.VM.SelectedBot = This.Bot; } newGameWindow.ShowDialog(); if (NewGameUI.Reset) { NewGameUI.Reset = false; This.Board.ClearBoard(); this.CreatePieces(); this.White.SetCurrentMove(null); this.White.PreviousMove = null; this.White.Moves.Clear(); this.White.CapturedMaterials.Clear(); this.White.KingStatus = KingStatus.Move; this.Black.SetCurrentMove(null); this.Black.PreviousMove = null; this.Black.Moves.Clear(); this.Black.CapturedMaterials.Clear(); this.Black.KingStatus = KingStatus.Move; this.CurrentPlayer = this.White; This.Board.SetupStartPosition(); This.Board.ResetLegalMoves(); This.Board.ResetBoardColors(); } }
public void ReturnToMenu() { MainMenuUI.SetActive(true); NewGameUI.SetActive(false); }