if (newTile != null) { TrackTile tt = w.getTile(point).getTrackTile(); BuildingType bType = (BuildingType) w.get(KEY.BUILDING_TYPES, newTile.getType(), Player.AUTHORITATIVE); if (tt != null && !bType.isTrackLayoutValid (tt.getTrackConfiguration())) return MoveStatus.moveFailed("Illegal track layout"); }
    public MoveStatus tryDoMove(World w, FreerailsPrincipal p) {	if (!w.getTile(point).getOwner().equals(p))	    return MoveStatus.moveFailed("You don't own this tile");	BuildingTile bTile = w.getTile(point).getBuildingTile();	if (((oldTile == null) && (bTile != null)) ||		((oldTile != null) && !oldTile.equals(bTile))) {	    return MoveStatus.moveFailed("Tile was changed by another player");	}	return MoveStatus.MOVE_OK;    }