Closed LarsGast closed 1 year ago
https://github.com/LarsGast/DeckOfCards/blob/0792d0f81c546ee0919924a642c96b68a7431bff/DeckOfCardsLibrary/Deck.cs#L89C10-L89C10
Throwing an exception or simply letting the program crash here instead of returning null could be more intuitive. Research required.
The method will remain as is. It is not intuitive enough to throw an exception here. Returning null is a valid way of responding to the situation where no more cards can be drawn.
https://github.com/LarsGast/DeckOfCards/blob/0792d0f81c546ee0919924a642c96b68a7431bff/DeckOfCardsLibrary/Deck.cs#L89C10-L89C10
Throwing an exception or simply letting the program crash here instead of returning null could be more intuitive. Research required.