diff --git a/app/src/main/java/com/wyattjmiller/tictactoeapp/Stats.kt b/app/src/main/java/com/wyattjmiller/tictactoeapp/Stats.kt new file mode 100644 index 0000000..ddc1ce4 --- /dev/null +++ b/app/src/main/java/com/wyattjmiller/tictactoeapp/Stats.kt @@ -0,0 +1,23 @@ +package com.wyattjmiller.tictactoeapp + +class Stats { + private var mGamesPlayed: Int = 0 + private var mGamesWonX: Int = 0 + private var mGamesWonO: Int = 0 + private var mGamePiecesPlaced: Int = 0 + + fun updateGamesPlayed() { + mGamesPlayed++ + } + + fun updateGamesWon(gameState: Gameboard.GameState) { + when (gameState) { + Gameboard.GameState.GamePlayerWinX -> mGamesWonX++ + Gameboard.GameState.GamePlayerWinO -> mGamesWonO++ + } + } + + fun updatePiecePlaced() { + mGamePiecesPlaced++ + } +} \ No newline at end of file