The bounds are not checked on this loop leaving us open to an index out of bounds exception, we can not trust the client to only send valid requests.
Also, we can not tell if a players claim of having a stale hand is valid without also checking to make sure they are unable to draw. I can think of the following cases to be considered:
[x] Player has a full hand that is unplayable (can stale)
[x] Player has a full hand that is playable (can't stale)
Player has a partially full hand that is unplayable
[x] Iff the player is unable to draw they should be able to declare stale
[x] Otherwise the request should be denied and the player should be prompted to instead draw a card
Let me know if you come up with any more or would like me to help with this.
https://github.com/ralstonba/CS3750Assignment3/blob/150322b546d12884abb1cf8d79f2bf2456c0df43/src/main/java/com/example/speed/Controller/SpeedController.java#L106-L114
The bounds are not checked on this loop leaving us open to an index out of bounds exception, we can not trust the client to only send valid requests.
Also, we can not tell if a players claim of having a stale hand is valid without also checking to make sure they are unable to draw. I can think of the following cases to be considered:
Let me know if you come up with any more or would like me to help with this.