mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
Fix 0 shot for new defense
This commit is contained in:
@@ -15,12 +15,13 @@ public class Shot
|
|||||||
{
|
{
|
||||||
// Although the game instructions reference two different jump shots,
|
// Although the game instructions reference two different jump shots,
|
||||||
// the original game code treats them both the same and just prints "Jump shot"
|
// the original game code treats them both the same and just prints "Jump shot"
|
||||||
|
0 => null,
|
||||||
<= 2 => new JumpShot(),
|
<= 2 => new JumpShot(),
|
||||||
3 => new Shot("Lay up"),
|
3 => new Shot("Lay up"),
|
||||||
4 => new Shot("Set shot"),
|
4 => new Shot("Set shot"),
|
||||||
_ => null
|
_ => null
|
||||||
};
|
};
|
||||||
return shot is not null;
|
return shotNumber == 0 || shot is not null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Shot Get(float shotNumber) =>
|
public static Shot Get(float shotNumber) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user