added density

code improvements
This commit is contained in:
2023-12-02 00:45:09 +01:00
parent 8278312aee
commit eb94c3bef9
4 changed files with 22 additions and 10 deletions

View File

@@ -78,6 +78,8 @@ public class Level {
public void Swap(Element what, Element swapTo) {
Element swap = new Element(what);
if (what == null || swapTo == null) return;
what.Position = swapTo.Position;
_elements[swapTo.Position.X, swapTo.Position.Y] = what;