Skip to content

Instantly share code, notes, and snippets.

@Nikola-Andreev
Created December 14, 2017 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikola-Andreev/b31c8469193f554b1e831db0c32939fb to your computer and use it in GitHub Desktop.
Save Nikola-Andreev/b31c8469193f554b1e831db0c32939fb to your computer and use it in GitHub Desktop.
BoatRacingSimulator-test9
-------------Input----------------
CreateBoatEngine\Shark\100\-250\Jet
CreateBoatEngine\Shark\500\250\Jet
CreateSailBoat\Sail1\100\100
CreateYacht\Yacht1\500\Shark\250
CreateRowBoat\Rowboat1\100\20
CreateRowBoat\Slow1\300\1
OpenRace\2100\2100\200\true
SignUpBoat\Yacht1
SignUpBoat\Sail1
SignUpBoat\Rowboat1
SignUpBoat\Slow1
StartRace
OpenRace\2100\0\201\true
SignUpBoat\Yacht1
SignUpBoat\Sail1
SignUpBoat\Rowboat1
SignUpBoat\Slow1
StartRace
OpenRace\2100\2000\200\false
SignUpBoat\Yacht1
SignUpBoat\Sail1
SignUpBoat\Rowboat1
SignUpBoat\Slow1
StartRace
End
----------Expected Output----------
Displacement must be a positive integer.
Engine model Shark with 500 HP and displacement 250 cm3 created successfully.
Sail boat with model Sail1 registered successfully.
Yacht with model Yacht1 registered successfully.
Row boat with model Rowboat1 registered successfully.
Row boat with model Slow1 registered successfully.
A new race with distance 2100 meters, wind speed 2100 m/s and ocean current speed 200 m/s has been set.
Boat with model Yacht1 has signed up for the current Race.
Boat with model Sail1 has signed up for the current Race.
Boat with model Rowboat1 has signed up for the current Race.
Boat with model Slow1 has signed up for the current Race.
First place: Yacht Model: Yacht1 Time: 1.00 sec
Second place: SailBoat Model: Sail1 Time: 1.00 sec
Third place: RowBoat Model: Rowboat1 Time: 1.00 sec
A new race with distance 2100 meters, wind speed 0 m/s and ocean current speed 201 m/s has been set.
Boat with model Yacht1 has signed up for the current Race.
Boat with model Sail1 has signed up for the current Race.
Boat with model Rowboat1 has signed up for the current Race.
Boat with model Slow1 has signed up for the current Race.
First place: RowBoat Model: Rowboat1 Time: 1.00 sec
Second place: Yacht Model: Yacht1 Time: 1.00 sec
Third place: RowBoat Model: Slow1 Time: 2100.00 sec
A new race with distance 2100 meters, wind speed 2000 m/s and ocean current speed 200 m/s has been set.
The specified boat does not meet the race constraints.
Boat with model Sail1 has signed up for the current Race.
Boat with model Rowboat1 has signed up for the current Race.
Boat with model Slow1 has signed up for the current Race.
First place: RowBoat Model: Rowboat1 Time: 1.00 sec
Second place: SailBoat Model: Sail1 Time: 1.05 sec
Third place: RowBoat Model: Slow1 Time: Did not finish!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment