-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: submit_answer #266
feat: submit_answer #266
Conversation
@armaanansari121 is attempting to deploy a commit to the xaxxoo's projects Team on Vercel. A member of the Team first needs to authorize it. |
Amazing work @armaanansari121, Please check the requested changes and update the tests accordingly. |
assert(!round.is_completed, Errors::ROUND_COMPLETED); | ||
|
||
// Get current card index and card | ||
let current_index = round.next_card_index; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a round is started the next_card
fn will be called which will increase the next_card_index
by 1, so the current card should be next_card_index - 1
.
let current_index = round.next_card_index; | |
let current_index = round.next_card_index - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the changes.
Thank you @armaanansari121, LGTM! |
Changes
submit_answer
function.round_id
andanswer
as a parameter and returns a boolean on whether the answer was correct or not.Answer
enum to have better readability.submit_answer
Function #193Tests Screenshot