-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSquare.h
49 lines (35 loc) · 908 Bytes
/
Square.h
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
45
46
47
48
49
//
// Square.h
// chess
//
// Created by User on 2015-11-25.
// Copyright (c) 2015 Jonah Librach. All rights reserved.
//
#ifndef __chess__Square__
#define __chess__Square__
#include <iostream>
#include <sstream>
#include <set>
#include "Chess.h"
class Piece;
class Square{
private:
Piece* p;
std::set<Square*>* controllers;
const int row, col;
public:
Square(int, int);
~Square();
double controlValue() const;
std::set<Square*>* getControllers() const;
void addController(Square*);
void removeController(Square*);
int getRow() const;
int getColumn() const;
Piece* piece() const;
Piece* setPiece(Piece* newPiece);
void printInfoTo(std::ostream&) const;
friend std::ostream& operator<<(std::ostream&, const Square&);
std::ostream& operator<<(std::ostream&) const;
};
#endif /* defined(__chess__Square__) */