public GameObj copy(GameObj obj) {
		int i = obj.getX();
		int j = obj.getY();
		if (obj.isTile()) {
			return new GameTile(i,j);
		} else {
			GameObj ret = null;
			Color c = obj.getColor();
			if(obj.isPawn()) {
				ret = new Pawn(i,j,c);
			} else if (obj.isKnight()) {
				ret = new Knight(i,j,c);
			} else if (obj.isBishop()) {
				ret = new Bishop(i,j,c);
			} else if (obj.isRook()) {
				ret = new Rook(i,j,c);
			} else if (obj.isQueen()) {
				ret = new Queen(i,j,c);
			} else if (obj.isKing()) {
				ret = new King(i,j,c);
			} else {
				//should never come here
				ret = null;
			}
			if(obj.hasMoved()) {
				ret.moves();
			}
			return ret;
		}
	}