ForNeVeR / ForNeVeR/O21

Level should be size-aware

Open
#275 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
F#
Stars
30
Forks
9
PR merge metrics
No merged PRs in 30d

Description

See the code near this line: https://github.com/ForNeVeR/O21/blob/a6b9cc232ede2b030410ee7a6fdc2545a33f73de/O21.Game/Engine/Enemies.fs#L157-L158

Currently, our `Level` is not size-aware: it's just a jagged array of cells. For some purposes (such as the linked one), we need to know the level size. We can either hardcode it (use same size from `GameRules` for every level), or calculate it in-place, but both approaches are suboptimal.

If in the future we'll want to have levels of different sizes (say for boss battles, custom mods or whatnot), hardcode will stop fitting us.

So, let's make the `Level` type to be aware of its own size.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.