private void PlayAgain_Click(object sender, RoutedEventArgs e) { Storyboard winnerBannerOut = this.FindResource("WinnerBannerOut") as Storyboard; winnerBannerOut.Begin(); boardHistories.Clear(); board = Game.NewBoard(); turn = 0; animationPaused = false; animationPending = false; RenderBoard(board); HandleAIMove(); }