Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. package org.owendev.object;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5.  
  6. public class SalaHG {
  7.  
  8. int kills,tempo,topkills,topks,players;
  9. String name;
  10. List<String>spec=new ArrayList<>();
  11. List<String>jogador=new ArrayList<>();
  12. public SalaHG(String name, int players,int kills,int topkills,int topks,int tempo,String player, String spec){
  13. this.kills=kills;
  14. this.topkills=topkills;
  15. this.topks=topks;
  16. this.name=name;
  17. this.tempo=tempo;
  18. this.players=players;
  19.  
  20.  
  21. if(spec!=null)
  22. this.spec.add(spec);
  23. if(player!=null)
  24. this.jogador.add(player);
  25. }
  26.  
  27. public String getName() {
  28. return this.name;
  29. }
  30. public int getTopKS() {
  31. return this.topks;
  32. }
  33. public int getTopKills() {
  34. return this.topkills;
  35. }
  36. public int getKills() {
  37. return this.kills;
  38. }
  39. public int getTempo() {
  40. return this.tempo;
  41. }
  42. public void addTempo(int tempo){
  43. this.tempo+=tempo;
  44. }
  45. public void removeTempo(int tempo){
  46. this.tempo-=tempo;
  47. }
  48. public void setTempo(int tempo){
  49. this.tempo=tempo;
  50. }
  51. public void addKills(int kills){
  52. this.kills+=kills;
  53. }
  54. public void setKills(int setkills){
  55. this.kills=setkills;
  56. }
  57. public void addtopKills(int kills){
  58. this.topkills+=kills;
  59. }
  60. public void settopKills(int setkills){
  61. this.topkills=setkills;
  62. }
  63. public void addtopKs(int kills){
  64. this.topks+=kills;
  65. }
  66. public void settopKs(int setkills){
  67. this.topks=setkills;
  68. }
  69.  
  70. public List<String> getSpecs(){
  71. return this.spec;
  72. }
  73.  
  74. public void addSpec(String c){
  75. this.spec.add(c);
  76. }
  77. public void removeSpec(String c){
  78. this.spec.remove(c);
  79. }
  80. public boolean isSpec(String c){
  81. if(this.spec.contains(c)){
  82. return true;
  83. }else{
  84. return false;
  85. }
  86. }
  87. public List<String> getjogadors(){
  88. return this.jogador;
  89. }
  90.  
  91. public void addjogador(String c){
  92. this.jogador.add(c);
  93. this.players++;
  94. }
  95. public void removejogador(String c){
  96. this.jogador.remove(c);
  97. this.players--;
  98. }
  99. public boolean isjogador(String c){
  100. if(this.jogador.contains(c)){
  101. return true;
  102. }else{
  103. return false;
  104. }
  105. }
  106. public int getPlayers() {
  107. return this.players;
  108. }
  109.  
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement