add ship, improve inheritance

This commit is contained in:
2025-05-23 11:48:30 -04:00
parent bd90e222ee
commit b4e08ff28d
10 changed files with 207 additions and 64 deletions

View File

@@ -1,8 +1,5 @@
#pragma once
#include <cctype>
#include <ncurses.h>
#include <string>
#include <unordered_map>
#include <vector>
struct AssetPair {
@@ -21,4 +18,12 @@ public:
float getX() const noexcept { return x; }
float getY() const noexcept { return y; }
virtual void update() noexcept = 0;
virtual bool isOffScreen() const noexcept = 0;
virtual const std::vector<std::string> &getImage() const = 0;
virtual const std::vector<std::string> &getMask() const = 0;
virtual char getDefaultColor() const noexcept = 0;
void draw(int layer) const;
};