Inires Agent Ticket Test Example - git-Fabi/inires GitHub Wiki

Ticket: Create a Simple Browser-Based Pong POC

Goal: Create a minimal, one-player Pong game that runs in a web browser using basic HTML, CSS, and JavaScript. The focus is on core functionality only.

Requirements Game Area: A rectangular play area should be displayed on the page.

Paddles:

Create one paddle on the left side for the player.

Create another paddle on the right side controlled by the computer (AI). The AI can be very simple: it just tries to follow the ball's height.

Ball: A square or circle that moves continuously across the game area.

Controls: The player must be able to move their paddle up and down (e.g., with arrow keys or the mouse).

Core Logic:

The ball should bounce off the top and bottom walls.

The ball should bounce off both paddles.

If the ball goes past the player's paddle, the AI gets a point.

If the ball goes past the AI's paddle, the player gets a point.

After a point is scored, the ball should reset to the center.

Acceptance Criteria Given I open the HTML file in a browser,

When the page loads,

Then I see the game area, two paddles, a ball, and a score of 0-0.

Given the game is running,

When I press the up/down arrow keys,

Then my paddle on the left moves up/down accordingly.

Given the ball is moving towards a paddle,

When it hits the paddle,

Then the ball bounces off and moves in the opposite horizontal direction.

Given the ball moves past the right paddle,

When it leaves the screen,

Then the player's score increases by one and the ball resets.

Given the ball moves past the left paddle,

When it leaves the screen,

Then the computer's score increases by one and the ball resets.