Advertisement
Guest User

Untitled

a guest
Oct 21st, 2021
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Guild
  6. {
  7. public class Player
  8. {
  9. public Player(string name, string @class)
  10. {
  11. Name = name;
  12. Class = @class;
  13. Rank = "Trial";
  14. Description = "n/a";
  15. }
  16. public string Name { get; set; }
  17. public string Class { get; set; }
  18. public string Rank { get; set; }
  19. public string Description { get; set; }
  20.  
  21. public override string ToString()
  22. {
  23. StringBuilder builder = new StringBuilder();
  24.  
  25. builder.AppendLine($"Player {Name}: {Class}");
  26. builder.AppendLine($"Rank: {Rank}");
  27. builder.AppendLine($"Description: {Description}");
  28.  
  29. return builder.ToString().TrimEnd();
  30. }
  31. }
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement