I would like to implement UI matrix pattern, which should generate dynamically. By receiving input parameter it should decide what would be UI matrix pattern dimensions: For
After reading all answers I managed to solve it:
public chooseGamePattern() {
if (this.cardType === 3) {
this.horizontalElementLocation = 9;
this.verticalElementLocation = 3;
this.rows = new Array(this.verticalElementLocation);
this.elements = new Array(this.horizontalElementLocation);
}
It works for me. Thank You all!!!