-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgamecontroller.h
More file actions
44 lines (38 loc) · 1002 Bytes
/
gamecontroller.h
File metadata and controls
44 lines (38 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// GameController.hpp
// PawnPusher9000
//
// Created by Lavi on 2015-11-22.
// Copyright © 2015 Lavi. All rights reserved.
//
#ifndef GameController_hpp
#define GameController_hpp
#include <iostream>
#include <string>
#include "game.h"
#include "textdisplay.h"
#include "player.h"
#include "human.h"
using namespace std;
const int maxPlayer = 2;
const int boardSize = 8;
class GameController : public NotifiableController{
View *view;
View *gd;
ChessGame *game;
Player *players[maxPlayer]; //players[0]=white, players[1]=black
bool autoMove;
bool gameInProg;
void makeMove();
public:
GameController();
~GameController();
void fileSetup(char *fileName);
void play(char *fileName=NULL);
//void play(std::string fileName="");
void resign();
void init(istream & input);
void notifySquareChange(string sqrName, char newValue);
void notifyMoveChange(string begPos, string endPos, string checkPos, bool isEndGame);
};
#endif /* GameController_hpp */