Cribbage is a card game in which players are dealt five cards. The remainder of the cards are placed in…