Simplify logic for is_ace and is_face_card in deck of cards solution (#113)

pull/115/head
Bryan Jennings 2017-10-24 18:05:59 -07:00 committed by Donne Martin
parent 2aa2166b2a
commit 84c21366d6
1 changed files with 2 additions and 2 deletions

View File

@ -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",