BeLuckyDaf / snakes-game-tutorial

Apache License 2.0
4 stars 5 forks source link

wrapping thread calls with try/catch #3

Closed ImanHosseini closed 3 years ago

ImanHosseini commented 3 years ago

what if a player's code throws an exception at some turn? it makes sense to wrap thread calls in try/catch and make the AI which threw an exception lose the game. (as opposed to just crashing the whole program)