This repository has been archived on 2022-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
glyphs-juke/Game.h

44 lines
746 B
C
Raw Normal View History

2021-08-23 05:22:56 +00:00
#pragma once
#include <string>
#include "iDrawable.h"
#include "iWritable.h"
#include "Logger.h"
namespace gj {
class Game : public iDrawable, public iWritable {
public:
Game() = delete;
Game(Game&&) = delete;
Game(const Game&) = delete;
Game& operator=(Game&&) = delete;
Game& operator=(const Game&) = delete;
Game(uint32_t w, uint32_t h) : w_(w), h_(h), logger_(h) {
logger_.Print(L"こんにちは");
}
void Update() {
static int i = 0;
++i;
logger_.Print(L"すべての人類は死滅する: "+std::to_wstring(i));
}
void Draw(Colorbuffer& fb) const override {
}
void Write(Textbuffer& fb) const override {
logger_.Write(fb);
}
private:
uint32_t w_, h_;
Logger logger_;
};
}