MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / _is_straight

Method _is_straight

project_euler/problem_054/sol1.py:273–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

271 return False
272
273 def _is_straight(self) -> bool:
274 for i in range(4):
275 if self._card_values[i] - self._card_values[i + 1] != 1:
276 return False
277 return True
278
279 def _is_same_kind(self) -> int:
280 # Kind Values for internal use:

Callers 2

_get_hand_typeMethod · 0.95
test_hand_is_straightFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_hand_is_straightFunction · 0.64