Guest User

Untitled

a guest
Jan 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. package Characters;
  2.  
  3. public class Character {
  4. String species;
  5. String unitName;
  6. String name;
  7. int ballisticSkill; //Ranged weapon accuracy
  8. //int Strength; //Strength in hand2hand combat
  9. int toughnes; //decides how easy one is wounded
  10. int weaponStrength;
  11.  
  12. public Character(){
  13. this("Unidentified", "Unknown", "Unknown", 1, 1, 1);
  14. }
  15.  
  16. public Character(String species, String unitName, String name, int BS, int T, int WS){
  17. setSpecies(species);
  18. setUnitName(unitName);
  19. setName(name);
  20. setBallisticSkill(BS);
  21. setToughnes(T);
  22. setWeaponStrength(WS);
  23. }
  24.  
  25. public void setSpecies(String species){
  26. this.species = species;
  27. }
  28.  
  29. public String getSpecies(){
  30. return species;
  31. }
  32.  
  33. public void setUnitName(String unitName){
  34. this.unitName = unitName;
  35. }
  36.  
  37. public String getUnitName(){
  38. return unitName;
  39. }
  40.  
  41. public void setName(String name){
  42. this.name = name;
  43. }
  44.  
  45. public String getName(){
  46. return name;
  47. }
  48.  
  49. public void setBallisticSkill(int BS){
  50. this.ballisticSkill = BS;
  51. }
  52.  
  53. public int getBallisticSkill(){
  54. return ballisticSkill;
  55. }
  56.  
  57. public void setToughnes(int T){
  58. this.toughnes = T;
  59. }
  60.  
  61. public int getToughnes(){
  62. return toughnes;
  63. }
  64.  
  65. public void setWeaponStrength(int WS){
  66. this.weaponStrength = WS;
  67. }
  68.  
  69. public int getWeaponStrength(){
  70. return weaponStrength;
  71. }
  72.  
  73. public String toString(){
  74. return "Species: " + getSpecies() + "\nUnit Name: " + getUnitName() +
  75. "\nName: " + getName() + "\nBallistic Skill: " + getBallisticSkill() +
  76. "\nToughnes: " + getToughnes() + "\nWeapon Strength: " + getWeaponStrength();
  77.  
  78. }
  79. }
Add Comment
Please, Sign In to add comment