Skip to content

Check if the output file are valid #4

@AkselsLedins

Description

@AkselsLedins

Expected Behavior

Throw an error like this:
selection_291

Current Behavior

The simulation runs smoothly

Possible Solution

Check simulation data before starting it.
Additionally, in:

func (v *Vehicle) Drive(allTrips []*Trip, step int, bonus int16) (score int) {
	// until the vehicle handles all scheduled rides
	if v.CurrentTrip >= len(v.Trips) {
		return
	}

	trip := allTrips[v.Trips[v.CurrentTrip]]
	trip.SomeoneIsOnIt()

We should check if someone is already on it

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions