|
Trabalho Prático - PDS2
|

Membros Públicos | |
| Player (int id, std::string name, std::string nickname, Stats stats) | |
| Player (int id, std::string name, std::string nickname) | |
| int | getId () const |
| std::string | getNickname () const |
| std::string | getName () const |
| void | setNickname (std::string nickname) |
| void | setName (std::string name) |
| Stats | getStats () const |
| void | updateStats (char result, char game) |
| Updates the player's statistics based on the result of a game. | |
Membros privados | |
| void | updateGameStats (char game, bool isWin) |
| Updates the game statistics for the player based on the game type and result. | |
Atributos Privados | |
| int | _id |
| std::string | _name |
| std::string | _nickname |
| Stats | _stats |
Amigos | |
| std::ostream & | operator<< (std::ostream &os, const Player &player) |
|
private |
Updates the game statistics for the player based on the game type and result.
| game | A character representing the game type: 'T' for Tic-Tac-Toe, 'L' for Connect Four (Lig4), 'R' for Reversi. |
| isWin | A boolean indicating whether the player won the game (true) or lost the game (false). |

| void updateStats | ( | char | result, |
| char | game ) |
Updates the player's statistics based on the result of a game.
| result | A character representing the result of the game: 'W' for a win, 'L' for a loss, 'D' for a draw. |
| game | A character representing the type of game played. |
| InvalidInputException | if the result character is not 'W', 'L', or 'D'. |

