Add files via upload

This commit is contained in:
agsNeto20
2022-05-11 17:44:45 +02:00
committed by GitHub
commit e2ef1fa590
17 changed files with 2780 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
#include <iostream>
#include <fstream>
#include <iomanip>
#ifndef CPVP_H
#define CPVP_H
#include "cboard.h"
using namespace std;
class CPvP
{
private:
CBoard *board;
string player_name1;
string player_name2;
char current_player;
public:
CPvP(string = "Guest1", string = "Guest2", char = 'O');
~CPvP();
// GAME
void playGame(); // main method
void gameOver(); // roll the credits
void showGame(); // show player turn, board
void switchPlayer(); // switch between players
// PLAYERS MECHANINCS
int playerMakePlay(); // returns & plays a valid move from player
// FILES
void saveGame(); // saves game into file
bool loadGame(); // loads game from file (if any)
void clearFile() const; // clears file
struct stats;
void swap(stats *, stats *);
void selectionSort(stats [], int);
void saveScore(bool, string);
void leaderboard() const;
};
#endif // CPVP_H