Skip to content

Repository files navigation

AntiCasino

GameStatistics Class

A reusable utility for tracking game performance metrics.

Usage

const gameStats = new GameStatistics();

gameStats.startGame();      // Start tracking
gameStats.startTurn();      // Begin turn
gameStats.endTurn();        // End turn
gameStats.endGame();        // Get final report
gameStats.logReport();      // Log stats to console
gameStats.reset();          // Clear statistics

Output

When a game completes, statistics are logged to the browser console (F12):

Game Statistics:
   Total Game Time: 45.67s
   Turns Played: 13
   Average Time per Turn: 3.51s

Integration

Include in your game HTML:

<script src="/public/scripts/GameStatistics.js"></script>

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages