Tile(TileColor _color, int _size, TileShape _shape, int _x, int _y, int _rotation){
		color = _color;
		size = _size;
		shape = _shape;
		x = _x;
		y = _y;
		rotation = _rotation;
		
		neighbours = new Array<Tile>();
		
		switch(shape){
		case SQUARE:
			tileSprite = new Sprite(tilesRegions[0][7]);
			break;
		case LONG:
			tileSprite = new Sprite(tilesRegions[0][1]);
			break;
		case CORNER:
			tileSprite = new Sprite(tilesRegions[0][3]);
			break;
		}
		switch(color){
		case RED:
			activeColor = new Color(1,0,0,1);
			inactiveColor = new Color(1,0.92f,0.92f,1);
			break;
		case YELLOW:
			activeColor = new Color(1,1,0,1);
			inactiveColor = new Color(1,1,0.92f,1);
			break;
		case BLUE:
			activeColor = new Color(0,0,1,1);
			inactiveColor = new Color(0.92f,0.92f,1,1);
			break;
		default:
		}

		tileSprite.setBounds(x, y, size*U.SPRITESIZE, size*U.SPRITESIZE);
		tileSprite.setOrigin(size*U.SPRITESIZE/2, size*U.SPRITESIZE/2);
		
		if(shape == TileShape.LONG){
			tileSprite.setRotation(rotation*-90);
		}
		if(shape == TileShape.CORNER){
			tileSprite.setRotation(rotation*90);
		}
		
		pixMap = TileShape.getMask(shape,size, rotation);
	}