Add custom error classes for state and placement (#2)

issue-2
Garrett Mills 4 years ago
parent 1a6d916f85
commit a803c6937d
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -0,0 +1,13 @@
/**
* Placeholder class for an error that is thrown when a ship is placed
* in an invalid position.
* @extends Error
*/
export class InvalidShipPlacementError extends Error {}
/**
* Error thrown when the program tries to advance the state, but it is
* invalid.
* @extends Error
*/
export class InvalidAdvanceStateError extends Error {}
Loading…
Cancel
Save