(id: string)
| 301 | } |
| 302 | |
| 303 | getUnit(id: string): FleetUnit | undefined { |
| 304 | return this.fleet.find((u) => u.id === id); |
| 305 | } |
| 306 | |
| 307 | updateUnit(id: string, update: Partial<FleetUnit>): FleetUnit | undefined { |
| 308 | const index = this.fleet.findIndex((u) => u.id === id); |