Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.20 KB | None | 0 0
  1. //PC CASE
  2. enum Vormfactor {
  3. atx, matx, itx
  4. }
  5.  
  6. enum Color {
  7. black, gray, blue, white, red
  8. }
  9.  
  10. class pcCase {
  11. name: string;
  12. ondersteuntVormFactoren: Vormfactor [] = [Vormfactor.atx, Vormfactor.matx, Vormfactor.itx]
  13. color: any;
  14. material: any;
  15. length: number;
  16. width: number;
  17. height: number;
  18. maxGpuLength: number;
  19. maxCpuCoolerHeight: number;
  20. expSlots: number;
  21. ssdDriveBays: number;
  22. hddDriveBays: number;
  23.  
  24. ondersteunt(motherBoard: motherBoard) {
  25. return this.ondersteuntVormFactoren.indexOf (motherBoard.vormFactoren) >= 0
  26.  
  27. }
  28.  
  29. constructor (strName: string, strColor: any, anyMaterial: any,
  30. numLength: any, numWidth: number, numHeight: number, numGpuLength: number, numCpuCoolerHeight: number,
  31. numExpSlots: number, numSsdDriveBays: number, numHddDriveBays: number)
  32. {
  33. this.name = strName;
  34. this.color = strColor;
  35. this.material = anyMaterial;
  36. this.length = numLength;
  37. this.height = numHeight;
  38. this.width = numWidth;
  39. this.maxGpuLength = numGpuLength;
  40. this.maxCpuCoolerHeight = numCpuCoolerHeight;
  41. this.expSlots = numExpSlots;
  42. this.ssdDriveBays = numSsdDriveBays;
  43. this.hddDriveBays = numHddDriveBays;
  44. }
  45. };
  46.  
  47.  
  48. //ATX PC Cases
  49. let coolermastermb520 = new pcCase ("Coolermaster MB520", ["red","blue", "white", "black"], ["steel", "plastic", "tempered glass"], 496, 217, 468, 410, 165, 7, 2, 4);
  50. let nzxth510 = new pcCase("NZXT H510", ["white", "black"], "steel", 428, 210, 468, 381, 160, 7, 3, 3);
  51. let corsairicue220t = new pcCase ("Corsair iCUE 220t", "white","steel", 395, 210, 450, 300, 160, 7, 2, 2);
  52. let fractaldesignmeshifyc = new pcCase("Fractal Design Meshify C", "black","steel", 395, 212, 440, 315, 172, 7, 3, 2);
  53. let phantekseclipsep300 = new pcCase ("Phantekseclipse P300", "black","steel" , 400, 200, 450, 330, 160, 7, 2, 2);
  54. let sharkoontg4 = new pcCase ("Sharkoon TG4", "black","steel" , 455, 200, 430, 375, 160, 6, 4, 2);
  55. //m-ATX PC Cases
  56. let coolermasterq300l = new pcCase ("Coolermaster Q300L", "black","steel", 387, 230, 381, 360, 159, 4, 2, 1);
  57. let nzxth400 = new pcCase ("NZXT H400", "black","steel" , 421, 210, 417, 360, 159, 4, 3, 1);
  58. let corsaircrystal280x = new pcCase ("Corsair Crystal 280X", "black","steel", 398, 276, 351, 300, 180, 4, 3, 2);
  59. let fractaldesignfocusgmini = new pcCase ("Fractal Design Focus G mini", "black","steel" , 464, 205, 383, 380, 165, 4, 1, 2);
  60. let phanteksenthooevolv = new pcCase ("Phanteks Enthoo Evolv", ["black", "gray", "white"], ["steel", "tempered glass", "aluminum"], 400, 230, 453, 319, 192, 4, 2,2);
  61. let sharkoons1000window = new pcCase ("Sharkoon s1000 Window", "black", ["steel", "tempered glass", "aluminum"], 453, 195, 402, 400, 150, 4, 2, 2);
  62. //ITX PC Cases
  63. let coolermastermch100 = new pcCase ("Coolermaster MCH100", ["black", "gray"], ["steel", "plastic"], 312, 216, 301, 210, 83, 2, 3, 1);
  64. let nzxth210 = new pcCase ("NZXT H210", ["black", "gray"], ["steel", "tempered glass"], 372, 210, 349, 325, 165, 2, 4, 1);
  65. let fractaldesignnode304 = new pcCase ("Fractal Design Node 304", ["black", "white"], ["steel", "tempered glass"], 372, 250, 210, 310, 165, 2, 3, 1);
  66. let phanteksenthooevolvshiftair = new pcCase ("Phanteks Enthoo Evolv Shiftair", ["black", "gray"], "metal", 370, 225, 180, 315, 150, 2, 1 ,1);
  67. let sharkoonsharkzonec10 = new pcCase ("Sharkoon SHarkzone C10", ["black", "gray"], "metal", 370, 225, 180, 315, 150, 2, 1, 1);
  68.  
  69. //MOTHERBOARD
  70. class motherBoard {
  71. vormFactoren: Vormfactor;
  72. name: string;
  73. atx: boolean;
  74. mATX: boolean;
  75. ITX: boolean;
  76. overclock: boolean;
  77. ramSlots: number;
  78. memory: any;
  79. ddrSpeed: any;
  80. socket: any;
  81. pciSlots: number;
  82. m2Slots: number;
  83. sataConnectors: number;
  84. usb31: number;
  85. usb20: number;
  86. rgbHeader: number;
  87.  
  88. constructor (strName: string, formaat: Vormfactor, boolOc: boolean, numRamSlots: number,
  89. anyMemory: any, anyDdrMemory: any, anySocket: any, numPciSlots: number, numM2Slots: number,
  90. numSataConnectors: number, numUsb31: number, numUsb20: number, numRgbHeader:number)
  91. {
  92. this.name = strName;
  93. this.vormFactoren = formaat;
  94. this.overclock = boolOc;
  95. this.ramSlots = numRamSlots;
  96. this.memory = anyMemory;
  97. this.ddrSpeed = anyDdrMemory;
  98. this.socket = anySocket;
  99. this.pciSlots = numPciSlots;
  100. this.m2Slots = numM2Slots;
  101. this.sataConnectors = numSataConnectors;
  102. this.usb31 = numUsb31;
  103. this.usb20 = numUsb20;
  104. this.rgbHeader = numRgbHeader;
  105. }
  106. };
  107.  
  108. //ATX Motherboards Intel
  109. let gigabytez390gamingx = new motherBoard ("Gigabyte Z390 GamingX", Vormfactor.atx, true, 4, "DDR4", "4266MHz", "1151", 2, 2, 6, 5, 2,1);
  110. let msiz390apro = new motherBoard ("MSI Z390-A Pro", Vormfactor.atx, true, 4, "DDR4", "4400MHz", "1151", 2, 2, 6, 4, 2, 1);
  111. let asusrogstrixb360fgaming = new motherBoard ("Asus ROG Strix B360-F Gaming", Vormfactor.atx, false, 4, "DDR4", "2666MHz","1151", 2, 2, 6, 3, 4, 1);
  112. let msib360apro = new motherBoard ("MSI 360-A Pro", Vormfactor.atx, false, 4, "DDR4", "2666MHz", "1151", 2, 1, 6, 2, 2, 0);
  113. //m-ATX Motherboards Intel
  114. let gigabytez390mgaming = new motherBoard ("Gigabyte Z390M Gaming", Vormfactor.matx, true, 4, "DDR4", "4266MHz", "1151", 2, 2, 6, 5, 2, 1);
  115. let asusrogstrixb360ggaming = new motherBoard ("Asus ROG Strix B360-G Gaming", Vormfactor.matx, false, 4, "DDR4", "2666MHz", "1151", 1, 2, 6, 6, 0, 1);
  116. //ITX Motherboards Intel
  117. let gigabyteaorusz390pro = new motherBoard ("Gigabyte Aorus I Z390 Pro", Vormfactor.itx, true, 2, "DDR4", "4400MHz", "1151", 1, 2, 4, 5, 0, 1);
  118. let asusrogstrixb360lggaming = new motherBoard ("Asus ROG Strix B360-l Gaming", Vormfactor.itx, false, 2, "DDR4", "2666MHz", "1151", 1, 2, 4, 4, 2, 0);
  119.  
  120. //ATX Motherboards AMD
  121. let gigabyteaorusx570elite = new motherBoard ("Gigabyte Aorus X570 ELITE", Vormfactor.atx, true, 4, "DDR4", "4000MHz", "AM4", 2, 2, 6, 6, 2, 2);
  122. let asusrogstrixb450gaming = new motherBoard ("Asus ROG Strix B450-F Gaming", Vormfactor.atx, true, 4, "DDR4", "3644MHz", "AM4", 2, 2, 6, 6, 2, 2);
  123. let msib450tomahawkmax = new motherBoard ("MSI B450 Tomahawk Max", Vormfactor.atx, true, 4, "DDR4", "2666MHz", "AM4", 1, 1, 6, 6, 2, 2);
  124. //m-ATX Motherboards AMD
  125. let gigabyteaorusb450m = new motherBoard ("Gigabyte Aorus B450-M", Vormfactor.matx, true, 4, "DDR4", "4266MHz", "AM4", 2, 2, 6, 6, 2, 1);
  126. let asusrogstrixb360gaming = new motherBoard ("Asus ROG Strix B360-G Gaming", Vormfactor.matx, true, 4, "DDR4", "4400MHz", "AM4", 1, 1, 6, 6, 0, 1);
  127. // ITX Motherboards AMD
  128. let gigabyteaorusx570 = new motherBoard ("Gigabyte Aorus X570", Vormfactor.itx, true, 2, "DDR4", "4400MHz", "AM4", 1, 2, 4, 5, 1, 1);
  129. let asusrogstrixb450lgaming = new motherBoard ("Asus ROG Strix B450-l Gaming", Vormfactor.itx, true, 4, "DDR4", "4400MHz", "AM4", 1, 2, 4, 6, 0, 1);
  130.  
  131. //CPU
  132. class cpu {
  133. name: string;
  134. socket: any;
  135. overclock: boolean;
  136.  
  137. constructor (strName: string, boolOc: boolean, anySocket: any)
  138. {
  139. this.name = strName;
  140. this.overclock = boolOc;
  141. this.socket = anySocket;
  142. }
  143. };
  144.  
  145. //Intel Z390
  146. let i39350k = new cpu ("i3 9350k", true, "1151");
  147. let i59600k = new cpu ("i5 9600k", true, "1151");
  148. let i79700k = new cpu ("i7 9700k", true, "1151");
  149. let i99900k = new cpu ("i9 9900k", true, "1151");
  150.  
  151. //Intel B630
  152. let i39100f = new cpu("i3 9100f", true, "1151");
  153. let i59400f = new cpu("i5 9400f", true, "1151");
  154. let i79700f = new cpu("i7 9700f", true, "1151");
  155.  
  156. //AMD470/570
  157. let ryzen3600x = new cpu ("Ryzen 3600x", true, "AM4");
  158. let ryzen2700x = new cpu ("Ryzen 2700x", true, "AM4");
  159. let ryzen3800x = new cpu ("Ryzen 3800x", true, "AM4");
  160. let ryzen3950x = new cpu ("Ryzen 3950x", true, "AM4");
  161.  
  162. //AMD non X(B450)
  163. let ryzen2200g = new cpu ("Ryzen 2200g", true, "AM4");
  164. let ryzen2600 = new cpu ("Ryzen 2600", true, "AM4");
  165. let ryzen3600 = new cpu ("Ryzen 3600", true, "AM4");
  166. let ryzen2700 = new cpu ("Ryzen 2700", true, "AM4");
  167.  
  168.  
  169. //Memory
  170.  
  171. class memory {
  172. name: string;
  173. memory: any;
  174. speed: any;
  175. memorySize: any;
  176. totalMemory: number;
  177.  
  178. constructor (strName: string, anyMemory: any, anySpeed: any, anyMemorySize: any, numTotalMemory: any)
  179. {
  180. this.name = strName;
  181. this.memory = anyMemory;
  182. this.speed = anySpeed;
  183. this.memorySize = anyMemorySize;
  184. this.totalMemory = numTotalMemory;
  185. }
  186. };
  187.  
  188. //8GB Memory
  189. let corsairvengeance2400 = new memory ("Corsair Vengeance2400MHz", "DDR4", "2400MHz", "2x4", 8);
  190.  
  191. //16GB Memory
  192. let gskillaegis2666 = new memory("G.Skill Aegis 2666", "DDR4", "2666MHz", "2x8", 16);
  193. let corsairvengancergb3000 = new memory("Corsair Vengeance RGB3000", "DDR4", "3000MHz", "2x8", 16);
  194. let gskilltridentz3200 = new memory("G.Skill Trident Z RGB 3200", "DDR4", "3200MHz", "2x8", 16);
  195.  
  196. //32GB Memory
  197. let gskillripjaws2666 = new memory ("G.Skill Ripjaws 2666", "DDR4", "2666MHz", "4x8", 32);
  198. let gskilltridentzrbg2666 = new memory ("G.Skill Trident Z 2666", "DDR4", "2666MHz", "4x8", 32);
  199. let gskilltridentzrgb3200 = new memory ("G.Skill Trident Z 3200", "DDR4", "3200MHz", "4x8", 32);
  200.  
  201. class gpu {
  202. brand: string;
  203. type: string;
  204. name: string;
  205. length: number;
  206. depth: number;
  207. memorySize: number;
  208.  
  209. constructor(strBrand: string, strType: string, strName: string, numLength: number, numDepth: number,
  210. numMemorySize: number) {
  211. this.brand = strBrand;
  212. this.type = strType;
  213. this.name = strName;
  214. this.length = numLength;
  215. this.depth = numDepth;
  216. this.memorySize = numMemorySize;
  217. }
  218. };
  219.  
  220. //NVidia GPU
  221. let nvidiagtx1650 = new gpu ("Inno3D", "GTX", "GTX 1650 Super (Inno3D Twin X2)", 220, 113, 4);
  222. let nvidiagtx1660 = new gpu ("PNY", "GTX", "GTX 1660 Super (PNY Dual)", 220, 113, 6);
  223. let nvidiagtx1660ti = new gpu ("PNY", "GTX", "GTX 1660ti Super (PNY Dual)", 196, 113, 6);
  224. let nvidiartx2060 = new gpu ("KFA2", "RTX", "RTX 2060 Super (KFA2)", 245, 134, 6);
  225. let nvidiartx2070 = new gpu ("KFA2", "RTX", "RTX 2070 Super(KFA2)", 295, 143, 8);
  226. let nvidiartx2080 = new gpu ("KFA2", "RTX", "RTX 2080 Super (KFA2)", 295, 143, 8);
  227. let nvidiartx2080ti = new gpu ("KFA2", "RTX", "RTX 2080ti Super (KFA2)", 268, 112, 11);
  228.  
  229. //AMD GPU
  230. let rx570 = new gpu ("XFX", "RX", "RX570 (XFX)", 243, 124, 8);
  231. let rx580 = new gpu ("Asus Dual", "RX", "RX580 (Asus Dual)", 242, 1298, 8);
  232. let rx590 = new gpu ("Sapphire Pulse", "RX", "RX590 (Sapphire Pulse)", 230, 125, 8);
  233. let rx5500xt = new gpu ("Gigabyte", "RX", "RX5500XT (Gigabyte)", 281, 115, 8);
  234. let rx5700 = new gpu ("AsRock", "RX", "RX5700 (ASRock)", 281, 126, 8);
  235. let rx5700xt = new gpu ("ASRock", "RX", "RX5700XT (ASRock)", 324, 145, 8);
  236.  
  237. class storage {
  238. name: string;
  239. type: string;
  240. size: number;
  241. capacity: number;
  242.  
  243. constructor(strName: string, strType: string, numSize: number, numCapacity: number) {
  244. this.name = strName;
  245. this.type = strType;
  246. this.size = numSize;
  247. this.capacity = numCapacity;
  248. }
  249. };
  250.  
  251. //SSD
  252. let ssd120pny = new storage ("PNY120GB", "SSD", 2.5, 120);
  253. let ssd250kingston = new storage ("Kingston250GB", "SSD", 2.5, 250);
  254. let ssd500kingston = new storage ("Kingston500GB", "SSD", 2.5, 500);
  255. let ssd1000gigabyte = new storage ("Kingston1000GB", "SSD", 2.5, 1000);
  256.  
  257. //M.2
  258. let m2120wdgreen = new storage ("WD Green 120GB", "m.2", 0, 120);
  259. let m2250wdgreen = new storage ("WD Green 250GB", "m.2", 0, 250);
  260. let m2500wdgreen = new storage ("WD Green 500GB", "m.2", 0, 500);
  261. let m21000wdgreen = new storage ("WD Blue 1000GB", "m.2", 0, 1000);
  262.  
  263. //HDD
  264. let hdd500wdblue = new storage ("WD Blue 500GB", "HDD", 3.5, 500);
  265. let hdd1000wdblue = new storage ("WD Blue 1000GB", "HDD", 3.5, 1000);
  266. let hdd2000wdblue = new storage ("WD Blue 2000GB", "HDD", 3.5, 2000);
  267. let hdd4000wdblue = new storage ("WD Blue 4000GB", "HDD", 3.5, 4000);
  268.  
  269. class psu {
  270. name: string;
  271. type: string;
  272. watt: number;
  273.  
  274. constructor (strName: string, strType: string, numWatt: number) {
  275. this.name = strName;
  276. this.type = strType;
  277. this.watt = numWatt;
  278. }
  279. };
  280.  
  281. //Corsair PSU
  282. let corsairvs450 = new psu ("Corsair VS450", "Corsair", 450);
  283. let corsairvs550 = new psu ("Corsair VS550", "Corsair", 550);
  284. let corsaircx650 = new psu ("Corsair CX650", "Corsair", 650);
  285. let corsairrm750 = new psu ("Corsair RM750", "Corsair", 750);
  286. let corsairax1000 = new psu ("Corsair AX1000", "Corsair", 1000);
  287. let corsairax1200i = new psu ("Corsair AX1200i", "Corsair", 1200);
  288.  
  289. //Seasonic PSU
  290. let seasonics12 = new psu ("Seasonic S12II-Bronze 520W", "Seasonic", 520);
  291. let seasonicm12 = new psu ("Seasonic M12II Evo 520W", "Seasonic", 520);
  292. let seasonicfocusplus = new psu ("Seasonic Focus Plus 650 Gold", "Seasonic", 650);
  293. let seasonicprimeplatinum = new psu ("Seasonic Prime Platinum 1300W", "Seasonic", 1300);
  294.  
  295. //LOG NEEDS FUNCTION
  296.  
  297. //ATX PC Cases
  298. console.log(coolermastermb520);
  299. console.log(nzxth510);
  300. console.log(corsairicue220t);
  301. console.log(fractaldesignmeshifyc);
  302. console.log(phantekseclipsep300);
  303. console.log(sharkoontg4);
  304.  
  305. //m-ATX PC Cases
  306. console.log(coolermasterq300l);
  307. console.log(nzxth400);
  308. console.log(corsaircrystal280x);
  309. console.log(fractaldesignfocusgmini);
  310. console.log(phanteksenthooevolv);
  311. console.log(sharkoons1000window);
  312.  
  313. //ITX PC Cases
  314. console.log(coolermastermch100);
  315. console.log(nzxth210);
  316. console.log(fractaldesignnode304);
  317. console.log(phanteksenthooevolvshiftair);
  318. console.log(sharkoonsharkzonec10);
  319.  
  320.  
  321. //ATX Motherboards Intel
  322. console.log(gigabytez390gamingx);
  323. console.log(msiz390apro);
  324. console.log(asusrogstrixb360fgaming);
  325. console.log(msib360apro);
  326.  
  327. //m-ATX Motherboards Intel
  328. console.log(gigabytez390mgaming);
  329. console.log(asusrogstrixb360ggaming);
  330.  
  331. //ITX Motherboards Intel
  332. console.log(gigabyteaorusz390pro);
  333. console.log(asusrogstrixb360lggaming);
  334.  
  335. //ATX Motherboards AMD
  336. console.log(gigabyteaorusx570elite);
  337. console.log(asusrogstrixb450gaming);
  338. console.log(msib450tomahawkmax);
  339.  
  340. //m-ATX Motherboards AMD
  341. console.log(gigabyteaorusb450m);
  342. console.log(asusrogstrixb360gaming);
  343.  
  344. //ITX Motherboards AMD
  345. console.log(gigabyteaorusx570);
  346. console.log(asusrogstrixb360lggaming);
  347.  
  348.  
  349. //Intel Z390
  350. console.log(i39350k);
  351. console.log(i59600k);
  352. console.log(i79700k);
  353. console.log(i99900k);
  354.  
  355. //Intel B630
  356. console.log(i39100f);
  357. console.log(i59400f);
  358. console.log(i79700f);
  359.  
  360. //AMD470/570
  361. console.log(ryzen2700x);
  362. console.log(ryzen3600x);
  363. console.log(ryzen3800x);
  364. console.log(ryzen3950x);
  365.  
  366. //AMD non X(B450)
  367. console.log(ryzen2200g);
  368. console.log(ryzen2600);
  369. console.log(ryzen2700);
  370. console.log(ryzen3600);
  371.  
  372. //8GB Memory
  373. console.log(corsairvengeance2400);
  374.  
  375.  
  376. //16GB Memory
  377. console.log(gskillaegis2666);
  378. console.log(corsairvengancergb3000);
  379. console.log(gskilltridentz3200);
  380.  
  381. //32GB Memory
  382. console.log(gskillripjaws2666);
  383. console.log(gskilltridentzrbg2666);
  384. console.log(gskilltridentzrgb3200);
  385.  
  386.  
  387. //Nvidia GPU
  388. console.log(nvidiagtx1650);
  389. console.log(nvidiagtx1660);
  390. console.log(nvidiagtx1660ti);
  391. console.log(nvidiartx2060);
  392. console.log(nvidiartx2070);
  393. console.log(nvidiartx2080);
  394. console.log(nvidiartx2080ti);
  395.  
  396. //AMD GPU
  397. console.log(rx570);
  398. console.log(rx580);
  399. console.log(rx590);
  400. console.log(rx5500xt);
  401. console.log(rx5700);
  402. console.log(rx5700xt);
  403.  
  404. //STORAGE SSD
  405. console.log(ssd120pny);
  406. console.log(ssd250kingston);
  407. console.log(ssd500kingston);
  408. console.log(ssd1000gigabyte);
  409.  
  410. //STORAGE M.2
  411. console.log(m2120wdgreen);
  412. console.log(m2250wdgreen);
  413. console.log(m2500wdgreen);
  414. console.log(m21000wdgreen);
  415.  
  416. //STORAGE HDD
  417. console.log(hdd500wdblue);
  418. console.log(hdd1000wdblue);
  419. console.log(hdd2000wdblue);
  420. console.log(hdd4000wdblue);
  421.  
  422. //Corsair PSU
  423. console.log(corsairvs450);
  424. console.log(corsairvs550);
  425. console.log(corsaircx650);
  426. console.log(corsairrm750);
  427. console.log(corsairax1000);
  428. console.log(corsairax1200i);
  429.  
  430. //Seasonic PSU
  431. console.log(seasonics12);
  432. console.log(seasonicm12);
  433. console.log(seasonicfocusplus);
  434. console.log(seasonicprimeplatinum);
  435.  
  436. //Function if/else statement to make status true/false, eliminate false statements.
  437. function atx(pcCase:any, motherBoard:any){
  438. if(pcCase.atx === motherBoard.atx){
  439. console.log("true");
  440. }
  441. else {
  442. console.log("false");
  443. }
  444. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement