CommonServices.cs 585 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using SCC.Interface;
  6. namespace SCC.Services
  7. {
  8. /// <summary>
  9. /// 公共方法服务
  10. /// </summary>
  11. public class CommonServices : ICommon
  12. {
  13. /// <summary>
  14. /// 获取等级对应分数
  15. /// </summary>
  16. /// <param name="level">等级</param>
  17. /// <returns></returns>
  18. public int GetScore(int level)
  19. {
  20. if (level > 10) return 100;
  21. if (level < 0) return 0;
  22. return level * 10;
  23. }
  24. }
  25. }