-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlue_piece.cpp
More file actions
53 lines (50 loc) · 1.15 KB
/
Blue_piece.cpp
File metadata and controls
53 lines (50 loc) · 1.15 KB
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
50
51
52
53
#include "Blue_piece.h"
#include"Global.h"
#include<iostream>
using namespace std;
Blue_piece::Blue_piece(Position pos, char id, DIRECTION dir,COLOR col)
:Piece(pos,id,dir,col)
{
}
//void Blue_piece::drawPiece(sf::RenderWindow& window)
//{
// image_piece.setTexture(Global::Ts[0]);
// image_piece.setScale((float)Global::dimSqr.x / Global::Ts[0].getSize().x, (float)Global::dimSqr.y / Global::Ts[0].getSize().y);
// image_piece.setPosition((float)Global::dimSqr.x * P_pos.ci,(float) Global::dimSqr.y * P_pos.ri);
// window.draw(image_piece);
//}
//char Blue_piece::getId_piece()
//{
// return this->P_id;
//}
//bool Blue_piece::Isfirst(Position P)
//{
// First_Init();
// for (int i = 0; i < 4; i++)
// {
// if (First[i].ri == P.ri && First[i].ci == P.ci)
// {
// return true;
// }
// }
// return false;
//}
void Blue_piece::First_Init()
{
Position ps[4];
//if (nop == 2 || nop == 3 || nop == 4 || nop==4)
{
ps[0].ri = 1;
ps[0].ci = 1;
ps[1].ri = 1;
ps[1].ci = 4;
ps[2].ri = 4;
ps[2].ci = 1;
ps[3].ri = 4;
ps[3].ci = 4;
for (int i = 0; i < 4; i++)
{
First.push_back(ps[i]);
}
}
}