Question: Text-based ball drop (plinko) game Balls are dropped from the opening at the top of the board. When a ball hits a peg it will
Text-based ball drop (plinko) game Balls are dropped from the opening at the top of the board. When a ball hits a peg it will either move left or right of the peg eventually landing in a random slot. There is a 50% chance that the ball will move in either direction (left or right). Note: System is a Galton board (triangle as opposed to The Price is Right version which is a rectangle) 1. Your program should prompt the user for the number of balls to drop. 2. Your program should prompt the user for the number slots (the example has 8). 3. Limit the slots no less than 2 and no more than 20. 4. Your program should display the 'path' of each ball moving through the pegs, for example "RLLRRLR". The letter 'R' represents a "Right" turn and the letter 'L' represents a "Left" turn. 5. Your program should display each slot with the ball count. --- Example of output--- (playing game with 2 slots and 5 balls) Please enter the number slots [2-20]: 2 Please enter the number balls to drop: 5 L L R R L Slot 1:2 Slot 2:3 <---- this is what the assignment had, but should't it be the other way around? (slot1:3, slot2:2)? -------------------------- 6. Create three files/classes called: Ball.java, BallBoard.java, and PlayBallDrop.java.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
