cmpsc330hw5/ss.h
Sandipsinh Rathod a6a1fca8cd
add ss.*
2024-12-06 21:24:11 -05:00

37 lines
985 B
C++

#ifndef HW4_STRATEGIC_PLAYER1_H
#define HW4_STRATEGIC_PLAYER1_H
#include "common.h"
#include "board.h"
#include "player.h"
#include <vector>
#include <limits>
class StrategicPlayer1 : public IPlayer {
char name;
char box_name;
Board board;
public:
string PlayerInfo() override;
void Init(int board_rows, int board_cols, char box_type, char line_type) override;
void Close() override;
void EventAddLine(char bar, const Loc& loc) override;
void EventAddBox(char box, const Loc& loc) override;
Loc SelectLineLocation() override;
int EvaluateMoveCost(int row, int col);
int CountBoxLines(int row, int col);
Loc FindOptimalMove();
void ListEmptyLines(vector<Loc>& empty_lines);
bool DoesMoveCompleteBox(int row, int col);
Loc FindBoxCompletingMove();
bool DoesMoveCreateChain(int row, int col);
Loc ForceOpponentMistake(const vector<Loc>& empty_lines);
~StrategicPlayer1();
};
#endif // HW4_STRATEGIC_PLAYER1_H