Fix 0 shot for new defense

This commit is contained in:
Andrew Cooper
2022-04-12 17:51:18 +10:00
parent f4fa4f230b
commit c6d018acef

View File

@@ -15,12 +15,13 @@ public class Shot
{
// Although the game instructions reference two different jump shots,
// the original game code treats them both the same and just prints "Jump shot"
0 => null,
<= 2 => new JumpShot(),
3 => new Shot("Lay up"),
4 => new Shot("Set shot"),
_ => null
};
return shot is not null;
return shotNumber == 0 || shot is not null;
}
public static Shot Get(float shotNumber) =>