Murthy10 / pyschieber

pyschieber is a playground for popular Swiss Schieber Jass game, it provides an API to the game as well as a CLI
MIT License
5 stars 4 forks source link

is_higher_trumpf_than(...) produces type error #3

Open NarCodeX opened 6 years ago

NarCodeX commented 6 years ago

Class: "Card" Function: "is_higher_trumpf_than(self, other)"

Current

The function tries to apply the '>' operator on the internal dictionary trumpf_rank of the two cards instead of comparing their actual trumpf value retrieved by get_trumpf_rank. This results in a type error when calling the function.

Expected

The function returns a boolean value of 'TRUE' when the card specified as parameter for comparison has a lower trumpf rank value.

Murthy10 commented 6 years ago

Unfortunately I'm not the creator of this method and I don't like the placement of the method, either. (Missed it when I accepted the pull request). Maybe @scriptcoffee knows the use of the method, but I didn't find a usage in the repo at all.

So @NarCodeX you can propose a fix that fits your needs?