feat: implement DirectionValidator and PlayerOnlineValidator #323

Merged
freemo merged 5 commits from feature/m1-direction-validator into master 2026-03-16 19:55:53 +00:00
Owner

Summary

  • Implement DirectionValidator for validating and normalizing direction strings
  • Implement PlayerOnlineValidator for validating online player names
  • Add comprehensive Cucumber test coverage for both validators

Changes

DirectionValidator

  • Validates 12 short-form directions: n, s, e, w, u, d, ne, nw, se, sw, in, out
  • Normalizes 10 long-form aliases to short-form (north->n, etc.)
  • Case-insensitive input handling
  • Returns Result struct with value or error

PlayerOnlineValidator

  • Case-insensitive player name lookup
  • Returns Player object on success
  • Handles edge cases (empty names, missing manager)
  • Returns descriptive error messages

Tests

  • 31 scenarios for DirectionValidator
  • 13 scenarios for PlayerOnlineValidator
  • All tests passing

Closes #295

## Summary - Implement DirectionValidator for validating and normalizing direction strings - Implement PlayerOnlineValidator for validating online player names - Add comprehensive Cucumber test coverage for both validators ## Changes ### DirectionValidator - Validates 12 short-form directions: n, s, e, w, u, d, ne, nw, se, sw, in, out - Normalizes 10 long-form aliases to short-form (north->n, etc.) - Case-insensitive input handling - Returns Result struct with value or error ### PlayerOnlineValidator - Case-insensitive player name lookup - Returns Player object on success - Handles edge cases (empty names, missing manager) - Returns descriptive error messages ### Tests - 31 scenarios for DirectionValidator - 13 scenarios for PlayerOnlineValidator - All tests passing Closes #295
freemo force-pushed feature/m1-direction-validator from 324a40ba8d to 15a2e028a2 2026-03-16 16:57:37 +00:00 Compare
freemo changed target branch from feature/m1-validation-pipeline to master 2026-03-16 16:57:43 +00:00
freemo force-pushed feature/m1-direction-validator from 15a2e028a2 to 7c85d42ab6 2026-03-16 17:07:31 +00:00 Compare
freemo force-pushed feature/m1-direction-validator from 7c85d42ab6 to 18033ebefe 2026-03-16 17:32:24 +00:00 Compare
freemo force-pushed feature/m1-direction-validator from 18033ebefe to 88f06c481f 2026-03-16 19:55:45 +00:00 Compare
freemo merged commit 88f06c481f into master 2026-03-16 19:55:53 +00:00
freemo deleted branch feature/m1-direction-validator 2026-03-16 19:55:54 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aethyr/Aethyr#323
No description provided.