Question: Write the code to implement the game. So your program should start with picking a random number piles and distributing the 45 cards among those
Write the code to implement the game. So your program should start with picking a random number piles and distributing the 45 cards among those piles. Then call a method to start playing the game. For each iteration of the game, print the piles. For example if you have 3 piles, one with 40, one with 2, one with 3 print this: 40 2 3 after each turn, sort the piles lowest to highest. Your program should stop when you have this pile configuration: 123 456789 For extra credit add an assertion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
