johanrovala / Workshop-3

0 stars 0 forks source link

Duplicate code #5

Closed johanrovala closed 8 years ago

johanrovala commented 8 years ago

The code for getting a card from the deck, show the card and give it to a player is duplicated in a number of places. Make a refactoring to remove this duplication and that supports low coupling/high cohesion. The code that is duplicated i similar to this:

Card c = deck.GetCard(); c.Show(true/false) player.DealCard(c);

johanrovala commented 8 years ago

Solved by ujjan.