Advertisement
Guest User

menu3ressi

a guest
Mar 7th, 2014
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1.  
  2. public class Menu3Ressi {
  3.  
  4. private int hauptgebaeude, kaserne, stall, werkstatt, schmiede, adelshof, markt, holzfaeller, lehmgrube, eisenmine, bauernhof, speicher, wall, holz, lehm, eisen;
  5.  
  6. public Menu3Ressi(int hauptgebaeude, int kaserne, int stall, int werkstatt, int schmiede, int adelshof, int markt, int holzfaeller, int lehmgrube, int eisenmine, int bauernhof, int speicher, int wall, int holz, int lehm, int eisen) {
  7.  
  8. this.hauptgebaeude = hauptgebaeude;
  9. this.kaserne = kaserne;
  10. this.stall = stall;
  11. this.werkstatt = werkstatt;
  12. this.schmiede = schmiede;
  13. this.adelshof = adelshof;
  14. this.markt = markt;
  15. this.holzfaeller = holzfaeller;
  16. this.lehmgrube = lehmgrube;
  17. this.eisenmine = eisenmine;
  18. this.bauernhof = bauernhof;
  19. this.speicher = speicher;
  20. this.wall = wall;
  21. this.holz = holz;
  22. this.lehm = lehm;
  23. this.eisen = eisen;
  24.  
  25. }
  26.  
  27. int berechnung() {
  28.  
  29. switch (hauptgebaeude) {
  30.  
  31. case 2: {
  32. holz+= 113;
  33. lehm+= 102;
  34. eisen+= 88;
  35. break;
  36. }
  37. case 3: {
  38. holz+= 143;
  39. lehm+= 130;
  40. eisen+= 111;
  41. break;
  42. }
  43. case 4: {
  44. holz+= 180;
  45. lehm+= 166;
  46. eisen+= 140;
  47. break;
  48. }
  49.  
  50. }
  51.  
  52. return holz;
  53. }
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement