Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.72 KB | None | 0 0
  1. //PC CASE
  2. enum Vormfactor {
  3. atx, matx, itx
  4. }
  5.  
  6. //PC CASE KLEUR
  7. enum Kleur {
  8. black = "Black", gray = "Gray", blue = "Blue", white = "White", red = "Red"
  9. }
  10.  
  11. //PC CASE MATERIAL
  12. enum Materiaal {
  13. steel = "Steel", temperedglass = "Tempered Glass", plastic = "Plastic",
  14. aluminum = "aluminum", metal = "Metal"
  15. }
  16.  
  17. //Moederbord geheugentype
  18. enum Moederboardgeheugentype {
  19. DDR3, DDR4, DDR5
  20. }
  21.  
  22. //Memory geheugentype
  23. enum Memorygeheugentype {
  24. DDR3, DDR4, DDR5
  25. }
  26.  
  27. //Moederboard overclock
  28. enum Moederboardoverclock {
  29. Yes = "Yes", No = "No"
  30. }
  31.  
  32. //CPU overclock
  33. enum CPUoverclock {
  34. Yes = "Yes", No = "No"
  35. }
  36.  
  37. //Moederbord socket
  38. enum Moederboardsocket {
  39. Intel, AMD
  40. }
  41.  
  42. //CPU socket
  43. enum CPUsocket {
  44. Intel, AMD
  45. }
  46.  
  47. //Memorysize
  48. enum memorysize {
  49. Twoslots4gb = "2x4", Twoslots8gb = "2x8", Fourslots4gb = "4x4", Fourslots8gb = "4x8",
  50. Twoslots16gb = "2x16", Fourslots16gb = "4x16", Twoslots32gb = "2x32", Fourslots32gb = "4x32"
  51. }
  52.  
  53. //GPU Brand
  54. enum gpubrand {
  55. Inno3D = "Inno3D", PNY = "PNY", KFA2 = "KFA2",
  56. XFX = "XFX", AsusDual = "Asus Dual", SapphirePulse = "Sapphire Pulse",
  57. Gigabyte = "Gigabyte", ASRock = "ASRock"
  58. }
  59.  
  60. //GPU Type
  61. enum gputype {
  62. RTX = "RTX", GTX = "GTX", RX = "RX"
  63. }
  64.  
  65. //Storage Type
  66. enum storagetype {
  67. SSD = "SSD", m2 = "m.2", HDD = "HDD"
  68. }
  69.  
  70. //Storage size in inch
  71. enum storagesize {
  72. SSD = '2.5"', m2 = "m.2", HDD = '3.5"'
  73. }
  74.  
  75. //PSU Brand
  76. enum psubrand {
  77. Corsair = "Corsair", Seasonic = "Seasonic"
  78. }
  79.  
  80. //Component comparing
  81. function compare (waarde1, waarde2){
  82. if(waarde1 == waarde2){
  83. return 0;
  84. }
  85. else{
  86. return 1;
  87. }
  88. }
  89.  
  90. class pcCase {
  91. name: string;
  92. ondersteuntVormFactoren: Vormfactor [] = [];
  93. form: Vormfactor;
  94. color: Kleur;
  95. material: Materiaal;
  96. length: number;
  97. width: number;
  98. height: number;
  99. maxGpuLength: number;
  100. maxCpuCoolerHeight: number;
  101. expSlots: number;
  102. ssdDriveBays: number;
  103. hddDriveBays: number;
  104.  
  105. //Welke vormvactorondersteuning? (0 = ATX, mAX, 1 = mATX en lager, 2 = ITX)
  106. ondersteunt(motherBoard: motherBoard) {
  107. return this.ondersteuntVormFactoren.indexOf (motherBoard.form) >= 0
  108. }
  109.  
  110. formsupport(form) {
  111. while (form < 3) {
  112. this.ondersteuntVormFactoren.push (form);
  113. form++;
  114. }
  115. }
  116.  
  117. //Check if the form factor is correct.
  118. addMotherboardToCase (motherBoard) {
  119. if (this.form <= motherBoard.form) {
  120. console.log("Motherboard added");
  121. }
  122. else {
  123. console.log("This case cannot hold this type of Motherboard.");
  124. }
  125. }
  126.  
  127.  
  128. constructor (strName: string, formfactor: Vormfactor, color: Kleur, material: Materiaal,
  129. numLength: any, numWidth: number, numHeight: number, numGpuLength: number, numCpuCoolerHeight: number,
  130. numExpSlots: number, numSsdDriveBays: number, numHddDriveBays: number,)
  131. {
  132. this.name = strName;
  133. this.form = formfactor;
  134. this.color = color;
  135. this.material = material;
  136. this.length = numLength;
  137. this.height = numHeight;
  138. this.width = numWidth;
  139. this.maxGpuLength = numGpuLength;
  140. this.maxCpuCoolerHeight = numCpuCoolerHeight;
  141. this.expSlots = numExpSlots;
  142. this.ssdDriveBays = numSsdDriveBays;
  143. this.hddDriveBays = numHddDriveBays;
  144. this.formsupport(this.form);
  145. }
  146. };
  147.  
  148. //ATX PC Cases
  149. let coolermastermb520 = new pcCase ("Coolermaster MB520", Vormfactor.atx, Kleur.black, Materiaal.plastic, 496, 217, 468, 410, 165, 7, 2, 4);
  150. let nzxth510 = new pcCase("NZXT H510", Vormfactor.atx, Kleur.white, Materiaal.steel, 428, 210, 468, 381, 160, 7, 3, 3);
  151. let corsairicue220t = new pcCase ("Corsair iCUE 220t", Vormfactor.atx, Kleur.white, Materiaal.steel, 395, 210, 450, 300, 160, 7, 2, 2);
  152. let fractaldesignmeshifyc = new pcCase("Fractal Design Meshify C", Vormfactor.atx, Kleur.black, Materiaal.steel, 395, 212, 440, 315, 172, 7, 3, 2);
  153. let phantekseclipsep300 = new pcCase ("Phantekseclipse P300", Vormfactor.atx, Kleur.black, Materiaal.steel , 400, 200, 450, 330, 160, 7, 2, 2);
  154. let sharkoontg4 = new pcCase ("Sharkoon TG4", Vormfactor.atx, Kleur.black, Materiaal.steel, 455, 200, 430, 375, 160, 6, 4, 2);
  155. //m-ATX PC Cases
  156. let coolermasterq300l = new pcCase ("Coolermaster Q300L", Vormfactor.matx, Kleur.black, Materiaal.steel, 387, 230, 381, 360, 159, 4, 2, 1);
  157. let nzxth400 = new pcCase ("NZXT H400",Vormfactor.matx, Kleur.black, Materiaal.steel, 421, 210, 417, 360, 159, 4, 3, 1);
  158. let corsaircrystal280x = new pcCase ("Corsair Crystal 280X",Vormfactor.matx, Kleur.black, Materiaal.steel, 398, 276, 351, 300, 180, 4, 3, 2);
  159. let phanteksenthooevolv = new pcCase ("Phanteks Enthoo Evolv", Vormfactor.matx, Kleur.gray, Materiaal.aluminum, 400, 230, 453, 319, 192, 4, 2,2);
  160. let fractaldesignfocusgmini = new pcCase ("Fractal Design Focus G mini",Vormfactor.matx, Kleur.black, Materiaal.steel, 464, 205, 383, 380, 165, 4, 1, 2);
  161. let sharkoons1000window = new pcCase ("Sharkoon s1000 Window", Vormfactor.matx, Kleur.red, Materiaal.temperedglass, 453, 195, 402, 400, 150, 4, 2, 2);
  162. //ITX PC Cases
  163. let coolermastermch100 = new pcCase ("Coolermaster MCH100", Vormfactor.itx, Kleur.gray, Materiaal.plastic, 312, 216, 301, 210, 83, 2, 3, 1);
  164. let nzxth210 = new pcCase ("NZXT H210", Vormfactor.itx, Kleur.black, Materiaal.steel, 372, 210, 349, 325, 165, 2, 4, 1);
  165. let fractaldesignnode304 = new pcCase ("Fractal Design Node 304", Vormfactor.itx, Kleur.white, Materiaal.temperedglass, 372, 250, 210, 310, 165, 2, 3, 1);
  166. let phanteksenthooevolvshiftair = new pcCase ("Phanteks Enthoo Evolv Shiftair", Vormfactor.itx, Kleur.gray, Materiaal.metal, 370, 225, 180, 315, 150, 2, 1 ,1);
  167. let sharkoonsharkzonec10 = new pcCase ("Sharkoon Sharkzone C10", Vormfactor.itx, Kleur.gray, Materiaal.metal, 370, 225, 180, 315, 150, 2, 1, 1);
  168.  
  169. //MOTHERBOARD
  170. class motherBoard {
  171. form: Vormfactor;
  172. name: string;
  173. overclock: Moederboardoverclock;
  174. ramSlots: number;
  175. memory: Moederboardgeheugentype;
  176. ddrSpeed: any;
  177. socket: Moederboardsocket;
  178. pciSlots: number;
  179. m2Slots: number;
  180. sataConnectors: number;
  181. usb31: number;
  182. usb20: number;
  183. rgbHeader: number;
  184. occupiedPCIeSlots: number;
  185.  
  186. constructor (strName: string, formaat: Vormfactor, Moederboardoverclock: Moederboardoverclock, numRamSlots: number,
  187. anyMemory: any, anyDdrMemory: any, Moederboardsocket: Moederboardsocket, numPciSlots: number, numM2Slots: number,
  188. numSataConnectors: number, numUsb31: number, numUsb20: number, numRgbHeader:number, occupiedPCIeSlots: number)
  189. {
  190. this.name = strName;
  191. this.form = formaat;
  192. this.overclock = Moederboardoverclock;
  193. this.ramSlots = numRamSlots;
  194. this.memory = anyMemory;
  195. this.ddrSpeed = anyDdrMemory;
  196. this.socket = Moederboardsocket;
  197. this.pciSlots = numPciSlots;
  198. this.m2Slots = numM2Slots;
  199. this.sataConnectors = numSataConnectors;
  200. this.usb31 = numUsb31;
  201. this.usb20 = numUsb20;
  202. this.rgbHeader = numRgbHeader;
  203. this.occupiedPCIeSlots;
  204. }
  205.  
  206. //Check if the socket is correct.
  207. addCpuToMotherboard (cpu) {
  208. if (this.socket, cpu.socket) {
  209. console.log("CPU added");
  210. }
  211. else {
  212. console.log("This Motherboard cannot hold this type of CPU.");
  213. }
  214. }
  215. //Check if the memory is correct.
  216. addMemoryToMotherboard (memory) {
  217. if (this.memory, memory.memory) {
  218. console.log("Memory added");
  219. }
  220. else {
  221. console.log("This Motherboard cannot hold this type of Memory.");
  222. }
  223. }
  224.  
  225. addGPUToMotherboard (gpu) {
  226. if(this.pciSlots > this.occupiedPCIeSlots) {
  227. console.log ("GPU added.");
  228. this.occupiedPCIeSlots++;
  229. }
  230. else {
  231. console.log("This Motherboard cannot have this many GPU's");
  232. }
  233. }
  234. };
  235.  
  236. //ATX Motherboards Intel
  237. let gigabytez390gamingx = new motherBoard ("Gigabyte Z390 GamingX", Vormfactor.atx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "4266MHz", Moederboardsocket.Intel, 2, 2, 6, 5, 2, 1, 0);
  238. let msiz390apro = new motherBoard ("MSI Z390-A Pro", Vormfactor.atx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "4400MHz", Moederboardsocket.Intel, 2, 2, 6, 4, 2, 1, 0);
  239. let asusrogstrixb360fgaming = new motherBoard ("Asus ROG Strix B360-F Gaming", Vormfactor.atx, Moederboardoverclock.No, 4, Moederboardgeheugentype.DDR4, "2666MHz", Moederboardsocket.Intel, 2, 2, 6, 3, 4, 1 ,0);
  240. let msib360apro = new motherBoard ("MSI 360-A Pro", Vormfactor.atx, Moederboardoverclock.No, 4, Moederboardgeheugentype.DDR4, "2666MHz", Moederboardsocket.Intel, 2, 1, 6, 2, 2, 0 ,0);
  241. //m-ATX Motherboards Intel
  242. let gigabytez390mgaming = new motherBoard ("Gigabyte Z390M Gaming", Vormfactor.matx, Moederboardoverclock.No, 4, Moederboardgeheugentype.DDR4, "4266MHz", Moederboardsocket.Intel, 2, 2, 6, 5, 2, 1 ,0);
  243. let asusrogstrixb360ggaming = new motherBoard ("Asus ROG Strix B360-G Gaming", Vormfactor.matx, Moederboardoverclock.No, 4, Moederboardgeheugentype.DDR4, "2666MHz", Moederboardsocket.Intel, 1, 2, 6, 6, 0, 1 ,0);
  244. //ITX Motherboards Intel
  245. let gigabyteaorusz390pro = new motherBoard ("Gigabyte Aorus I Z390 Pro", Vormfactor.itx, Moederboardoverclock.Yes, 2, Moederboardgeheugentype.DDR4, "4400MHz", Moederboardsocket.Intel, 1, 2, 4, 5, 0, 1 ,0);
  246. let asusrogstrixb360lggaming = new motherBoard ("Asus ROG Strix B360-l Gaming", Vormfactor.itx, Moederboardoverclock.No, 2, Moederboardgeheugentype.DDR4, "2666MHz", Moederboardsocket.Intel, 1, 2, 4, 4, 2, 0 ,0);
  247.  
  248. //ATX Motherboards AMD
  249. let gigabyteaorusx570elite = new motherBoard ("Gigabyte Aorus X570 ELITE", Vormfactor.atx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "4000MHz", Moederboardsocket.AMD, 2, 2, 6, 6, 2, 2 ,0);
  250. let asusrogstrixb450gaming = new motherBoard ("Asus ROG Strix B450-F Gaming", Vormfactor.atx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "3644MHz", Moederboardsocket.AMD, 2, 2, 6, 6, 2, 2 ,0);
  251. let msib450tomahawkmax = new motherBoard ("MSI B450 Tomahawk Max", Vormfactor.atx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "2666MHz", Moederboardsocket.AMD, 1, 1, 6, 6, 2, 2 ,0);
  252. //m-ATX Motherboards AMD
  253. let gigabyteaorusb450m = new motherBoard ("Gigabyte Aorus B450-M", Vormfactor.matx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "4266MHz", Moederboardsocket.AMD, 2, 2, 6, 6, 2, 1 ,0);
  254. let asusrogstrixb360gaming = new motherBoard ("Asus ROG Strix B360-G Gaming", Vormfactor.matx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "4400MHz", Moederboardsocket.Intel, 1, 1, 6, 6, 0, 1 ,0);
  255. // ITX Motherboards AMD
  256. let gigabyteaorusx570 = new motherBoard ("Gigabyte Aorus X570", Vormfactor.itx, Moederboardoverclock.Yes, 2, Moederboardgeheugentype.DDR4, "4400MHz", Moederboardsocket.AMD, 1, 2, 4, 5, 1, 1 ,0);
  257. let asusrogstrixb450lgaming = new motherBoard ("Asus ROG Strix B450-l Gaming", Vormfactor.itx, Moederboardoverclock.Yes, 4, Moederboardgeheugentype.DDR4, "4400MHz", Moederboardsocket.AMD, 1, 2, 4, 6, 0, 1 ,0);
  258.  
  259. //CPU
  260. class cpu {
  261. name: string;
  262. socket: CPUsocket;
  263. overclock: CPUoverclock;
  264.  
  265. constructor (strName: string, overclock: CPUoverclock, socket: CPUsocket)
  266. {
  267. this.name = strName;
  268. this.overclock = overclock;
  269. this.socket = socket;
  270. }
  271. };
  272.  
  273. //Intel Z390
  274. let i39350k = new cpu ("i3 9350k", CPUoverclock.Yes, CPUsocket.Intel);
  275. let i59600k = new cpu ("i5 9600k", CPUoverclock.Yes, CPUsocket.Intel);
  276. let i79700k = new cpu ("i7 9700k", CPUoverclock.Yes, CPUsocket.Intel);
  277. let i99900k = new cpu ("i9 9900k", CPUoverclock.Yes, CPUsocket.Intel);
  278.  
  279. //Intel B630
  280. let i39100f = new cpu("i3 9100f", CPUoverclock.Yes, CPUsocket.Intel);
  281. let i59400f = new cpu("i5 9400f", CPUoverclock.Yes, CPUsocket.Intel);
  282. let i79700f = new cpu("i7 9700f", CPUoverclock.Yes, CPUsocket.Intel);
  283.  
  284. //AMD470/570
  285. let ryzen3600x = new cpu ("Ryzen 3600x", CPUoverclock.Yes, CPUsocket.AMD);
  286. let ryzen2700x = new cpu ("Ryzen 2700x", CPUoverclock.Yes, CPUsocket.AMD);
  287. let ryzen3800x = new cpu ("Ryzen 3800x", CPUoverclock.Yes, CPUsocket.AMD);
  288. let ryzen3950x = new cpu ("Ryzen 3950x", CPUoverclock.Yes, CPUsocket.AMD);
  289.  
  290. //AMD non X(B450)
  291. let ryzen2200g = new cpu ("Ryzen 2200g", CPUoverclock.Yes, CPUsocket.AMD);
  292. let ryzen2600 = new cpu ("Ryzen 2600", CPUoverclock.Yes, CPUsocket.AMD);
  293. let ryzen3600 = new cpu ("Ryzen 3600", CPUoverclock.Yes, CPUsocket.AMD);
  294. let ryzen2700 = new cpu ("Ryzen 2700", CPUoverclock.Yes, CPUsocket.AMD);
  295.  
  296. //Memory
  297.  
  298. class memory {
  299. name: string;
  300. memory: Memorygeheugentype;
  301. speed: any;
  302. memorySize: memorysize;
  303. totalMemory: number;
  304.  
  305. constructor (strName: string, memory: Memorygeheugentype, anySpeed: any, memorySize: memorysize, numTotalMemory: any)
  306. {
  307. this.name = strName;
  308. this.memory = memory;
  309. this.speed = anySpeed;
  310. this.memorySize = memorySize;
  311. this.totalMemory = numTotalMemory;
  312. }
  313. };
  314.  
  315. //8GB Memory
  316. let corsairvengeance2400 = new memory ("Corsair Vengeance2400MHz", Memorygeheugentype.DDR4, "2400MHz", memorysize.Twoslots4gb, 8);
  317.  
  318. //16GB Memory
  319. let gskillaegis2666 = new memory("G.Skill Aegis 2666", Memorygeheugentype.DDR4, "2666MHz", memorysize.Twoslots8gb, 16);
  320. let corsairvengancergb3000 = new memory("Corsair Vengeance RGB3000", Memorygeheugentype.DDR4, "3000MHz", memorysize.Twoslots8gb, 16);
  321. let gskilltridentz3200 = new memory("G.Skill Trident Z RGB 3200", Memorygeheugentype.DDR4, "3200MHz", memorysize.Twoslots8gb, 16);
  322.  
  323. //32GB Memory
  324. let gskillripjaws2666 = new memory ("G.Skill Ripjaws 2666", Memorygeheugentype.DDR4, "2666MHz", memorysize.Fourslots8gb, 32);
  325. let gskilltridentzrbg2666 = new memory ("G.Skill Trident Z 2666", Memorygeheugentype.DDR4, "2666MHz", memorysize.Fourslots8gb, 32);
  326. let gskilltridentzrgb3200 = new memory ("G.Skill Trident Z 3200", Memorygeheugentype.DDR4, "3200MHz", memorysize.Fourslots8gb, 32);
  327.  
  328. class gpu {
  329. brand: gpubrand;
  330. type: gputype;
  331. name: string;
  332. length: number;
  333. depth: number;
  334. memorySize: number;
  335.  
  336. constructor(brand: gpubrand, type: gputype, strName: string, numLength: number, numDepth: number,
  337. numMemorySize: number) {
  338. this.brand = brand;
  339. this.type = type;
  340. this.name = strName;
  341. this.length = numLength;
  342. this.depth = numDepth;
  343. this.memorySize = numMemorySize;
  344. }
  345. };
  346.  
  347. //NVidia GPU
  348. let nvidiagtx1650 = new gpu (gpubrand.Inno3D, gputype.GTX, "GTX 1650 Super (Inno3D Twin X2)", 220, 113, 4);
  349. let nvidiagtx1660 = new gpu (gpubrand.PNY, gputype.GTX, "GTX 1660 Super (PNY Dual)", 220, 113, 6);
  350. let nvidiagtx1660ti = new gpu (gpubrand.PNY, gputype.GTX, "GTX 1660ti Super (PNY Dual)", 196, 113, 6);
  351. let nvidiartx2060 = new gpu (gpubrand.KFA2, gputype.RTX, "RTX 2060 Super (KFA2)", 245, 134, 6);
  352. let nvidiartx2070 = new gpu (gpubrand.KFA2, gputype.RTX, "RTX 2070 Super(KFA2)", 295, 143, 8);
  353. let nvidiartx2080 = new gpu (gpubrand.KFA2, gputype.RTX, "RTX 2080 Super (KFA2)", 295, 143, 8);
  354. let nvidiartx2080ti = new gpu (gpubrand.KFA2, gputype.RTX, "RTX 2080ti Super (KFA2)", 268, 112, 11);
  355.  
  356. //AMD GPU
  357. let rx570 = new gpu (gpubrand.XFX, gputype.RX, "RX570 (XFX)", 243, 124, 8);
  358. let rx580 = new gpu (gpubrand.AsusDual, gputype.RX, "RX580 (Asus Dual)", 242, 1298, 8);
  359. let rx590 = new gpu (gpubrand.SapphirePulse, gputype.RX, "RX590 (Sapphire Pulse)", 230, 125, 8);
  360. let rx5500xt = new gpu (gpubrand.Gigabyte, gputype.RX, "RX5500XT (Gigabyte)", 281, 115, 8);
  361. let rx5700 = new gpu (gpubrand.ASRock, gputype.RX, "RX5700 (ASRock)", 281, 126, 8);
  362. let rx5700xt = new gpu (gpubrand.ASRock, gputype.RX, "RX5700XT (ASRock)", 324, 145, 8);
  363.  
  364. class storage {
  365. name: string;
  366. type: storagetype;
  367. size: storagesize;
  368. capacity: number;
  369.  
  370. constructor(strName: string, type: storagetype, size: storagesize, numCapacity: number) {
  371. this.name = strName;
  372. this.type = type;
  373. this.size = size;
  374. this.capacity = numCapacity;
  375. }
  376. };
  377.  
  378. //SSD
  379. let ssd120pny = new storage ("PNY120GB", storagetype.SSD, storagesize.SSD, 120);
  380. let ssd250kingston = new storage ("Kingston250GB", storagetype.SSD, storagesize.SSD, 250);
  381. let ssd500kingston = new storage ("Kingston500GB", storagetype.SSD, storagesize.SSD, 500);
  382. let ssd1000gigabyte = new storage ("Kingston1000GB", storagetype.SSD, storagesize.SSD, 1000);
  383.  
  384. //M.2
  385. let m2120wdgreen = new storage ("WD Green 120GB", storagetype.m2, storagesize.m2, 120);
  386. let m2250wdgreen = new storage ("WD Green 250GB", storagetype.m2, storagesize.m2, 250);
  387. let m2500wdgreen = new storage ("WD Green 500GB", storagetype.m2, storagesize.m2, 500);
  388. let m21000wdgreen = new storage ("WD Blue 1000GB", storagetype.m2, storagesize.m2, 1000);
  389.  
  390. //HDD
  391. let hdd500wdblue = new storage ("WD Blue 500GB", storagetype.HDD, storagesize.HDD, 500);
  392. let hdd1000wdblue = new storage ("WD Blue 1000GB", storagetype.HDD, storagesize.HDD, 1000);
  393. let hdd2000wdblue = new storage ("WD Blue 2000GB", storagetype.HDD, storagesize.HDD, 2000);
  394. let hdd4000wdblue = new storage ("WD Blue 4000GB", storagetype.HDD, storagesize.HDD, 4000);
  395.  
  396. class psu {
  397. name: string;
  398. brand: psubrand;
  399. watt: number;
  400.  
  401. constructor (strName: string, brand: psubrand, numWatt: number) {
  402. this.name = strName;
  403. this.brand = brand;
  404. this.watt = numWatt;
  405. }
  406. };
  407.  
  408. //Corsair PSU
  409. let corsairvs450 = new psu ("Corsair VS450", psubrand.Corsair, 450);
  410. let corsairvs550 = new psu ("Corsair VS550", psubrand.Corsair, 550);
  411. let corsaircx650 = new psu ("Corsair CX650", psubrand.Corsair, 650);
  412. let corsairrm750 = new psu ("Corsair RM750", psubrand.Corsair, 750);
  413. let corsairax1000 = new psu ("Corsair AX1000", psubrand.Corsair, 1000);
  414. let corsairax1200i = new psu ("Corsair AX1200i", psubrand.Corsair, 1200);
  415.  
  416. //Seasonic PSU
  417. let seasonics12 = new psu ("Seasonic S12II-Bronze 520W", psubrand.Seasonic, 520);
  418. let seasonicm12 = new psu ("Seasonic M12II Evo 520W", psubrand.Seasonic, 520);
  419. let seasonicfocusplus = new psu ("Seasonic Focus Plus 650 Gold", psubrand.Seasonic, 650);
  420. let seasonicprimeplatinum = new psu ("Seasonic Prime Platinum 1300W", psubrand.Seasonic, 1300);
  421.  
  422. //LOG NEEDS FUNCTION
  423.  
  424. //ATX PC Cases
  425. console.log(coolermastermb520);
  426. console.log(nzxth510);
  427. console.log(corsairicue220t);
  428. console.log(fractaldesignmeshifyc);
  429. console.log(phantekseclipsep300);
  430. console.log(sharkoontg4);
  431.  
  432. //m-ATX PC Cases
  433. console.log(coolermasterq300l);
  434. console.log(nzxth400);
  435. console.log(corsaircrystal280x);
  436. console.log(fractaldesignfocusgmini);
  437. console.log(phanteksenthooevolv);
  438. console.log(sharkoons1000window);
  439.  
  440. //ITX PC Cases
  441. console.log(coolermastermch100);
  442. console.log(nzxth210);
  443. console.log(fractaldesignnode304);
  444. console.log(phanteksenthooevolvshiftair);
  445. console.log(sharkoonsharkzonec10);
  446.  
  447.  
  448. //ATX Motherboards Intel
  449. console.log(gigabytez390gamingx);
  450. console.log(msiz390apro);
  451. console.log(asusrogstrixb360fgaming);
  452. console.log(msib360apro);
  453.  
  454. //m-ATX Motherboards Intel
  455. console.log(gigabytez390mgaming);
  456. console.log(asusrogstrixb360ggaming);
  457.  
  458. //ITX Motherboards Intel
  459. console.log(gigabyteaorusz390pro);
  460. console.log(asusrogstrixb360lggaming);
  461.  
  462. //ATX Motherboards AMD
  463. console.log(gigabyteaorusx570elite);
  464. console.log(asusrogstrixb450gaming);
  465. console.log(msib450tomahawkmax);
  466.  
  467. //m-ATX Motherboards AMD
  468. console.log(gigabyteaorusb450m);
  469. console.log(asusrogstrixb360gaming);
  470.  
  471. //ITX Motherboards AMD
  472. console.log(gigabyteaorusx570);
  473. console.log(asusrogstrixb360lggaming);
  474.  
  475.  
  476. //Intel Z390
  477. console.log(i39350k);
  478. console.log(i59600k);
  479. console.log(i79700k);
  480. console.log(i99900k);
  481.  
  482. //Intel B630
  483. console.log(i39100f);
  484. console.log(i59400f);
  485. console.log(i79700f);
  486.  
  487. //AMD470/570
  488. console.log(ryzen2700x);
  489. console.log(ryzen3600x);
  490. console.log(ryzen3800x);
  491. console.log(ryzen3950x);
  492.  
  493. //AMD non X(B450)
  494. console.log(ryzen2200g);
  495. console.log(ryzen2600);
  496. console.log(ryzen2700);
  497. console.log(ryzen3600);
  498.  
  499. //8GB Memory
  500. console.log(corsairvengeance2400);
  501.  
  502.  
  503. //16GB Memory
  504. console.log(gskillaegis2666);
  505. console.log(corsairvengancergb3000);
  506. console.log(gskilltridentz3200);
  507.  
  508. //32GB Memory
  509. console.log(gskillripjaws2666);
  510. console.log(gskilltridentzrbg2666);
  511. console.log(gskilltridentzrgb3200);
  512.  
  513.  
  514. //Nvidia GPU
  515. console.log(nvidiagtx1650);
  516. console.log(nvidiagtx1660);
  517. console.log(nvidiagtx1660ti);
  518. console.log(nvidiartx2060);
  519. console.log(nvidiartx2070);
  520. console.log(nvidiartx2080);
  521. console.log(nvidiartx2080ti);
  522.  
  523. //AMD GPU
  524. console.log(rx570);
  525. console.log(rx580);
  526. console.log(rx590);
  527. console.log(rx5500xt);
  528. console.log(rx5700);
  529. console.log(rx5700xt);
  530.  
  531. //STORAGE SSD
  532. console.log(ssd120pny);
  533. console.log(ssd250kingston);
  534. console.log(ssd500kingston);
  535. console.log(ssd1000gigabyte);
  536.  
  537. //STORAGE M.2
  538. console.log(m2120wdgreen);
  539. console.log(m2250wdgreen);
  540. console.log(m2500wdgreen);
  541. console.log(m21000wdgreen);
  542.  
  543. //STORAGE HDD
  544. console.log(hdd500wdblue);
  545. console.log(hdd1000wdblue);
  546. console.log(hdd2000wdblue);
  547. console.log(hdd4000wdblue);
  548.  
  549. //Corsair PSU
  550. console.log(corsairvs450);
  551. console.log(corsairvs550);
  552. console.log(corsaircx650);
  553. console.log(corsairrm750);
  554. console.log(corsairax1000);
  555. console.log(corsairax1200i);
  556.  
  557. //Seasonic PSU
  558. console.log(seasonics12);
  559. console.log(seasonicm12);
  560. console.log(seasonicfocusplus);
  561. console.log(seasonicprimeplatinum);
  562.  
  563.  
  564. //ADDING COMPONENT
  565.  
  566. //Component adding Case + Motherboard
  567. coolermastermb520.addMotherboardToCase(gigabyteaorusx570); //True, Component added. ITX Motherboards fits in ATX Case.
  568.  
  569. //Component adding Motherboard + CPU
  570. gigabytez390gamingx.addCpuToMotherboard(ryzen3600x); //False, Component not compatible. Reason: Motherboard uses Intel socket. CPU uses AMD socket.
  571. gigabyteaorusx570.addCpuToMotherboard(ryzen3600x); //True, Component added. Intel socket on both components.
  572.  
  573. //Component adding Motherboard + Memory
  574. gigabyteaorusx570.addMemoryToMotherboard(gskilltridentz3200); // True, Component added. Both memory are DDR4.
  575.  
  576. //Component adding Motherboard + GPU
  577. gigabyteaorusx570.addGPUToMotherboard(nvidiagtx1650);
  578.  
  579.  
  580. //COMPARE
  581.  
  582. //Component comparing PC Case Form + Motherboard Form
  583. let comparecasemotherboard = compare(coolermastermb520.form, gigabyteaorusx570.form); //True, components compatible. Reason: ITX Motherboard fits in ATX Case.
  584. //Component comparing Motherboard socket type + CPU socket type
  585. let comparecomponentsocket = compare(gigabyteaorusx570elite.overclock, ryzen3600.overclock); //True, components compatible. Reason: Both AMD sockets.
  586.  
  587. //Compare overlock possibilities Motherboard + CPU
  588. let comparecomponentoc = compare(gigabyteaorusx570elite.overclock, ryzen3600.overclock); // True, components both overclock.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement