コード例 #1
0
 public MainWindow()
 {
     InitializeComponent();
     hs   = new Highscore(highscoretb, currentscoretb, player1score, player2score);
     ni   = new NameInput(UName1Input, UName2Input, UName1Label, UName2Label);
     grid = new MemoryGrid(GameGrid, NR_OF_COLS, NR_OF_ROWS, hs, ni);
 }
コード例 #2
0
        public MemoryGrid(Grid grid, int cols, int rows, Highscore hs, NameInput ni)
        {
            //constructor
            this.hs   = hs;
            this.grid = grid;
            this.cols = cols;
            this.rows = rows;
            this.ni   = ni;
            initializeGameGrid(cols, rows);
            AddImages();
            hs.ReadHighscore();


            Image image = new Image();

            image.MouseDown += new MouseButtonEventHandler(CardClick);
        }