The box office adds the theatre, whose floor is $95 gold and upper $30 grey. A teammate’s pull request makes buildSeatMap take a venue, shares one style book across every map “so each zone’s style is made once”, and adds reprice so a performance can run a promotion. House rule: a seat on hold keeps the price its customer was quoted. You are reviewing the pull request.
Theatre customers are shown arena prices, or arena customers theatre prices, depending on which map the box office drew first. A promotion on one performance changes the prices of every other performance, and of seats customers already hold.
Reproduce
Build the arena’s matinee with F1 on the floor, then the theatre with F1 on the floor. The theatre’s F1 should draw “F1 floor $95 gold”; today it draws the arena’s $120 red.
Acceptance criteria
- Each map draws its own venue’s prices and colours, whichever map was built first.
- reprice changes the seats of that map’s zone and nothing else: no other map, no other zone, and no seat on hold, which keeps its quoted price.
- After a reprice, the zone’s repriced seats still share one style per kind of seat.
- Earlier rules still hold: holds stay on the seat, access is part of the style.
Notes
- Each case builds its maps first, then runs its holds and reprices in order. It prints each map as “name: styles=N; seats”, maps joined by “ || ”.
- Keep the names and signatures of buildSeatMap, reprice, holdSeat and drawSeat, and the Seat’s style field. The checker runs every case in one program, so state that outlives a map outlives a case too.