Bug 315 - Invalid input incorrectly deducted users tokens
Summary: Invalid input incorrectly deducted users tokens
Status: RESOLVED FIXED
Alias: None
Product: Slot Machine
Classification: Unclassified
Component: slot machine (show other bugs)
Version: 1.0 release
Hardware: PC Mac OS
: High critical
Assignee: billy777
URL:
Depends on:
Blocks:
 
Reported: 2019-11-24 14:55 HKT by josephccs0917
Modified: 2019-11-24 16:14 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description josephccs0917 2019-11-24 14:55:34 HKT
When I entered non-numeric input for the bet, it deducts my tokens and starts spinning the slot machine. Non-numeric input should be regarded as invalid input and requires player to enter numeric input.
Comment 1 billy777 2019-11-24 15:57:22 HKT
Problem resolved by prohibiting player to enter input by themselves, but allow them to input the bet by clicking the add or minus button.
Comment 2 billy777 2019-11-24 16:14:34 HKT
The problem is caused by Generics in Java is only available at compile time. Java generic is only performing type safe casting at compile time. However, the problem is caused by user enter inputs at run time. Therefore, disabling the editable feature in spinner is the most intuitive way to solve the problem.