-
Posts
1,021 -
Joined
-
Last visited
Content Type
Forums
Status Updates
Blogs
Events
Gallery
Downloads
Store Home
Everything posted by Epimetheus
-
The 2060 isn't ideal either, the 6600k is basically a 9100
-
i mean yeah, but bottleneck isn't a huge deal. A quad core will work fine depending on the performance you need. Will certainly hold the card back in almost all cases though
-
pokemon sword and shield raids not working
Epimetheus replied to spartaman64's topic in Console Gaming
I don't think people in the overworld are the ones that gets in raid. When an online raid pops up you just need to press y, select the raid that popped up and then hope you made it quick enough in the case of a rare pokemon, like a Gigamax pokemon -
yeah that's definitely easier lol, didn't think about that. What does "final" stand for?
-
Yeah, i know that - however, due to how I created the deck, i had to leave out the 0 position. If you want you can check the algorithm I used for it. I suppose I could have made a for cicle to move all the positions back by one once I finished creating it, but didn't feel like it
-
ok, apparently i've fixed it? I just started the i at value 1 when i'm randomly generating numbers (since the original array, that in the function is called v[], occupies positions 1-53. That's due to how I generate the deck of cards). I though I had already tested doing that but it didn't work, but apparently it does now? Thank you anyways. Quite frankly, (leaving out the function controllaColore that is pure garbage and then i've remade it from scratch in the other function much better), how is my code? Is it trash or am I doing things the right way?
-
i've done further testing, and it looks like the object in position 0 is null, while the others aren't. Can't pinpoint the reason though
-
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package esercizio2; import java.util.*; /** * * @author studente */ public class Esercizio2 { /** * @param args the command line arguments */ public static void main(String[] args) { CartaDaGioco[] carte = new CartaDaGioco[53]; int i; Random random=new Random(); for(i=1;i<=52;i++){ if(i<=13){ if(i<=10){ carte[i]=new CartaDaGioco("cuori",Integer.toString(i)); } else{ if(i==11){ carte[i]=new CartaDaGioco("cuori","J"); } if(i==12){ carte[i]=new CartaDaGioco("cuori","Q"); } if(i==13){ carte[i]=new CartaDaGioco("cuori","K"); } } } else if(i>13 && i<=26){ if(i<=23){ carte[i]=new CartaDaGioco("quadri",Integer.toString(i-13)); } else{ if(i-13==11){ carte[i]=new CartaDaGioco("quadri","J"); } if(i-13==12){ carte[i]=new CartaDaGioco("quadri","Q"); } if(i-13==13){ carte[i]=new CartaDaGioco("quadri","K"); } } } else if(i>26 && i<=39){ if(i<=36){ carte[i]=new CartaDaGioco("fiori",Integer.toString(i-26)); } else{ if(i-26==11){ carte[i]=new CartaDaGioco("fiori","J"); } if(i-26==12){ carte[i]=new CartaDaGioco("fiori","Q"); } if(i-26==13){ carte[i]=new CartaDaGioco("fiori","K"); } } } else if(i>39 && i<=52){ if(i<=49){ carte[i]=new CartaDaGioco("picche",Integer.toString(i-39)); } else{ if(i-39==11){ carte[i]=new CartaDaGioco("picche","J"); } if(i-39==12){ carte[i]=new CartaDaGioco("picche","Q"); } if(i-39==13){ carte[i]=new CartaDaGioco("picche","K"); } } } } System.out.println("Inserisci le carte che vuoi confrontare"); String seme,valore; int pos1=1,pos2=1; Scanner tastiera=new Scanner(System.in); seme=tastiera.nextLine(); valore=tastiera.nextLine(); for(i=1;i<=52;i++){ if(carte[i].getSeme().equals(seme) && carte[i].getValore().equals(valore)){ pos1=i; } } System.out.println("Inserisci la seconda carta"); seme=tastiera.nextLine(); valore=tastiera.nextLine(); for(i=1;i<=52;i++){ if(carte[i].getSeme().equals(seme) && carte[i].getValore().equals(valore)){ pos2=i; } } int ris; ris=carte[pos1].confronta(pos1,pos2); switch (ris) { case -1: System.out.println("La carta iniziale viene dopo"); break; case 0: System.out.println("Sono la stessa carta"); break; case 1: System.out.println("La carta iniziale viene prima"); break; default: System.out.println("C'è stato un errore"); break; } Boolean ris2; ris2=controllaScala(carte); if(ris2==true){ System.out.println("Le 5 carte estratte sono in scala"); } else{ System.out.println("Le 5 carte estratte non sono in scala"); } } public static Boolean controllaColore(CartaDaGioco v[]){ Random random= new Random(); int posz[]=new int[5],j=0; int nestratti=0,sel; Boolean ris=false; for(int i=0;i<=52;i++){ sel=random.nextInt(1); if(nestratti<5){ if(sel==1){ posz[j]=i; j++; } } } if(v[posz[0]].getSeme().equals(v[posz[1]].getSeme()) && v[posz[1]].getSeme().equals(v[posz[2]].getSeme()) && v[posz[2]].getSeme().equals(v[posz[3]].getSeme()) && v[posz[3]].getSeme().equals(v[posz[4]].getSeme()) && v[posz[4]].getSeme().equals(v[posz[5]].getSeme())){ ris=true; } return ris; } public static Boolean controllaScala(CartaDaGioco v[]){ Random random= new Random(); CartaDaGioco carte[]= new CartaDaGioco[5]; CartaDaGioco tmp; int posz[]=new int[5],j=0; int nestratti=0,sel; Boolean ris=false; for(int i=0;i<=52;i++){ sel=random.nextInt(1); if(nestratti<5){ if(sel==1){ carte[j]=new CartaDaGioco(v[i].getSeme(),v[i].getValore()); j++; nestratti++; } } } Boolean nere=false,rosse=false; System.out.println(carte[0]); for(int i=0;i<5;i++){ System.out.println("Questo è i"+i); /*if(carte[i].getSeme().equals("cuori") || carte[i].getSeme().equals("quadri")){ rosse=true; }*/ if(carte[i].getSeme().equals("fiori") || carte[i].getSeme().equals("picche")){ nere=true; } } int val,valori[]=new int[5]; if(rosse==true && nere==true){ ris=false; } else{ for(int i=0;i<5;i++){ if(carte[i].getValore().equals("J")){ val=11; } else if(carte[i].getValore().equals("Q")){ val=12; } else if(carte[i].getValore().equals("K")){ val=13; } else{ val=Integer.parseInt(carte[i].getValore()); } valori[i]=val; } ris=true; for(int i=1;i<5;i++){ if(valori[i]<valori[i-1]){ ris=false; } } } return ris; } } @vorticalbox here it is /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package esercizio2; /** * * @author studente */ public class CartaDaGioco { private String seme; private String valore; CartaDaGioco(String a,String b){ seme=a; valore=b; } public void setSeme(String a){ seme=a; } public void setValore(String a){ valore=a; } public String getSeme(){ return seme; } public String getValore(){ return valore; } public String toString(){ return valore+" di "+seme; } public int confronta(int pos1, int pos2){ int ris; if(pos1>pos2){ ris=-1; } else if(pos1==pos2){ ris=0; } else{ ris=1; } return ris; } } This is the class CartaDaGioco
-
Hey guys, i know the code is probably ass, but i just want to get it working. What's the problem with this code? I commented the lines 177-179, but it gave me the same error
-
what do you think is better
Epimetheus replied to ghiaknchi's topic in CPUs, Motherboards, and Memory
Aside from the i/o which i don't know, the pro4 is a much better quality board overall -
Why No new cpu,gpu companies are not coming
Epimetheus replied to 220VoltsallCore's topic in CPUs, Motherboards, and Memory
I know ARM chips are slowly climbing their way up -
I know PyCharm is good, don't know many others
-
Why No new cpu,gpu companies are not coming
Epimetheus replied to 220VoltsallCore's topic in CPUs, Motherboards, and Memory
For cpus, i know that intel and amd have a contract that makes x86-64 exclusive to them -
Is waiting for zen2 Ryzen mobile worth it?
Epimetheus replied to Svs213's topic in Laptops and Pre-Built Systems
@Firewrath9 check this though -
Is waiting for zen2 Ryzen mobile worth it?
Epimetheus replied to Svs213's topic in Laptops and Pre-Built Systems
What the hell? I've never seen such low results, are you sure that isn't a specific case? -
msi b450 gaming pro carbon ac vs msi x570 pro
Epimetheus replied to UK-Gary's topic in CPUs, Motherboards, and Memory
The x570 a-pro is terrible, if you just want x570 then you can get an asus prime board for the same price. However for cheaper the b450 is still a great choice -
Is waiting for zen2 Ryzen mobile worth it?
Epimetheus replied to Svs213's topic in Laptops and Pre-Built Systems
a 2500u for example has got the same graphics as the 2200g, and no intel chip is able to play a modern game at all, not even on unplayable terms. Just not at all. Also Intel chips are really not that more power efficient. It really depends on what the op is going to do with it. If he's planning on using it for something that leverages cpu horsepower definitely comet lake is the best choice, but if it's for general usage for a price that doesn't allow a dGPU i'd definitely go for something Ryzen -
Is waiting for zen2 Ryzen mobile worth it?
Epimetheus replied to Svs213's topic in Laptops and Pre-Built Systems
Intel, as of now, doesn't reign much in the laptop section. Their comet lake cpus are faster, but their integrated graphics are real trash, while ice lake cpus are pretty much on par with ryzen cpus while having slightly worse graphics. So i guess what fits you best, but there's not a real gap. I'd take a Ryzen mobile laptop any day of the week just for the integrated graphics that would let me play games btw, but if you want to get a pc with dedicated graphics then it doesn't really matter -
Do you already have the components you've listed? Because if you do and you're using it mostly for gaming, you should really change gpu and psu first
-
To be clear, we're also doing c now, we did c++ a year ago. In my opinion though it's simpler for beginners to pick up c++ than c, since there are strings, the input may be confusing for noobs who have no idea of what they're doing compared to a simple cin, the likings. Also file management is pretty similar between the two. We basically started with c++ to learn the basics, then this year we're doing both java and c, in different classes. In java we're doing classes and objects, while in c we're doing processes and soon threads
-
Dude, what's the point of continuing a thread where I already admitted i knew it on a superficial level. At my school they didn't teach us classes, objects and the such in c++, we're doing them in java. Gotta streamline if they want to teach us 8 languages in 3 years i guess. I'm including html and css though, not really programming languages but still languages
-
look for something in at least tier A
-
Do you want to make your pc detonate with that power supply? A VS650 with a 9700k and a 2080S?