SharifAIChallenge / AIC20-Client-Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

king.is_alive

mohamad-shadfar opened this issue · comments

Hi
I print is_alive of the king by following lines of code but it returns "True" even when hp of king is -1

    a = world.get_king_by_id(world.get_me().player_id)
    print("playerid of king is : ", a.player_id )
    print("hp of king is : ", a.hp)
    print("is_alive of king is : ", a.is_alive )

turn started: 49


playerid of king is : 0
hp of king is : 7
is_alive of king is : True


turn started: 50


playerid of king is : 0
hp of king is : -1
is_alive of king is : True


turn started: 51


playerid of king is : 0
hp of king is : -1
is_alive of king is : True

Thanks! fixed it!