Java pokemon game code
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy. See our Privacy Policy and User Agreement for details. Create your free account to read unlimited documents.
Basic pokmemon battle simulator program. The SlideShare family just got bigger. Home Explore Login Signup. Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime. Next SlideShares. You are reading a preview. Create your free account to continue reading. Sign Up. Upcoming SlideShare. Use a real package name. Do you own the domain company. If not, fine some other unique package name. Create object variables with an interface rather than a concrete class, if possible.
Don't use underscores in variable names. The idiom for setting an field with a parameter is this. Even when writing prototype code, every method and class should have a comment. This clears your mind as to what the method is doing and helps you remember why you wrote it. Always use braces, even when you don't have too. Especially with if statements, even if there is only one statement in the "then" clause, use braces for clarity.
Rob Spoor. Did you already check if such a game would be legal? I'm making this for learning, Not for any sort of commercial purposes. In retrospect I should not have used existing pokemon images anyways. I will remove them later. Thank you, I tried to include them in the original post but I kept hitting the character limit.
Valid points. I started working in C first so some of my naming convention carried over. Then I realized that I could make the IDE generate constructor code so I followed the style you mentioned in other classes. This was more readable to me. My question was more along the lines of how to reduce coupling between UI and the trainer class. But your points are still insightful since I'm mostly self taught and I forget about these things a lot.
Chris R Olsen. Bo Persson Jonathan Toomer Jonathan Toomer 11 1 1 bronze badge. When I run your code, I get: Pokemon a17f begins the fight against Pokemon c9be Pokemon a17f does 50 damage to Pokemon c9be and Pokemon c9be has left.
Pokemon c9be does 25 damage to Pokemon a17f and Pokemon a17f has 75 left. Pokemon a17f begins the fight against Pokemon c9be Pokemon a17f does 50 damage to Pokemon c9be and Pokemon c9be has 50 left. Pokemon c9be does 25 damage to Pokemon a17f and Pokemon a17f has 50 left. Pokemon a17f begins the fight against Pokemon c9be Pokemon a17f does 50 damage to Pokemon c9be and Pokemon c9be has 0 left.
Pokemon c9be does 25 damage to Pokemon a17f and Pokemon a17f has 25 left. Pokemon a17f begins the fight against Pokemon c9be Pokemon a17f does 50 damage to Pokemon c9be and Pokemon c9be has left.
Pokemon c9be does 25 damage to Pokemon a17f and Pokemon a17f has 0 left. Pokemon a17f has lost the fight Names a17f and a17f are not good names for pokemon. Riley Jones Riley Jones 33 7 7 bronze badges. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related
0コメント