initial port for Cevo game in C++ (libs)

This commit is contained in:
Geoffray Levasseur committed 2026-10-22 17:20:45 +02:00
commit 8436242032
375 files changed
+46282

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#pragma once
#include <QMutex>
namespace Cevo {
// Equivalent of SyncCounter.pas's TSyncCounter: a thread-safe counter/ID allocator.
class SyncCounter {
public:
int allocate();
bool currentEqualTo(int value) const;
void increment();
// NOTE: matches the original, which copies Top/Current without locking.
void assign(const SyncCounter &source);
private:
mutable QMutex m_lock;
int m_top = 0;
int m_current = 0;
};
} // namespace Cevo