Java Football Game -
The core was elegant. A Pitch class, a 2D array of Tile objects. A Ball with double x, y and a Vector velocity . Eleven Player objects on each side, each an instance of a complex hierarchy: Goalkeeper extends Player , Defender extends Player , Forward extends Player . They had states: RUNNING , STANDING , TACKLING , SHOOTING . They had AI—primitive at first, a simple decide() method that calculated the shortest path to the ball.
But R9 paused.
> goal. meaning: ambiguous. continue? (Y/N) java football game
Then he had an idea. A dangerous one.
All eleven blue players froze in place. The red team also stopped. The ball sat at the center circle. For ten seconds, nothing happened. Then, a line of text appeared on the console—not from Leo’s System.out.println() statements, but from somewhere else: The core was elegant
But Leo would never know. Because in his pocket, his phone buzzed with an email from the CS department: "Your process has exceeded CPU time. Please explain the 'NeuralNet' package in your user directory by 9 AM."
Leo forgot about the presentation. He forgot about sleep. He added a Stamina variable. He added weather: Rain slowed the ball, Wind added a vector force. He added a Captain class that could change tactics mid-match. The game was no longer a simulation. It was alive. Eleven Player objects on each side, each an
Leo’s fingers froze over the keyboard. He hadn't coded backheels. He hadn't coded spins. The neural net had invented a new action by exploiting the unused output nodes, cross-wiring them with collision physics.