This repository has been archived on 2022-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
dcbot-old/util/twutil/tribalwars.go

18 lines
331 B
Go
Raw Permalink Normal View History

2021-05-06 13:25:09 +00:00
package twutil
2020-08-09 15:20:23 +00:00
import (
"github.com/tribalwarshelp/shared/tw/twmodel"
2020-08-09 15:20:23 +00:00
)
func IsPlayerNil(player *twmodel.Player) bool {
2020-08-09 15:20:23 +00:00
return player == nil
}
func IsPlayerTribeNil(player *twmodel.Player) bool {
2020-08-09 15:20:23 +00:00
return IsPlayerNil(player) || player.Tribe == nil
}
func IsVillageNil(village *twmodel.Village) bool {
2020-08-09 15:20:23 +00:00
return village == nil
}