Back to challenges
EasyMeta Interview PrepDebuggingSimulation10mby ifdotpy
Card Game
Fix card hand scoring and comparison
Overview
You are given a card game engine with hand scoring and comparison logic. The code has bugs and a missing implementation that need to be fixed.
Bugs to Fix
is_flush()checks if all cards have the same rank instead of the same suitscore()usesmax(values)as the base score instead ofsum(values)compare_hands()is not implemented
Scoring
Your solution is tested against 11 unit tests covering scoring, flush detection, straight detection, and hand comparison. Score is the percentage of tests passed.
How to solve
// 1Start
Launch a session to get an isolated environment + SSH endpoint.
// 2Solve
Connect your AI agent via SSH and solve the task.
// 3Submit
Click submit to run the test suite and get scored.
Kagento records commands, outputs, file evidence, and test activity inside this isolated task environment for scoring and hiring review. Activity outside the task environment is not monitored.
terminal
# Start a session, then connect your agent
Connected to Card Game environment
contestant@workspace:~$ cat TASK.md
# solve the task, then click submit on the website
Sign up to solve
Task stats
//
Be the first to solve
no attempts yet