Java Horse Racing Simulation
Budget / Salary$10–30
TypeFreelance project
LocationRemote
Posted2 hours ago
I need a concise piece of Java code that simulates a horse race for use inside a game prototype. The key rule is simple: the Black Horse must always be the one out in front when the race plays out. How you keep it ahead—fixed speed boost, weighted randomness, or another elegant trick—is up to you as long as the code remains readable, well-commented, and easy for me to tweak later.
Because this is going straight into a game build, clean object-oriented structure is essential. A small main class that spins up a race, a Horse class (with colour or ID), and whatever helper logic you consider best practice will do; I’ll wire it into the rest of my project myself. If you enjoy adding basic ASCII or simple Swing graphics for clarity, that’s fine, but I’m equally happy with a text-only console run as long as the output shows positions in real time and ends with Black Horse declared the winner.
Please include:
• clear instructions on how to compile and run from the command line
• comments explaining where to adjust horse stats or race length
• a short note on how you ensured Black Horse’s lead without breaking realism
I’ll consider the job finished once I can run java RaceSimulation, watch the horses advance turn by turn, and consistently see the Black Horse cross the line first.
Because this is going straight into a game build, clean object-oriented structure is essential. A small main class that spins up a race, a Horse class (with colour or ID), and whatever helper logic you consider best practice will do; I’ll wire it into the rest of my project myself. If you enjoy adding basic ASCII or simple Swing graphics for clarity, that’s fine, but I’m equally happy with a text-only console run as long as the output shows positions in real time and ends with Black Horse declared the winner.
Please include:
• clear instructions on how to compile and run from the command line
• comments explaining where to adjust horse stats or race length
• a short note on how you ensured Black Horse’s lead without breaking realism
I’ll consider the job finished once I can run java RaceSimulation, watch the horses advance turn by turn, and consistently see the Black Horse cross the line first.
Apply on Freelancer →
Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.