slotscore.go 589 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package slotscore
  2. func Run() {
  3. createScoreManager()
  4. }
  5. func AddScore(userId int, score int) int {
  6. return mgr.addScore(userId, score)
  7. }
  8. func GetScore(userId int) int {
  9. return mgr.getScore(userId)
  10. }
  11. func GetExchangeList() string {
  12. return mgr.getExchangeList()
  13. }
  14. func Exchange(userId int, productId int) bool {
  15. return mgr.exchangeChip(userId, productId)
  16. }
  17. func GetExchangeHistory(userId int) string {
  18. return mgr.getExchangeHistory(userId)
  19. }
  20. func Dump(param1, param2 string) {
  21. if param1 == "" {
  22. mgr.dumpSys()
  23. return
  24. }
  25. mgr.dumpUser(param1)
  26. }
  27. func Flush() {
  28. mgr.doFlush()
  29. }