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/utils/tribalwars.go

18 lines
323 B
Go

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