-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pit.java
33 lines (23 loc) · 831 Bytes
/
Pit.java
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
public class Pit {
int numberOfPiece = 4;
int x;
int y;
Piece [] pieceArr = {new Piece(1,x+40,y+40),new Piece(1,x+40,y+57),new Piece(1,x+57,y+40), new Piece(1,x+57,y+57),new Piece(3,x+50,y+22), new Piece(3,x+22,y+50),new Piece(3,x+75,y+50), new Piece(3,x+50,y+75), new Piece(3,x+70,y+70)
, new Piece(3,x+27,y+70),new Piece(3,x+70,y+27),new Piece(3,x+27,y+27)};
Pit(){
}
Pit(int x, int y){
this.x=x;
this.y=y;
for(int i=0; i<12; i++){
pieceArr[i].setX(x+pieceArr[i].getX());
pieceArr[i].setY(y+pieceArr[i].getY());
}
}
public void konumkopyala(Pit pit){
for(int i=0; i<12; i++){
this.pieceArr[i].x = pit.pieceArr[i].getX();
this.pieceArr[i].y = pit.pieceArr[i].getY();
}
}
}