public AIWindow() { InitializeComponent(); game = new AIFrame(gameGrid,19,10); game.AIInitialize(new SimpleAI(19,10, game,new Simple_AI_Integrator())); ScoringBoard sb = new ScoringBoard(Scoring_Board_AI); game.RowsCleanEvent += sb.GetScore; }
public MainWindow() { InitializeComponent(); game = new MyGameFrame(gameGrid,19,11); scoreBoard = new ScoringBoard(Scoring_Board); preview = new PreviewWindow(game, PreviewImage); game.RowsCleanEvent += scoreBoard.GetScore; game.GameOverEvent += scoreBoard.WhenGameOver; }
public Singleplaywindow() { InitializeComponent(); // 在此点之下插入创建对象所需的代码。 game = new MyGameFrame(gameGrid,19,11); scoreBoard = new ScoringBoard(Scoring_Board); preview = new PreviewWindow(game, PreviewImage); game.RowsCleanEvent += scoreBoard.GetScore; game.RowsCleanEvent += Play; game.GameOverEvent += scoreBoard.WhenGameOver; //game.GameOverEvent += writeScoreRating; }