public boolean build(Tile t, String type, Dude dude)
	{
		if (dude.getTask().getTask().equals("buildTile")) {
			if (dude.isAt(t.getX(), t.getY())) {
				// finish building tile
				if (t.getStructure() != null) {
					removeStructure(t.getStructure());
				}

				t.setImage(dude.getTask().getType());
				t.setHeight(t.getHeight() + 1);
				crystalResource -= 20;
				woodResource -= -10;
				// set tile non transparent
				// reassign dude to new task
				return true;
			}
		}
		else if (dude.getTask().getTask().equals("buildStructure"))
		{
			if (dude.isAt(t.getX(), t.getY()))
			{
				// finish building tile
				if (t.getStructure() != null)
				{
					removeStructure(t.getStructure());
				}
				if (type.equals("Tree")){
					this.addStructure(new Structure(t.getX(),t.getY(),1,1,"Assets/EnvironmentObjects/DarkTree.png"));
				}
				else{
					this.addStructure(StructureType.getTypes().get(type).create(this,t.getX(), t.getY()));
				}
			// plays audio
			if (mixingDesk != null) {
				mixingDesk.addAudioPlayer("PlaceItem.wav", true);
			}
			// set tile non transparent
			// reassign dude to new task
			return true;
			}
		} else
		{
			// otherwise reassign dude and repush task
//			tasks.add(new Task(t, "build", type));
			throw new Error("task type is "+dude.getTask().getTask());
		}
		return false;
	}