I recently applied for a backend Java developer role and was given a coding challenge to create a one-armed bandit (slot machine) game accessible via REST calls with JSON for the request and response formats. The main gameplay involved spending credits, where one game costs 3 credits, and payout conditions were based on the appearance of fruits on three reels. After submitting my project, I received feedback stating that while my personality and consulting skills were appreciated, my technical execution didn't meet expectations. I'm looking for insights on where I went wrong, especially since I added features like adjustable bets and a PostgreSQL database version. Here are my project links: [The Repo](https://github.com/xtay2/one-armed-bandit), [The Docs](https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/xtay2/one-armed-bandit/refs/heads/master/docs/api-v1.yaml).
1 Answer
It looks like one of the main issues was that while you allowed players to set a dynamic stake, the instructions clearly stated that each game should cost 3 credits. This could confuse users about the actual cost. Plus, I noticed you didn't have unit tests for specific conditions like the payout calculations when all three fruits match. Having more structured tests would help ensure your game logic behaves as expected.
Yeah, like testing the payout if someone bets 3 apples for 10 credits. It’d really show the code's functionality.