modernization, better food rendering, consistent player moving, snake intersections

This commit is contained in:
programsnail 2024-07-22 23:20:20 +03:00
parent adabb50a9e
commit b4509733da
8 changed files with 119 additions and 39 deletions

View file

@ -3,23 +3,9 @@
#include <cmath>
#include "Engine.h"
#include "Utils.hpp"
#include "Vec.hpp"
enum class Color : uint32_t {
BLACK = 0x000000ff,
WHITE = 0x00ff6000,
BLUE = 0x000000ff,
GREEN = 0x0000ff00,
CYAN = 0x0000ffff,
RED = 0x00ff0000,
MAGENTA = 0x00ff00ff,
YELLOW = 0x00ffff00,
GRAY = 0x001f1f1f,
ORANGE = 0x00ff6000,
};
constexpr Color CL_BG = Color::BLACK;
using Screen = uint32_t[SCREEN_HEIGHT][SCREEN_WIDTH];
namespace canvas {