In this particular example, the offending code can be found on line 42 of TeamPhase.cs:
return command.Executor.ResponsibleTeam == CurrentTeam &&
(command.Executor as ITappableTeammate)?.IsTapped != true;
There should be a null check on the command.Executor property here. If the null check fails, I think raising an exception (such as a NullObjectException) with a message something along the lines of "The command's executor has not been set yet" would be great.
In this particular example, the offending code can be found on line 42 of
TeamPhase.cs
:There should be a null check on the
command.Executor
property here. If the null check fails, I think raising an exception (such as aNullObjectException
) with a message something along the lines of "The command's executor has not been set yet" would be great.