これでいい?基本的に、グローバルを参照する単一の関数の呼び出しを、すべてのゲームエンティティとロジックをカプセル化するクラスに置き換えます。以下は、メインで新しいクラスを呼び出す方法です。これに関する一般的なc++の第一人者のコンセンサスは何でしょうか。
class thingy
{
public:
thingy()
{
loop();
}
void loop()
{
while(true)
{
//do stuff
//if (something)
//break out
}
}
};
int main (int argc, char * const argv[])
{
thingy();
return 0;
}