public ObservableChessBoard(IChessBoard board, Windows.UI.Core.CoreDispatcher uiDispatcher) { this.uiDispatcher = uiDispatcher; this.board = board; for (int row = 0; row < ChessBoard.Size; row++) { for (int col = 0; col < ChessBoard.Size; col++) { if (board.PieceAt(col, row) != null) { Add(new ObservableChessPiece(board.PieceAt(col, row), row, col, uiDispatcher)); } } } }