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

package twutil
import (
"github.com/tribalwarshelp/shared/tw/twmodel"
)
func IsPlayerNil(player *twmodel.Player) bool {
return player == nil
}
func IsPlayerTribeNil(player *twmodel.Player) bool {
return IsPlayerNil(player) || player.Tribe == nil
}
func IsVillageNil(village *twmodel.Village) bool {
return village == nil
}