Simplify logic for is_ace and is_face_card in deck of cards solution (#113)
parent
2aa2166b2a
commit
6c4c2abe00
|
@ -89,11 +89,11 @@
|
||||||
" super(BlackJackCard, self).__init__(value, suit)\n",
|
" super(BlackJackCard, self).__init__(value, suit)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def is_ace(self):\n",
|
" def is_ace(self):\n",
|
||||||
" return True if self._value == 1 else False\n",
|
" return self._value == 1\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def is_face_card(self):\n",
|
" def is_face_card(self):\n",
|
||||||
" \"\"\"Jack = 11, Queen = 12, King = 13\"\"\"\n",
|
" \"\"\"Jack = 11, Queen = 12, King = 13\"\"\"\n",
|
||||||
" return True if 10 < self._value <= 13 else False\n",
|
" return 10 < self._value <= 13\n",
|
||||||
"\n",
|
"\n",
|
||||||
" @property\n",
|
" @property\n",
|
||||||
" def value(self):\n",
|
" def value(self):\n",
|
||||||
|
|
Loading…
Reference in New Issue