Skip to content

Commit a6b9cc2

Browse files
committed
(#27) Enemies: minor comment tweaks
1 parent e4e1ee5 commit a6b9cc2

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

O21.Game/Engine/Enemies.fs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ type Fish = {
3939
| Collision.OutOfBounds ->
4040
EnemyEffect.Despawn
4141
| Collision.CollidesBrick ->
42-
// TODO[#27]: Fish behavior: up/down
43-
// TODO[#27]: Fish behavior: turn
44-
// TODO[#27]: Fish behavior: randomize speed
45-
EnemyEffect.Update this
42+
// Should not happen.
43+
EnemyEffect.Despawn
4644
| Collision.CollidesObject _ ->
4745
EnemyEffect.PlayerHit this.Id
4846

4947
member private this.WithNextPosition level: Fish =
50-
// TODO: Stick to the wall if there's any space
48+
// TODO[#27]: Stick to the wall if there's any space (so that we should move as close to it as possible).
5149
let checkState(state: Fish) =
5250
match CheckCollision level state.Box Array.empty with
5351
| Collision.CollidesBrick -> None
@@ -157,7 +155,7 @@ type Fish = {
157155

158156
[|
159157
// TODO: Pick the actual level size instead of hardcoding here. In the future, we might wish to have levels
160-
// of different sizes in the same game. This will require the level to be aware of its contents, though.
158+
// of different sizes in the same game. This will require the level to be aware of its size, though.
161159
for x in 0 .. GameRules.BrickSize.X .. GameRules.LevelWidth - 1 do
162160
for y in 0 .. GameRules.BrickSize.Y .. GameRules.LevelHeight - 1 do
163161
let fish = Fish.Random(Point(x, y), random)

O21.Game/Engine/GameEngine.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ type GameEngine = {
286286
PlayAnimation (AnimationType.Die,
287287
EnemyDie(game.GetEntityInfoById id
288288
|> _.Value)) |]
289-
| EnemyEffect.Die -> None, Array.empty // TODO: death animation
290-
| EnemyEffect.Despawn -> None, Array.empty
289+
| EnemyEffect.Die | EnemyEffect.Despawn -> None, Array.empty
291290

292291
static member private UpdateBonusesHandler : UpdateHandler =
293292
fun (engine: GameEngine) ->

0 commit comments

Comments
 (0)