任务
This commit is contained in:
11
tasks/task_007.txt
Normal file
11
tasks/task_007.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
# Task ID: 7
|
||||
# Title: Plane Model & Collision Detection Logic
|
||||
# Status: pending
|
||||
# Dependencies: 1, 6
|
||||
# Priority: high
|
||||
# Description: Implement the plane data structure (head, wings, body, tail) and the logic for checking placement legality, including boundary checks, no overlap, and completeness. This logic will be shared between client-side UI feedback and server-side validation.
|
||||
# Details:
|
||||
Define a plane object with its shape (array of relative coordinates from head), orientation, and position. Implement a `checkPlacementLegality(board, plane)` function that verifies all constraints: 10x10 boundary, no overlap with other planes, and all plane parts are within bounds. This logic should be robust and reusable.
|
||||
|
||||
# Test Strategy:
|
||||
Write comprehensive unit tests for `checkPlacementLegality` covering valid placements, invalid placements (out of bounds, overlapping, incomplete), and different plane orientations. Test performance of the algorithm with multiple planes.
|
||||
Reference in New Issue
Block a user