Below I have an array that works but it is far too long and I am thinking there is a far easier way to generate the same result using a loop but I just can't get my head around it at the moment. The array is as follows:
var CardDeck = new Array();
CardDeck[0] = new C1();
CardDeck[1] = new C2();
CardDeck[2] = new C3();
CardDeck[3] = new C4();
CardDeck[4] = new C5();
CardDeck[5] = new C6();
CardDeck[6] = new C7();
CardDeck[7] = new C8();
CardDeck[8] = new C9();
CardDeck[9] = new C10();
CardDeck[10] = new C11();
CardDeck[11] = new C12();
CardDeck[12] = new C13();
CardDeck[13] = new D1();
CardDeck[14] = new D2();
CardDeck[15] = new D3();
CardDeck[16] = new D4();
CardDeck[17] = new D5();
CardDeck[18] = new D6();
CardDeck[19] = new D7();
CardDeck[20] = new D8();
CardDeck[21] = new D9();
CardDeck[22] = new D10();
CardDeck[23] = new D11();
CardDeck[24] = new D12();
CardDeck[25] = new D13();
CardDeck[26] = new H1();
CardDeck[27] = new H2();
CardDeck[28] = new H3();
CardDeck[29] = new H4();
CardDeck[30] = new H5();
CardDeck[31] = new H6();
CardDeck[32] = new H7();
CardDeck[33] = new H8();
CardDeck[34] = new H9();
CardDeck[35] = new H10();
CardDeck[36] = new H11();
CardDeck[37] = new H12();
CardDeck[38] = new H13();
CardDeck[39] = new S1();
CardDeck[40] = new S2();
CardDeck[41] = new S3();
CardDeck[42] = new S4();
CardDeck[43] = new S5();
CardDeck[44] = new S6();
CardDeck[45] = new S7();
CardDeck[46] = new S8();
CardDeck[47] = new S9();
CardDeck[48] = new S10();
CardDeck[49] = new S11();
CardDeck[50] = new S12();
CardDeck[51] = new S13();
Can someone tell me how to put that together into a loop that will generate the same results?
Thanks Ben