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",
|
||||
"\n",
|
||||
" def is_ace(self):\n",
|
||||
" return True if self._value == 1 else False\n",
|
||||
" return self._value == 1\n",
|
||||
"\n",
|
||||
" def is_face_card(self):\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",
|
||||
" @property\n",
|
||||
" def value(self):\n",
|
||||
|
|
Loading…
Reference in New Issue