Scramble method done

This commit is contained in:
blzimme000 2022-02-18 07:35:12 -06:00
parent f8f054c985
commit 6ae8461d8a
2 changed files with 59 additions and 20 deletions

View file

@ -24,9 +24,9 @@ You will implement three different public methods in the GameWheel class.
| | 19 - Color: red, Prize Amount: $190 |
| | You may find the toString method helpful when testing your other GameWheel methods. |
***
| scramble | The second method you will write is the scramble method, which randomizes the positions of the slices that are in the wheel, but without changing the pattern of the colors (i.e. the black slices will still be at multiples of 5, the red slices at all other odd indices and the blue slices at all other even indices). No individual slice should be changed, rather the slices should be re-ordered. | |
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| sort | The third method to implement is the sort method. This is similar to the scramble method in that it reorders the slices in the GameWheel so that the pattern of the colors remains the same. After the sort method is called however, the slices of each color should be sorted in increasing order of prize amount. So for example, the black slice with the lowest | prize value will be at index 0, and the black slice with the highest prize value will be at index 15. |
| scramble | The second method you will write is the scramble method, which randomizes the positions of the slices that are in the wheel, but without changing the pattern of the colors (i.e. the black slices will still be at multiples of 5, the red slices at all other odd indices and the blue slices at all other even indices). No individual slice should be changed, rather the slices should be re-ordered. |
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| sort | The third method to implement is the sort method. This is similar to the scramble method in that it reorders the slices in the GameWheel so that the pattern of the colors remains the same. After the sort method is called however, the slices of each color should be sorted in increasing order of prize amount. So for example, the black slice with the lowest prize value will be at index 0, and the black slice with the highest prize value will be at index 15|
### Part 2: Game/play