public MainWindow() { InitializeComponent(); soccerGame = new SoccerGameWithAI(BoardWidth, BoardHeight); Board.Background = Brushes.Green; DrawPitch(); DrawPoints(); Stopwatch watch = new Stopwatch(); watch.Start(); /*for (int i = 0; i < 400000; i++) * { * soccerGame.currentState.copy(); * }*/ watch.Stop(); BoardState second = soccerGame.currentState.copy(); BoardState third = soccerGame.currentState.copy(); /*second.markOnBoardState(new System.Drawing.Point(5, 5), Direction.up); * third.markOnBoardState(new System.Drawing.Point(5, 4), Direction.down); * * second.markOnBoardState(new System.Drawing.Point(5, 5), Direction.upleft); * third.markOnBoardState(new System.Drawing.Point(4, 4), Direction.downright); * * second.markOnBoardState(new System.Drawing.Point(5, 5), Direction.left); * third.markOnBoardState(new System.Drawing.Point(4, 5), Direction.right); * * second.markOnBoardState(new System.Drawing.Point(5, 5), Direction.upright); * third.markOnBoardState(new System.Drawing.Point(6, 4), Direction.downleft); * * second.markOnBoardState(new System.Drawing.Point(5, 5), Direction.up); * second.markOnBoardState(new System.Drawing.Point(5, 4), Direction.left); * second.markOnBoardState(new System.Drawing.Point(4, 4), Direction.downright); * //hasher.Add(second); * third.markOnBoardState(new System.Drawing.Point(5, 5), Direction.upleft); * third.markOnBoardState(new System.Drawing.Point(4, 4), Direction.right); * third.markOnBoardState(new System.Drawing.Point(5, 4), Direction.down); */ /*bool b = false; * DebugStatistics.wholeTime = watch.Elapsed; * if (hasher.Contains(third) == true) * { * b = true; * } * else * { * b = false; * } * DialogBox box = new DialogBox(hasher.Contains(third).ToString());*/ //box.ShowDialog(); }
private void resetGame() { Board.Children.Clear(); soccerGame = new SoccerGameWithAI(BoardWidth, BoardHeight); Board.Background = Brushes.Green; DrawPitch(); DrawPoints(); currentPoint = new Point(BoardWidth / 2, BoardHeight / 2); //Move(Direction.up); //Move(Direction.left); //Move(Direction.upright); }