Skip to content

Commit

Permalink
modified: main.h
Browse files Browse the repository at this point in the history
  • Loading branch information
KaVoshnik committed Sep 2, 2024
1 parent 060a270 commit 9fe3dbc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
"C_Cpp_Runner.msvcBatchPath": "",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
Expand Down
37 changes: 37 additions & 0 deletions main.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
#ifndef class_h
#define class_h
#include <iostream>
#include <string>

using std::cout;

class Piece {

public:
Piece(Color color, PieceType type, int row, int col): //Конструктор
color(color), type(type), row(row), col(col) {}

getColor() const {
return color;
} //Цвет фигуры
getType() const {
return type;
} //Тип фигуры

int getRow() const {
return row;
}
int getCol() const {
return col;
}
void setRow(int newRow)const {
row = newRow;
}
void setCol(int newCol) const {
col = newCol;
}

private:
Color color;
PieceType type;
int row;
int col;
}

#endif

0 comments on commit 9fe3dbc

Please sign in to comment.