Bug 794 - Bug logic with card type number
Summary: Bug logic with card type number
Status: RESOLVED FIXED
Alias: None
Product: .CS3343 Group2 2324A Uno Game
Classification: Unclassified
Component: Card (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- major
Assignee: tinloklee2-c
URL:
Depends on:
Blocks:
 
Reported: 2023-11-28 21:36 HKT by pybehardi2-c
Modified: 2023-12-01 00:01 HKT (History)
1 user (show)

See Also:


Attachments
The current card is GREEN 9, and user played RED 0 which shouldn't be possible (9.86 KB, image/png)
2023-11-28 21:36 HKT, pybehardi2-c
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pybehardi2-c 2023-11-28 21:36:35 HKT
Created attachment 153 [details]
The current card is GREEN 9, and user played RED 0 which shouldn't be possible

When the current card is a number card, if the next card played is also a number card, the system must check both its colour and number to check if it is valid. However, when the next number card has a different colour and number, the system thinks it is a valid card.

Steps to reproduce:
1. Run the main function
2. Play the game until it is the user's turn, and the current card is a number card
3. Play a number card which has a different colour and number than the current card

Expected result: the game declines the new card and asks the user to input again

Actual result: the game accepts the new card, and it is the next player's turn