inline les fonctions opérateurs hors classes

This commit is contained in:
2025-02-25 15:10:50 +01:00
parent 59f457c752
commit f0f391ade6
7 changed files with 26 additions and 31 deletions

View File

@@ -36,7 +36,6 @@ Game::Game(Gamemode gamemode, const Player& controls, int boardWidth, int boardH
}
void Game::start() {
// starts the game
this->started = true;
this->lost = this->board.spawnNextPiece();
}

View File

@@ -20,23 +20,6 @@ void readStatsFromFilesForAllSizes(int amount);
int main(int argc, char** argv) {
std::srand(std::time(NULL));
using std::chrono::high_resolution_clock;
using std::chrono::duration_cast;
using std::chrono::duration;
using std::chrono::milliseconds;
PiecesFiles pf;
std::vector<Piece> pieces;
std::vector<int> convexPieces;
std::vector<int> holelessPieces;
std::vector<int> otherPieces;
pf.loadPieces(13, pieces, convexPieces, holelessPieces, otherPieces);
auto t1 = high_resolution_clock::now();
Bag bg(pieces);
auto t2 = high_resolution_clock::now();
duration<double, std::milli> ms_double = t2 - t1;
std::cout << ms_double.count() << "ms" << std::endl;
return 0;
}