prog3b_652/includes/gamematrix.h
2025-12-01 12:25:58 +02:00

36 lines
862 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <vector>
#include <array>
#include <stdexcept>
#include <cmath>
class gameMatrix
{
public:
// Matrix Multiplikation
static std::array<std::array<double,4>,4> matmul(
const std::array<std::array<double,4>,4>& A,
const std::array<std::array<double,4>,4>& B
);
// Rotationsmatrix um Achse x/y/z
static std::array<std::array<double,4>,4> rot3D(
double angle_deg,
char axis
);
// Translation
static std::array<std::array<double,4>,4> translate(
const std::array<double,3>& pos
);
};
enum class GameState
{
Idle, // kein Würfel offen, Eingabe erlaubt
OneFlipped, // ein Würfel offen
CheckingMatch, // zwei Würfel vollständig aufgeklappt, Vergleich läuft
LockInput // Würfel drehen gerade Eingabe kurz blockiert
};