query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Sets the value of the iznos property.
public void setIznos(double value) { this.iznos = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIzq(int izq) {\r\n\t\tthis.izq = izq;\r\n\t}", "public double getIznos() {\n return iznos;\n }", "public void setIzquierdo(Nodo<T> izquierdo) {\n\t\tthis.izquierdo = izquierdo;\n\t}", "public void setNodoIzquierdo(Nodo nodo){\n izq = nodo;\n }", "private void setNumeros(Set<Integer> numeros) {\n\t\tthis.numeros = new Vector<Integer>(numeros);\n\t}", "@Override\r\n\tpublic void setIzena(String izena) {\n\t\tsuper.setIzena(izena);\r\n\t}", "public void setIops(Integer iops) {\n this.iops = iops;\n }", "void setNilExternalOrderLineArray(int i);", "public void setInversiones(int n){\r\n\t\tinversiones = n;\r\n\t}", "public void setIops(Long iops) {\n this.iops = iops;\n }", "public void setDatossolicitudBfnumeroDeIteracion(int value) {\n this.datossolicitudBfnumeroDeIteracion = value;\n }", "public void setNumero(int index, int value){\r\n\t\tnumeros.set(index, value);\r\n\t}", "public void setEi(Integer ei) {\n this.ei = ei;\n }", "void setNumberOfInfantry(int infantry);", "public int getIzq() {\r\n\t\treturn izq;\r\n\t}", "public void setNilai(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j) {\n nilai[0] = a;\n nilai[1] = b;\n nilai[2] = c;\n nilai[3] = d;\n nilai[4] = e;\n nilai[5] = f;\n nilai[6] = g;\n nilai[7] = h;\n nilai[8] = i;\n nilai[9] = j;\n }", "public void setNumFilhos(int numFilhos){ \n this.numFilhos = numFilhos;\n }", "public void setNOficina (Integer pNOficina)\r\n {\r\n this.nOficina=pNOficina;\r\n }", "public void setIteraciones(int iteraciones) {\r\n this.iteraciones = iteraciones;\r\n }", "public void setI(long value) {\n this.i = value;\n }", "public void setIdexpediente(Integer idexpediente) {\r\n this.idexpediente = idexpediente;\r\n }", "public void set(int i) {\n }", "public void setNumErode(int n) {\r\n itersErode = n;\r\n }", "public void setNickels(int n)\n {\n\tthis.nickels = n;\n\tchangeChecker();\n }", "public void setEmployees(int _employees){\n employees = _employees;\n }", "private void setItty(int ndx) {\r\n\t\titty = table.lists.get(ndx).iterator();\r\n\t}", "public void setFoliosintramo(Number value) {\n setAttributeInternal(FOLIOSINTRAMO, value);\n }", "public void SetNoElises(int noelises) {\n\t\tthis.NoElises=noelises;\n\t}", "public void setIdestimulacion(Integer idestimulacion) {\r\n this.idestimulacion = idestimulacion;\r\n }", "public void setInvima(Invima invima){\n\t\tthis.invima = invima;\n\t}", "public final void setN(final int koko) {\r\n this.n = koko;\r\n }", "public void setOcena(int value) {\n this.ocena = value;\n }", "public void set(int i);", "public void setKoernerImMaul(int n)\n {\n koernerImMaul=n;\n }", "public void setInfo(int i)\r\n\t{\r\n\t\tinfo = i;\r\n\t}", "public void setIteracion(int iteracion) {\n this.iteracion = iteracion;\n }", "public void setNmi(int nmi){\n this.nmi=nmi;\n }", "public void setNumero(int numero) { this.numero = numero; }", "public void setNumverts(int numverts) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 148, numverts);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 116, numverts);\n\t\t}\n\t}", "public void setnOrder(Integer nOrder) {\n this.nOrder = nOrder;\n }", "public void setNumer(int numer)\n\t{\n\t\tthis.numer = numer;\n\t}", "public void setNumeroInicial(int numeroInicial)\r\n/* 185: */ {\r\n/* 186:198 */ this.numeroInicial = numeroInicial;\r\n/* 187: */ }", "public void setAno( int ano ){\n this.ano = ano;\n }", "public void setLineNumbers(int ln[]) {\n lineNos = ln;\n }", "public void setDeixis(Deixis deixis) {\n\t\tthis.deixis = deixis;\n\t}", "public void setILastIPosX() {\n this.iLastIPosX = getIPosX();\n }", "public void setInumber(final String value)\n\t{\n\t\tsetInumber( getSession().getSessionContext(), value );\n\t}", "public void setFavAM(int i, Double n) {\n FavoritosAM[i] = n;\r\n }", "public void setImsi(String imsi) {\r\n this.imsi = imsi == null ? null : imsi.trim();\r\n }", "void setPosiblesValores(int[] valores);", "void setNumberOfArtillery(int artillery);", "public Nodo getNodoIzquierdo(){\n return izq;\n }", "public void setInputCount(final int i) {\n this.inputCount = i;\n\n }", "public void setInumber(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, INUMBER,value);\n\t}", "protected void setID(int i){\r\n\t\tthis.ID = i;\r\n\t}", "public void setItemNo(int value) {\n this.itemNo = value;\n }", "public void setIndx(int indx){\n this.indx = indx;\n }", "public void setInteger(int value) {\n this.value = value;\n }", "public void setInteger(int value) {\n this.value = value;\n }", "public void setInfestedSolarSystems(IntArrayList val) {\n infestedSolarSystems = val;\n }", "public void setTipoInteres(double tipoInteres) {\r\n this.tipoInteres = tipoInteres;\r\n }", "public void setNX(int nx){\n newX=nx;\n }", "public void setAnnoIscrizione(int annoIscrizione) {\n\t\tthis.annoIscrizione = annoIscrizione;\n\t}", "public void setICID(int value) {\n this.icid = value;\n }", "public void setCantidad(Integer cantidad) {\n this.cantidad.set(cantidad);\n }", "public void setNumeroColis(int numeroColis) {\r\n\t\tthis.numeroColis = numeroColis;\r\n\t}", "public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }", "@IcalProperty(pindex = PropertyInfoIndex.SEQUENCE,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true\n )\n public void setSequence(final int val) {\n sequence = val;\n }", "public void setIndex(int i) {\n\t\t\n\t}", "private void setIsNoted(ArrayList<OrderItem> oil) {\n if (oil != null) {\n int size = oil.size();\n isNoted = new boolean[size];\n\n for (int i = 0; i < size; i++) {\n isNoted[i] = !oil.get(i).getNote().equals(\"\");\n }\n }\n }", "public void setNum(Integer num) {\n this.num = num;\n }", "public void setNum(Integer num) {\n this.num = num;\n }", "public void set(int i, int value) {\n\t\tassert i < size();\n\t\tarr[i] = value;\n\t}", "public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }", "public DDCountInversion(){\n\t\tnumeros = new ArrayList<Integer>();\n\t}", "public void setCantidad(int value) {\n this.cantidad = value;\n }", "void setNilScansArray(int i);", "void setLanesArray(int i, org.landxml.schema.landXML11.LanesDocument.Lanes lanes);", "public void setDireccionX(int i){\n this.ubicacion.x=i;\n }", "public void setNotiId(DBSequence value) {\r\n setAttributeInternal(NOTIID, value);\r\n }", "public void setNumeroDeAlunos(int valor)\n\t{\n\t\tnumAlunos = valor;\n\t\tSystem.out.printf(\"Modificado o Número de alunos %s\\n\", inicioCurso.getHoraAtual());\n\t}", "public void setQtVoos(Integer qtVoos)\n {\n this.qtVoos = qtVoos;\n }", "public void setestadosiguientejardin(int filas, int columnas){\n\t\tthis.vectorjardin = new Celda[filas][columnas];\r\n\t}", "public void setElementAt(int n, Object ob) {\r\n\t\telements.set(n, ob);\r\n\t}", "public void setNotes(Set<INote> notes) {\r\n this.no = new NoteOperations(notes);\r\n\r\n // the total beats onscreen.\r\n this.totalBeats = no.pieceLength();\r\n\r\n this.setPreferredSize(getPreferredSize());\r\n }", "public void setNionPoney(int i) {\n if (!getPoney()[i].isUsed()) {\n System.out.println(\"set\");\n getPoney()[i].modeNianOn();\n getPoney()[i].setUsed(true);\n setChanged();\n notifyObserver(true, i, getPoney()[i].getPoneyColor(), getPoney()[i].getX(), getPoney()[i].getY());\n }\n }", "public void setNulo(boolean nulo) {\n if (autoIncrement && nulo) {\n try {\n throw new ExcepcionPersonalizada(\n \"El campo esta definido como autoincrement y no puede ser nulo.\",\n this,\n \"isNulo\");\n } catch (ExcepcionPersonalizada ex) {\n Logger.getLogger(ParametrosDeCampo.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n this.nulo = nulo;\n }", "public void setNPI(int value) {\r\n this.npi = value;\r\n }", "public void setVonalAzonosito(int ujAzonosito)\r\n\t{\r\n\t\tvonalAzonosito = ujAzonosito;\r\n\t}", "public void setAtores(Iterator<IPessoa> atores);", "public void setNumSales(int numSales){\r\n this.sales = numSales;\r\n }", "@Immutable\n @IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.ENTITY_TYPE,\n jname = \"entityType\",\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.DOCTYPE,\n jname = \"_type\",\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)}\n )\n public void setEntityType(final int val) {\n entityType = val;\n }", "public void setNumOpens(int n) {\r\n itersOpen = n;\r\n }", "public void setNUMCOPIAS(int value) {\n this.numcopias = value;\n }", "public void setInteger(int value){}", "public void setID(int i){\n\t\tid = i;\n\t}", "public void setInteger(int value);", "public void setIcon(Integer icon) {\n switch (icon) {\n case 0:\n this.icon = Icon.Schutzengel;\n break;\n case 1:\n this.icon = Icon.Person;\n break;\n case 2:\n this.icon = Icon.Institution;\n break;\n case 3:\n this.icon = Icon.Krankenhaus;\n break;\n case 4:\n this.icon = Icon.Polizei;\n break;\n default:\n this.icon = Icon.Feuerwehr;\n break;\n }\n }", "public void setI(boolean i) {\n\tthis.i = i;\n }", "public void setTraversalIDs(int i, String v) {\n ((StringArray) (_getFeatureValueNc(wrapGetIntCatchException(_FH_traversalIDs)))).set(i, v);\n }" ]
[ "0.66908383", "0.66216683", "0.6211611", "0.61193293", "0.606355", "0.59644365", "0.5682133", "0.5493766", "0.5434963", "0.5392054", "0.5358928", "0.53332853", "0.5278543", "0.52514505", "0.525084", "0.5241773", "0.523269", "0.5229975", "0.52269", "0.5215288", "0.5200263", "0.5171136", "0.51694655", "0.51418865", "0.51342905", "0.51181084", "0.50900203", "0.50812924", "0.50591934", "0.5048165", "0.50339174", "0.5032234", "0.50018376", "0.5001228", "0.499384", "0.49901325", "0.49828997", "0.4981612", "0.49677375", "0.4962267", "0.4960722", "0.49528825", "0.4943944", "0.49400294", "0.49237707", "0.49153227", "0.49064285", "0.48994437", "0.48828208", "0.4877587", "0.48725647", "0.48509648", "0.48390323", "0.48374888", "0.48314184", "0.48292673", "0.4829256", "0.48274633", "0.48274633", "0.48259938", "0.48218378", "0.48195586", "0.4818991", "0.48182973", "0.4813758", "0.48100537", "0.4809131", "0.48074374", "0.4806668", "0.47929394", "0.47915637", "0.47915637", "0.47841766", "0.47799915", "0.47789383", "0.47752973", "0.47725224", "0.4761945", "0.47609693", "0.47606355", "0.475941", "0.47568902", "0.4750438", "0.4749977", "0.47464627", "0.47415337", "0.473288", "0.4732044", "0.47269064", "0.47215086", "0.47197202", "0.4718758", "0.47148725", "0.47101945", "0.4707073", "0.47049776", "0.47040728", "0.4699987", "0.46957573", "0.46875113" ]
0.70203996
0
Gets the value of the ulaz property.
public boolean isUlaz() { return ulaz; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getLA() {\n return la;\n }", "public long getLUC() {\r\n/* 180 */ return this._LUC;\r\n/* */ }", "java.lang.String getUa();", "public int getLac() {\n return lac_;\n }", "public int getLac() {\n return lac_;\n }", "public Float getHsupaUlTraff() {\n return hsupaUlTraff;\n }", "public Float getHsupaUlThroughtput() {\n return hsupaUlThroughtput;\n }", "public long upperLongValue() {\n\t\treturn getSection().upperLongValue();\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getExplicitLac() {\n return explicitLac_;\n }", "public double getL() {\n return l;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getExplicitLac() {\n return explicitLac_;\n }", "public String getUc() {\n return uc;\n }", "public Vector3 getValue() {\n\t\treturn this.value;\n\t}", "public MessageRequestOfUserModelNuLtuh91 getValue() {\n return localValue;\n }", "public int getBulanLahir() {\r\n return bulanLahir;\r\n }", "public String getUom() {\n return (String)getAttributeInternal(UOM);\n }", "public String getUom() {\n return (String)getAttributeInternal(UOM);\n }", "public String getRollupValue() {\r\n return getAttributeAsString(\"rollupValue\");\r\n }", "public String getLaji() {\n return this.laji;\n }", "public int getLongueur()\n\t{\n\t\treturn longueur_;\n\t}", "public void setUlaz(boolean value) {\n this.ulaz = value;\n }", "public int getLongueur() {\n\t\treturn this.longueur;\n\t}", "public java.lang.Long getJamMulai() {\n return jam_mulai;\n }", "public org.apache.axis2.databinding.types.UnsignedLong getUnsignedLong() {\n return localUnsignedLong;\n }", "com.google.protobuf.ByteString\n getUaBytes();", "public String getLb() {\n return lb;\n }", "public Double z() {\n return this.f917a.getAsDouble(\"CFG_LOCATION_LATITUDE\");\n }", "public java.lang.Long getJamMulai() {\n return jam_mulai;\n }", "@Override\n public java.lang.String getUa() {\n java.lang.Object ref = ua_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ua_ = s;\n }\n return s;\n }\n }", "public java.lang.String getZjlx() {\r\n return localZjlx;\r\n }", "public MessageRequestOfAnimalModelNuLtuh91 getValue() {\n return localValue;\n }", "public MessageRequestOfAnimalModelNuLtuh91 getValue() {\n return localValue;\n }", "public MessageRequestOfAnimalModelNuLtuh91 getValue() {\n return localValue;\n }", "@Basic\n\tpublic double getAy() {\n\t\treturn this.ay;\n\t}", "float getLte();", "public int getUpperValue() {\n return getValue() + getExtent();\n }", "public String getZlcc() {\n return zlcc;\n }", "public Number getAlto()\n {\n return (Number)getAttributeInternal(ALTO);\n }", "public int getAngulo(){\n\t\treturn this.angulo_final;\n\t}", "public long getValue() {\n\treturn value;\n }", "public boolean hasLUC() {\r\n/* 295 */ return this._has_LUC;\r\n/* */ }", "public Double getAltVa() {\n\t\treturn altVa;\n\t}", "public void setLA(long value) {\n this.la = value;\n }", "public Long getMolecula() {\n return molecula;\n }", "public long getValue() {\n return value_;\n }", "@Override\n public com.google.protobuf.ByteString\n getUaBytes() {\n java.lang.Object ref = ua_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ua_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public java.lang.String getUa() {\n java.lang.Object ref = ua_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ua_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getLongueur() {\r\n return longueur;\r\n }", "public long getValue() {\n\t\treturn this._value;\n\t}", "public long getValue() {\n return value_;\n }", "public int getLongueur() {\n return longueur;\n }", "public int getTahunLahir() {\r\n return tahunLahir;\r\n }", "public Long getTesuryo03() {\r\n return tesuryo03;\r\n }", "public void setLUC(long LUC) {\r\n/* 394 */ this._LUC = LUC;\r\n/* 395 */ this._has_LUC = true;\r\n/* */ }", "public String getRuc() {\n return ruc;\n }", "public Number getLargo()\n {\n return (Number)getAttributeInternal(LARGO);\n }", "@Override\n public com.google.protobuf.ByteString\n getUaBytes() {\n java.lang.Object ref = ua_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ua_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@ApiModelProperty(required = true, value = \"L3 cache hits per second.\")\n public BigDecimal getL3() {\n return l3;\n }", "public WebElement getUlica() {\n\t\treturn Utils.waitForElementPresence(driver, By.name(\"address\"), 10);\n\t}", "public double getUpperArm() {\n return upperArm;\n }", "public BotManagedRule getUaBotRule() {\n return this.UaBotRule;\n }", "public double getLoa() {\n\t\treturn _tempNoTiceShipMessage.getLoa();\n\t}", "public Double A() {\n return this.f917a.getAsDouble(\"CFG_LOCATION_LONGITUDE\");\n }", "public String getUsetaxtable() {\r\n return usetaxtable;\r\n }", "public long getValue()\n {\n return itsValue;\n }", "public String getLtUser() {\n return ltUser;\n }", "public int getLattine() {\n\t\treturn nLattine;\n\t}", "public String getLOAI()\n {\n return this.LOAI;\n }", "public float getTaux() {\r\n\treturn this.taux;\r\n}", "public String getLrry() {\n return lrry;\n }", "public Float getPsr99UlThroughtput() {\n return psr99UlThroughtput;\n }", "public double getAltitude() {\n return selv;\n }", "public java.lang.Integer getLeaserule() {\n\treturn leaserule;\n}", "double getLuong();", "public String getAmplitud() {\r\n return amplitud;\r\n }", "public String getLBR_BankAccount_Carteira_UU () \n\t{\n\t\treturn (String)get_Value(COLUMNNAME_LBR_BankAccount_Carteira_UU);\n\t}", "public String getLenguaje() {\n return lenguaje;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraLocation getAuvLoc() {\n return auvLoc_;\n }", "public int zzu() {\n int zzu = super.zzu();\n if (this.zzcwX) {\n zzu += zzbyc.zzh(1, this.zzcwX);\n }\n if (this.score != 0) {\n zzu += zzbyc.zzL(2, this.score);\n }\n return (this.zzcwY == null || this.zzcwY.equals(\"\")) ? zzu : zzu + zzbyc.zzr(3, this.zzcwY);\n }", "public Point getUpperLeft() {\n return this.upperLeft;\n }", "public long longValue() {\n return this.value;\n }", "@java.lang.Override\n public java.lang.String getU() {\n java.lang.Object ref = u_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n u_ = s;\n return s;\n }\n }", "public int getUpper() {\n return upper;\n }", "public java.lang.String getU() {\n java.lang.Object ref = u_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n u_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public double getUpperValue() {\n return this.upperMeasure.getValue();\n }", "public double getAngleXZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.y/l);\r\n\t}", "public int getLaSign() {\n return laSign;\n }", "public final long getUIN() {\n\t return icqUIN;\n }", "public long getPlateau()\n {\n return plateau;\n }", "public String getUPath() {\n return uPath;\n }", "public String geteUname() {\n return eUname;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraLocation getAuvLoc() {\n return auvLoc_;\n }", "public float getUmfang() {\r\n return umfang;\r\n }", "public final int getRiviMuuttujaAihe() {\r\n return riviMuuttujaAihe;\r\n }", "public java.lang.String getUnitLOA() {\n\t\treturn _tempNoTiceShipMessage.getUnitLOA();\n\t}", "public double lhv(){\n return comp.getLHV() * (molarMass()/1000) * (1000/PhysicalProperties.MOLAR_VOLUME);\n }", "@Basic\n\tpublic double getVy() {\n\t\treturn this.vy;\n\t}", "public long getPropertyVolumeUnity()\n {\n return iPropertyVolumeUnity.getValue();\n }", "public Vector2f getUpperLeftCorner() {\n return upperLeftCorner;\n }", "public Set<V> getL() {\n\t\treturn L;\n\t}" ]
[ "0.6275003", "0.62729746", "0.58803487", "0.5866642", "0.5855324", "0.57430273", "0.56333417", "0.56261563", "0.5605274", "0.5586499", "0.5580915", "0.55746824", "0.55616075", "0.55502194", "0.55421555", "0.55417883", "0.55417883", "0.5532531", "0.5517658", "0.5508258", "0.5483038", "0.5473994", "0.54433966", "0.54317087", "0.5419594", "0.5377626", "0.53661686", "0.5348314", "0.5335121", "0.5325684", "0.5313721", "0.5313721", "0.5313721", "0.5308644", "0.53066164", "0.5292322", "0.5291967", "0.52915156", "0.5282877", "0.528282", "0.5267866", "0.5262944", "0.52621", "0.525535", "0.5254046", "0.5253027", "0.52514756", "0.52371037", "0.52314955", "0.5228205", "0.5227931", "0.5226016", "0.5222818", "0.52071595", "0.5195161", "0.5192355", "0.51864195", "0.5181476", "0.51784855", "0.5173125", "0.51711273", "0.5162185", "0.5161034", "0.5160813", "0.51588446", "0.51495934", "0.51494867", "0.5142783", "0.5134073", "0.51248103", "0.51247215", "0.5109657", "0.51033914", "0.5102521", "0.50996906", "0.5098025", "0.50973904", "0.50969416", "0.5094856", "0.50943273", "0.50915945", "0.5089473", "0.508815", "0.5083279", "0.50818527", "0.5080675", "0.5077173", "0.5076626", "0.50732875", "0.50708324", "0.5070173", "0.50679255", "0.506327", "0.50626945", "0.5052855", "0.50526315", "0.5046674", "0.5040434", "0.5040161", "0.50379044" ]
0.68937045
0
Sets the value of the ulaz property.
public void setUlaz(boolean value) { this.ulaz = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLUC(long LUC) {\r\n/* 394 */ this._LUC = LUC;\r\n/* 395 */ this._has_LUC = true;\r\n/* */ }", "public boolean isUlaz() {\n return ulaz;\n }", "public void setLA(long value) {\n this.la = value;\n }", "public Builder setExplicitLac(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n explicitLac_ = value;\n onChanged();\n return this;\n }", "public final void set (Unit u) {\t\t// Just copy the instance\n\t\tmksa = u.mksa ;\n\t\tsymbol = u.symbol ;\n\t\tvalue = u.value ;\n\t\tfactor = u.factor ;\n\t\toffset = u.offset ;\n\t}", "public Builder setLac(int value) {\n \n lac_ = value;\n onChanged();\n return this;\n }", "public void setU(boolean u) {\n\tthis.u = u;\n }", "public Builder setUa(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n ua_ = value;\n onChanged();\n return this;\n }", "public DynamicCuboid setU(float u) {\n this.u = u;\n return this;\n }", "public final void zza() throws RemoteException {\n this.zzd.zzr.setConditionalUserProperty(this.zzc, this.zza);\n }", "public void setRua(String rua) {this.rua = rua;}", "public void setLongueur(int l) {\n\t\tthis.longueur = l;\n\t}", "public final void zzl() throws RemoteException {\n this.zzar.zzan.clearConditionalUserProperty(this.zzas, this.zzat, this.zzau);\n }", "public void setUpperLip(EditableParametrisedCylinder upperLip) {\n\t\tremoveSceneObject(this.upperLip);\n\t\t\n\t\t// ... and add the new one\n\t\tthis.upperLip = upperLip;\n\t\taddSceneObject(upperLip);\n\t}", "public void setUnit(Unit u)\r\n {\r\n display.setUnit(u);\r\n selectedIndex = -1;\r\n }", "public void setHsupaUlTraff(Float hsupaUlTraff) {\n this.hsupaUlTraff = hsupaUlTraff;\n }", "public void setComputeU(boolean val) {\n computeU = val;\n }", "public Builder setUaBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n ua_ = value;\n onChanged();\n return this;\n }", "public void setV(long value) {\n this.v = value;\n }", "public void setOrientation(LatLonAlt lla) {\r\n\tOrientation = Location.azimuth_elevation_dist(lla)[0];\r\n}", "public long getLUC() {\r\n/* 180 */ return this._LUC;\r\n/* */ }", "public void setL(double value) {\n this.l = value;\n }", "public void setU(String f){\n u = f;\n}", "public void setLaji(String laji) {\n this.laji = laji; \n }", "public void setLuogo (String luogo) {\r\n\t\tthis.luogo=luogo;\r\n\t}", "public void setMakul(ArrayList makulData){\n this.makul = makulData;\n }", "public void setCuota(double cuota) {\n this.cuota = cuota;\n }", "public final void reset$$dsl$guidsl$ltms() {\n userSet = false;\n value = variable.U;\n // to be extended by later layers\n }", "public void setUc(String uc) {\n this.uc = uc == null ? null : uc.trim();\n }", "public void setLaSign(int laSign) {\n this.laSign = laSign;\n }", "public Value.Builder setJamMulai(long value) {\n validate(fields()[2], value);\n this.jam_mulai = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public Builder setU(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n u_ = value;\n onChanged();\n return this;\n }", "public void setLBR_BankAccount_Carteira_UU (String LBR_BankAccount_Carteira_UU)\n\t{\n\t\tset_ValueNoCheck (COLUMNNAME_LBR_BankAccount_Carteira_UU, LBR_BankAccount_Carteira_UU);\n\t}", "public void setHsupaUlThroughtput(Float hsupaUlThroughtput) {\n this.hsupaUlThroughtput = hsupaUlThroughtput;\n }", "public DynamicCuboid setUV(float u, float v) {\n return this.setU(u).setV(v);\n }", "public void setZlcc(String zlcc) {\n this.zlcc = zlcc;\n }", "public BinaarinenPuusolmu(int avain) {\n this.avain = avain;\n vasen = null;\n oikea = null;\n vanhempi = null;\n }", "public DynamicModelPart setU(int[] u) {\n this.u = u;\n return this;\n }", "public void setUmbrellaAddress(String umbrellaAddress) {\n this.umbrellaAddress = umbrellaAddress == null ? null : umbrellaAddress.trim();\n }", "public void setValue(long value) {\n\t this.value = value;\n\t }", "public void setAOA(float AOA);", "public void setUnsignedLong(\n org.apache.axis2.databinding.types.UnsignedLong param) {\n this.localUnsignedLong = param;\n }", "public long getLA() {\n return la;\n }", "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void setVonalAzonosito(int ujAzonosito)\r\n\t{\r\n\t\tvonalAzonosito = ujAzonosito;\r\n\t}", "public void setAlto(Number value)\n {\n setAttributeInternal(ALTO, value);\n }", "public void setL(boolean l) {\n\tthis.l = l;\n }", "public void setLaSeconds(int laSeconds) {\n this.laSeconds = laSeconds;\n }", "public void setOrdem(long value) {\n this.ordem = value;\n }", "public void setUnrealizedPnl(double value) {\r\n this.unrealizedPnl = value;\r\n }", "@Override\n public void setUilButtonLampColor(java.lang.Object uilButtonLampColor) throws G2AccessException {\n setAttributeValue (UIL_BUTTON_LAMP_COLOR_, uilButtonLampColor);\n }", "@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }", "public void setMotivoLlamadoAtencion(MotivoLlamadoAtencion motivoLlamadoAtencion)\r\n/* 119: */ {\r\n/* 120:127 */ this.motivoLlamadoAtencion = motivoLlamadoAtencion;\r\n/* 121: */ }", "public Element set(Element value) {\n if (value instanceof SymmetricLongZrElement)\n this.value = ((SymmetricLongZrElement) value).value;\n else\n this.value = value.toBigInteger().longValue();\n// return this;\n return mod();\n }", "public void setUaBotRule(BotManagedRule UaBotRule) {\n this.UaBotRule = UaBotRule;\n }", "public void setURL(java.lang.String uRL) {\n this.uRL = uRL;\n }", "public void setPoistumisaika(double poistumisaika) {\n\t\tthis.poistumisaika = poistumisaika + ThreadLocalRandom.current().nextDouble(1, 10);\n\t}", "public void setValue(MessageRequestOfUserModelNuLtuh91 param) {\n localValueTracker = true;\n\n this.localValue = param;\n }", "public void setUIComponent(Component c) {}", "public static void setPrepositionLength(long l){\n\t\tprepositionLength = l;\n\t}", "public void setAutorizacion(String autorizacion)\r\n/* 139: */ {\r\n/* 140:236 */ this.autorizacion = autorizacion;\r\n/* 141: */ }", "public void setLb(String lb) {\n this.lb = lb;\n }", "public void setUom(String value) {\n setAttributeInternal(UOM, value);\n }", "public void setUom(String value) {\n setAttributeInternal(UOM, value);\n }", "public void setJamMulai(java.lang.Long value) {\n this.jam_mulai = value;\n }", "public void setForua(boolean newValue);", "public void sacuvajUFajl(String putanja) {\r\n\t\tSOSacuvajUFajl.izvrsi(putanja, lista);\r\n\t}", "public void setTesuryo03(Long tesuryo03) {\r\n this.tesuryo03 = tesuryo03;\r\n }", "public void setLtUser(String ltUser) {\n this.ltUser = ltUser;\n }", "public void setUser(int U)\t\n\t{\t//start of setUser mehtod\n\t\tuserNum = U;\n\t}", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "public void setRuc(String ruc) {\n this.ruc = ruc;\n }", "public void limpar() {\n\t\talunosMilitarPraca.setId(null);\n\t\talunosMilitarPraca.setMasculino(null);\n\t\talunosMilitarPraca.setFeminino(null);\n\t\t\n\t\talunosMilitarOficial.setId(null);\n\t\talunosMilitarOficial.setMasculino(null);\n\t\talunosMilitarOficial.setFeminino(null);\n\t}", "public void setZjlx(java.lang.String param) {\r\n localZjlxTracker = param != null;\r\n\r\n this.localZjlx = param;\r\n }", "private void asetaAlaTeksti(String uusiteksti)\n\t{\n\t\talapaneeliteksti.setText(uusiteksti);\n\t}", "public void setLeftVector(Vector u) throws IncorrectSpaceException {\n if (u.getSpace() != outputSpace) {\n throw new IncorrectSpaceException();\n }\n this.u = u;\n }", "public final void mo25618la(boolean z) {\n AppMethodBeat.m2504i(37318);\n if (z) {\n this.raM.setVisibility(0);\n this.raN.setVisibility(0);\n this.iVh.setVisibility(0);\n if (this.rbi != null) {\n this.rbi.mo15469lb(true);\n }\n this.fbD.postDelayed(this.raR, 5000);\n AppMethodBeat.m2505o(37318);\n return;\n }\n this.raU = false;\n this.raM.setVisibility(4);\n this.raN.setVisibility(8);\n this.iVh.setVisibility(4);\n if (this.rbi != null) {\n this.rbi.mo15469lb(false);\n }\n this.fbD.removeCallbacks(this.raR);\n AppMethodBeat.m2505o(37318);\n }", "public void setLB(LivingBeing lb){\n\t\tthis.lb=lb; \n\t}", "public void skaliere(double u)\n {\n p1.setX(p1.getX() * u);\n p1.setY(p1.getY() * u);\n p2.setX(p2.getX() * u);\n p2.setY(p2.getY() * u);\n p3.setX(p3.getX() * u);\n p3.setY(p3.getY() * u);\n p4.setX(p4.getX() * u);\n p4.setY(p4.getY() * u);\n }", "public void setLaMinutes(int laMinutes) {\n this.laMinutes = laMinutes;\n }", "public int getLac() {\n return lac_;\n }", "public int getLac() {\n return lac_;\n }", "public Builder clearExplicitLac() {\n bitField0_ = (bitField0_ & ~0x00000008);\n explicitLac_ = getDefaultInstance().getExplicitLac();\n onChanged();\n return this;\n }", "private void setupSpalteAufwand() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteAufwand.setCellValueFactory(new PropertyValueFactory<>(\"aufwand\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteAufwand.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteAufwand.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setAufwand(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "public void setLBR_DocLine_ICMS_UU (String LBR_DocLine_ICMS_UU);", "public void setUmfang(float value) {\r\n this.umfang = value;\r\n }", "protected void setAy(double ay) {\n\t\tif (isValidAy(ay))\n\t\t\tthis.ay = ay;\t\t\n\t\telse \n\t\t\tthis.ay = 0;\t\t\n\t}", "public void setLongueur(int longueur) {\r\n this.longueur = longueur;\r\n }", "@NoProxy\n public BwXproperty setPeruserTransparency(final String userHref,\n final String val) {\n if (userHref.equals(getOwnerHref())) {\n setTransparency(val);\n return null;\n }\n\n BwXproperty pu = findPeruserXprop(userHref, BwXproperty.peruserPropTransp);\n\n if (pu == null) {\n pu = new BwXproperty(BwXproperty.peruserPropTransp,\n BwXproperty.peruserOwnerParam + \"=\" + userHref,\n val);\n\n addXproperty(pu);\n return pu;\n }\n\n pu.setValue(val);\n return null;\n }", "public Builder setZ(\n godot.wire.Wire.Vector3.Builder builderForValue) {\n if (zBuilder_ == null) {\n z_ = builderForValue.build();\n onChanged();\n } else {\n zBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public Builder setUBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n u_ = value;\n onChanged();\n return this;\n }", "public void setAmplitud(String amplitud) {\r\n this.amplitud = amplitud;\r\n }", "public void setMolecula(Long molecula) {\n this.molecula = molecula;\n }", "public void setTorqueFtLb(double torqueFtLb) {\r\n this.torqueFtLb = torqueFtLb;\r\n }", "public void setUpc(String upc) {\r\n this.upc = upc;\r\n }", "public void setLivello(String l){\n \n this.livello = l;\n \n }", "public void setPUtilization(double argPUtilization) {\n pUtilization = argPUtilization;\n }", "public Builder setZ(godot.wire.Wire.Vector3 value) {\n if (zBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n z_ = value;\n onChanged();\n } else {\n zBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setLien(String lien) {\n this.lien1 = lien;\n this.lien2 = lien;\n this.lien3 = lien;\n this.lien4 = lien;\n this.lien5 = lien;\n }", "public void setBlockValue(UnaryStatement blockValue) {\n\t\t\tthis.blockValue = blockValue;\n\t\t}" ]
[ "0.637977", "0.62802774", "0.6236746", "0.57027984", "0.55034304", "0.5446279", "0.5367489", "0.53632635", "0.52625716", "0.52144724", "0.5205423", "0.5182648", "0.5165745", "0.51027846", "0.50929374", "0.5074975", "0.50574255", "0.5046482", "0.49925292", "0.49803057", "0.49726108", "0.49721032", "0.49564907", "0.49449104", "0.49413174", "0.4940092", "0.49339128", "0.49207747", "0.49178457", "0.48976418", "0.48960188", "0.4881142", "0.48531154", "0.48529962", "0.4815909", "0.4813572", "0.48107252", "0.48101562", "0.48071277", "0.48065266", "0.48058584", "0.47988248", "0.47974533", "0.4789696", "0.47822928", "0.4777869", "0.4775381", "0.47722682", "0.4761953", "0.4753092", "0.47511548", "0.47504714", "0.47372758", "0.47364455", "0.47290215", "0.4727802", "0.47262135", "0.47163558", "0.4709828", "0.47013924", "0.46991652", "0.46895158", "0.46894348", "0.46894348", "0.46849585", "0.46813318", "0.46793163", "0.46746925", "0.4670264", "0.46693808", "0.4668556", "0.4666561", "0.46626577", "0.466004", "0.46553937", "0.46535528", "0.46500018", "0.46426156", "0.4637855", "0.46223465", "0.46203873", "0.46186206", "0.46169832", "0.46128115", "0.46065688", "0.46030268", "0.46004722", "0.45816514", "0.45809737", "0.45808235", "0.45720702", "0.45683482", "0.45681995", "0.45635933", "0.45615995", "0.45614007", "0.4547406", "0.4544665", "0.45437092", "0.45364913" ]
0.6964524
0
TODO Autogenerated method stub
public static void main(String[] args) { one obj = new one(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table storage
int deleteByPrimaryKey(StorageKey key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract String toSQL();", "public void formDatabaseTable() {\n }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "TableId table();", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "String getTableName();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "public abstract String doTableConvert(String sql);", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "public Table<Integer, Integer, String> getData();", "@Insert({\n \"insert into SWMS_stock_out_record_detail (stock_out_record_id, stock_out_record_head_id, \",\n \"stock_out_record_head_code, group_name, \",\n \"stock_in_record_account_id, material_code, \",\n \"material_batch, material_type_id, \",\n \"material_sub_type_id, material_workshop_id, \",\n \"material_name_code, material_supplier_code, \",\n \"material_name, bag_num, \",\n \"weight, measure_unit, \",\n \"created_time, completion_flag)\",\n \"values (#{stockOutRecordId,jdbcType=BIGINT}, #{stockOutRecordHeadId,jdbcType=BIGINT}, \",\n \"#{stockOutRecordHeadCode,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, \",\n \"#{stockInRecordAccountId,jdbcType=BIGINT}, #{materialCode,jdbcType=VARCHAR}, \",\n \"#{materialBatch,jdbcType=VARCHAR}, #{materialTypeId,jdbcType=INTEGER}, \",\n \"#{materialSubTypeId,jdbcType=INTEGER}, #{materialWorkshopId,jdbcType=INTEGER}, \",\n \"#{materialNameCode,jdbcType=INTEGER}, #{materialSupplierCode,jdbcType=INTEGER}, \",\n \"#{materialName,jdbcType=VARCHAR}, #{bagNum,jdbcType=INTEGER}, \",\n \"#{weight,jdbcType=REAL}, #{measureUnit,jdbcType=VARCHAR}, \",\n \"#{createdTime,jdbcType=TIMESTAMP}, #{completionFlag,jdbcType=BIT})\"\n })\n @SelectKey(statement=\"SELECT LAST_INSERT_ID()\", keyProperty=\"id\", before=false, resultType=Long.class)\n int insert(SwmsStockOutRecordDetail record);", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface SqliteService {\n\n @TableName(Constants.TABLE_NAME)\n @QUERY\n public ArrayList<SearchHistory> getSearchHistory();\n\n @TableName(Constants.TABLE_NAME)\n @INSERT\n public void addSearchHistory(@Column(name = Constants.SEARCH_STRING) String searchString);\n\n}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO);\n\n int getDeviceNum(String type);\n\n int deviceBindNum(String type);\n}", "public interface MigratableTableDAO extends MigrationTypeProvider {\r\n\t\r\n\t/**\r\n\t * The total number of rows in the table.\r\n\t * @return\r\n\t */\r\n\tpublic long getCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current max(id) for a table\r\n\t */\r\n\tpublic long getMaxId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current min(id) for a table\r\n\t */\r\n\tpublic long getMinId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * MigrationTypeCount for given migration type\r\n\t */\r\n\tpublic MigrationTypeCount getMigrationTypeCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * A checksum on etag or id for a range of ids\r\n\t */\r\n\tpublic String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);\r\n\t\r\n\t/**\r\n\t * A table checksum (CHECKSUM TABLE statement)\r\n\t */\r\n\tpublic String getChecksumForType(MigrationType type);\r\n\t\t\r\n\t/**\r\n\t * Stream over all of the database object for the given within the provided ID range.\r\n\t * \r\n\t * @param migrationType\r\n\t * @param minimumId Smallest ID in the range (inclusive).\r\n\t * @param maximumId Largest ID in range (exclusive).\r\n\t * @param batchSize\r\n\t * @return\r\n\t */\r\n\tpublic Iterable<MigratableDatabaseObject<?, ?>> streamDatabaseObjects(MigrationType migrationType, Long minimumId,\r\n\t\t\tLong maximumId, Long batchSize);\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the MigratableObjectType from \r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic MigratableDatabaseObject getObjectForType(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The list of primary migration types represents types that either stand-alone or are the owner's of other types.\r\n\t * Migration is driven off this list as secondary types are migrated with their primary owners.\r\n\t * @return\r\n\t */\r\n\tpublic List<MigrationType> getPrimaryMigrationTypes();\r\n\t\r\n\t/**\r\n\t * Run a method with foreign key and uniqueness constraints checks off.\r\n\t * The global state of the database changed to disable checks while the passed callable is running.\r\n\t * The key checking will unconditionally be re-enabled after the callable finishes.\r\n\t * @param call\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;\r\n\t\r\n\t/**\r\n\t * Checks if the migration type has been registered\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic boolean isMigrationTypeRegistered(MigrationType type);\r\n\t\r\n\t/**\r\n\t * List all non-restricted foreign keys in the schema.\r\n\t * @return\r\n\t */\r\n\tpublic List<ForeignKeyInfo> listNonRestrictedForeignKeys();\r\n\r\n\r\n\t/**\r\n\t * Map each secondary table name to all of the table names within its primary group.\r\n\t * Secondary tables can have restricted foreign keys to any table within their primary group.\r\n\t * @return\r\n\t */\r\n\tMap<String, Set<String>> mapSecondaryTablesToPrimaryGroups();\r\n\r\n\t/**\r\n\t * Create or update a batch of database objects\r\n\t * @param batch\r\n\t * @return\r\n\t * @throws Exception \r\n\t */\r\n\tpublic List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);\r\n\r\n\t/**\r\n\t * Delete all rows of the given type and row ID range.\r\n\t * @param type\r\n\t * @param minimumId inclusive\r\n\t * @param maximumId exclusive\r\n\t */\r\n\tpublic int deleteByRange(TypeData type, long minimumId, long maximumId);\r\n\r\n\t/**\r\n\t * Calculate the ID ranges with the optimal number of rows for the given type.\r\n\t * @param migrationType\r\n\t * @param minimumId\r\n\t * @param maximumId\r\n\t * @param optimalNumberOfRows\r\n\t * @return\r\n\t */\r\n\tpublic List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);\r\n\r\n\t/**\r\n\t * Get the SQL used for primary cardinality.\r\n\t * @param node\r\n\t * @return\r\n\t */\r\n\tpublic String getPrimaryCardinalitySql(MigrationType node);\r\n\r\n\t/**\r\n\t * Calculate a batch of checksums for the given type and ID range.\r\n\t * @param request\r\n\t * @return\r\n\t */\r\n\tpublic List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);\r\n\t\r\n\t/**\r\n\t * Get the type data for the given migration type.\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic TypeData getTypeData(MigrationType type);\r\n\r\n}", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}", "public int getJdbcType();", "public void doCreateTable();", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "@Override\n public void createTable() throws Exception {\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "public abstract byte getTableId();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "TableInstance createTableInstance();", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public interface DatabaseAdminRepository\n{\n /**\n * The specified map must contain below keys,\n *\n * key: id\n * key: tableName\n * key: columnIds\n * key: columnValues\n *\n * @param mapParams\n * @return\n */\n Integer insertByMap(Map mapParams);\n\n Integer insertByProps(\n @Param(\"tableName\") String tableName,\n @Param(\"columnIds\") String columnIds,\n @Param(\"columnValues\") String columnValues);\n\n Integer update(\n //@Param(\"tableName\") String tableName,\n //@Param(\"id\") Integer id,\n Map params);\n\n Integer createTableIfNotExist(\n @Param(\"tableName\") String tableName);\n\n Integer addTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnName\") String columnName,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer removeTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId);\n\n Integer delete(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer id);\n\n Integer deleteByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId);\n\n Integer update (\n @Param(\"tableName\") String tableName);\n\n List<Map<String, Object>> getRecordByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId,\n @Param(\"conditionParams\") List<Pair<String, String>> conditionParams);\n\n Map<String, Object> getRecordById(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer recordId);\n\n Integer empty(\n @Param(\"tableName\") String tableName);\n\n Integer updateColumnLength (\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer deleteTable(\n @Param(\"tableName\") String tableName);\n\n}", "public String getTableName() {\n return this.tableName;\n }", "@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "public interface OneTableDMLMapper{\n int insertVaPlatAccInfo(Map<String, Object> map);\n int insertVaPlatInfo(Map<String,Object> map);\n int insertVaPlatVirtualAcctBal(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalSub(Map<String, Object> params);\n int insertVaPlatVirtualAcct(Map<String,Object> params);\n\n int updateVaMerchVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaMerchAccInfo(Map<String, Object> map);\n int insertVaMerchInfo(Map<String,Object> map);\n int insertVaMerchVirtualAcctBal(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalAdd(Map<String, Object> params);\n int insertVaMerchRechargeSeq(Map<String, Object> params);\n int insertVaMerchWithdrawSeq(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalSub(Map<String, Object> params);\n int insertVaMerchVirtualAcct(Map<String,Object> params);\n int dayEndTransferAmtForMerch(Map<String,Object> params);\n int deleteVaMerchAcctInfo(Map<String,Object> params);\n\n\n int updateVaCustVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaCustAccInfo(Map<String, Object> map);\n int insertVaCustInfo(Map<String,Object> map);\n int insertVaCustVirtualAcctBal(Map<String, Object> params);\n int updateVaCustVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaCustVirtualAcctBalSub(Map<String, Object> params);\n int insertVaCustVirtualAcct(Map<String,Object> params);\n int insertVaCustRechargeSeq(Map<String,Object> params);\n int insertVaCustWithdrawSeq(Map<String,Object> params);\n int dayEndTransferAmtForCust(Map<String,Object> params);\n int deleteVaCustAcctInfo(Map<String,Object> params);\n\n int insertCmAcctTranSeq(Map<String,Object> params);\n int updateCmAcctTranSeq(Map<String,Object> params);\n\n int insertCmTranSeq(Map<String,Object> params);\n int updateCmTranSeq(Map<String,Object> params);\n\n int insertVaOrderInfo(Map<String,Object> params);\n int updateVaOrderInfo(Map<String,Object> params);\n int insertVaOrderSeq(Map<String,Object> params);\n\n int insertVaVirAcctSeq(Map<String,Object> params);\n int updateVaVirAcctSeq(Map<String,Object> params);\n int insertVaBindSeq(Map<String,Object> params);\n\n\n int insertVaTransferSeq(Map<String,Object> params);\n int insertTestUser(Map<String,Object> params);\n int updateProduceDay(Map<String,Object> params);\n\n int insertEodProcPrdLog(Map<String,Object> params);\n int insertEodProcLog(Map<String,Object> params);\n int updateEodProcPrdLog(Map<String,Object> params);\n int updateEodProcLog(Map<String,Object> params);\n\n\n\n}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public abstract Statement queryToRetrieveData();", "@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public TableImpl() { columns = new Column[0]; }", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "private String getTableName() {\n return this.tableName;\n }", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}", "public String getTableName() {\n return tableName; \n }", "BSQL2Java2 createBSQL2Java2();", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public void setDbTable(String v) {this.dbTable = v;}", "private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }" ]
[ "0.59743357", "0.59551793", "0.5953946", "0.5948315", "0.5815608", "0.57866806", "0.5743492", "0.57434845", "0.57413363", "0.57276547", "0.57164264", "0.5698415", "0.5684695", "0.56742334", "0.5673265", "0.5657313", "0.56537586", "0.56467736", "0.5635891", "0.5632242", "0.56241137", "0.56232136", "0.56207013", "0.5615621", "0.5607292", "0.56051093", "0.560122", "0.55989575", "0.55989575", "0.55906546", "0.5587427", "0.55830204", "0.5575702", "0.5575414", "0.5565551", "0.5561139", "0.5554712", "0.55441684", "0.5543162", "0.5537628", "0.55133027", "0.55114686", "0.55114686", "0.5506025", "0.5485437", "0.54854333", "0.54777074", "0.5473597", "0.54735357", "0.5472035", "0.5462619", "0.54498726", "0.5445269", "0.54413277", "0.54340655", "0.5433554", "0.5429626", "0.5428245", "0.5425953", "0.5424759", "0.5420752", "0.54143476", "0.5406236", "0.540362", "0.54000425", "0.53938854", "0.53843117", "0.5382401", "0.5377922", "0.5376144", "0.5373521", "0.53716755", "0.53709525", "0.5359391", "0.5355615", "0.5348986", "0.5343794", "0.5339306", "0.53374237", "0.5337036", "0.53365797", "0.53352237", "0.5334058", "0.5333522", "0.53331035", "0.53314745", "0.5329141", "0.53257966", "0.53236663", "0.5321417", "0.5320443", "0.5316201", "0.5312822", "0.5311098", "0.53106314", "0.53090996", "0.53076863", "0.5306761", "0.5300114", "0.5298682", "0.52902704" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table storage
int insert(Storage record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract String toSQL();", "public void formDatabaseTable() {\n }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "TableId table();", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "String getTableName();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "public abstract String doTableConvert(String sql);", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "public Table<Integer, Integer, String> getData();", "@Insert({\n \"insert into SWMS_stock_out_record_detail (stock_out_record_id, stock_out_record_head_id, \",\n \"stock_out_record_head_code, group_name, \",\n \"stock_in_record_account_id, material_code, \",\n \"material_batch, material_type_id, \",\n \"material_sub_type_id, material_workshop_id, \",\n \"material_name_code, material_supplier_code, \",\n \"material_name, bag_num, \",\n \"weight, measure_unit, \",\n \"created_time, completion_flag)\",\n \"values (#{stockOutRecordId,jdbcType=BIGINT}, #{stockOutRecordHeadId,jdbcType=BIGINT}, \",\n \"#{stockOutRecordHeadCode,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, \",\n \"#{stockInRecordAccountId,jdbcType=BIGINT}, #{materialCode,jdbcType=VARCHAR}, \",\n \"#{materialBatch,jdbcType=VARCHAR}, #{materialTypeId,jdbcType=INTEGER}, \",\n \"#{materialSubTypeId,jdbcType=INTEGER}, #{materialWorkshopId,jdbcType=INTEGER}, \",\n \"#{materialNameCode,jdbcType=INTEGER}, #{materialSupplierCode,jdbcType=INTEGER}, \",\n \"#{materialName,jdbcType=VARCHAR}, #{bagNum,jdbcType=INTEGER}, \",\n \"#{weight,jdbcType=REAL}, #{measureUnit,jdbcType=VARCHAR}, \",\n \"#{createdTime,jdbcType=TIMESTAMP}, #{completionFlag,jdbcType=BIT})\"\n })\n @SelectKey(statement=\"SELECT LAST_INSERT_ID()\", keyProperty=\"id\", before=false, resultType=Long.class)\n int insert(SwmsStockOutRecordDetail record);", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface SqliteService {\n\n @TableName(Constants.TABLE_NAME)\n @QUERY\n public ArrayList<SearchHistory> getSearchHistory();\n\n @TableName(Constants.TABLE_NAME)\n @INSERT\n public void addSearchHistory(@Column(name = Constants.SEARCH_STRING) String searchString);\n\n}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO);\n\n int getDeviceNum(String type);\n\n int deviceBindNum(String type);\n}", "public interface MigratableTableDAO extends MigrationTypeProvider {\r\n\t\r\n\t/**\r\n\t * The total number of rows in the table.\r\n\t * @return\r\n\t */\r\n\tpublic long getCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current max(id) for a table\r\n\t */\r\n\tpublic long getMaxId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current min(id) for a table\r\n\t */\r\n\tpublic long getMinId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * MigrationTypeCount for given migration type\r\n\t */\r\n\tpublic MigrationTypeCount getMigrationTypeCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * A checksum on etag or id for a range of ids\r\n\t */\r\n\tpublic String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);\r\n\t\r\n\t/**\r\n\t * A table checksum (CHECKSUM TABLE statement)\r\n\t */\r\n\tpublic String getChecksumForType(MigrationType type);\r\n\t\t\r\n\t/**\r\n\t * Stream over all of the database object for the given within the provided ID range.\r\n\t * \r\n\t * @param migrationType\r\n\t * @param minimumId Smallest ID in the range (inclusive).\r\n\t * @param maximumId Largest ID in range (exclusive).\r\n\t * @param batchSize\r\n\t * @return\r\n\t */\r\n\tpublic Iterable<MigratableDatabaseObject<?, ?>> streamDatabaseObjects(MigrationType migrationType, Long minimumId,\r\n\t\t\tLong maximumId, Long batchSize);\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the MigratableObjectType from \r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic MigratableDatabaseObject getObjectForType(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The list of primary migration types represents types that either stand-alone or are the owner's of other types.\r\n\t * Migration is driven off this list as secondary types are migrated with their primary owners.\r\n\t * @return\r\n\t */\r\n\tpublic List<MigrationType> getPrimaryMigrationTypes();\r\n\t\r\n\t/**\r\n\t * Run a method with foreign key and uniqueness constraints checks off.\r\n\t * The global state of the database changed to disable checks while the passed callable is running.\r\n\t * The key checking will unconditionally be re-enabled after the callable finishes.\r\n\t * @param call\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;\r\n\t\r\n\t/**\r\n\t * Checks if the migration type has been registered\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic boolean isMigrationTypeRegistered(MigrationType type);\r\n\t\r\n\t/**\r\n\t * List all non-restricted foreign keys in the schema.\r\n\t * @return\r\n\t */\r\n\tpublic List<ForeignKeyInfo> listNonRestrictedForeignKeys();\r\n\r\n\r\n\t/**\r\n\t * Map each secondary table name to all of the table names within its primary group.\r\n\t * Secondary tables can have restricted foreign keys to any table within their primary group.\r\n\t * @return\r\n\t */\r\n\tMap<String, Set<String>> mapSecondaryTablesToPrimaryGroups();\r\n\r\n\t/**\r\n\t * Create or update a batch of database objects\r\n\t * @param batch\r\n\t * @return\r\n\t * @throws Exception \r\n\t */\r\n\tpublic List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);\r\n\r\n\t/**\r\n\t * Delete all rows of the given type and row ID range.\r\n\t * @param type\r\n\t * @param minimumId inclusive\r\n\t * @param maximumId exclusive\r\n\t */\r\n\tpublic int deleteByRange(TypeData type, long minimumId, long maximumId);\r\n\r\n\t/**\r\n\t * Calculate the ID ranges with the optimal number of rows for the given type.\r\n\t * @param migrationType\r\n\t * @param minimumId\r\n\t * @param maximumId\r\n\t * @param optimalNumberOfRows\r\n\t * @return\r\n\t */\r\n\tpublic List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);\r\n\r\n\t/**\r\n\t * Get the SQL used for primary cardinality.\r\n\t * @param node\r\n\t * @return\r\n\t */\r\n\tpublic String getPrimaryCardinalitySql(MigrationType node);\r\n\r\n\t/**\r\n\t * Calculate a batch of checksums for the given type and ID range.\r\n\t * @param request\r\n\t * @return\r\n\t */\r\n\tpublic List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);\r\n\t\r\n\t/**\r\n\t * Get the type data for the given migration type.\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic TypeData getTypeData(MigrationType type);\r\n\r\n}", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}", "public int getJdbcType();", "public void doCreateTable();", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "@Override\n public void createTable() throws Exception {\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "public abstract byte getTableId();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "TableInstance createTableInstance();", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public interface DatabaseAdminRepository\n{\n /**\n * The specified map must contain below keys,\n *\n * key: id\n * key: tableName\n * key: columnIds\n * key: columnValues\n *\n * @param mapParams\n * @return\n */\n Integer insertByMap(Map mapParams);\n\n Integer insertByProps(\n @Param(\"tableName\") String tableName,\n @Param(\"columnIds\") String columnIds,\n @Param(\"columnValues\") String columnValues);\n\n Integer update(\n //@Param(\"tableName\") String tableName,\n //@Param(\"id\") Integer id,\n Map params);\n\n Integer createTableIfNotExist(\n @Param(\"tableName\") String tableName);\n\n Integer addTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnName\") String columnName,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer removeTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId);\n\n Integer delete(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer id);\n\n Integer deleteByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId);\n\n Integer update (\n @Param(\"tableName\") String tableName);\n\n List<Map<String, Object>> getRecordByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId,\n @Param(\"conditionParams\") List<Pair<String, String>> conditionParams);\n\n Map<String, Object> getRecordById(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer recordId);\n\n Integer empty(\n @Param(\"tableName\") String tableName);\n\n Integer updateColumnLength (\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer deleteTable(\n @Param(\"tableName\") String tableName);\n\n}", "public String getTableName() {\n return this.tableName;\n }", "@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "public interface OneTableDMLMapper{\n int insertVaPlatAccInfo(Map<String, Object> map);\n int insertVaPlatInfo(Map<String,Object> map);\n int insertVaPlatVirtualAcctBal(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalSub(Map<String, Object> params);\n int insertVaPlatVirtualAcct(Map<String,Object> params);\n\n int updateVaMerchVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaMerchAccInfo(Map<String, Object> map);\n int insertVaMerchInfo(Map<String,Object> map);\n int insertVaMerchVirtualAcctBal(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalAdd(Map<String, Object> params);\n int insertVaMerchRechargeSeq(Map<String, Object> params);\n int insertVaMerchWithdrawSeq(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalSub(Map<String, Object> params);\n int insertVaMerchVirtualAcct(Map<String,Object> params);\n int dayEndTransferAmtForMerch(Map<String,Object> params);\n int deleteVaMerchAcctInfo(Map<String,Object> params);\n\n\n int updateVaCustVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaCustAccInfo(Map<String, Object> map);\n int insertVaCustInfo(Map<String,Object> map);\n int insertVaCustVirtualAcctBal(Map<String, Object> params);\n int updateVaCustVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaCustVirtualAcctBalSub(Map<String, Object> params);\n int insertVaCustVirtualAcct(Map<String,Object> params);\n int insertVaCustRechargeSeq(Map<String,Object> params);\n int insertVaCustWithdrawSeq(Map<String,Object> params);\n int dayEndTransferAmtForCust(Map<String,Object> params);\n int deleteVaCustAcctInfo(Map<String,Object> params);\n\n int insertCmAcctTranSeq(Map<String,Object> params);\n int updateCmAcctTranSeq(Map<String,Object> params);\n\n int insertCmTranSeq(Map<String,Object> params);\n int updateCmTranSeq(Map<String,Object> params);\n\n int insertVaOrderInfo(Map<String,Object> params);\n int updateVaOrderInfo(Map<String,Object> params);\n int insertVaOrderSeq(Map<String,Object> params);\n\n int insertVaVirAcctSeq(Map<String,Object> params);\n int updateVaVirAcctSeq(Map<String,Object> params);\n int insertVaBindSeq(Map<String,Object> params);\n\n\n int insertVaTransferSeq(Map<String,Object> params);\n int insertTestUser(Map<String,Object> params);\n int updateProduceDay(Map<String,Object> params);\n\n int insertEodProcPrdLog(Map<String,Object> params);\n int insertEodProcLog(Map<String,Object> params);\n int updateEodProcPrdLog(Map<String,Object> params);\n int updateEodProcLog(Map<String,Object> params);\n\n\n\n}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public abstract Statement queryToRetrieveData();", "@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public TableImpl() { columns = new Column[0]; }", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "private String getTableName() {\n return this.tableName;\n }", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}", "public String getTableName() {\n return tableName; \n }", "BSQL2Java2 createBSQL2Java2();", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public void setDbTable(String v) {this.dbTable = v;}", "private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }" ]
[ "0.59743357", "0.59551793", "0.5953946", "0.5948315", "0.5815608", "0.57866806", "0.5743492", "0.57434845", "0.57413363", "0.57276547", "0.57164264", "0.5698415", "0.5684695", "0.56742334", "0.5673265", "0.5657313", "0.56537586", "0.56467736", "0.5635891", "0.5632242", "0.56241137", "0.56232136", "0.56207013", "0.5615621", "0.5607292", "0.56051093", "0.560122", "0.55989575", "0.55989575", "0.55906546", "0.5587427", "0.55830204", "0.5575702", "0.5575414", "0.5565551", "0.5561139", "0.5554712", "0.55441684", "0.5543162", "0.5537628", "0.55133027", "0.55114686", "0.55114686", "0.5506025", "0.5485437", "0.54854333", "0.54777074", "0.5473597", "0.54735357", "0.5472035", "0.5462619", "0.54498726", "0.5445269", "0.54413277", "0.54340655", "0.5433554", "0.5429626", "0.5428245", "0.5425953", "0.5424759", "0.5420752", "0.54143476", "0.5406236", "0.540362", "0.54000425", "0.53938854", "0.53843117", "0.5382401", "0.5377922", "0.5376144", "0.5373521", "0.53716755", "0.53709525", "0.5359391", "0.5355615", "0.5348986", "0.5343794", "0.5339306", "0.53374237", "0.5337036", "0.53365797", "0.53352237", "0.5334058", "0.5333522", "0.53331035", "0.53314745", "0.5329141", "0.53257966", "0.53236663", "0.5321417", "0.5320443", "0.5316201", "0.5312822", "0.5311098", "0.53106314", "0.53090996", "0.53076863", "0.5306761", "0.5300114", "0.5298682", "0.52902704" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table storage
int insertSelective(Storage record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract String toSQL();", "public void formDatabaseTable() {\n }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "TableId table();", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "String getTableName();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "public abstract String doTableConvert(String sql);", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "public Table<Integer, Integer, String> getData();", "@Insert({\n \"insert into SWMS_stock_out_record_detail (stock_out_record_id, stock_out_record_head_id, \",\n \"stock_out_record_head_code, group_name, \",\n \"stock_in_record_account_id, material_code, \",\n \"material_batch, material_type_id, \",\n \"material_sub_type_id, material_workshop_id, \",\n \"material_name_code, material_supplier_code, \",\n \"material_name, bag_num, \",\n \"weight, measure_unit, \",\n \"created_time, completion_flag)\",\n \"values (#{stockOutRecordId,jdbcType=BIGINT}, #{stockOutRecordHeadId,jdbcType=BIGINT}, \",\n \"#{stockOutRecordHeadCode,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, \",\n \"#{stockInRecordAccountId,jdbcType=BIGINT}, #{materialCode,jdbcType=VARCHAR}, \",\n \"#{materialBatch,jdbcType=VARCHAR}, #{materialTypeId,jdbcType=INTEGER}, \",\n \"#{materialSubTypeId,jdbcType=INTEGER}, #{materialWorkshopId,jdbcType=INTEGER}, \",\n \"#{materialNameCode,jdbcType=INTEGER}, #{materialSupplierCode,jdbcType=INTEGER}, \",\n \"#{materialName,jdbcType=VARCHAR}, #{bagNum,jdbcType=INTEGER}, \",\n \"#{weight,jdbcType=REAL}, #{measureUnit,jdbcType=VARCHAR}, \",\n \"#{createdTime,jdbcType=TIMESTAMP}, #{completionFlag,jdbcType=BIT})\"\n })\n @SelectKey(statement=\"SELECT LAST_INSERT_ID()\", keyProperty=\"id\", before=false, resultType=Long.class)\n int insert(SwmsStockOutRecordDetail record);", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface SqliteService {\n\n @TableName(Constants.TABLE_NAME)\n @QUERY\n public ArrayList<SearchHistory> getSearchHistory();\n\n @TableName(Constants.TABLE_NAME)\n @INSERT\n public void addSearchHistory(@Column(name = Constants.SEARCH_STRING) String searchString);\n\n}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO);\n\n int getDeviceNum(String type);\n\n int deviceBindNum(String type);\n}", "public interface MigratableTableDAO extends MigrationTypeProvider {\r\n\t\r\n\t/**\r\n\t * The total number of rows in the table.\r\n\t * @return\r\n\t */\r\n\tpublic long getCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current max(id) for a table\r\n\t */\r\n\tpublic long getMaxId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current min(id) for a table\r\n\t */\r\n\tpublic long getMinId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * MigrationTypeCount for given migration type\r\n\t */\r\n\tpublic MigrationTypeCount getMigrationTypeCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * A checksum on etag or id for a range of ids\r\n\t */\r\n\tpublic String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);\r\n\t\r\n\t/**\r\n\t * A table checksum (CHECKSUM TABLE statement)\r\n\t */\r\n\tpublic String getChecksumForType(MigrationType type);\r\n\t\t\r\n\t/**\r\n\t * Stream over all of the database object for the given within the provided ID range.\r\n\t * \r\n\t * @param migrationType\r\n\t * @param minimumId Smallest ID in the range (inclusive).\r\n\t * @param maximumId Largest ID in range (exclusive).\r\n\t * @param batchSize\r\n\t * @return\r\n\t */\r\n\tpublic Iterable<MigratableDatabaseObject<?, ?>> streamDatabaseObjects(MigrationType migrationType, Long minimumId,\r\n\t\t\tLong maximumId, Long batchSize);\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the MigratableObjectType from \r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic MigratableDatabaseObject getObjectForType(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The list of primary migration types represents types that either stand-alone or are the owner's of other types.\r\n\t * Migration is driven off this list as secondary types are migrated with their primary owners.\r\n\t * @return\r\n\t */\r\n\tpublic List<MigrationType> getPrimaryMigrationTypes();\r\n\t\r\n\t/**\r\n\t * Run a method with foreign key and uniqueness constraints checks off.\r\n\t * The global state of the database changed to disable checks while the passed callable is running.\r\n\t * The key checking will unconditionally be re-enabled after the callable finishes.\r\n\t * @param call\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;\r\n\t\r\n\t/**\r\n\t * Checks if the migration type has been registered\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic boolean isMigrationTypeRegistered(MigrationType type);\r\n\t\r\n\t/**\r\n\t * List all non-restricted foreign keys in the schema.\r\n\t * @return\r\n\t */\r\n\tpublic List<ForeignKeyInfo> listNonRestrictedForeignKeys();\r\n\r\n\r\n\t/**\r\n\t * Map each secondary table name to all of the table names within its primary group.\r\n\t * Secondary tables can have restricted foreign keys to any table within their primary group.\r\n\t * @return\r\n\t */\r\n\tMap<String, Set<String>> mapSecondaryTablesToPrimaryGroups();\r\n\r\n\t/**\r\n\t * Create or update a batch of database objects\r\n\t * @param batch\r\n\t * @return\r\n\t * @throws Exception \r\n\t */\r\n\tpublic List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);\r\n\r\n\t/**\r\n\t * Delete all rows of the given type and row ID range.\r\n\t * @param type\r\n\t * @param minimumId inclusive\r\n\t * @param maximumId exclusive\r\n\t */\r\n\tpublic int deleteByRange(TypeData type, long minimumId, long maximumId);\r\n\r\n\t/**\r\n\t * Calculate the ID ranges with the optimal number of rows for the given type.\r\n\t * @param migrationType\r\n\t * @param minimumId\r\n\t * @param maximumId\r\n\t * @param optimalNumberOfRows\r\n\t * @return\r\n\t */\r\n\tpublic List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);\r\n\r\n\t/**\r\n\t * Get the SQL used for primary cardinality.\r\n\t * @param node\r\n\t * @return\r\n\t */\r\n\tpublic String getPrimaryCardinalitySql(MigrationType node);\r\n\r\n\t/**\r\n\t * Calculate a batch of checksums for the given type and ID range.\r\n\t * @param request\r\n\t * @return\r\n\t */\r\n\tpublic List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);\r\n\t\r\n\t/**\r\n\t * Get the type data for the given migration type.\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic TypeData getTypeData(MigrationType type);\r\n\r\n}", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}", "public int getJdbcType();", "public void doCreateTable();", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "@Override\n public void createTable() throws Exception {\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "public abstract byte getTableId();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "TableInstance createTableInstance();", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public interface DatabaseAdminRepository\n{\n /**\n * The specified map must contain below keys,\n *\n * key: id\n * key: tableName\n * key: columnIds\n * key: columnValues\n *\n * @param mapParams\n * @return\n */\n Integer insertByMap(Map mapParams);\n\n Integer insertByProps(\n @Param(\"tableName\") String tableName,\n @Param(\"columnIds\") String columnIds,\n @Param(\"columnValues\") String columnValues);\n\n Integer update(\n //@Param(\"tableName\") String tableName,\n //@Param(\"id\") Integer id,\n Map params);\n\n Integer createTableIfNotExist(\n @Param(\"tableName\") String tableName);\n\n Integer addTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnName\") String columnName,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer removeTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId);\n\n Integer delete(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer id);\n\n Integer deleteByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId);\n\n Integer update (\n @Param(\"tableName\") String tableName);\n\n List<Map<String, Object>> getRecordByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId,\n @Param(\"conditionParams\") List<Pair<String, String>> conditionParams);\n\n Map<String, Object> getRecordById(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer recordId);\n\n Integer empty(\n @Param(\"tableName\") String tableName);\n\n Integer updateColumnLength (\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer deleteTable(\n @Param(\"tableName\") String tableName);\n\n}", "public String getTableName() {\n return this.tableName;\n }", "@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "public interface OneTableDMLMapper{\n int insertVaPlatAccInfo(Map<String, Object> map);\n int insertVaPlatInfo(Map<String,Object> map);\n int insertVaPlatVirtualAcctBal(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalSub(Map<String, Object> params);\n int insertVaPlatVirtualAcct(Map<String,Object> params);\n\n int updateVaMerchVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaMerchAccInfo(Map<String, Object> map);\n int insertVaMerchInfo(Map<String,Object> map);\n int insertVaMerchVirtualAcctBal(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalAdd(Map<String, Object> params);\n int insertVaMerchRechargeSeq(Map<String, Object> params);\n int insertVaMerchWithdrawSeq(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalSub(Map<String, Object> params);\n int insertVaMerchVirtualAcct(Map<String,Object> params);\n int dayEndTransferAmtForMerch(Map<String,Object> params);\n int deleteVaMerchAcctInfo(Map<String,Object> params);\n\n\n int updateVaCustVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaCustAccInfo(Map<String, Object> map);\n int insertVaCustInfo(Map<String,Object> map);\n int insertVaCustVirtualAcctBal(Map<String, Object> params);\n int updateVaCustVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaCustVirtualAcctBalSub(Map<String, Object> params);\n int insertVaCustVirtualAcct(Map<String,Object> params);\n int insertVaCustRechargeSeq(Map<String,Object> params);\n int insertVaCustWithdrawSeq(Map<String,Object> params);\n int dayEndTransferAmtForCust(Map<String,Object> params);\n int deleteVaCustAcctInfo(Map<String,Object> params);\n\n int insertCmAcctTranSeq(Map<String,Object> params);\n int updateCmAcctTranSeq(Map<String,Object> params);\n\n int insertCmTranSeq(Map<String,Object> params);\n int updateCmTranSeq(Map<String,Object> params);\n\n int insertVaOrderInfo(Map<String,Object> params);\n int updateVaOrderInfo(Map<String,Object> params);\n int insertVaOrderSeq(Map<String,Object> params);\n\n int insertVaVirAcctSeq(Map<String,Object> params);\n int updateVaVirAcctSeq(Map<String,Object> params);\n int insertVaBindSeq(Map<String,Object> params);\n\n\n int insertVaTransferSeq(Map<String,Object> params);\n int insertTestUser(Map<String,Object> params);\n int updateProduceDay(Map<String,Object> params);\n\n int insertEodProcPrdLog(Map<String,Object> params);\n int insertEodProcLog(Map<String,Object> params);\n int updateEodProcPrdLog(Map<String,Object> params);\n int updateEodProcLog(Map<String,Object> params);\n\n\n\n}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public abstract Statement queryToRetrieveData();", "@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public TableImpl() { columns = new Column[0]; }", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "private String getTableName() {\n return this.tableName;\n }", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}", "public String getTableName() {\n return tableName; \n }", "BSQL2Java2 createBSQL2Java2();", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public void setDbTable(String v) {this.dbTable = v;}", "private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }" ]
[ "0.59743357", "0.59551793", "0.5953946", "0.5948315", "0.5815608", "0.57866806", "0.5743492", "0.57434845", "0.57413363", "0.57276547", "0.57164264", "0.5698415", "0.5684695", "0.56742334", "0.5673265", "0.5657313", "0.56537586", "0.56467736", "0.5635891", "0.5632242", "0.56241137", "0.56232136", "0.56207013", "0.5615621", "0.5607292", "0.56051093", "0.560122", "0.55989575", "0.55989575", "0.55906546", "0.5587427", "0.55830204", "0.5575702", "0.5575414", "0.5565551", "0.5561139", "0.5554712", "0.55441684", "0.5543162", "0.5537628", "0.55133027", "0.55114686", "0.55114686", "0.5506025", "0.5485437", "0.54854333", "0.54777074", "0.5473597", "0.54735357", "0.5472035", "0.5462619", "0.54498726", "0.5445269", "0.54413277", "0.54340655", "0.5433554", "0.5429626", "0.5428245", "0.5425953", "0.5424759", "0.5420752", "0.54143476", "0.5406236", "0.540362", "0.54000425", "0.53938854", "0.53843117", "0.5382401", "0.5377922", "0.5376144", "0.5373521", "0.53716755", "0.53709525", "0.5359391", "0.5355615", "0.5348986", "0.5343794", "0.5339306", "0.53374237", "0.5337036", "0.53365797", "0.53352237", "0.5334058", "0.5333522", "0.53331035", "0.53314745", "0.5329141", "0.53257966", "0.53236663", "0.5321417", "0.5320443", "0.5316201", "0.5312822", "0.5311098", "0.53106314", "0.53090996", "0.53076863", "0.5306761", "0.5300114", "0.5298682", "0.52902704" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table storage
Storage selectByPrimaryKey(StorageKey key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract String toSQL();", "public void formDatabaseTable() {\n }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "TableId table();", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "String getTableName();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "public abstract String doTableConvert(String sql);", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "public Table<Integer, Integer, String> getData();", "@Insert({\n \"insert into SWMS_stock_out_record_detail (stock_out_record_id, stock_out_record_head_id, \",\n \"stock_out_record_head_code, group_name, \",\n \"stock_in_record_account_id, material_code, \",\n \"material_batch, material_type_id, \",\n \"material_sub_type_id, material_workshop_id, \",\n \"material_name_code, material_supplier_code, \",\n \"material_name, bag_num, \",\n \"weight, measure_unit, \",\n \"created_time, completion_flag)\",\n \"values (#{stockOutRecordId,jdbcType=BIGINT}, #{stockOutRecordHeadId,jdbcType=BIGINT}, \",\n \"#{stockOutRecordHeadCode,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, \",\n \"#{stockInRecordAccountId,jdbcType=BIGINT}, #{materialCode,jdbcType=VARCHAR}, \",\n \"#{materialBatch,jdbcType=VARCHAR}, #{materialTypeId,jdbcType=INTEGER}, \",\n \"#{materialSubTypeId,jdbcType=INTEGER}, #{materialWorkshopId,jdbcType=INTEGER}, \",\n \"#{materialNameCode,jdbcType=INTEGER}, #{materialSupplierCode,jdbcType=INTEGER}, \",\n \"#{materialName,jdbcType=VARCHAR}, #{bagNum,jdbcType=INTEGER}, \",\n \"#{weight,jdbcType=REAL}, #{measureUnit,jdbcType=VARCHAR}, \",\n \"#{createdTime,jdbcType=TIMESTAMP}, #{completionFlag,jdbcType=BIT})\"\n })\n @SelectKey(statement=\"SELECT LAST_INSERT_ID()\", keyProperty=\"id\", before=false, resultType=Long.class)\n int insert(SwmsStockOutRecordDetail record);", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface SqliteService {\n\n @TableName(Constants.TABLE_NAME)\n @QUERY\n public ArrayList<SearchHistory> getSearchHistory();\n\n @TableName(Constants.TABLE_NAME)\n @INSERT\n public void addSearchHistory(@Column(name = Constants.SEARCH_STRING) String searchString);\n\n}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO);\n\n int getDeviceNum(String type);\n\n int deviceBindNum(String type);\n}", "public interface MigratableTableDAO extends MigrationTypeProvider {\r\n\t\r\n\t/**\r\n\t * The total number of rows in the table.\r\n\t * @return\r\n\t */\r\n\tpublic long getCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current max(id) for a table\r\n\t */\r\n\tpublic long getMaxId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current min(id) for a table\r\n\t */\r\n\tpublic long getMinId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * MigrationTypeCount for given migration type\r\n\t */\r\n\tpublic MigrationTypeCount getMigrationTypeCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * A checksum on etag or id for a range of ids\r\n\t */\r\n\tpublic String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);\r\n\t\r\n\t/**\r\n\t * A table checksum (CHECKSUM TABLE statement)\r\n\t */\r\n\tpublic String getChecksumForType(MigrationType type);\r\n\t\t\r\n\t/**\r\n\t * Stream over all of the database object for the given within the provided ID range.\r\n\t * \r\n\t * @param migrationType\r\n\t * @param minimumId Smallest ID in the range (inclusive).\r\n\t * @param maximumId Largest ID in range (exclusive).\r\n\t * @param batchSize\r\n\t * @return\r\n\t */\r\n\tpublic Iterable<MigratableDatabaseObject<?, ?>> streamDatabaseObjects(MigrationType migrationType, Long minimumId,\r\n\t\t\tLong maximumId, Long batchSize);\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the MigratableObjectType from \r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic MigratableDatabaseObject getObjectForType(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The list of primary migration types represents types that either stand-alone or are the owner's of other types.\r\n\t * Migration is driven off this list as secondary types are migrated with their primary owners.\r\n\t * @return\r\n\t */\r\n\tpublic List<MigrationType> getPrimaryMigrationTypes();\r\n\t\r\n\t/**\r\n\t * Run a method with foreign key and uniqueness constraints checks off.\r\n\t * The global state of the database changed to disable checks while the passed callable is running.\r\n\t * The key checking will unconditionally be re-enabled after the callable finishes.\r\n\t * @param call\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;\r\n\t\r\n\t/**\r\n\t * Checks if the migration type has been registered\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic boolean isMigrationTypeRegistered(MigrationType type);\r\n\t\r\n\t/**\r\n\t * List all non-restricted foreign keys in the schema.\r\n\t * @return\r\n\t */\r\n\tpublic List<ForeignKeyInfo> listNonRestrictedForeignKeys();\r\n\r\n\r\n\t/**\r\n\t * Map each secondary table name to all of the table names within its primary group.\r\n\t * Secondary tables can have restricted foreign keys to any table within their primary group.\r\n\t * @return\r\n\t */\r\n\tMap<String, Set<String>> mapSecondaryTablesToPrimaryGroups();\r\n\r\n\t/**\r\n\t * Create or update a batch of database objects\r\n\t * @param batch\r\n\t * @return\r\n\t * @throws Exception \r\n\t */\r\n\tpublic List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);\r\n\r\n\t/**\r\n\t * Delete all rows of the given type and row ID range.\r\n\t * @param type\r\n\t * @param minimumId inclusive\r\n\t * @param maximumId exclusive\r\n\t */\r\n\tpublic int deleteByRange(TypeData type, long minimumId, long maximumId);\r\n\r\n\t/**\r\n\t * Calculate the ID ranges with the optimal number of rows for the given type.\r\n\t * @param migrationType\r\n\t * @param minimumId\r\n\t * @param maximumId\r\n\t * @param optimalNumberOfRows\r\n\t * @return\r\n\t */\r\n\tpublic List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);\r\n\r\n\t/**\r\n\t * Get the SQL used for primary cardinality.\r\n\t * @param node\r\n\t * @return\r\n\t */\r\n\tpublic String getPrimaryCardinalitySql(MigrationType node);\r\n\r\n\t/**\r\n\t * Calculate a batch of checksums for the given type and ID range.\r\n\t * @param request\r\n\t * @return\r\n\t */\r\n\tpublic List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);\r\n\t\r\n\t/**\r\n\t * Get the type data for the given migration type.\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic TypeData getTypeData(MigrationType type);\r\n\r\n}", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}", "public int getJdbcType();", "public void doCreateTable();", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "@Override\n public void createTable() throws Exception {\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "public abstract byte getTableId();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "TableInstance createTableInstance();", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public interface DatabaseAdminRepository\n{\n /**\n * The specified map must contain below keys,\n *\n * key: id\n * key: tableName\n * key: columnIds\n * key: columnValues\n *\n * @param mapParams\n * @return\n */\n Integer insertByMap(Map mapParams);\n\n Integer insertByProps(\n @Param(\"tableName\") String tableName,\n @Param(\"columnIds\") String columnIds,\n @Param(\"columnValues\") String columnValues);\n\n Integer update(\n //@Param(\"tableName\") String tableName,\n //@Param(\"id\") Integer id,\n Map params);\n\n Integer createTableIfNotExist(\n @Param(\"tableName\") String tableName);\n\n Integer addTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnName\") String columnName,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer removeTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId);\n\n Integer delete(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer id);\n\n Integer deleteByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId);\n\n Integer update (\n @Param(\"tableName\") String tableName);\n\n List<Map<String, Object>> getRecordByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId,\n @Param(\"conditionParams\") List<Pair<String, String>> conditionParams);\n\n Map<String, Object> getRecordById(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer recordId);\n\n Integer empty(\n @Param(\"tableName\") String tableName);\n\n Integer updateColumnLength (\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer deleteTable(\n @Param(\"tableName\") String tableName);\n\n}", "public String getTableName() {\n return this.tableName;\n }", "@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "public interface OneTableDMLMapper{\n int insertVaPlatAccInfo(Map<String, Object> map);\n int insertVaPlatInfo(Map<String,Object> map);\n int insertVaPlatVirtualAcctBal(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalSub(Map<String, Object> params);\n int insertVaPlatVirtualAcct(Map<String,Object> params);\n\n int updateVaMerchVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaMerchAccInfo(Map<String, Object> map);\n int insertVaMerchInfo(Map<String,Object> map);\n int insertVaMerchVirtualAcctBal(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalAdd(Map<String, Object> params);\n int insertVaMerchRechargeSeq(Map<String, Object> params);\n int insertVaMerchWithdrawSeq(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalSub(Map<String, Object> params);\n int insertVaMerchVirtualAcct(Map<String,Object> params);\n int dayEndTransferAmtForMerch(Map<String,Object> params);\n int deleteVaMerchAcctInfo(Map<String,Object> params);\n\n\n int updateVaCustVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaCustAccInfo(Map<String, Object> map);\n int insertVaCustInfo(Map<String,Object> map);\n int insertVaCustVirtualAcctBal(Map<String, Object> params);\n int updateVaCustVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaCustVirtualAcctBalSub(Map<String, Object> params);\n int insertVaCustVirtualAcct(Map<String,Object> params);\n int insertVaCustRechargeSeq(Map<String,Object> params);\n int insertVaCustWithdrawSeq(Map<String,Object> params);\n int dayEndTransferAmtForCust(Map<String,Object> params);\n int deleteVaCustAcctInfo(Map<String,Object> params);\n\n int insertCmAcctTranSeq(Map<String,Object> params);\n int updateCmAcctTranSeq(Map<String,Object> params);\n\n int insertCmTranSeq(Map<String,Object> params);\n int updateCmTranSeq(Map<String,Object> params);\n\n int insertVaOrderInfo(Map<String,Object> params);\n int updateVaOrderInfo(Map<String,Object> params);\n int insertVaOrderSeq(Map<String,Object> params);\n\n int insertVaVirAcctSeq(Map<String,Object> params);\n int updateVaVirAcctSeq(Map<String,Object> params);\n int insertVaBindSeq(Map<String,Object> params);\n\n\n int insertVaTransferSeq(Map<String,Object> params);\n int insertTestUser(Map<String,Object> params);\n int updateProduceDay(Map<String,Object> params);\n\n int insertEodProcPrdLog(Map<String,Object> params);\n int insertEodProcLog(Map<String,Object> params);\n int updateEodProcPrdLog(Map<String,Object> params);\n int updateEodProcLog(Map<String,Object> params);\n\n\n\n}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public abstract Statement queryToRetrieveData();", "@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public TableImpl() { columns = new Column[0]; }", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "private String getTableName() {\n return this.tableName;\n }", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}", "public String getTableName() {\n return tableName; \n }", "BSQL2Java2 createBSQL2Java2();", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public void setDbTable(String v) {this.dbTable = v;}", "private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }" ]
[ "0.59743357", "0.59551793", "0.5953946", "0.5948315", "0.5815608", "0.57866806", "0.5743492", "0.57434845", "0.57413363", "0.57276547", "0.57164264", "0.5698415", "0.5684695", "0.56742334", "0.5673265", "0.5657313", "0.56537586", "0.56467736", "0.5635891", "0.5632242", "0.56241137", "0.56232136", "0.56207013", "0.5615621", "0.5607292", "0.56051093", "0.560122", "0.55989575", "0.55989575", "0.55906546", "0.5587427", "0.55830204", "0.5575702", "0.5575414", "0.5565551", "0.5561139", "0.5554712", "0.55441684", "0.5543162", "0.5537628", "0.55133027", "0.55114686", "0.55114686", "0.5506025", "0.5485437", "0.54854333", "0.54777074", "0.5473597", "0.54735357", "0.5472035", "0.5462619", "0.54498726", "0.5445269", "0.54413277", "0.54340655", "0.5433554", "0.5429626", "0.5428245", "0.5425953", "0.5424759", "0.5420752", "0.54143476", "0.5406236", "0.540362", "0.54000425", "0.53938854", "0.53843117", "0.5382401", "0.5377922", "0.5376144", "0.5373521", "0.53716755", "0.53709525", "0.5359391", "0.5355615", "0.5348986", "0.5343794", "0.5339306", "0.53374237", "0.5337036", "0.53365797", "0.53352237", "0.5334058", "0.5333522", "0.53331035", "0.53314745", "0.5329141", "0.53257966", "0.53236663", "0.5321417", "0.5320443", "0.5316201", "0.5312822", "0.5311098", "0.53106314", "0.53090996", "0.53076863", "0.5306761", "0.5300114", "0.5298682", "0.52902704" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table storage
int updateByPrimaryKeySelective(Storage record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract String toSQL();", "public void formDatabaseTable() {\n }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "TableId table();", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "String getTableName();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "public abstract String doTableConvert(String sql);", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "public Table<Integer, Integer, String> getData();", "@Insert({\n \"insert into SWMS_stock_out_record_detail (stock_out_record_id, stock_out_record_head_id, \",\n \"stock_out_record_head_code, group_name, \",\n \"stock_in_record_account_id, material_code, \",\n \"material_batch, material_type_id, \",\n \"material_sub_type_id, material_workshop_id, \",\n \"material_name_code, material_supplier_code, \",\n \"material_name, bag_num, \",\n \"weight, measure_unit, \",\n \"created_time, completion_flag)\",\n \"values (#{stockOutRecordId,jdbcType=BIGINT}, #{stockOutRecordHeadId,jdbcType=BIGINT}, \",\n \"#{stockOutRecordHeadCode,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, \",\n \"#{stockInRecordAccountId,jdbcType=BIGINT}, #{materialCode,jdbcType=VARCHAR}, \",\n \"#{materialBatch,jdbcType=VARCHAR}, #{materialTypeId,jdbcType=INTEGER}, \",\n \"#{materialSubTypeId,jdbcType=INTEGER}, #{materialWorkshopId,jdbcType=INTEGER}, \",\n \"#{materialNameCode,jdbcType=INTEGER}, #{materialSupplierCode,jdbcType=INTEGER}, \",\n \"#{materialName,jdbcType=VARCHAR}, #{bagNum,jdbcType=INTEGER}, \",\n \"#{weight,jdbcType=REAL}, #{measureUnit,jdbcType=VARCHAR}, \",\n \"#{createdTime,jdbcType=TIMESTAMP}, #{completionFlag,jdbcType=BIT})\"\n })\n @SelectKey(statement=\"SELECT LAST_INSERT_ID()\", keyProperty=\"id\", before=false, resultType=Long.class)\n int insert(SwmsStockOutRecordDetail record);", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface SqliteService {\n\n @TableName(Constants.TABLE_NAME)\n @QUERY\n public ArrayList<SearchHistory> getSearchHistory();\n\n @TableName(Constants.TABLE_NAME)\n @INSERT\n public void addSearchHistory(@Column(name = Constants.SEARCH_STRING) String searchString);\n\n}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO);\n\n int getDeviceNum(String type);\n\n int deviceBindNum(String type);\n}", "public interface MigratableTableDAO extends MigrationTypeProvider {\r\n\t\r\n\t/**\r\n\t * The total number of rows in the table.\r\n\t * @return\r\n\t */\r\n\tpublic long getCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current max(id) for a table\r\n\t */\r\n\tpublic long getMaxId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current min(id) for a table\r\n\t */\r\n\tpublic long getMinId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * MigrationTypeCount for given migration type\r\n\t */\r\n\tpublic MigrationTypeCount getMigrationTypeCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * A checksum on etag or id for a range of ids\r\n\t */\r\n\tpublic String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);\r\n\t\r\n\t/**\r\n\t * A table checksum (CHECKSUM TABLE statement)\r\n\t */\r\n\tpublic String getChecksumForType(MigrationType type);\r\n\t\t\r\n\t/**\r\n\t * Stream over all of the database object for the given within the provided ID range.\r\n\t * \r\n\t * @param migrationType\r\n\t * @param minimumId Smallest ID in the range (inclusive).\r\n\t * @param maximumId Largest ID in range (exclusive).\r\n\t * @param batchSize\r\n\t * @return\r\n\t */\r\n\tpublic Iterable<MigratableDatabaseObject<?, ?>> streamDatabaseObjects(MigrationType migrationType, Long minimumId,\r\n\t\t\tLong maximumId, Long batchSize);\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the MigratableObjectType from \r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic MigratableDatabaseObject getObjectForType(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The list of primary migration types represents types that either stand-alone or are the owner's of other types.\r\n\t * Migration is driven off this list as secondary types are migrated with their primary owners.\r\n\t * @return\r\n\t */\r\n\tpublic List<MigrationType> getPrimaryMigrationTypes();\r\n\t\r\n\t/**\r\n\t * Run a method with foreign key and uniqueness constraints checks off.\r\n\t * The global state of the database changed to disable checks while the passed callable is running.\r\n\t * The key checking will unconditionally be re-enabled after the callable finishes.\r\n\t * @param call\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;\r\n\t\r\n\t/**\r\n\t * Checks if the migration type has been registered\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic boolean isMigrationTypeRegistered(MigrationType type);\r\n\t\r\n\t/**\r\n\t * List all non-restricted foreign keys in the schema.\r\n\t * @return\r\n\t */\r\n\tpublic List<ForeignKeyInfo> listNonRestrictedForeignKeys();\r\n\r\n\r\n\t/**\r\n\t * Map each secondary table name to all of the table names within its primary group.\r\n\t * Secondary tables can have restricted foreign keys to any table within their primary group.\r\n\t * @return\r\n\t */\r\n\tMap<String, Set<String>> mapSecondaryTablesToPrimaryGroups();\r\n\r\n\t/**\r\n\t * Create or update a batch of database objects\r\n\t * @param batch\r\n\t * @return\r\n\t * @throws Exception \r\n\t */\r\n\tpublic List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);\r\n\r\n\t/**\r\n\t * Delete all rows of the given type and row ID range.\r\n\t * @param type\r\n\t * @param minimumId inclusive\r\n\t * @param maximumId exclusive\r\n\t */\r\n\tpublic int deleteByRange(TypeData type, long minimumId, long maximumId);\r\n\r\n\t/**\r\n\t * Calculate the ID ranges with the optimal number of rows for the given type.\r\n\t * @param migrationType\r\n\t * @param minimumId\r\n\t * @param maximumId\r\n\t * @param optimalNumberOfRows\r\n\t * @return\r\n\t */\r\n\tpublic List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);\r\n\r\n\t/**\r\n\t * Get the SQL used for primary cardinality.\r\n\t * @param node\r\n\t * @return\r\n\t */\r\n\tpublic String getPrimaryCardinalitySql(MigrationType node);\r\n\r\n\t/**\r\n\t * Calculate a batch of checksums for the given type and ID range.\r\n\t * @param request\r\n\t * @return\r\n\t */\r\n\tpublic List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);\r\n\t\r\n\t/**\r\n\t * Get the type data for the given migration type.\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic TypeData getTypeData(MigrationType type);\r\n\r\n}", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}", "public int getJdbcType();", "public void doCreateTable();", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "@Override\n public void createTable() throws Exception {\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "public abstract byte getTableId();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "TableInstance createTableInstance();", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public interface DatabaseAdminRepository\n{\n /**\n * The specified map must contain below keys,\n *\n * key: id\n * key: tableName\n * key: columnIds\n * key: columnValues\n *\n * @param mapParams\n * @return\n */\n Integer insertByMap(Map mapParams);\n\n Integer insertByProps(\n @Param(\"tableName\") String tableName,\n @Param(\"columnIds\") String columnIds,\n @Param(\"columnValues\") String columnValues);\n\n Integer update(\n //@Param(\"tableName\") String tableName,\n //@Param(\"id\") Integer id,\n Map params);\n\n Integer createTableIfNotExist(\n @Param(\"tableName\") String tableName);\n\n Integer addTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnName\") String columnName,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer removeTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId);\n\n Integer delete(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer id);\n\n Integer deleteByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId);\n\n Integer update (\n @Param(\"tableName\") String tableName);\n\n List<Map<String, Object>> getRecordByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId,\n @Param(\"conditionParams\") List<Pair<String, String>> conditionParams);\n\n Map<String, Object> getRecordById(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer recordId);\n\n Integer empty(\n @Param(\"tableName\") String tableName);\n\n Integer updateColumnLength (\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer deleteTable(\n @Param(\"tableName\") String tableName);\n\n}", "public String getTableName() {\n return this.tableName;\n }", "@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "public interface OneTableDMLMapper{\n int insertVaPlatAccInfo(Map<String, Object> map);\n int insertVaPlatInfo(Map<String,Object> map);\n int insertVaPlatVirtualAcctBal(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalSub(Map<String, Object> params);\n int insertVaPlatVirtualAcct(Map<String,Object> params);\n\n int updateVaMerchVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaMerchAccInfo(Map<String, Object> map);\n int insertVaMerchInfo(Map<String,Object> map);\n int insertVaMerchVirtualAcctBal(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalAdd(Map<String, Object> params);\n int insertVaMerchRechargeSeq(Map<String, Object> params);\n int insertVaMerchWithdrawSeq(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalSub(Map<String, Object> params);\n int insertVaMerchVirtualAcct(Map<String,Object> params);\n int dayEndTransferAmtForMerch(Map<String,Object> params);\n int deleteVaMerchAcctInfo(Map<String,Object> params);\n\n\n int updateVaCustVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaCustAccInfo(Map<String, Object> map);\n int insertVaCustInfo(Map<String,Object> map);\n int insertVaCustVirtualAcctBal(Map<String, Object> params);\n int updateVaCustVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaCustVirtualAcctBalSub(Map<String, Object> params);\n int insertVaCustVirtualAcct(Map<String,Object> params);\n int insertVaCustRechargeSeq(Map<String,Object> params);\n int insertVaCustWithdrawSeq(Map<String,Object> params);\n int dayEndTransferAmtForCust(Map<String,Object> params);\n int deleteVaCustAcctInfo(Map<String,Object> params);\n\n int insertCmAcctTranSeq(Map<String,Object> params);\n int updateCmAcctTranSeq(Map<String,Object> params);\n\n int insertCmTranSeq(Map<String,Object> params);\n int updateCmTranSeq(Map<String,Object> params);\n\n int insertVaOrderInfo(Map<String,Object> params);\n int updateVaOrderInfo(Map<String,Object> params);\n int insertVaOrderSeq(Map<String,Object> params);\n\n int insertVaVirAcctSeq(Map<String,Object> params);\n int updateVaVirAcctSeq(Map<String,Object> params);\n int insertVaBindSeq(Map<String,Object> params);\n\n\n int insertVaTransferSeq(Map<String,Object> params);\n int insertTestUser(Map<String,Object> params);\n int updateProduceDay(Map<String,Object> params);\n\n int insertEodProcPrdLog(Map<String,Object> params);\n int insertEodProcLog(Map<String,Object> params);\n int updateEodProcPrdLog(Map<String,Object> params);\n int updateEodProcLog(Map<String,Object> params);\n\n\n\n}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public abstract Statement queryToRetrieveData();", "@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public TableImpl() { columns = new Column[0]; }", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "private String getTableName() {\n return this.tableName;\n }", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}", "public String getTableName() {\n return tableName; \n }", "BSQL2Java2 createBSQL2Java2();", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public void setDbTable(String v) {this.dbTable = v;}", "private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }" ]
[ "0.59743357", "0.59551793", "0.5953946", "0.5948315", "0.5815608", "0.57866806", "0.5743492", "0.57434845", "0.57413363", "0.57276547", "0.57164264", "0.5698415", "0.5684695", "0.56742334", "0.5673265", "0.5657313", "0.56537586", "0.56467736", "0.5635891", "0.5632242", "0.56241137", "0.56232136", "0.56207013", "0.5615621", "0.5607292", "0.56051093", "0.560122", "0.55989575", "0.55989575", "0.55906546", "0.5587427", "0.55830204", "0.5575702", "0.5575414", "0.5565551", "0.5561139", "0.5554712", "0.55441684", "0.5543162", "0.5537628", "0.55133027", "0.55114686", "0.55114686", "0.5506025", "0.5485437", "0.54854333", "0.54777074", "0.5473597", "0.54735357", "0.5472035", "0.5462619", "0.54498726", "0.5445269", "0.54413277", "0.54340655", "0.5433554", "0.5429626", "0.5428245", "0.5425953", "0.5424759", "0.5420752", "0.54143476", "0.5406236", "0.540362", "0.54000425", "0.53938854", "0.53843117", "0.5382401", "0.5377922", "0.5376144", "0.5373521", "0.53716755", "0.53709525", "0.5359391", "0.5355615", "0.5348986", "0.5343794", "0.5339306", "0.53374237", "0.5337036", "0.53365797", "0.53352237", "0.5334058", "0.5333522", "0.53331035", "0.53314745", "0.5329141", "0.53257966", "0.53236663", "0.5321417", "0.5320443", "0.5316201", "0.5312822", "0.5311098", "0.53106314", "0.53090996", "0.53076863", "0.5306761", "0.5300114", "0.5298682", "0.52902704" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table storage
int updateByPrimaryKey(Storage record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract String toSQL();", "public void formDatabaseTable() {\n }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "TableId table();", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "String getTableName();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Repository\npublic interface HeaderHistoryMapper {\n\n @Insert(\"INSERT INTO HeaderHistory VALUES(NULL, #{name}, #{value}, #{resultHistory.id})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n int save(HeaderHistory headerHistory);\n\n @Insert(\"<script>INSERT INTO HeaderHistory(name, value, resultHistoryId) VALUES \"\n + \"<foreach collection='headerHistories' item='headerHistory' separator=','> \"\n + \"(#{headerHistory.name}, #{headerHistory.value}, #{id}) \"\n + \"</foreach></script>\")\n int saveByResultHistory(ResultHistory resultHistory);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE id = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n HeaderHistory load(int id);\n\n @Select(\"SELECT id, name, value FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n @Results({ @Result(id = true, property = \"id\", column = \"id\", jdbcType = JdbcType.INTEGER),\n @Result(property = \"name\", column = \"name\", jdbcType = JdbcType.VARCHAR),\n @Result(property = \"value\", column = \"value\", jdbcType = JdbcType.VARCHAR)\n })\n List<HeaderHistory> loadByResultHistoryId(int id);\n\n @Update(\"UPDATE HeaderHistory SET name = #{name}, value = #{value}, \"\n + \"resultHistoryId = #{resultHistory.id} WHERE id = #{id}\")\n int update(HeaderHistory headerHistory);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE id = #{id}\")\n int delete(int id);\n\n @Delete(\"DELETE FROM HeaderHistory WHERE resultHistoryId = #{id}\")\n int deleteByResultHistoryId(int id);\n}", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "public abstract String doTableConvert(String sql);", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "public Table<Integer, Integer, String> getData();", "@Insert({\n \"insert into SWMS_stock_out_record_detail (stock_out_record_id, stock_out_record_head_id, \",\n \"stock_out_record_head_code, group_name, \",\n \"stock_in_record_account_id, material_code, \",\n \"material_batch, material_type_id, \",\n \"material_sub_type_id, material_workshop_id, \",\n \"material_name_code, material_supplier_code, \",\n \"material_name, bag_num, \",\n \"weight, measure_unit, \",\n \"created_time, completion_flag)\",\n \"values (#{stockOutRecordId,jdbcType=BIGINT}, #{stockOutRecordHeadId,jdbcType=BIGINT}, \",\n \"#{stockOutRecordHeadCode,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, \",\n \"#{stockInRecordAccountId,jdbcType=BIGINT}, #{materialCode,jdbcType=VARCHAR}, \",\n \"#{materialBatch,jdbcType=VARCHAR}, #{materialTypeId,jdbcType=INTEGER}, \",\n \"#{materialSubTypeId,jdbcType=INTEGER}, #{materialWorkshopId,jdbcType=INTEGER}, \",\n \"#{materialNameCode,jdbcType=INTEGER}, #{materialSupplierCode,jdbcType=INTEGER}, \",\n \"#{materialName,jdbcType=VARCHAR}, #{bagNum,jdbcType=INTEGER}, \",\n \"#{weight,jdbcType=REAL}, #{measureUnit,jdbcType=VARCHAR}, \",\n \"#{createdTime,jdbcType=TIMESTAMP}, #{completionFlag,jdbcType=BIT})\"\n })\n @SelectKey(statement=\"SELECT LAST_INSERT_ID()\", keyProperty=\"id\", before=false, resultType=Long.class)\n int insert(SwmsStockOutRecordDetail record);", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface SqliteService {\n\n @TableName(Constants.TABLE_NAME)\n @QUERY\n public ArrayList<SearchHistory> getSearchHistory();\n\n @TableName(Constants.TABLE_NAME)\n @INSERT\n public void addSearchHistory(@Column(name = Constants.SEARCH_STRING) String searchString);\n\n}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO);\n\n int getDeviceNum(String type);\n\n int deviceBindNum(String type);\n}", "public interface MigratableTableDAO extends MigrationTypeProvider {\r\n\t\r\n\t/**\r\n\t * The total number of rows in the table.\r\n\t * @return\r\n\t */\r\n\tpublic long getCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current max(id) for a table\r\n\t */\r\n\tpublic long getMaxId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The current min(id) for a table\r\n\t */\r\n\tpublic long getMinId(MigrationType type);\r\n\t\r\n\t/**\r\n\t * MigrationTypeCount for given migration type\r\n\t */\r\n\tpublic MigrationTypeCount getMigrationTypeCount(MigrationType type);\r\n\t\r\n\t/**\r\n\t * A checksum on etag or id for a range of ids\r\n\t */\r\n\tpublic String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);\r\n\t\r\n\t/**\r\n\t * A table checksum (CHECKSUM TABLE statement)\r\n\t */\r\n\tpublic String getChecksumForType(MigrationType type);\r\n\t\t\r\n\t/**\r\n\t * Stream over all of the database object for the given within the provided ID range.\r\n\t * \r\n\t * @param migrationType\r\n\t * @param minimumId Smallest ID in the range (inclusive).\r\n\t * @param maximumId Largest ID in range (exclusive).\r\n\t * @param batchSize\r\n\t * @return\r\n\t */\r\n\tpublic Iterable<MigratableDatabaseObject<?, ?>> streamDatabaseObjects(MigrationType migrationType, Long minimumId,\r\n\t\t\tLong maximumId, Long batchSize);\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the MigratableObjectType from \r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic MigratableDatabaseObject getObjectForType(MigrationType type);\r\n\t\r\n\t/**\r\n\t * The list of primary migration types represents types that either stand-alone or are the owner's of other types.\r\n\t * Migration is driven off this list as secondary types are migrated with their primary owners.\r\n\t * @return\r\n\t */\r\n\tpublic List<MigrationType> getPrimaryMigrationTypes();\r\n\t\r\n\t/**\r\n\t * Run a method with foreign key and uniqueness constraints checks off.\r\n\t * The global state of the database changed to disable checks while the passed callable is running.\r\n\t * The key checking will unconditionally be re-enabled after the callable finishes.\r\n\t * @param call\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;\r\n\t\r\n\t/**\r\n\t * Checks if the migration type has been registered\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic boolean isMigrationTypeRegistered(MigrationType type);\r\n\t\r\n\t/**\r\n\t * List all non-restricted foreign keys in the schema.\r\n\t * @return\r\n\t */\r\n\tpublic List<ForeignKeyInfo> listNonRestrictedForeignKeys();\r\n\r\n\r\n\t/**\r\n\t * Map each secondary table name to all of the table names within its primary group.\r\n\t * Secondary tables can have restricted foreign keys to any table within their primary group.\r\n\t * @return\r\n\t */\r\n\tMap<String, Set<String>> mapSecondaryTablesToPrimaryGroups();\r\n\r\n\t/**\r\n\t * Create or update a batch of database objects\r\n\t * @param batch\r\n\t * @return\r\n\t * @throws Exception \r\n\t */\r\n\tpublic List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);\r\n\r\n\t/**\r\n\t * Delete all rows of the given type and row ID range.\r\n\t * @param type\r\n\t * @param minimumId inclusive\r\n\t * @param maximumId exclusive\r\n\t */\r\n\tpublic int deleteByRange(TypeData type, long minimumId, long maximumId);\r\n\r\n\t/**\r\n\t * Calculate the ID ranges with the optimal number of rows for the given type.\r\n\t * @param migrationType\r\n\t * @param minimumId\r\n\t * @param maximumId\r\n\t * @param optimalNumberOfRows\r\n\t * @return\r\n\t */\r\n\tpublic List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);\r\n\r\n\t/**\r\n\t * Get the SQL used for primary cardinality.\r\n\t * @param node\r\n\t * @return\r\n\t */\r\n\tpublic String getPrimaryCardinalitySql(MigrationType node);\r\n\r\n\t/**\r\n\t * Calculate a batch of checksums for the given type and ID range.\r\n\t * @param request\r\n\t * @return\r\n\t */\r\n\tpublic List<RangeChecksum> calculateBatchChecksums(BatchChecksumRequest request);\r\n\t\r\n\t/**\r\n\t * Get the type data for the given migration type.\r\n\t * @param type\r\n\t * @return\r\n\t */\r\n\tpublic TypeData getTypeData(MigrationType type);\r\n\r\n}", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}", "public int getJdbcType();", "public void doCreateTable();", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "public interface SQLTransform {\n\n\t/**\n\t * Generate code to put into cursor, the bean property value.\n\t *\n\t * @param tableEntity entity with table to target\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Used when you need to use a cursor column as select's result value. \n\t *\n\t * @param methodBuilder the method builder\n\t * @param daoDefinition the dao definition\n\t * @param paramTypeName the param type name\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName);\n\n\t/**\n\t * Generate default value, null or 0 or ''.\n\t *\n\t * @param methodBuilder the method builder\n\t */\n\tvoid generateDefaultValue(Builder methodBuilder);\n\n\t/**\n\t * Write a bean property to a content writer.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property property to write\n\t */\n\tvoid generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\t\n\t/**\n\t * Write a bean property into a where condition.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanName the bean name\n\t * @param beanClass the bean class\n\t * @param property the property\n\t */\n\tvoid generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);\n\n\t/**\n\t * <p>\n\t * Generate code to write parameter to where condition\n\t * </p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramTypeName the param type name\n\t */\n\tvoid generateWriteParam2WhereCondition(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramTypeName);\n\t\n\t/**\n\t * <p>Generate code to write parameter to where statement</p>.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param method the method\n\t * @param paramName the param name\n\t * @param paramType the param type\n\t * @param property the property\n\t */\n\tvoid generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);\n\n\t/**\n\t * Generate code to set property to null value or default value.\n\t *\n\t * @param methodBuilder the method builder\n\t * @param beanClass the bean class\n\t * @param beanName the bean name\n\t * @param property the property\n\t * @param cursorName the cursor name\n\t * @param indexName the index name\n\t */\n\tvoid generateResetProperty(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);\n\n\t/**\n\t * Associated column type.\n\t *\n\t * @return column type as string\n\t */\n\tString getColumnTypeAsString();\n\n\t/**\n\t * Gets the column type.\n\t *\n\t * @return column type\n\t */\n\tColumnAffinityType getColumnType();\n\t\n\t/**\n\t * if true, transform can be used as convertion type in a type adapter.\n\t *\n\t * @return true, if is type adapter aware\n\t */\n\tboolean isTypeAdapterAware();\n\n}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "@Override\n public void createTable() throws Exception {\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "public abstract byte getTableId();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@SuppressWarnings(\"all\")\npublic interface I_I_BankDataJP \n{\n\n /** TableName=I_BankDataJP */\n public static final String Table_Name = \"I_BankDataJP\";\n\n /** AD_Table_ID=1000307 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Tenant.\n\t * Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_OrgTrx_ID */\n public static final String COLUMNNAME_AD_OrgTrx_ID = \"AD_OrgTrx_ID\";\n\n\t/** Set Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic void setAD_OrgTrx_ID (int AD_OrgTrx_ID);\n\n\t/** Get Trx Organization.\n\t * Performing or initiating organization\n\t */\n\tpublic int getAD_OrgTrx_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within tenant\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name AccountNo */\n public static final String COLUMNNAME_AccountNo = \"AccountNo\";\n\n\t/** Set Account No.\n\t * Account Number\n\t */\n\tpublic void setAccountNo (String AccountNo);\n\n\t/** Get Account No.\n\t * Account Number\n\t */\n\tpublic String getAccountNo();\n\n /** Column name BankAccountType */\n public static final String COLUMNNAME_BankAccountType = \"BankAccountType\";\n\n\t/** Set Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic void setBankAccountType (String BankAccountType);\n\n\t/** Get Bank Account Type.\n\t * Bank Account Type\n\t */\n\tpublic String getBankAccountType();\n\n /** Column name C_BankAccount_ID */\n public static final String COLUMNNAME_C_BankAccount_ID = \"C_BankAccount_ID\";\n\n\t/** Set Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic void setC_BankAccount_ID (int C_BankAccount_ID);\n\n\t/** Get Bank Account.\n\t * Account at the Bank\n\t */\n\tpublic int getC_BankAccount_ID();\n\n\tpublic org.compiere.model.I_C_BankAccount getC_BankAccount() throws RuntimeException;\n\n /** Column name C_Bank_ID */\n public static final String COLUMNNAME_C_Bank_ID = \"C_Bank_ID\";\n\n\t/** Set Bank.\n\t * Bank\n\t */\n\tpublic void setC_Bank_ID (int C_Bank_ID);\n\n\t/** Get Bank.\n\t * Bank\n\t */\n\tpublic int getC_Bank_ID();\n\n\tpublic org.compiere.model.I_C_Bank getC_Bank() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateAcct */\n public static final String COLUMNNAME_DateAcct = \"DateAcct\";\n\n\t/** Set Account Date.\n\t * Accounting Date\n\t */\n\tpublic void setDateAcct (Timestamp DateAcct);\n\n\t/** Get Account Date.\n\t * Accounting Date\n\t */\n\tpublic Timestamp getDateAcct();\n\n /** Column name I_BankDataJP_ID */\n public static final String COLUMNNAME_I_BankDataJP_ID = \"I_BankDataJP_ID\";\n\n\t/** Set I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic void setI_BankDataJP_ID (int I_BankDataJP_ID);\n\n\t/** Get I_BankDataJP.\n\t * JPIERE-0595:JPBP\n\t */\n\tpublic int getI_BankDataJP_ID();\n\n /** Column name I_BankDataJP_UU */\n public static final String COLUMNNAME_I_BankDataJP_UU = \"I_BankDataJP_UU\";\n\n\t/** Set I_BankDataJP_UU\t */\n\tpublic void setI_BankDataJP_UU (String I_BankDataJP_UU);\n\n\t/** Get I_BankDataJP_UU\t */\n\tpublic String getI_BankDataJP_UU();\n\n /** Column name I_ErrorMsg */\n public static final String COLUMNNAME_I_ErrorMsg = \"I_ErrorMsg\";\n\n\t/** Set Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic void setI_ErrorMsg (String I_ErrorMsg);\n\n\t/** Get Import Error Message.\n\t * Messages generated from import process\n\t */\n\tpublic String getI_ErrorMsg();\n\n /** Column name I_IsImported */\n public static final String COLUMNNAME_I_IsImported = \"I_IsImported\";\n\n\t/** Set Imported.\n\t * Has this import been processed\n\t */\n\tpublic void setI_IsImported (boolean I_IsImported);\n\n\t/** Get Imported.\n\t * Has this import been processed\n\t */\n\tpublic boolean isI_IsImported();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name JP_A_Name */\n public static final String COLUMNNAME_JP_A_Name = \"JP_A_Name\";\n\n\t/** Set Account Name\t */\n\tpublic void setJP_A_Name (String JP_A_Name);\n\n\t/** Get Account Name\t */\n\tpublic String getJP_A_Name();\n\n /** Column name JP_A_Name_Kana */\n public static final String COLUMNNAME_JP_A_Name_Kana = \"JP_A_Name_Kana\";\n\n\t/** Set Account Name(Kana)\t */\n\tpublic void setJP_A_Name_Kana (String JP_A_Name_Kana);\n\n\t/** Get Account Name(Kana)\t */\n\tpublic String getJP_A_Name_Kana();\n\n /** Column name JP_AcctDate */\n public static final String COLUMNNAME_JP_AcctDate = \"JP_AcctDate\";\n\n\t/** Set Date of Account Date\t */\n\tpublic void setJP_AcctDate (String JP_AcctDate);\n\n\t/** Get Date of Account Date\t */\n\tpublic String getJP_AcctDate();\n\n /** Column name JP_AcctMonth */\n public static final String COLUMNNAME_JP_AcctMonth = \"JP_AcctMonth\";\n\n\t/** Set Month of Account Date\t */\n\tpublic void setJP_AcctMonth (String JP_AcctMonth);\n\n\t/** Get Month of Account Date\t */\n\tpublic String getJP_AcctMonth();\n\n /** Column name JP_BankAccountType */\n public static final String COLUMNNAME_JP_BankAccountType = \"JP_BankAccountType\";\n\n\t/** Set Bank Account Type\t */\n\tpublic void setJP_BankAccountType (String JP_BankAccountType);\n\n\t/** Get Bank Account Type\t */\n\tpublic String getJP_BankAccountType();\n\n /** Column name JP_BankAccount_Value */\n public static final String COLUMNNAME_JP_BankAccount_Value = \"JP_BankAccount_Value\";\n\n\t/** Set Bank Account(Search Key)\t */\n\tpublic void setJP_BankAccount_Value (String JP_BankAccount_Value);\n\n\t/** Get Bank Account(Search Key)\t */\n\tpublic String getJP_BankAccount_Value();\n\n /** Column name JP_BankDataCustomerCode1 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode1 = \"JP_BankDataCustomerCode1\";\n\n\t/** Set Bank Data Customer Code1\t */\n\tpublic void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);\n\n\t/** Get Bank Data Customer Code1\t */\n\tpublic String getJP_BankDataCustomerCode1();\n\n /** Column name JP_BankDataCustomerCode2 */\n public static final String COLUMNNAME_JP_BankDataCustomerCode2 = \"JP_BankDataCustomerCode2\";\n\n\t/** Set Bank Data Customer Code2\t */\n\tpublic void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);\n\n\t/** Get Bank Data Customer Code2\t */\n\tpublic String getJP_BankDataCustomerCode2();\n\n /** Column name JP_BankDataLine_ID */\n public static final String COLUMNNAME_JP_BankDataLine_ID = \"JP_BankDataLine_ID\";\n\n\t/** Set Import Bank Data Line\t */\n\tpublic void setJP_BankDataLine_ID (int JP_BankDataLine_ID);\n\n\t/** Get Import Bank Data Line\t */\n\tpublic int getJP_BankDataLine_ID();\n\n\tpublic I_JP_BankDataLine getJP_BankDataLine() throws RuntimeException;\n\n /** Column name JP_BankData_EDI_Info */\n public static final String COLUMNNAME_JP_BankData_EDI_Info = \"JP_BankData_EDI_Info\";\n\n\t/** Set BankData EDI Info\t */\n\tpublic void setJP_BankData_EDI_Info (String JP_BankData_EDI_Info);\n\n\t/** Get BankData EDI Info\t */\n\tpublic String getJP_BankData_EDI_Info();\n\n /** Column name JP_BankData_ID */\n public static final String COLUMNNAME_JP_BankData_ID = \"JP_BankData_ID\";\n\n\t/** Set Import Bank Data\t */\n\tpublic void setJP_BankData_ID (int JP_BankData_ID);\n\n\t/** Get Import Bank Data\t */\n\tpublic int getJP_BankData_ID();\n\n\tpublic I_JP_BankData getJP_BankData() throws RuntimeException;\n\n /** Column name JP_BankData_ReferenceNo */\n public static final String COLUMNNAME_JP_BankData_ReferenceNo = \"JP_BankData_ReferenceNo\";\n\n\t/** Set Bank Data ReferenceNo\t */\n\tpublic void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);\n\n\t/** Get Bank Data ReferenceNo\t */\n\tpublic String getJP_BankData_ReferenceNo();\n\n /** Column name JP_BankName_Kana */\n public static final String COLUMNNAME_JP_BankName_Kana = \"JP_BankName_Kana\";\n\n\t/** Set Bank Name(Kana)\t */\n\tpublic void setJP_BankName_Kana (String JP_BankName_Kana);\n\n\t/** Get Bank Name(Kana)\t */\n\tpublic String getJP_BankName_Kana();\n\n /** Column name JP_BankName_Kana_Line */\n public static final String COLUMNNAME_JP_BankName_Kana_Line = \"JP_BankName_Kana_Line\";\n\n\t/** Set Bank Name(Kana) Line\t */\n\tpublic void setJP_BankName_Kana_Line (String JP_BankName_Kana_Line);\n\n\t/** Get Bank Name(Kana) Line\t */\n\tpublic String getJP_BankName_Kana_Line();\n\n /** Column name JP_Bank_Name */\n public static final String COLUMNNAME_JP_Bank_Name = \"JP_Bank_Name\";\n\n\t/** Set Bank Name\t */\n\tpublic void setJP_Bank_Name (String JP_Bank_Name);\n\n\t/** Get Bank Name\t */\n\tpublic String getJP_Bank_Name();\n\n /** Column name JP_BranchCode */\n public static final String COLUMNNAME_JP_BranchCode = \"JP_BranchCode\";\n\n\t/** Set Branch Code\t */\n\tpublic void setJP_BranchCode (String JP_BranchCode);\n\n\t/** Get Branch Code\t */\n\tpublic String getJP_BranchCode();\n\n /** Column name JP_BranchName */\n public static final String COLUMNNAME_JP_BranchName = \"JP_BranchName\";\n\n\t/** Set Branch Name\t */\n\tpublic void setJP_BranchName (String JP_BranchName);\n\n\t/** Get Branch Name\t */\n\tpublic String getJP_BranchName();\n\n /** Column name JP_BranchName_Kana */\n public static final String COLUMNNAME_JP_BranchName_Kana = \"JP_BranchName_Kana\";\n\n\t/** Set Branch Name(Kana)\t */\n\tpublic void setJP_BranchName_Kana (String JP_BranchName_Kana);\n\n\t/** Get Branch Name(Kana)\t */\n\tpublic String getJP_BranchName_Kana();\n\n /** Column name JP_BranchName_Kana_Line */\n public static final String COLUMNNAME_JP_BranchName_Kana_Line = \"JP_BranchName_Kana_Line\";\n\n\t/** Set Branch Name(Kana) Line\t */\n\tpublic void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);\n\n\t/** Get Branch Name(Kana) Line\t */\n\tpublic String getJP_BranchName_Kana_Line();\n\n /** Column name JP_Date */\n public static final String COLUMNNAME_JP_Date = \"JP_Date\";\n\n\t/** Set Date.\n\t * Date\n\t */\n\tpublic void setJP_Date (String JP_Date);\n\n\t/** Get Date.\n\t * Date\n\t */\n\tpublic String getJP_Date();\n\n /** Column name JP_Line_Description */\n public static final String COLUMNNAME_JP_Line_Description = \"JP_Line_Description\";\n\n\t/** Set Line Description\t */\n\tpublic void setJP_Line_Description (String JP_Line_Description);\n\n\t/** Get Line Description\t */\n\tpublic String getJP_Line_Description();\n\n /** Column name JP_Month */\n public static final String COLUMNNAME_JP_Month = \"JP_Month\";\n\n\t/** Set Month\t */\n\tpublic void setJP_Month (String JP_Month);\n\n\t/** Get Month\t */\n\tpublic String getJP_Month();\n\n /** Column name JP_OrgTrx_Value */\n public static final String COLUMNNAME_JP_OrgTrx_Value = \"JP_OrgTrx_Value\";\n\n\t/** Set Trx Organization(Search Key)\t */\n\tpublic void setJP_OrgTrx_Value (String JP_OrgTrx_Value);\n\n\t/** Get Trx Organization(Search Key)\t */\n\tpublic String getJP_OrgTrx_Value();\n\n /** Column name JP_Org_Value */\n public static final String COLUMNNAME_JP_Org_Value = \"JP_Org_Value\";\n\n\t/** Set Organization(Search Key)\t */\n\tpublic void setJP_Org_Value (String JP_Org_Value);\n\n\t/** Get Organization(Search Key)\t */\n\tpublic String getJP_Org_Value();\n\n /** Column name JP_RequesterName */\n public static final String COLUMNNAME_JP_RequesterName = \"JP_RequesterName\";\n\n\t/** Set Requester Name\t */\n\tpublic void setJP_RequesterName (String JP_RequesterName);\n\n\t/** Get Requester Name\t */\n\tpublic String getJP_RequesterName();\n\n /** Column name JP_SalesRep_EMail */\n public static final String COLUMNNAME_JP_SalesRep_EMail = \"JP_SalesRep_EMail\";\n\n\t/** Set Sales Rep(E-Mail)\t */\n\tpublic void setJP_SalesRep_EMail (String JP_SalesRep_EMail);\n\n\t/** Get Sales Rep(E-Mail)\t */\n\tpublic String getJP_SalesRep_EMail();\n\n /** Column name JP_SalesRep_Name */\n public static final String COLUMNNAME_JP_SalesRep_Name = \"JP_SalesRep_Name\";\n\n\t/** Set Sales Rep(Name)\t */\n\tpublic void setJP_SalesRep_Name (String JP_SalesRep_Name);\n\n\t/** Get Sales Rep(Name)\t */\n\tpublic String getJP_SalesRep_Name();\n\n /** Column name JP_SalesRep_Value */\n public static final String COLUMNNAME_JP_SalesRep_Value = \"JP_SalesRep_Value\";\n\n\t/** Set Sales Rep(Search Key)\t */\n\tpublic void setJP_SalesRep_Value (String JP_SalesRep_Value);\n\n\t/** Get Sales Rep(Search Key)\t */\n\tpublic String getJP_SalesRep_Value();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name Processing */\n public static final String COLUMNNAME_Processing = \"Processing\";\n\n\t/** Set Process Now\t */\n\tpublic void setProcessing (boolean Processing);\n\n\t/** Get Process Now\t */\n\tpublic boolean isProcessing();\n\n /** Column name RoutingNo */\n public static final String COLUMNNAME_RoutingNo = \"RoutingNo\";\n\n\t/** Set Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic void setRoutingNo (String RoutingNo);\n\n\t/** Get Routing No.\n\t * Bank Routing Number\n\t */\n\tpublic String getRoutingNo();\n\n /** Column name SalesRep_ID */\n public static final String COLUMNNAME_SalesRep_ID = \"SalesRep_ID\";\n\n\t/** Set Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic void setSalesRep_ID (int SalesRep_ID);\n\n\t/** Get Sales Rep.\n\t * Sales Representative or Company Agent\n\t */\n\tpublic int getSalesRep_ID();\n\n\tpublic org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;\n\n /** Column name StatementDate */\n public static final String COLUMNNAME_StatementDate = \"StatementDate\";\n\n\t/** Set Statement date.\n\t * Date of the statement\n\t */\n\tpublic void setStatementDate (Timestamp StatementDate);\n\n\t/** Get Statement date.\n\t * Date of the statement\n\t */\n\tpublic Timestamp getStatementDate();\n\n /** Column name StmtAmt */\n public static final String COLUMNNAME_StmtAmt = \"StmtAmt\";\n\n\t/** Set Statement amount.\n\t * Statement Amount\n\t */\n\tpublic void setStmtAmt (BigDecimal StmtAmt);\n\n\t/** Get Statement amount.\n\t * Statement Amount\n\t */\n\tpublic BigDecimal getStmtAmt();\n\n /** Column name TrxAmt */\n public static final String COLUMNNAME_TrxAmt = \"TrxAmt\";\n\n\t/** Set Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic void setTrxAmt (BigDecimal TrxAmt);\n\n\t/** Get Transaction Amount.\n\t * Amount of a transaction\n\t */\n\tpublic BigDecimal getTrxAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "TableInstance createTableInstance();", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface RoleMapper extends RoleDao {\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE id = #{id}\")\n Role getRole(int id);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role WHERE name = #{name}\")\n Role getRoleByName(String name);\n\n @Override\n @ResultType(Role.class)\n @Select(\"SELECT * FROM role ORDER BY name\")\n List<Role> getAllRoles();\n\n @Override\n @Insert(\"INSERT INTO role (name) VALUES(#{name})\")\n @Options(useGeneratedKeys = true)\n void addRole(Role role);\n\n @Override\n @Delete(\"DELETE FROM role WHERE id =#{id}\")\n void removeRole(Role role);\n}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public interface DatabaseAdminRepository\n{\n /**\n * The specified map must contain below keys,\n *\n * key: id\n * key: tableName\n * key: columnIds\n * key: columnValues\n *\n * @param mapParams\n * @return\n */\n Integer insertByMap(Map mapParams);\n\n Integer insertByProps(\n @Param(\"tableName\") String tableName,\n @Param(\"columnIds\") String columnIds,\n @Param(\"columnValues\") String columnValues);\n\n Integer update(\n //@Param(\"tableName\") String tableName,\n //@Param(\"id\") Integer id,\n Map params);\n\n Integer createTableIfNotExist(\n @Param(\"tableName\") String tableName);\n\n Integer addTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnName\") String columnName,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer removeTableColumn(\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId);\n\n Integer delete(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer id);\n\n Integer deleteByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId);\n\n Integer update (\n @Param(\"tableName\") String tableName);\n\n List<Map<String, Object>> getRecordByCategory(\n @Param(\"tableName\") String tableName,\n @Param(\"categoryId\") Integer categoryId,\n @Param(\"conditionParams\") List<Pair<String, String>> conditionParams);\n\n Map<String, Object> getRecordById(\n @Param(\"tableName\") String tableName,\n @Param(\"id\") Integer recordId);\n\n Integer empty(\n @Param(\"tableName\") String tableName);\n\n Integer updateColumnLength (\n @Param(\"tableName\") String tableName,\n @Param(\"columnId\") String columnId,\n @Param(\"columnLength\") Integer columnLength);\n\n Integer deleteTable(\n @Param(\"tableName\") String tableName);\n\n}", "public String getTableName() {\n return this.tableName;\n }", "@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}", "@Override\r\n\t\tpublic SQLXML createSQLXML() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@MapperScan\npublic interface DSSettingMapper {\n\n @Insert(\"INSERT INTO ds_setting (dsId, dsAppointment2,dsAppointment3,outCoachIds,status,modifyTime)\" +\n \" VALUES(#{dsId},#{dsAppointment2},#{dsAppointment3},#{outCoachIds},#{status},NOW())\")\n int insertDssetting(DSSetting dsSetting);\n\n @Update(\"UPDATE ds_setting SET dsAppointment2 = #{dsAppointment2},\" +\n \" dsAppointment3 = #{dsAppointment3}, outCoachIds = #{outCoachIds}, \" +\n \"status = #{status}, modifyTime = NOW() \" +\n \"WHERE dsId = #{dsId}\")\n int updateDssetting(DSSetting dsSetting);\n\n @Select(\"SELECT * FROM ds_setting WHERE dsId = #{dsId}\")\n DSSetting findOneDSSetting(@Param(\"dsId\") Long dsId);\n}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "public interface OneTableDMLMapper{\n int insertVaPlatAccInfo(Map<String, Object> map);\n int insertVaPlatInfo(Map<String,Object> map);\n int insertVaPlatVirtualAcctBal(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaPlatVirtualAcctBalSub(Map<String, Object> params);\n int insertVaPlatVirtualAcct(Map<String,Object> params);\n\n int updateVaMerchVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaMerchAccInfo(Map<String, Object> map);\n int insertVaMerchInfo(Map<String,Object> map);\n int insertVaMerchVirtualAcctBal(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalAdd(Map<String, Object> params);\n int insertVaMerchRechargeSeq(Map<String, Object> params);\n int insertVaMerchWithdrawSeq(Map<String, Object> params);\n int updateVaMerchVirtualAcctBalSub(Map<String, Object> params);\n int insertVaMerchVirtualAcct(Map<String,Object> params);\n int dayEndTransferAmtForMerch(Map<String,Object> params);\n int deleteVaMerchAcctInfo(Map<String,Object> params);\n\n\n int updateVaCustVirtualAcctBalAddForRefund(Map<String, Object> map);\n int insertVaCustAccInfo(Map<String, Object> map);\n int insertVaCustInfo(Map<String,Object> map);\n int insertVaCustVirtualAcctBal(Map<String, Object> params);\n int updateVaCustVirtualAcctBalAdd(Map<String, Object> params);\n int updateVaCustVirtualAcctBalSub(Map<String, Object> params);\n int insertVaCustVirtualAcct(Map<String,Object> params);\n int insertVaCustRechargeSeq(Map<String,Object> params);\n int insertVaCustWithdrawSeq(Map<String,Object> params);\n int dayEndTransferAmtForCust(Map<String,Object> params);\n int deleteVaCustAcctInfo(Map<String,Object> params);\n\n int insertCmAcctTranSeq(Map<String,Object> params);\n int updateCmAcctTranSeq(Map<String,Object> params);\n\n int insertCmTranSeq(Map<String,Object> params);\n int updateCmTranSeq(Map<String,Object> params);\n\n int insertVaOrderInfo(Map<String,Object> params);\n int updateVaOrderInfo(Map<String,Object> params);\n int insertVaOrderSeq(Map<String,Object> params);\n\n int insertVaVirAcctSeq(Map<String,Object> params);\n int updateVaVirAcctSeq(Map<String,Object> params);\n int insertVaBindSeq(Map<String,Object> params);\n\n\n int insertVaTransferSeq(Map<String,Object> params);\n int insertTestUser(Map<String,Object> params);\n int updateProduceDay(Map<String,Object> params);\n\n int insertEodProcPrdLog(Map<String,Object> params);\n int insertEodProcLog(Map<String,Object> params);\n int updateEodProcPrdLog(Map<String,Object> params);\n int updateEodProcLog(Map<String,Object> params);\n\n\n\n}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public abstract Statement queryToRetrieveData();", "@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public TableImpl() { columns = new Column[0]; }", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Mapper\npublic interface CivilizationIndexMapper {\n\n @Insert(\"insert into t_timezerg_civilization_index values (#{id},#{cid},#{cdate})\")\n int add(CivilizationIndex civilizationIndex);\n\n @Delete(\"delete from t_timezerg_civilization_index where id = #{id}\")\n void delete(String id);\n\n @Select(\"select * from t_timezerg_civilization_index where cid = #{cid}\")\n CivilizationIndex selectByCid(String cid);\n\n @Select(\"select * from t_timezerg_civilization_index where id = #{id}\")\n CivilizationIndex selectById(String id);\n\n @Select(\"select ci.*,c.title from t_timezerg_civilization_index ci left join t_timezerg_civilization c on c.id = ci.cid order by ci.cdate desc\")\n List<HashMap> selectList();\n\n}", "@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "private String getTableName() {\n return this.tableName;\n }", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public static void createTableDefinition() throws Exception{\n\n if(OBJECT.isAnnotationPresent(Table.class)){\n Annotation annotation = OBJECT.getAnnotation(Table.class);\n Method method = annotation.getClass().getMethod(\"name\");\n Object object = method.invoke(annotation);\n\n TABLE_NAME = object.toString().toUpperCase();\n\n CREATE_STATEMENT = new StringBuilder();\n FOREIGN_KEY = new StringBuilder();\n COLUMNS = new StringBuilder();\n LIST_FIELD_MODEL = new ArrayList<FieldModel>();\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Table not declared in class \"+OBJECT.getSimpleName());\n }\n\n\n FIELD_DEFINITION = OBJECT.getDeclaredFields();\n\n ARRAY_COLUMNS = new String[FIELD_DEFINITION.length];\n\n for (int i = 0; i < FIELD_DEFINITION.length ; i++){\n Field field = FIELD_DEFINITION[i];\n Annotation annotation = null;\n Method methodName = null;\n Method methodSize = null;\n Object objectName = null;\n Object sizeField = null;\n String type;\n String primaryKeyText = \"\";\n\n\n if(field.isAnnotationPresent(Column.class)){\n annotation = field.getAnnotation(Column.class);\n methodName = annotation.getClass().getMethod(\"name\");\n methodSize = annotation.getClass().getMethod(\"size\");\n sizeField = methodSize.invoke(annotation);\n objectName = methodName.invoke(annotation);\n if(objectName == null || objectName.toString() == \"\"){\n objectName = field.getName();\n }\n\n\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Annotation @Column not declared in the field --> \"+field.getName());\n }\n\n if(field.isAnnotationPresent(PrimaryKey.class)){\n PK = objectName.toString();\n\n Annotation pKey_annotation = field.getAnnotation(PrimaryKey.class);\n Method pkey_methodAutoIncrement = pKey_annotation.getClass().getMethod(\"autoIncrement\");\n Object pkey_autoIncrement = pkey_methodAutoIncrement.invoke(pKey_annotation);\n\n primaryKeyText = \" PRIMARY KEY \";\n\n if(Boolean.valueOf(pkey_autoIncrement.toString())){\n primaryKeyText = primaryKeyText + \" AUTOINCREMENT \";\n }\n\n }\n if(field.isAnnotationPresent(Codigo.class)){\n setCOD(objectName.toString());\n }\n if(field.isAnnotationPresent(ForeignKey.class)){\n Annotation fkey_annotation = field.getAnnotation(ForeignKey.class);\n Method fkey_methodTableReference = fkey_annotation.getClass().getMethod(\"tableReference\");\n Object fkey_tableReferenceName = fkey_methodTableReference.invoke(fkey_annotation);\n\n Method fkey_methodOnUpCascade = fkey_annotation.getClass().getMethod(\"onUpdateCascade\");\n Object fkey_OnUpCascadeValue = fkey_methodOnUpCascade.invoke(fkey_annotation);\n\n Method fkey_methodOnDelCascade = fkey_annotation.getClass().getMethod(\"onDeleteCascade\");\n Object fkey_OnDelCascadeValue = fkey_methodOnDelCascade.invoke(fkey_annotation);\n\n Method fkey_methodColumnReference = fkey_annotation.getClass().getMethod(\"columnReference\");\n Object fkey_columnReference = fkey_methodColumnReference.invoke(fkey_annotation);\n\n String columnReference = fkey_columnReference.toString();\n if(columnReference == \"\"){\n columnReference = \"_id\";\n }\n\n FOREIGN_KEY.append(\", FOREIGN KEY (\"+objectName.toString()+\") REFERENCES \"+fkey_tableReferenceName.toString().toUpperCase()+\" (\"+columnReference+\")\");\n\n if(Boolean.valueOf(fkey_OnUpCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON UPDATE CASCADE \");\n }\n if(Boolean.valueOf(fkey_OnDelCascadeValue.toString())){\n FOREIGN_KEY.append(\" ON DELETE CASCADE \");\n }\n\n\n }\n\n\n if(field.getType() == int.class || field.getType() == Integer.class || field.getType() == Long.class || field.getType() == long.class){\n type = \" INTEGER \";\n }else\tif(field.getType() == String.class || field.getType() == char.class ){\n type = \" TEXT \";\n }else\tif(field.getType() == Double.class || field.getType() == Float.class || field.getType() == double.class){\n type = \" REAL \";\n }else if(field.getType() == BigDecimal.class){\n type = \" REAL \";\n }else if(field.getType() == Date.class){\n type = \" TIMESTAMP \";\n }\n else if(field.getType() == java.sql.Timestamp.class){\n type = \" TIMESTAMP \";\n }else if(field.getType() == Boolean.class || field.getType() == boolean.class){\n type = \" BOOLEAN \";\n }else{\n type = \" NONE \";\n }\n if(!sizeField.equals(\"\") ){\n type = type+\"(\"+sizeField.toString()+\") \";\n setSIZE(Integer.parseInt(sizeField.toString()));\n }\n // Log.d(\"afalOG\", \"TAMANHO\" + type+sizeField.toString());\n if(i == FIELD_DEFINITION.length-1){\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText);\n COLUMNS.append(objectName.toString());\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }else{\n if(objectName != null){\n CREATE_STATEMENT.append(objectName.toString()+\" \"+type+primaryKeyText+\", \");\n COLUMNS.append(objectName.toString()+\" , \");\n }else{\n CREATE_STATEMENT = null;\n throw new Exception(\"Property 'name' not declared in the field --> \"+field.getName());\n }\n }\n ARRAY_COLUMNS[i] = objectName.toString();\n if(! primaryKeyText.contains(\"AUTOINCREMENT\")){\n FieldModel fieldModel = new FieldModel();\n fieldModel.setColumnName(objectName.toString());\n fieldModel.setFieldName(field.getName());\n LIST_FIELD_MODEL.add(fieldModel);\n }\n }\n\n if(FOREIGN_KEY.toString() != \"\"){\n CREATE_STATEMENT.append(FOREIGN_KEY);\n }\n CREATE_STATEMENT.append(\");\");\n\n\n if(getPK() == \"\"){\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(BaseColumns._ID +\" INTEGER PRIMARY KEY AUTOINCREMENT, \" );\n sb.append(CREATE_STATEMENT);\n\n String[] columns = new String[ARRAY_COLUMNS.length+1];\n columns[0] = BaseColumns._ID;\n for(int i = 0; i < ARRAY_COLUMNS.length; i++){\n columns[i+1] = ARRAY_COLUMNS[i];\n }\n\n ARRAY_COLUMNS = columns;\n\n CREATE_STATEMENT = sb;\n }else{\n StringBuilder sb = new StringBuilder();\n sb.append(\"CREATE TABLE \" + TABLE_NAME + \" (\");\n sb.append(CREATE_STATEMENT);\n\n CREATE_STATEMENT = sb;\n }\n }", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}", "public String getTableName() {\n return tableName; \n }", "BSQL2Java2 createBSQL2Java2();", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public void setDbTable(String v) {this.dbTable = v;}", "private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }" ]
[ "0.59743357", "0.59551793", "0.5953946", "0.5948315", "0.5815608", "0.57866806", "0.5743492", "0.57434845", "0.57413363", "0.57276547", "0.57164264", "0.5698415", "0.5684695", "0.56742334", "0.5673265", "0.5657313", "0.56537586", "0.56467736", "0.5635891", "0.5632242", "0.56241137", "0.56232136", "0.56207013", "0.5615621", "0.5607292", "0.56051093", "0.560122", "0.55989575", "0.55989575", "0.55906546", "0.5587427", "0.55830204", "0.5575702", "0.5575414", "0.5565551", "0.5561139", "0.5554712", "0.55441684", "0.5543162", "0.5537628", "0.55133027", "0.55114686", "0.55114686", "0.5506025", "0.5485437", "0.54854333", "0.54777074", "0.5473597", "0.54735357", "0.5472035", "0.5462619", "0.54498726", "0.5445269", "0.54413277", "0.54340655", "0.5433554", "0.5429626", "0.5428245", "0.5425953", "0.5424759", "0.5420752", "0.54143476", "0.5406236", "0.540362", "0.54000425", "0.53938854", "0.53843117", "0.5382401", "0.5377922", "0.5376144", "0.5373521", "0.53716755", "0.53709525", "0.5359391", "0.5355615", "0.5348986", "0.5343794", "0.5339306", "0.53374237", "0.5337036", "0.53365797", "0.53352237", "0.5334058", "0.5333522", "0.53331035", "0.53314745", "0.5329141", "0.53257966", "0.53236663", "0.5321417", "0.5320443", "0.5316201", "0.5312822", "0.5311098", "0.53106314", "0.53090996", "0.53076863", "0.5306761", "0.5300114", "0.5298682", "0.52902704" ]
0.0
-1
year do boundschecking to ensure object represents a valid date
public Group3Date(int month, int day, int year) { if (!isValid(month, day, year)) throw new Error("Invalid date"); this.month = month; this.day = day; this.year = year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectYear() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/1700\");\r\n }", "@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }", "private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }", "@Test\n public void isLeapYearOk(){\n assertTrue(Date.isLeapYear(2008));\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectLeapYear() {\r\n SimpleDate d1 = new SimpleDate(\"2/29/2000\");\r\n }", "@Test\n public void isLeapYear() {\n assertFalse(Deadline.isLeapYear(Integer.parseInt(VALID_YEAR_2018)));\n\n // Valid leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2020)));\n\n // Valid year divisible by 4 but is common year -> returns false\n assertFalse(Deadline.isLeapYear(Integer.parseInt(NON_LEAP_YEAR_2100)));\n\n // Valid year divisible by 100 but is leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2400)));\n }", "@Test\n public void test7() {\n boolean res = object.checkLeapYear(1900);\n assertEquals(false, res);\n }", "void testDateSetYear(java.util.Date date, boolean validate) {\n if (date instanceof java.sql.Time) { return; } // java.sql.Time throws IllegalArgumentException in setYear().\n \n if (validate) {\n assertEqualDate(createDate(\"Feb 20, 1999\"), date);\n } else {\n synchronized (date) {\n date.setYear(99);\n }\n }\n }", "public boolean LeapYearValidation(int year) {\r\n\t\tif (year >= 1582 && year <= 9999)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\r\n\t}", "public boolean isDate (int year, int doy)\n {\n return ((year >= FIRST_YEAR)\n && (1 <= doy && doy <= getLengthOfYear (year)));\n }", "public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}", "public void setYear(int year) throws InvalidDateException {\r\n\t\tif (year <= 2100 & year >= 2000) {\r\n\t\t\tthis.year = year;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic year for the date (between 2000 and 2100) !\");\r\n\t\t}\r\n\t}", "protected void checkMappingReleaseYear(RecordUrlData record) {\n checkMainMapping(record, RECORD_FACTORY.getMappingReleaseYear(record));\n }", "private void checkYearDeviation() {\n val yearDeviation = config.getInt(\"year_deviation\");\n\n checkArgument(yearDeviation > 0, \"year_deviation is less than or equal to 0!\");\n }", "@Test\n public void checkLeapYearCriteria() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItLeapYear(1600);\n assertTrue(flag);\n }", "@Test\n public void test6() {\n boolean res = object.checkLeapYear(-400);\n assertEquals(false, res);\n }", "@Test\n public void test1() {\n boolean res = object.checkLeapYear(0);\n assertEquals(false, res);\n }", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "@Test\n\tpublic void parseDateTextFieldYearTest() {\n\t\tassertEquals(2016,\n\t\t\t\tInteger.parseInt(textFieldDate.getText().substring(0, 4)));\n\t}", "Year createYear();", "abstract void birthDateValidity();", "private boolean leapyear(int yr){\n if(yr%4 == 0 && yr%100 != 0){ //If year is divisible by 4 but not by 100\r\n days[1] = 29; //Set February's days to 29\r\n return true; //Retrn true.\r\n }\r\n return false; //Otherwise, return false.\r\n }", "@Test\r\n\tpublic void test_leap_five(){\r\n\t\tLeapYear year1555 = new LeapYear(1555);\r\n\t\tLeapYear year2135 = new LeapYear(2135);\r\n\t\tassertFalse(year1555.isLeapYear());\r\n\t\tassertFalse(year2135.isLeapYear());\r\n\t}", "@Test\r\n\tpublic void test_leap_zero() {\r\n\t\tLeapYear year1940 = new LeapYear(1940);\r\n\t\tLeapYear year2080 = new LeapYear(2080);\r\n\t\tassertTrue(year1940.isLeapYear());\r\n\t\tassertTrue(year2080.isLeapYear());\r\n\r\n\t}", "boolean isValidFor (@Nonnull DATATYPE aDate);", "@Test\r\n\tpublic void testYOBValid() {\r\n\t\tassertTrue(Activity5Query.isYOBCorrect(1880));\r\n\t\tassertTrue(Activity5Query.isYOBCorrect(2019));\r\n\t\tassertTrue(Activity5Query.isYOBCorrect(2018));\r\n\t\tassertTrue(Activity5Query.isYOBCorrect(1881));\r\n\t\tassertTrue(Activity5Query.isYOBCorrect(1960));\r\n\t\t\r\n\t}", "@Test\n public void test8() {\n boolean res = object.checkLeapYear(2000);\n assertEquals(true, res);\n }", "@Test\n\tpublic void testCreatePastCarYear() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = \"black\";\n\t\tint _year = 1800;\n\n\t\t// ---------------------------------------------\n\t\t// Creating past year.\n\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\t}", "public static boolean esAnoBisiesto(int year) {\r\n\t\t assert year >= 1583; // not valid before this date.\r\n\t\t return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);\r\n\t}", "private boolean isCurrentYear(Date date) {\n boolean result = false;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n Calendar today = Calendar.getInstance();\n if (today.get(Calendar.YEAR) == calendar.get(Calendar.YEAR)) {\n result = true;\n }\n return result;\n }", "public void testCtor() {\r\n assertNotNull(\"Failed to create a new Year instance.\", new Year());\r\n }", "@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }", "@Test\n public void leapYearIsDivisibleBy4(){\n int year = 2020;\n assertTrue(LeapYear.isLeapYear(year));\n }", "private boolean checkValidDate(String inputDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n date.setLenient(false);\n try {\n date.parse(inputDate);\n return true;\n } catch (ParseException e) {\n return false;\n }\n }", "public boolean setYear(int newYear, boolean check) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\tif (check) {\n\t\t\tdouble oldMonth = this.month;\n\t\t\tdouble oldDay = this.day;\n\t\t\tIDate dt = swe_revjul(this.jd, this.calType); // -> erzeugt neues\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Datum\n\t\t\tthis.year = dt.year;\n\t\t\tthis.month = dt.month;\n\t\t\tthis.day = dt.day;\n\t\t\tthis.hour = dt.hour;\n\t\t\treturn (this.year == newYear && this.month == oldMonth && this.day == oldDay);\n\t\t}\n\t\treturn true;\n\t}", "@Property\n void centurialNonLeapYearTest(@ForAll(\"centurialNonLeapYears\") int year){\n assertThat(!ly.isLeapYear(year));\n }", "public void setYear(int year){\r\n\t\ttry{\r\n\t\t\tif(year>=1900)\r\n\t\t\tthis.year = year;\r\n\t\t\telse\r\n\t\t\t\tthrow new cardYearException();\r\n\t\t}catch(cardYearException ex){\r\n\t\t\tSystem.out.println(\"Baseball Cards weren't invented \"\r\n\t\t\t\t\t+ \"before 1900!\");\r\n\t\t\tSystem.out.print(\"Please enter a valid year: \");\r\n\t\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\tint retry = input.nextInt();\r\n\t\t\t\tsetYear(retry);\r\n\t\t}\r\n\t}", "public void setYear(int _year) { year = _year; }", "@Property\n void nonCenturialLeapYearTest(@ForAll(\"nonCenturialLeapYears\") int year){\n assertThat(ly.isLeapYear(year));\n }", "public static boolean isValid (int yyyy, int mm, int dd)\n {\n // null date 0000 00 00 is considered valid\n // but otherwise year 0000 never happened.\n if ( yyyy == 0 ) return(mm == 0) && (dd == 0);\n if ( (yyyy < MIN_YEAR) || (yyyy > MAX_YEAR)\n || (mm < 1) || (mm > 12)\n || (dd < 1) || (dd > 31) ) return false;\n // account for missing 10 days in 1582.\n // Thursday 1582 October 4 Julian was followed\n // immediately by Friday 1582 October 15\n // Similarly for the British Calendar\n if ( yyyy == OJC_lastYYYY\n && mm == OJC_lastMM\n && OJC_lastDD < dd\n && dd < GC_firstDD )\n return false;\n return dd <= daysInMonth(mm, yyyy);\n }", "public boolean isSupportYear() {\r\n return true;\r\n }", "public boolean checkDate(int year, int month, int day) {\n\t\tboolean cd = checkDate(year, month, day, 0.0);\n\t\treturn cd;\n\t}", "public boolean setYear(int newYear) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\treturn true;\n\t}", "protected final void normalise()\n {\n // yyyy, mm, dd must be set at this point\n if ( isValid(yyyy,mm,dd) ) return;\n else if ( mm > 12 )\n {\n yyyy += (mm-1) / 12;\n mm = ((mm-1) % 12) + 1;\n if ( isValid(yyyy,mm,dd) ) return;\n }\n else if ( mm <= 0 )\n {\n // Java's definition of modulus means we need to handle negatives as a special case.\n yyyy -= -mm / 12 + 1;\n mm = 12 - (-mm % 12);\n if ( isValid(yyyy,mm,dd) ) return;\n }\n if ( isValid(yyyy,mm,01) )\n {\n int olddd = dd;\n dd = 1;\n toOrdinal();\n ordinal += olddd - 1;\n toGregorian();\n if ( isValid(yyyy,mm,dd) ) return;\n }\n\n throw new IllegalArgumentException(\"date cannot be normalised: \"\n + yyyy + \"/\" + mm + \"/\" + dd);\n\n }", "@Property\n void nonCenturialNonLeapyearTest(@ForAll(\"nonCenturialNonLeapyears\") int year){\n assertThat(!ly.isLeapYear(year));\n }", "private static boolean isLeapYear(int y) {\n\t\t\tif (y % 400 == 0) return true;\n\t\t\tif (y % 100 == 0) return false;\n\t\t\treturn y % 4 == 0;\n\t\t}", "private static boolean isLeapYear(int y) {\n if (y % 400 == 0) return true;\n if (y % 100 == 0) return false;\n return y % 4 == 0;\n }", "private static boolean isLeapYear(int y) {\r\n\t\tif (y % 400 == 0)\r\n\t\t\treturn true;\r\n\t\tif (y % 100 == 0)\r\n\t\t\treturn false;\r\n\t\treturn (y % 4 == 0);\r\n\t}", "public ConcreteYear(int year) {\r\n if (year > 0) {\r\n this.year = year;\r\n }\r\n }", "@Test\n public void test_MinguoDate_range_yeaOfEra() {\n assertEquals(ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND),\n MinguoDate.of(1, 1, 1).range(ChronoField.YEAR_OF_ERA));\n assertEquals(ValueRange.of(1, -ChronoField.YEAR.range().getMinimum() + 1 + YEARS_BEHIND),\n MinguoDate.of(-1, 1, 1).range(ChronoField.YEAR_OF_ERA));\n }", "private int restrictYear(Message msg, String parameter, int section) {\n int[] years = setYearRestriction(msg, parameter, section);\n\n if (years[0] == ERROR_CODE[0]) {\n return -1;\n }\n\n yearRestriction = true;\n lowerYear = years[0];\n upperYear = years[1];\n return 0;\n }", "void birthDateValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setBirthdate(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }", "private void checkDate(String strDate, LocalDate localDate) {\n if (Integer.parseInt(strDate.substring(0, 4)) != localDate.getYear()\n || Integer.parseInt(strDate.substring(5, 7)) != localDate.getMonthValue()\n || Integer.parseInt(strDate.substring(8,10)) != localDate.getDayOfMonth()) {\n throw new IllegalArgumentException(\"Illegal date: date dose not exist.\");\n }\n }", "@Test\n public void isNumeric() {\n assertTrue(Deadline.isNumeric(VALID_YEAR_2018));\n\n //contains other symbols -> false\n assertFalse(Deadline.isNumeric(INVALID_YEAR_WITH_SYMBOLS));\n\n //contains alphabets -> false\n assertFalse(Deadline.isNumeric(INVALID_YEAR_WITH_ALPHABETS));\n\n //contains space -> false\n assertFalse(Deadline.isNumeric(INVALID_YEAR_WITH_SPACE));\n }", "public boolean isLeapYear(){\n\t if (((this.year % 4 == 0) && (this.year % 100 != 0)) || (this.year %400 == 0))\n\t return true;\n\treturn false;\n }", "@Test public void Year_0__month__day()\t\t\t\t\t\t\t{tst_date_(\"2001-03-31\"\t\t\t\t, \"2001-03-31\");}", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }", "public void test_compareAsYear_basic() {\n // ## Arrange ##\n String fromRes = \"2008-09-14 12:34:56\";\n String toRes = \"2008-11-18 18:34:56\";\n FromToOption option = createOption();\n\n // ## Act ##\n option.compareAsYear();\n Date fromDate = option.filterFromDate(DfTypeUtil.toDate(fromRes));\n Date toDate = option.filterToDate(DfTypeUtil.toDate(toRes));\n\n // ## Assert ##\n assertEquals(ConditionKey.CK_GREATER_EQUAL, option.getFromDateConditionKey());\n assertEquals(ConditionKey.CK_LESS_THAN, option.getToDateConditionKey());\n assertEquals(\"2008-01-01 00:00:00\", DfTypeUtil.toString(fromDate, \"yyyy-MM-dd HH:mm:ss\"));\n assertEquals(\"2009-01-01 00:00:00\", DfTypeUtil.toString(toDate, \"yyyy-MM-dd HH:mm:ss\"));\n }", "private boolean leap(int year) {\n\t\tif (!(year % 4 == 0)) {\n\t\t\treturn false;\n\t\t} else if (!(year % 100 == 0)) {\n\t\t\treturn true;\n\t\t} else if (!(year % 400 == 0)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private static boolean isLeapYear(int year)\n\t{\n \t if ((year % 4 == 0) && (year % 100 != 0)) return true;\n\t\t if (year % 400 == 0) return true;\n\t\t return true;\n }", "public boolean isLeapYear(int year){\r\n if(year%4 != 0){\r\n return false;\r\n } else if(year%100 == 0){\r\n if(year%400 != 0) return false; \r\n }\r\n return true;\r\n }", "private static boolean isDate(final Object obj) {\n return dateClass != null && dateClass.isAssignableFrom(obj.getClass());\n }", "public DateValidator(Integer Day,Integer Month,Integer Year) throws InvalidDateException\n\t{\n\t\t\n\t\t\tiDay = Day;\n\t\t\tiMonth = Month;\n\t\t\tiYear = Year;\n\t\t\t//create Calendar object for current date\n\t\t\tCalendar now = Calendar.getInstance ( );\n\t\t\t//create Calendar Object to test\n\t\t\tCalendar test = Calendar.getInstance( );\n\t\t\t//set the attributes of test Calendar\n\t\t\ttest.set (iYear,iMonth,iDay);\n\t\t\t\n\t\t\tboolean leap = true;//holds the boolean value of leap year \n\t\t\t\n\t\t\t/* test year for proper input*/\n\t\t\tif (iYear + 120 < now.get (Calendar.YEAR) || now.before (test))\n\t\t\t{\t\n\t\t\t\tthrow new InvalidDateException(\"year\");\n\t\t\t}\n\t\t\t/* Test the month for proper input*/\n\t\t\tif (iMonth < 0 || iMonth > 12)\n\t\t\t{\t\n\t\t\t\tthrow new InvalidDateException(\"month\");\n\t\t\t}\n\t\t\t\n\t\t\t//algorithm to determine if it is a leap year\n\t\t\tif (iYear % 400 == 0)\n\t\t\t\tleap = true;\n\t\t\telse if (iYear % 100 == 0)\n\t\t\t\tleap = false;\n\t\t\telse if (iYear % 4 == 0)\n\t\t\t\tleap = true;\n\t\t\telse\n\t\t\t\tleap = false;\n\t\t\t\n\t\t\t/*Test to see if user has entered a\n\t\t\t * valid day for that particular month\n\t\t\t */\n\t\t\t\n\t\t\t//if the day entered for February is greater then 29 in a leap year it is invalid\n\t\t\tif ( leap == true && iMonth == 2)\n\t\t\t{\n\t\t\t\tif ( iDay < 0 || iDay > 29 )\n\t\t\t\t{\t\n\t\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//if the day entered for February is greater then 28 in a non leap year it is invalid\n\t\t\tif ( leap == false && iMonth == 2)\n\t\t\t{\n\t\t\t\tif ( iDay < 0 || iDay > 28)\n\t\t\t\t{\t\n\t\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//in the months of Apr, Jun, Sep, or Nov a day greater then 30 is invalid\n\t\t\tif( iMonth == 4 ||\n\t\t\t\tiMonth == 6 ||\n\t\t\t\tiMonth == 9 ||\n\t\t\t\tiMonth == 11 )\n\t\t\t{\n\t\t\t\tif( iDay < 0 || iDay > 30)\n\t\t\t\t{\t\n\t\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//in the remaining months a day greater than 31 is invalid\n\t\t\tif (iDay < 0 || iDay > 31)\n\t\t\t{\t\n\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t}\n\t}", "protected static final boolean is_leap_year_gregorian (int year)\n {\n // Algorithm: Kernighan & Richie,\n // \"The C Programming Language\", 1st edition (1978), p. 37.\n //\n return (year % 4 == 0 && year % 100 != 0 || year % 400 == 0);\n }", "public boolean leapYear(int year) {\r\n\r\n\t\tif (year % 4 == 0 || year % 400 == 0 && year % 100 != 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void testDate1() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(0);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 1900);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public Boolean validateDate(String date_of_birth) {\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n format.parse(date_of_birth);\n } catch (ParseException exception) {\n System.out.println(\"Invalid Input!\");\n return true;\n }\n return false;\n }", "public void leapYear() {\n System.out.print(\"\\nEnter a year: \");\n long year = in.nextLong();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n System.out.println(\"\\n\" + year + \" is a leap year.\\n\");\n } else {\n System.out.println(\"\\n\" + year + \" is not a leap year.\\n\");\n }\n }", "private boolean isDOBValid(String DOB) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n dateFormat.setLenient(false);\n try {\n dateFormat.parse(DOB.trim());\n } catch (ParseException pe) {\n return false;\n }\n return true;\n }", "public void setYear(int value) {\r\n this.year = value;\r\n }", "private static Date getYearDate(int year) {\n Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.set(Calendar.YEAR, year);\n return calendar.getTime();\n }", "@Test\n public void testSpecificYear() {\n context = new MockServletContext();\n context.setInitParameter(ConfigService.MESHRDF_YEAR, \"2018\");\n context.setInitParameter(ConfigService.MESHRDF_INTERIM, \"true\");\n configService = new ConfigServiceImpl(context);\n\n ValidYears years = configService.getValidYears();\n\n assertThat(years.getCurrent(), equalTo(2018));\n assertThat(years.getInterim(), equalTo(2019));\n }", "@Test\r\n\tpublic void testSetYear() {\r\n\t\tmeetingu1.setYear(3);\r\n\t\tassertTrue(meetingu1.getYear() == 3);\r\n\t}", "public void setYear (int yr) {\n year = yr;\n }", "private static boolean isLeapYear(int year) {\n return year % 400 == 0 || (year % 100 != 0 && year % 4 == 0);\n }", "public static boolean isLeapYear(int year) {\n if(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)){\n return true;\n } \n else{\n return false; \n } \n }", "@Test\n @Disabled\n public void testValidateFecha() {\n assertTrue(RegExprMain.validateFecha(\"10/06/2022\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2011\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2015\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2016\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2021\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/1999\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2007\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2000\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2002\"));\n assertFalse(RegExprMain.validateFecha(\"38/06/2009\"));\n assertFalse(RegExprMain.validateFecha(\"10/20/2010\"));\n \n \n\n }", "private static double toFullYear(double year) {\n if (-1 < year && year < 100) {\n return 1900 + (int) year;\n }\n return year;\n }", "public void setYear(String year)\r\n {\r\n this.year = year; \r\n }", "private static boolean isLeapYear(int year)\n\t{\n\t\treturn ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);\n\t}", "public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }", "public static NodeValue dtGetYear(NodeValue nv) {\n if ( nv.isDateTime() || nv.isDate() || nv.isGYear() || nv.isGYearMonth() ) {\n DateTimeStruct dts = parseAnyDT(nv) ;\n if ( dts.neg != null )\n return NodeValue.makeNode(\"-\"+dts.year, XSDDatatype.XSDinteger) ;\n return NodeValue.makeNode(dts.year, XSDDatatype.XSDinteger) ;\n }\n throw new ExprEvalException(\"Not a year datatype\") ;\n }", "public interface DateValidator {\n\n boolean isDateValid(String date);\n}", "public boolean orgFirstYear(Object bean,\r\n\t\t\tValidatorAction va, Field field, ActionMessages msgs,\r\n\t\t\tHttpServletRequest request) {\r\n\r\n\t\tSystemConfigForm sysConfigForm = (SystemConfigForm)bean;\r\n\t\t\r\n\t\tString orgYear = sysConfigForm.getOrgFirstYear();\r\n\t\tint intOrgYear = Integer.parseInt(orgYear);\r\n\t\t\r\n GregorianCalendar ct = new GregorianCalendar();\r\n int currentYear = ct.get(Calendar.YEAR);\t\t\r\n\r\n\t\tif (intOrgYear > currentYear) {\t\t\t\r\n\t\t\t\tmsgs.add(field.getKey(), new ActionMessage(\"error.orgfirstyear\", String.valueOf(currentYear)));\r\n\t\t\t\tsaveErrors(request, msgs);\r\n\t\t}\r\n\t\treturn msgs.isEmpty();\r\n\t}", "private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectMonth() {\r\n SimpleDate d1 = new SimpleDate(\"-3/1/1700\");\r\n }", "@Test\n\tpublic void testDate4() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36161);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 2);\n\t\t\t// month is 0 indexed, so Jan is 0\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public void setYear(String year) {\n this.year = year;\n }", "public void setYear(String year) {\n this.year = year;\n }", "@Test\n\tpublic void testYears() {\n\t\tint birthYear = 2000;\n\t\tint deathYear = 2019;\n\t\tPlot plot = new Plot();\n\t\t\n\t\tplot.setBirthYear(2000);\n\t\tassertEquals(plot.getBirthYear(), birthYear);\n\t\tplot.setDeathYear(2019);\n\t\tassertEquals(plot.getDeathYear(), deathYear);\n\t\t\n\t\tSystem.out.println(\"Birth and Death Years were successful.\");\n\t}", "private static boolean validDate(String date) {\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tDate tryDate = null; \n\t\t\ttry\n\t\t{\n\t\t\ttryDate = formatter.parse(date);\n\t\t}catch (ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t\tformatDate(tryDate);\n\t\treturn true; \n\t\t\n\t}", "public boolean isALeapYear(int year){\n\n if (((year%4 == 0) && (year%100!=0)) || (year%400==0)){\n return true;\n }\n return false;\n }", "public static boolean leapYear(int year)\n\t{\n\t\tif(year<999 || year>9999) \n\t\t{\n\t\t\tSystem.out.println(\"Enter valid year\");\n\t\t}\n\t\t\n\t\tif(year%400==0 || year%4==0 && year%100!=0) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public void checkLeapYear(int year) {\r\n\t int count=1;\r\n\t int temp=year;\r\n\t\twhile(temp>10){\r\n\t\t\tint r= temp%10;\r\n\t\t\tcount++;\r\n\t\t\ttemp=temp/10;\r\n\t\t}\r\n\t\tif(count>=3){\r\n\t\t\tif(year%4==0){\r\n\t\t\t\tSystem.out.println(\"given year is leap year:\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"given year is not leap year:\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"please enter atleast 4 digit no to find leap year\");\r\n\t\t}\r\n}", "@Test\n public void equalsOk(){\n Date date = new Date(1,Month.january,1970);\n assertTrue(date.equals(date));\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "@Test\n\tpublic void testDate2() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36160);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "int getYear();", "public void setYear(int year) {\r\n this.year = year;\r\n }" ]
[ "0.760386", "0.7338926", "0.7122767", "0.6922692", "0.6898001", "0.67690134", "0.67298055", "0.6698588", "0.6673798", "0.6620741", "0.6613436", "0.65736496", "0.6572506", "0.6559963", "0.65229964", "0.65028095", "0.6479585", "0.6477804", "0.63891596", "0.625916", "0.6223474", "0.6215779", "0.6205273", "0.61939037", "0.61842036", "0.6156181", "0.61257136", "0.6122765", "0.61210966", "0.6101483", "0.6084449", "0.60837805", "0.6081687", "0.6065594", "0.6057931", "0.6026275", "0.602616", "0.601767", "0.6004341", "0.5997526", "0.5964655", "0.59558576", "0.5955625", "0.59518254", "0.59470135", "0.59457064", "0.5939372", "0.59368795", "0.5935214", "0.59221476", "0.59157443", "0.59118116", "0.5895668", "0.58848804", "0.58699644", "0.58637327", "0.58603513", "0.58447844", "0.58426917", "0.5842013", "0.5838965", "0.5817751", "0.5816939", "0.5816066", "0.58038664", "0.5802733", "0.57947344", "0.5790065", "0.57886076", "0.5787539", "0.5783763", "0.57792187", "0.57762253", "0.5773097", "0.5768991", "0.5768441", "0.57667667", "0.5761425", "0.57603925", "0.5757238", "0.57571805", "0.57486194", "0.5744216", "0.57430977", "0.57363987", "0.57255274", "0.57217157", "0.5721575", "0.5718463", "0.5718463", "0.5717485", "0.57166797", "0.5709592", "0.5706554", "0.57057655", "0.57014966", "0.57012796", "0.57012796", "0.570049", "0.5696417", "0.56930983" ]
0.0
-1
create new data by parsing from string of the form mm/dd/yy
public Group3Date(String date) { String[] fields = date.split("/"); if (fields.length != 3) { throw new Error("Date parse error"); } month = Integer.parseInt(fields[0]); day = Integer.parseInt(fields[1]); year = Integer.parseInt(fields[2]); if (!isValid(month, day, year)) throw new Error("Invalid date"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date stringToDate (String s) {\n\t\tint year=0 , month=0 , date=0;\n\t\tCalendar cal = Calendar.getInstance(Locale.getDefault());\n\t\t\n\t\tStringTokenizer st = new StringTokenizer (s,\"/\");\n\t\t\n\t\tdate = Integer.parseInt(st.nextToken());\n\t\tmonth = Integer.parseInt(st.nextToken());\n\t\tyear = Integer.parseInt(st.nextToken());\n\t\tcal.clear();\n\t\tcal.set(year,month-1,date);\n\t\t//System.out.println(\"\\nDate : \"+getStringFromDate(cal.getTime()));\n\t\treturn (Date)cal.getTime().clone();\n\t}", "public void parseDate(String d)\n {\n\tdate.set(d);\n String [] dateList = d.split(\"-\");\n \n year.set(Integer.valueOf(dateList[0]));\n month.set(Integer.valueOf(dateList[1]));\n day.set(Integer.valueOf(dateList[2]));\n }", "public static Date parseDate(String date) {\r\n return parseDateWithPattern(date, \"dd/MM/yyyy\");\r\n }", "private String YYYYMMDD(String str) {\n\t\tString[] s = str.split(\"/\");\n\t\treturn s[0] + parseToTwoInteger(Integer.parseInt(s[1].trim())) + parseToTwoInteger(Integer.parseInt(s[2].trim()));\n\t}", "public static Date parseDate(String date)\n {\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date dt = null;\n try {\n dt = format.parse(date);\n } \n catch (ParseException ex) \n {\n System.out.println(\"Unexpected error during the conversion - \" + ex);\n }\n return dt;\n }", "public static String parseDate(String input) {\n String year = input.substring(0, 4);\n String month = input.substring(5, 7);\n String day = input.substring(8, 10);\n return year + \"-\" + month + \"-\" + day;\n }", "public Date parse (String dateAsString , String dateFormat) throws Exception ;", "public Date ToDate(String line){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd\");\n try {\n Date d = sdf.parse(line);\n return d;\n } catch (ParseException ex) {\n\n Log.v(\"Exception\", ex.getLocalizedMessage());\n return null;\n }\n }", "public static Date stringToDate(String dateAsString){\r\n try { \r\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\"); \r\n return df.parse(dateAsString);\r\n } catch (ParseException ex) {\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n }", "public DateCell(String value) // constructs the date\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"mm/dd/yyyy\"); // creates date format\n date = format.parse(value,new ParsePosition(0)); // creates date \n String dateCompare = format.format(date); // puts date into a string\n //below is used for comparing dates\n String[] dateCompareOps = dateCompare.split(\"/\"); // splits values at the /\n month = Integer.parseInt(dateCompareOps[0]); // gets value for month\n day = Integer.parseInt(dateCompareOps[1]); // gets value for day\n year = Integer.parseInt(dateCompareOps[2]); // gets value for year\n\t}", "public Date formatForDate(String data) throws ParseException{\n //definindo a forma da Data Recebida\n DateFormat formatUS = new SimpleDateFormat(\"dd-MM-yyyy\");\n return formatUS.parse(data);\n }", "public static Date converteStringInvertidaSemBarraAAAAMMDDParaDate(String data) {\r\n\t\tDate retorno = null;\r\n\r\n\t\tString dataInvertida = data.substring(6, 8) + \"/\" + data.substring(4, 6) + \"/\" + data.substring(0, 4);\r\n\r\n\t\tSimpleDateFormat dataTxt = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\ttry {\r\n\t\t\tretorno = dataTxt.parse(dataInvertida);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tthrow new IllegalArgumentException(data + \" não tem o formato dd/MM/yyyy.\");\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "private Date stringToDate(String datum)\r\n\t{\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDate d = df.parse(datum);\r\n\t\t\treturn d;\r\n\t\t}\r\n\t\tcatch (ParseException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private Date stringToDate(String s) throws ParseException{\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.parse(s);\r\n\t}", "private String convertDate(String date){\r\n String arrDate[] = date.split(\"/\");\r\n date = arrDate[2] + \"-\" + arrDate[1] + \"-\" + arrDate[0];\r\n return date;\r\n }", "public boolean setDateFromString(String s){\n String[] strs = s.split(\"/\");\n if(strs.length != 3){\n return false;\n }\n try {\n this.year = Integer.parseInt(strs[0].toString());\n this.month = Integer.parseInt(strs[1].toString());\n this.dayOfMonth = Integer.parseInt(strs[2].toString());\n }catch (NumberFormatException e){\n e.printStackTrace();\n return false;\n }\n this.dateString = s;\n return true;\n }", "public static Date converteStringInvertidaSemBarraAAMMDDParaDate(String data) {\r\n\t\tDate retorno = null;\r\n\r\n\t\tString dataInvertida = data.substring(4, 6) + \"/\" + data.substring(2, 4) + \"/20\" + data.substring(0, 2);\r\n\r\n\t\tSimpleDateFormat dataTxt = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\ttry {\r\n\t\t\tretorno = dataTxt.parse(dataInvertida);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tthrow new IllegalArgumentException(data + \" não tem o formato dd/MM/yyyy.\");\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public static String dateStr(String str)\n {\n String month = str.split(\"/\")[0];\n String day = str.split(\"/\")[1];\n String year = str.split(\"/\")[2];\n return day + \"-\" + month + \"-\" + year;\n }", "public MyDate(String date){\n \t\tStringTokenizer st;\n\n \t\tst = new StringTokenizer(date,\"/\");\t//tokenizer will always result in 3 tokens \n\n\t\tthis.day = Integer.parseInt(st.nextToken());\n\t\tthis.month = Integer.parseInt(st.nextToken());\n\t\tthis.year = Integer.parseInt(st.nextToken());\t\n\t}", "public void setString (String s) { //set method\n full_Date = s;\n if(!isValidDate(full_Date)) throw new IllegalArgumentException(\"Invalid Date Format!\");\n\n Year = Integer.parseInt(full_Date.substring(0,3));\n Month = Integer.parseInt(full_Date.substring(4,5));\n Day = Integer.parseInt(full_Date.substring(6,7));\n\n \n}", "public static Date createDate(String dateStr) throws ParseException {\n\t\tSimpleDateFormat date = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\treturn date.parse(dateStr);\n\t}", "private String getDate(String str) {\n String[] arr = str.split(\"T\");\n DateFormat formatter = new SimpleDateFormat(\"yyyy-mm-d\", Locale.US);\n Date date = null;\n try {\n date = formatter.parse(arr[0]);\n } catch (java.text.ParseException e) {\n Log.e(LOG_TAG, \"Could not parse date\", e);\n }\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MMM d, yyyy\", Locale.US);\n\n return dateFormatter.format(date);\n }", "private static Date getDate(String sdate)\n\t{\n\t\tDate date = null;\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\ttry {\n\t\t\tdate = formatter.parse(sdate);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn date;\n\t}", "private LocalDateTime parseDate(String s) {\n String[] splitDate = s.split(\" \", 2);\n // Split day, month, year\n String[] splitDateElements = splitDate[0].split(\"/\", 3);\n int day = parseInt(splitDateElements[0]);\n int month = parseInt(splitDateElements[1]);\n int year = parseInt(splitDateElements[2]);\n // Split hours and minutes\n int hours = parseInt(splitDate[1].substring(0, 2));\n int mins = parseInt(splitDate[1].substring(2, 4));\n return LocalDateTime.of(year, month, day, hours, mins);\n }", "public LocalDate Data(String data) {\n DateTimeFormatter formatodata = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\n //crio o objeto localdate que formata a informação intoduzida para o formato que eu paremetrizei em formatodata\n LocalDate localDate = LocalDate.parse(data, formatodata);\n\n return localDate;\n }", "public static Date parseDate(String val) {\n\n\t\tDate d = null;\n\n\t\tif (val != null && !val.equals(\"0\")) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"MMM/dd/yyyy\");\n\t\t\ttry {\n\t\t\t\td = format.parse(val);\n\t\t\t} catch (ParseException e) {\n\t\t\t}\n\t\t}\n\n\t\treturn d;\n\n\t}", "public Date dataDiProva(String data) {\r\n try {\r\n String strDate1 = data;\r\n String strDate2 = \"2009/08/02 20:45:07\";\r\n\r\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n fmt.setLenient(false);\r\n\r\n // Parses the two strings.\r\n Date d1 = null;\r\n try{\r\n d1 = (Date) fmt.parse(strDate1);\r\n }catch(ClassCastException cce){}\r\n return d1;\r\n } catch (ParseException e) {\r\n System.out.println(\"sbagliata conversione data\");\r\n return null;\r\n }\r\n }", "public static Date strToDate(String strDate)\r\n/* 127: */ {\r\n/* 128:178 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 129:179 */ ParsePosition pos = new ParsePosition(0);\r\n/* 130:180 */ Date strtodate = formatter.parse(strDate, pos);\r\n/* 131:181 */ return strtodate;\r\n/* 132: */ }", "@Override\n\tpublic Date convert(String source) {\n\t\tif (StringUtils.isValid(source)) {\n\t\t\tDateFormat dateFormat;\n\t\t\tif (source.indexOf(\":\") != -1) {\n\t\t\t\tdateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t} else {\n\t\t\t\tdateFormat = new SimpleDateFormat(\"yyyy-MM-dd\"); \n\t\t\t}\n\t\t\t//日期转换为严格模式\n\t\t dateFormat.setLenient(false); \n\t try {\n\t\t\t\treturn dateFormat.parse(source);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\t\treturn null;\n\t}", "public Date stringToDate(String date) throws ParseException {\n String[] splitDate = date.split(\"T\");\n String day = splitDate[0];\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date dayDate = dateFormat.parse(day);\n return dayDate;\n }", "protected void guessDateFormat(String dateStr) {\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date\"));} //$NON-NLS-1$\n String[] dateSplit = dateStr.split(\"/\"); //$NON-NLS-1$\n String yrFmt = null;\n int yrPos = -1;\n int dayPos = -1;\n // quick look for either yyyy/xx/xx or xx/xx/yyyy\n for (int i=0; i<dateSplit.length; i++) {\n int aDigit = Integer.parseInt(dateSplit[i]); \n if (dateSplit[i].length() == 4) {\n yrFmt = \"yyyy\"; //$NON-NLS-1$\n yrPos = i;\n } else if (aDigit>31) {\n // found 2-digit year\n yrFmt = \"yy\"; //$NON-NLS-1$\n yrPos = i;\n } else if (aDigit > 12) {\n // definitely found a # <=31,\n dayPos = i;\n }\n }\n if (yrFmt != null) {\n StringBuffer fmt = new StringBuffer();\n if (dayPos >=0) {\n // OK, we know everything.\n String[] tmp = new String[3];\n tmp[yrPos] = yrFmt;\n tmp[dayPos] = \"dd\"; //$NON-NLS-1$\n for (int i=0; i<tmp.length; i++) {\n fmt.append(i>0?\"/\":\"\"); //$NON-NLS-1$ //$NON-NLS-2$\n fmt.append(tmp[i] == null ? \"MM\":tmp[i]); //$NON-NLS-1$\n }\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Obvious\"));} //$NON-NLS-1$\n } else {\n // OK, we have something like 2010/01/01 - I can't\n // tell month from day. So, we'll guess. If it doesn't work on a later\n // date, we'll flip it (the alternate).\n \n StringBuffer altFmt = new StringBuffer();\n if (yrPos == 0) {\n fmt.append(yrFmt).append(\"/MM/dd\"); //$NON-NLS-1$\n altFmt.append(yrFmt).append(\"/dd/MM\"); //$NON-NLS-1$\n } else {\n fmt.append(\"MM/dd/\").append(yrFmt); //$NON-NLS-1$\n altFmt.append(\"dd/MM/\").append(yrFmt); //$NON-NLS-1$\n }\n this.alternateFormatString = altFmt.toString();\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Ambiguous\"));} //$NON-NLS-1$\n }\n this.dateFormatString = fmt.toString();\n this.dateFormat = new SimpleDateFormat(dateFormatString);\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Decided\", this.dateFormatString));} //$NON-NLS-1$\n try {\n dateFormat.parse(dateStr);\n } catch (ParseException ex) {\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Unparsable\", dateStr));} //$NON-NLS-1$\n }\n } else {\n // looks ilke something like 01/02/05 - where's the year?\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date.Year.Ambiguous\"));} //$NON-NLS-1$\n return;\n }\n \n }", "public Date formatDate( String dob )\n throws ParseException {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n dateFormat.setLenient(false);\n return dateFormat.parse(dob);\n }", "public static Date stringToDate(String date) throws InvalidDateException{\n DateFormat format = new SimpleDateFormat(Constants.BIRTH_DATE_FORMAT);\n format.setLenient(false); //é uma flag para que a data esteja sempre entre os limites corretos\n try {\n return format.parse(date);\n } catch (ParseException ignored) {\n throw new InvalidDateException(\"Invalid date\");\n }\n }", "public static java.util.Date convertFromStringToDate(String strDate){\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\"); /*This stringDate is come from UI*/\n\t\tjava.util.Date date = null;\n\t\tif(strDate != null && !strDate.trim().isEmpty()){\n\t\t\ttry {\n\t\t\t\tdate = format.parse(strDate);\n\t\t\t\tSystem.out.println(strDate);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\treturn date;\n\t}", "public Date parseDate(String date) {\t\t\n\t\ttry{\n\t\t\tDate d2 = sdf.parse(date);\n\t\t\t//String month = parseMonth(date);\n\t\t\t//cal.setTime(d2);\t\t\t\n\t\t\t//months.put(month, new Integer(cal.get(Calendar.MONTH) + 1));\t\t\t\n\t\t\treturn d2;\n\t\t} catch(ParseException e){\n\t\t\tSystem.out.println(\"Invalid Date Format or No Such Date : \" + date + \". Message: \" + e.getMessage() );\n\t\t\treturn null;\n\t\t}\n\t}", "public static Date stringToDate(String date)\r\n/* 29: */ {\r\n/* 30: 39 */ log.debug(\"DateUtil.stringToDate()\");\r\n/* 31: */ try\r\n/* 32: */ {\r\n/* 33: 41 */ return sdfDate.parse(date);\r\n/* 34: */ }\r\n/* 35: */ catch (ParseException e)\r\n/* 36: */ {\r\n/* 37: 43 */ log.fatal(\"DateUtil.stringToDate抛出异常\", e);\r\n/* 38: */ }\r\n/* 39: 44 */ return new Date();\r\n/* 40: */ }", "private static Date convertFromString(String dateString) throws ParseException {\n return new SimpleDateFormat(\"yyyyMMddHHmm\").parse(dateString);\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic static Date getDateForString(String dateString) {\n\t\tString[] separation1 = dateString.split(\" \");\n\t\tString[] separation2 = separation1[0].split(\"/\");\n\t\tString[] separation3 = separation1[1].split(\":\");\n\t\treturn new Date(Integer.parseInt(separation2[2])-1900, (Integer.parseInt(separation2[1])-1), Integer.parseInt(separation2[0]), Integer.parseInt(separation3[0]), Integer.parseInt(separation3[1]), Integer.parseInt(separation3[2]));\n\t}", "public Date stringToDate(String d)\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"MMM-yyyy\");\n\t\t\n\t\tDate date = new Date();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tdate = format.parse(d);\n\t\t} \n\t\tcatch (ParseException e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn date;\n\t}", "public static Date StringToDate(String strFecha) throws ParseException {\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n return simpleDateFormat.parse(strFecha);\r\n }", "public static Date StringToDate(String dateString) {\n int y = new Integer(dateString.substring(0, 4));\n int m = new Integer(dateString.substring(4, 6));\n int d = new Integer(dateString.substring(6, 8));\n int h = new Integer(dateString.substring(8, 10));\n int min = new Integer(dateString.substring(10, 12));\n\n try {\n Calendar convCal = Calendar.getInstance();\n convCal.set(y, m - 1, d, h, min);\n Date date = convCal.getTime();\n\n return date;\n } catch (Exception ex) {\n System.out.println(\"BwInfo.convertStringToDate() \" + ex);\n return null;\n }\n\n }", "private static String convertDate(String dateString) {\n String date = null;\n\n try {\n //Parse the string into a date variable\n Date parsedDate = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").parse(dateString);\n\n //Now reformat it using desired display pattern:\n date = new SimpleDateFormat(DATE_FORMAT).format(parsedDate);\n\n } catch (ParseException e) {\n Log.e(TAG, \"getDate: Error parsing date\", e);\n e.printStackTrace();\n }\n\n return date;\n }", "@Test\n\t@DisplayName(\"string to date\")\n\tpublic void testStringToDate() throws ParseException\n\t{\n\t\tDateConverter d = new DateConverter(string1);\n\t\t\n\t\tString dateInString = \"1997-03-19\";\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t date1 = formatter.parse(dateInString);\n\t\t} catch (ParseException e) {\n\t\t //handle exception if date is not in \"dd-MMM-yyyy\" format\n\t\t}\n\t\tassertEquals(date1, d.getDate());\n\t}", "public static Date parseDate(String date) {\n return DateUtil.toDate(date);\n }", "private Date convertStringToDate(String dateInString){\n DateFormat format = new SimpleDateFormat(\"d-MM-yyyy HH:mm\", Locale.ENGLISH);\n Date date = null;\n try {\n date = format.parse(dateInString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return date;\n }", "public void parseDateTextFieldHelper() {\n\t\tyear = Integer.parseInt(textFieldDate.getText().substring(0, 4));\n\t\tmonth = Integer.parseInt(textFieldDate.getText().substring(5, 7));\n\t\tdayOfMonth = Integer.parseInt(textFieldDate.getText().substring(8, 10));\n\t}", "private LocalDate parse(String format) {\r\n\t\tString lista[] = format.split(\"/\"); // DD - MM - YYYY\r\n\t\tint dia = Integer.parseInt(lista[0]);\r\n\t\tint mes = Integer.parseInt(lista[1]);\r\n\t\tint ano = Integer.parseInt(lista[2]);\r\n\t\tLocalDate date = LocalDate.of(ano, mes, dia);\r\n\t\treturn date;\r\n\t}", "@Override\n public Date parse(String text, Locale locale) throws ParseException {\n return getDateFormat().parse(text);\n }", "public static Date FormatStringToDate(String dateString) {\r\n SimpleDateFormat dF = new SimpleDateFormat(\"dd/mm/yyyy HH:mm:ss\");\r\n Date date = null;\r\n try {\r\n date = dF.parse(dateString);\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n return date;\r\n }", "private Calendar parseDate(String invoiceDate) throws InvoiceFileParseException {\n\n\t\tPattern p = Pattern.compile(\"[\\\\d]{1,2}/[\\\\d]{1,2}/[\\\\d]{4}\");\n\t\tMatcher m = p.matcher(invoiceDate);\n\t\tif (!m.matches()) {\n\t\t\tthrow new InvoiceFileParseException(\"Specified date is not valid [\" + invoiceDate + \"], expected date format is dd/MM/yyyy\");\n\t\t}\n\n\t\tCalendar invD;\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\ttry {\n\t\t\tinvD = Calendar.getInstance();\n\t\t\tinvD.setTime(sdf.parse(invoiceDate));\n\t\t} catch (ParseException e) {\n\t\t\tthrow new InvoiceFileParseException(\"Specified date is not valid [\" + invoiceDate + \"], expected date format is dd/MM/yyyy\", e);\n\t\t}\n\t\treturn invD;\n\t}", "private static String toDateTime(String dateSubmitted) {\n\t\tString[] extracted = dateSubmitted.split(\" \");\n\t\t\n\t\tString[] date = extracted[0].split(\"/\");\n\t\t\n\t\tif(date[0].length() == 1)\n\t\t\tdate[0] = \"0\" + date[0];\n\t\tif(date[1].length() == 1)\n\t\t\tdate[1] = \"0\" + date[1];\n\t\t\n\t\treturn date[2] + \"-\" + date[0] + \"-\" + date[1] + \" \" + extracted[1];\n\t}", "private String convertDateVN(String date) {\r\n String arrDate[] = date.split(\"-\");\r\n date = arrDate[2] + \"/\" + arrDate[1] + \"/\" + arrDate[0];\r\n return date;\r\n }", "public static void main(String[] args) {\n\t\tDateTimeFormatter formatter=DateTimeFormatter.ofPattern(\"yy/MM/dd\");\n\t\tString input=\"19/12/09\";//user can give input any format of date\n\t\t\n\t\tLocalDate date=LocalDate.parse(input,formatter);\n\t\tSystem.out.println(date);\n\t\t\n\t\n\t}", "private Date parseDate(String text) throws Exception {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n return dateFormat.parse(text);\n }", "public static java.util.Date convertToUDate(String dateInString) {\n\t\tif (dateInString == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tjava.util.Date uDate = null;\n\t\t\ttry {\n\t\t\t\tuDate = dateFormat.parse(dateInString);\n\t\t\t} catch (ParseException e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn uDate;\n\t\t}\n\t}", "public static Date parseDate(String date)\n\t{\n\t\treturn parseFormatDate(date, getDateFormat());\n\t}", "protected static Date parseDate(String dateStr) {\n if (dateStr != null) {\n try {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n return df.parse(dateStr);\n }\n catch (Exception e) {\n throw new IllegalArgumentException(\"Expected date in format yyyy-MM-dd but got \" + dateStr, e);\n }\n }\n return null;\n }", "public static Date stringToDate(String dateString) {\n for(String format: DATE_FORMATS){\n try {\n return new SimpleDateFormat(format).parse(dateString);\n }\n catch (Exception e){}\n }\n throw new IllegalArgumentException(\"Date is not parsable\");\n }", "public static Date fromString(String fullDate) {\n\t\tString[] parsed = fullDate.split(\",\");\n\t\tif (parsed.length != 3 && parsed.length != 5) {\n\t\t\tthrow new InvalidParsingStringException(Date.class.getName());\n\t\t}\n\t\tDate date = new Date();\n\t\tdate.setYear(Integer.valueOf(parsed[0]));\n\t\tdate.setMonth(Integer.valueOf(parsed[1]));\n\t\tdate.setDay(Integer.valueOf(parsed[2]));\n\t\tif (parsed.length == 5) {\n\t\t\tdate.setHour(Integer.valueOf(parsed[3]));\n\t\t\tdate.setMin(Integer.valueOf(parsed[4]));\n\t\t}\n\t\treturn date;\n\t}", "public java.util.Date parse(java.lang.String r4, java.text.ParsePosition r5) {\n /*\n r3 = this;\n boolean r0 = r3.looksLikeISO8601(r4)\n if (r0 == 0) goto L_0x000b\n java.util.Date r4 = r3.parseAsISO8601(r4, r5)\n return r4\n L_0x000b:\n int r0 = r4.length()\n L_0x000f:\n int r0 = r0 + -1\n if (r0 < 0) goto L_0x0021\n char r1 = r4.charAt(r0)\n r2 = 48\n if (r1 < r2) goto L_0x0021\n r2 = 57\n if (r1 <= r2) goto L_0x0020\n goto L_0x0021\n L_0x0020:\n goto L_0x000f\n L_0x0021:\n if (r0 >= 0) goto L_0x0034\n r0 = 0\n boolean r0 = com.fasterxml.jackson.core.p007io.NumberInput.inLongRange(r4, r0)\n if (r0 == 0) goto L_0x0034\n java.util.Date r5 = new java.util.Date\n long r0 = java.lang.Long.parseLong(r4)\n r5.<init>(r0)\n return r5\n L_0x0034:\n java.util.Date r4 = r3.parseAsRFC1123(r4, r5)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.fasterxml.jackson.databind.util.StdDateFormat.parse(java.lang.String, java.text.ParsePosition):java.util.Date\");\n }", "public Date(String date) {\n String[] fields = date.split(\"/\");\n if (fields.length != 3) {\n throw new IllegalArgumentException(\"Invalid date\");\n }\n month = Integer.parseInt(fields[0]);\n day = Integer.parseInt(fields[1]);\n year = Integer.parseInt(fields[2]);\n if (!isValid(month, day, year)) throw new IllegalArgumentException(\"Invalid date\");\n }", "public String convertDateFormate(String dt) {\n String formatedDate = \"\";\n if (dt.equals(\"\"))\n return \"1970-01-01\";\n String[] splitdt = dt.split(\"-\");\n formatedDate = splitdt[2] + \"-\" + splitdt[1] + \"-\" + splitdt[0];\n \n return formatedDate;\n \n }", "public static Date parseDate(String s) {\n\t\tDate d = null;\n\t\tif (s == null) {\n\t\t\treturn d;\n\t\t}\n\n\t\tString pattern = \"\";\n\n\t\tif (s.indexOf(':') >= 0) {\n\t\t\tif (s.length() > 20) {\n\t\t\t\tpattern = \"yyyy-MM-dd HH:mm:ss.SSS\";\n\t\t\t} else {\n\t\t\t\tif (s.lastIndexOf(':') != s.indexOf(':'))\n\t\t\t\t\tpattern = DD_MM_YYYY_HH_MM_SS;\n\t\t\t\telse\n\t\t\t\t\tpattern = \"dd/MM/yyyy HH:mm\";\n\t\t\t}\n\t\t} else {\n\t\t\tpattern = DD_MM_YYYY;\n\t\t}\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(pattern);\n\t\tsdf.setTimeZone(TimeZone.getDefault());\n\t\tif (s.length() > 0) {\n\t\t\ttry {\n\t\t\t\td = sdf.parse(s);\n\t\t\t} catch (ParseException e) {\n\t\t\t\tthrow new FenixException(\"Errore nella conversione della data. \" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn d;\n\t}", "public static Timestamp changeStrToDate(String strInput)\n\t{\n\t\tSimpleDateFormat sdfmt1 = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\");\n\t\tSimpleDateFormat sdfmt2= new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\tjava.util.Date dDate = new Date();\n\t\ttry {\n\t\t\tdDate = sdfmt1.parse( strInput );\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString strOutput = sdfmt2.format( dDate );\n\t\tDateTimeFormatter formattert = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n\t\tLocalDateTime ldt = LocalDateTime.parse(strOutput,formattert);\n\t\tTimestamp dt = Timestamp.valueOf(ldt);\n\t\t//System.out.println(dDate + \" \" + strOutput + \" \" + dt);\n\t\t//System.out.println(dt);\n\t\treturn dt;\n\n\t}", "private Date parseStringToDate(String date) {\n Date resultDate = null;\n if (date.contains(TODAY) || date.contains(YESTERDAY)) {\n String[] dateStrings = date.split(\",\");\n if (dateStrings[0].equalsIgnoreCase(TODAY)) {\n Calendar today = Calendar.getInstance();\n resultDate = today.getTime();\n } else if (dateStrings[0].equalsIgnoreCase(YESTERDAY)) {\n Calendar yesterday = Calendar.getInstance();\n yesterday.add(Calendar.DATE, MINUS_DAY);\n resultDate = yesterday.getTime();\n }\n } else {\n SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);\n try {\n resultDate = formatter.parse(date);\n } catch (ParseException e) {\n LOG.error(e.getMessage(), e);\n }\n }\n return resultDate;\n }", "public Date parseString(String dateString) throws ParseException {\n return dateFormat.parse(dateString);\n }", "public Date unmarshal( String value )\n {\n return DatatypeConverter.parseDateTime( value ).getTime();\n }", "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public Date convertStringToDate(String s) throws ParseException {\n\t\tDate dateTime = SDF.parse(s);\n\t\treturn dateTime;\n\t}", "public static Date dateParsing(String birthDate2) {\n\t\treturn null;\r\n\t}", "public static String strToDateFormToDB(String fecha){ \n\t\tString dateValue = fecha;\n\t\tint index = dateValue.indexOf(\"/\");\n\t\tString day = dateValue.substring(0,index);\n\t\tint index2 = dateValue.indexOf(\"/\",index+1);\n\t\tString month = dateValue.substring(index+1,index2);\n\t\tString year = dateValue.substring(index2+1,index2+5);\n\t\tdateValue=year+\"-\"+month+\"-\"+day;\n\t\treturn dateValue;\n\t}", "public static String getParsableDate(String rawDateTime) throws InvalidDateFormatException {\n try {\n String[] separatedDateTime = rawDateTime.split(\" \");\n String[] date = separatedDateTime[0].split(\"/\");\n if (date[0].length() < 2) {\n date[0] = \"0\" + date[0];\n }\n if (date[1].length() < 2) {\n date[1] = \"0\" + date[1];\n }\n String formattedDate = date[2] + \"-\" + date[1] + \"-\" + date[0];\n return formattedDate;\n } catch (Exception e) {\n throw new InvalidDateFormatException(DATE_FORMAT_ERROR_MESSAGE);\n }\n }", "public static java.util.Date parseStringToDate(String data, String pattern) {\r\n\t\tjava.util.Date retorno = null;\r\n\r\n\t\tif (data != null && pattern != null) {\r\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(pattern);\r\n\t\t\tformat.setLenient(false);\r\n\t\t\ttry {\r\n\t\t\t\tretorno = format.parse(data);\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "protected final void normalise()\n {\n // yyyy, mm, dd must be set at this point\n if ( isValid(yyyy,mm,dd) ) return;\n else if ( mm > 12 )\n {\n yyyy += (mm-1) / 12;\n mm = ((mm-1) % 12) + 1;\n if ( isValid(yyyy,mm,dd) ) return;\n }\n else if ( mm <= 0 )\n {\n // Java's definition of modulus means we need to handle negatives as a special case.\n yyyy -= -mm / 12 + 1;\n mm = 12 - (-mm % 12);\n if ( isValid(yyyy,mm,dd) ) return;\n }\n if ( isValid(yyyy,mm,01) )\n {\n int olddd = dd;\n dd = 1;\n toOrdinal();\n ordinal += olddd - 1;\n toGregorian();\n if ( isValid(yyyy,mm,dd) ) return;\n }\n\n throw new IllegalArgumentException(\"date cannot be normalised: \"\n + yyyy + \"/\" + mm + \"/\" + dd);\n\n }", "public static Date date(String str) throws Exception {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n return sdf.parse( str );\n }", "private boolean splitDate(String dateString) throws Exception {\n\t\tif (dateSet)\n\t\t\tthrow new Exception(\"Double date \" + dateString);\n\t\tStringTokenizer st = new StringTokenizer(dateString, \"/\");\n\t\tif (st.countTokens() == 3) {\n\t\t\tyear = Integer.valueOf(st.nextToken()).intValue();\n\t\t\tmonth = Integer.valueOf(st.nextToken()).intValue();\n\t\t\tday = Integer.valueOf(st.nextToken()).intValue();\n\t\t\tif (year < 1900)\n\t\t\t\tyear = year + 1900;\n\t\t}\n\t\telse\n\t\t\tthrow new Exception(\"Too few or too many argument \" + dateString);\n\t\tif ((day < 1)\n\t\t|| (day > 31)\n\t\t|| (month <1)\n\t\t|| (month > 12)) {\n\t\t\tthrow new Exception(\"Not a valid date \" + dateString);\n}\n\t\tdate = new Date((year - 1900)\n\t\t\t , (month - 1)\n\t\t\t\t , day\n\t\t\t\t , hour\n\t\t\t\t , minute\n\t\t\t , second);\n\t\tdateSet = true;\n\t\treturn true;\n }", "@Test\n\tpublic void testParseDate1() throws ParseException {\n\t\tDate date = ParserFacade.getInstance().parseDate(\"1/2 2am\");\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.DATE, 1);\n\t\tcal.set(Calendar.MONTH, 1);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 2);\n\t\tcal.set(Calendar.MINUTE, 0);\n\t\tcal.set(Calendar.SECOND, 0);\n\t\tcal.set(Calendar.MILLISECOND, 0);\n\t\tassertEquals(cal.getTime(), date);\n\n\t}", "public static String dateTran(String dateOri){\n\t\tDateFormat formatter1 ; \n\t\tDate date ; \n\t\tString newDate=null;\n\t\tformatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t\tdate=formatter1.parse(dateOri);\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat ( \"M/d/yy\" );\n\t\t\tnewDate = formatter.format(date);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newDate;\n\t}", "public static Object changeDateFormat(String date)\r\n\t{\n\t\tString temp=\"\";\r\n\t\tint len = date.length();\r\n\t\tfor(int i=0;i<len;i++)\r\n\t\t{\r\n\t\t\tchar ch = date.charAt(i);\r\n\t\t\tif(ch == ',')\r\n\t\t\t{\r\n\t\t\t\ttemp = temp+'/';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttemp = temp+ch;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString n=\"\"+temp.charAt(3)+temp.charAt(4);\r\n\t\tint month=Integer.parseInt(n);\r\n\t\tString m=\"\";\r\n\t\tswitch(month)\r\n\t\t{\r\n\t\t\tcase 1:\r\n\t\t\t\tm=\"jan\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tm=\"feb\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tm=\"mar\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tm=\"apr\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tm=\"may\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tm=\"jun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tm=\"jul\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\tm=\"aug\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\tm=\"sep\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\tm=\"oct\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\tm=\"nov\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 12:\r\n\t\t\t\tm=\"dec\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Enter a valid month\");\r\n\t\t\t}\r\n\t\t\tString s=(temp.substring(0, 3)+ m +temp.substring(5));\r\n\t\t\treturn s;\r\n\t\t}", "public static Date stringToDate(String date) {\n\t\tDate result = null;\n\t\tif (date != null && !\"\".equals(date)) {\n\t\t\tDateTimeFormatter f = DateTimeFormat.forPattern(SmartMoneyConstants.DATE_FORMAT);\n\t\t\tDateTime dateTime = f.parseDateTime(date);\n\t\t\tresult = dateTime.toDate();\n\t\t}\n\n\t\treturn result;\n\t}", "public static Date stringToDate(String string_date){\n Date myDate = null;\n \n try {\n java.util.Date utilDate = new SimpleDateFormat(\"yyyy-MM-dd\").parse(string_date);\n myDate = new java.sql.Date(utilDate.getTime());\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return myDate;\n }", "public static String fromDate(String s){\n \t\t\n \t\tString[] date = s.split(\"T\");\n \t\tString time = date[1].substring(0,5);\n \t\tString[] dates = date[0].split(\"-\"); \n \t\tString month = dates[1];\n \t\tString day = dates[2];\n \t\t\n \t\treturn day + \"/\" + month + \", kl: \" + time;\n \t}", "public static Date convertStringToDate(String strDate)\n\t {\n\t Date myDate = null;\n\t if (strDate.length() > 0)\n\t {\n\t DateFormat formatter = new SimpleDateFormat(EProcurementConstants.INPUT_DATE_FORMAT);\n\t try\n\t {\n\t myDate = formatter.parse(strDate);\n\t } catch (ParseException e)\n\t {\n\t LOGGER.error(\"Not able to parse \" + strDate + \" into date ..\" + e.getMessage());\n\t }\n\t }\n\t return myDate;\n\t }", "public java.sql.Date format(String date) {\n int i = 0;\n int dateAttr[];\n dateAttr = new int[3];\n for(String v : date.split(\"/\")) {\n dateAttr[i] = Integer.parseInt(v);\n i++;\n }\n\n GregorianCalendar gcalendar = new GregorianCalendar();\n gcalendar.set(dateAttr[2], dateAttr[0]-1, dateAttr[1]); // Year,Month,Day Of Month\n java.sql.Date sdate = new java.sql.Date(gcalendar.getTimeInMillis());\n return sdate;\n }", "public static Date String2Date(String date){\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Date currentDate = null;\n try {\n currentDate = format.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return currentDate;\n }", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }", "public static Date ParseFecha(String fecha)\n {\n //SimpleDateFormat formato = new SimpleDateFormat(\"dd-MM-yyyy\");\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date fechaDate = null;\n try {\n if(!fecha.equals(\"0\")){\n fechaDate = formato.parse(fecha);\n }\n\n }\n catch (ParseException ex)\n {\n System.out.println(ex);\n }\n return fechaDate;\n }", "public static boolean comprobarFecha(String s){\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n //dateFormat.setLenient(false);\n try {\n dateFormat.parse(s.trim());\n }catch (ParseException pe) {\n System.out.println(\"Fecha introducida de manera erronea\");\n return false;\n }\n return true;\n }", "@SuppressLint(\"SimpleDateFormat\") public static String parse(String date, String format){\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat localFormatter= new SimpleDateFormat(format);\r\n\t\t\tlocalFormatter.setLenient(false);\r\n\t\t\tString formattedDate=localFormatter.parse(date).toString();\r\n\t\t\t\r\n\t\t\t//days, months, years\r\n\t\t\tif(format.equals(formats[0])) return convertDate(formattedDate);\r\n\t\t\t\r\n\t\t\t//hours, minutes, seconds\r\n\t\t\telse if(format.equals(formats[1])) return convertHoursMinsSecs(formattedDate);\t\r\n\t\t\t\r\n\t\t\t//hours, minutes\r\n\t\t\telse if(format.equals(formats[2])) return convertHoursMins(formattedDate);\t\r\n\t\t\t\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\t} catch (ParseException e) {\r\n\t\t\t//e.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "private int parseMDYYYYtoJDate(String sDate) throws OException\r\n\t{\r\n final int month = 0;\r\n final int day = 1;\r\n final int year = 2;\r\n int result = OCalendar.today();\r\n String separator = \"\";\r\n\r\n if(sDate.indexOf(\"/\") > 0)\r\n separator = \"/\";\r\n else if(sDate.indexOf(\"-\") > 0)\r\n separator = \"-\";\r\n else if(sDate.indexOf(\"\\\\\") > 0)\r\n separator = \"\\\\\";\r\n else\r\n return result;\r\n\r\n String subDate[] = sDate.split(separator);\r\n if(subDate.length != 3)\r\n return result;\r\n\r\n if((subDate[day].length() != 1 && subDate[day].length() != 2)\r\n || (subDate[month].length() != 1 && subDate[month].length() != 2)\r\n || (subDate[year].length() != 2 && subDate[year].length() != 4))\r\n return result;\r\n\r\n // Fix Month to MM\r\n if(subDate[month].length() == 1)\r\n subDate[month] = \"0\" + subDate[month];\r\n\r\n // Fix Day to DD\r\n if(subDate[day].length() == 1)\r\n subDate[day] = \"0\" + subDate[day];\r\n\r\n // Fix Year to YYYY\r\n if(subDate[year].length() == 2)\r\n subDate[year] = \"20\" + subDate[year];\r\n\r\n\r\n // Convert to Julian Date using YYYYMMDD convert function\r\n result = OCalendar.convertYYYYMMDDToJd(subDate[year] + subDate[month] + subDate[day]);\r\n\r\n return result;\r\n\t}", "private static boolean validDate(String date) {\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tDate tryDate = null; \n\t\t\ttry\n\t\t{\n\t\t\ttryDate = formatter.parse(date);\n\t\t}catch (ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t\tformatDate(tryDate);\n\t\treturn true; \n\t\t\n\t}", "public static Date toDate(String dateStr, SimpleDateFormat format) throws ParseException {\r\n\t\treturn format.parse(dateStr);\r\n\t}", "public boolean checkData(String data){\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t dateFormat.setLenient(false);\n\t try {\n\t\t\tdateFormat.parse(data.trim());\n\t\t} catch (java.text.ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t return true;\n\t}", "private void setYearMonthDay(String fvtime) {\n\t\tString cleanStr = fvtime.replaceAll(\"^ca\\\\. \", \"\");\n\t\tcleanStr = cleanStr.replaceAll(\"\\\\?$\", \"\");\n\t\tString[] parts = cleanStr.split(\"/\");\n\t\tif (parts.length == 1) {\n\t\t\tyear = Integer.parseInt(parts[0]);\n\t\t} else if (parts.length == 2) {\n\t\t\tmonth = Integer.parseInt(parts[0]);\n\t\t\tyear = Integer.parseInt(parts[1]);\n\t\t} else if (parts.length == 3) {\n\t\t\tmonth = Integer.parseInt(parts[0]);\n\t\t\tday = Integer.parseInt(parts[1]);\n\t\t\tyear = Integer.parseInt(parts[2]);\n//\t\t\t\t\t// extract day part...\n//\t\t\t\t\t// 1949-03-04T21:45:00Z -> 1949, 03, 04T21:45:00Z\n//\t\t\t\t\tString[] dayParts = parts[parts.length-3].split(\"T\");\n//\t\t\t\t\tday = Integer.parseInt(dayParts[0]);\n\t\t}\n\t}", "public static Date parseToDate(String dateAParser, String type){\n\t\tDateFormat dfTmp = \"US\".equals(type) ? df : dfr;\n\t\tDate retour = null;\n\t\ttry {\n\t\t\tif(dateAParser != null){\n\t\t\t\tretour = df.parse(dateAParser);\n \n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\t//TODO : add log\n\t\t}\n\t\treturn retour;\n\t}", "protected Date handleDateExtractionAndParsing(String dateField, String dateFormat, Map<String, Object> data,\n\t\t\tString base, PreprocessChainContext chainContext) throws DataProblemException {\n\n\t\tif (dateField == null)\n\t\t\treturn null;\n\n\t\tDate resultDate = null;\n\n\t\tObject dateFieldData = null;\n\t\tif (dateField.contains(\".\")) {\n\t\t\tdateFieldData = XContentMapValues.extractValue(dateField, data);\n\t\t} else {\n\t\t\tdateFieldData = data.get(dateField);\n\t\t}\n\n\t\tif (dateFieldData != null) {\n\t\t\tif (!(dateFieldData instanceof String)) {\n\t\t\t\tString msg = \"Value for field '\" + dateField + \"' is not a String, so can't be parsed to the date object.\";\n\t\t\t\taddDataWarning(chainContext, msg);\n\t\t\t\tthrow new DataProblemException();\n\t\t\t} else {\n\t\t\t\tString dateStr = dateFieldData.toString();\n\t\t\t\tif (dateStr != null && !dateStr.isEmpty()) {\n\t\t\t\t synchronized(dateFormatter) {\n \t\t\t\t\tdateFormatter.applyPattern(dateFormat);\n \t\t\t\t\ttry {\n \t\t\t\t\t\tresultDate = dateFormatter.parse(dateStr);\n \t\t\t\t\t} catch (ParseException e) {\n \t\t\t\t\t\tString msg = dateField + \" parameter value of \" + dateStr + \" could not be parsed using \" + dateFormat\n \t\t\t\t\t\t\t\t+ \" format.\";\n \t\t\t\t\t\taddDataWarning(chainContext, msg);\n \t\t\t\t\t\tthrow new DataProblemException();\n \t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn resultDate;\n\t}", "private String validateDateString(String dateString) {\n String returnValue = null;\n DateFormat dateFormat1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n DateFormat dateFormat2 = new SimpleDateFormat(\"yyyy-MM\");\n DateFormat dateFormat3 = new SimpleDateFormat(\"yyyy\");\n Date date = null;\n \n if (dateString == null || dateString.equals(\"\")) {\n return dateString;\n }\n else {\n try {\n date = dateFormat1.parse(dateString);\n returnValue = dateFormat1.format(date);\n }\n catch (ParseException e1) {\n try {\n date = dateFormat2.parse(dateString);\n returnValue = dateFormat2.format(date);\n }\n catch (ParseException e2) {\n try {\n date = dateFormat3.parse(dateString);\n returnValue = dateFormat3.format(date);\n }\n catch (ParseException e3) {\n logger.warn(\"Couldn't parse date string using any of the recognized formats: \" + dateString);\n } \n }\n }\n }\n \n return returnValue;\n }", "public static Date convertStringToDate(String date) throws ParseException {\n\t return new SimpleDateFormat(\"yyyy-MM-dd\").parse(date); \n\t}", "public static Date parse(String input) throws java.text.ParseException {\n\t\treturn new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.S\").parse(input);\n\n\t}", "public static Date convertirStringADateUtil(String s){\n\t\tFORMATO_FECHA.setLenient(false);\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = FORMATO_FECHA.parse(s);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fecha;\n\t}" ]
[ "0.7173364", "0.68032086", "0.67664534", "0.6730712", "0.6650112", "0.6556935", "0.65096825", "0.6496426", "0.6458763", "0.6445693", "0.6424927", "0.6413139", "0.63754636", "0.63661504", "0.6354472", "0.6351842", "0.6322777", "0.63050836", "0.6254353", "0.6241144", "0.6192071", "0.61766213", "0.61593604", "0.6153847", "0.6128834", "0.6112844", "0.6094919", "0.6041777", "0.6019694", "0.6005701", "0.5965641", "0.59624165", "0.59416056", "0.593709", "0.5928862", "0.5922057", "0.5916077", "0.5914188", "0.5895962", "0.5879579", "0.58762735", "0.58689153", "0.5868502", "0.5867343", "0.5859431", "0.585192", "0.58491194", "0.58249855", "0.5812482", "0.5792443", "0.5766283", "0.57613915", "0.57491636", "0.57399875", "0.5731238", "0.5729945", "0.57217276", "0.5721459", "0.5686937", "0.56854975", "0.5682592", "0.5679197", "0.5670128", "0.5665648", "0.56538254", "0.56329393", "0.560282", "0.559889", "0.55962265", "0.55813545", "0.5579825", "0.55756265", "0.5564132", "0.5561148", "0.55398214", "0.5528886", "0.5517109", "0.55167407", "0.5516716", "0.5510545", "0.55063033", "0.55042356", "0.5501849", "0.5494683", "0.5486273", "0.5471887", "0.5467097", "0.5462233", "0.5458841", "0.54588133", "0.5449611", "0.54477984", "0.5446217", "0.54459447", "0.5445599", "0.5441873", "0.5432383", "0.54254705", "0.5406805", "0.5402783" ]
0.5777007
50
is the given date valid?
private static boolean isValid(int m, int d, int y) { if (m < 1 || m > 12) return false; if (d < 1 || d > DAYS[m]) return false; if (m == 2 && d == 29 && !isLeapYear(y)) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isValidFor (@Nonnull DATATYPE aDate);", "boolean isValidForDate(LocalDate date);", "private boolean isValidDate(String date) {\n\t Date d = null;\n\t try {\n\t\t\td = format.parse(date);\t\t\t\n\t\t\treturn d != null;\n\t\t} catch (java.text.ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isValidDate(String date){\n Date inputDate = new Date(date);\n boolean isValid = false;\n\n if (inputDate.isValid()) {\n isValid = true;\n }else{\n generalTextArea.appendText(date + \" is not a valid date!\\n\");\n }\n return isValid;\n }", "public static boolean isValidDate(Date date) {\n\n if (date == null) return false;\n\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n if (localDate.isBefore(LocalDate.parse(\"2000-01-01\"))) return false;\n\n if (localDate.isAfter(LocalDate.now().plusDays(30))) return false;\n\n return true;\n }", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "public Boolean validateDate(String date_of_birth) {\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n format.parse(date_of_birth);\n } catch (ParseException exception) {\n System.out.println(\"Invalid Input!\");\n return true;\n }\n return false;\n }", "public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }", "public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "private boolean checkDate(String date) {\n return date.matches(regexDate);\n }", "public static boolean isValidDate(String date) {\n return isValidDate(date, getDateTimeFormatter());\n }", "public boolean isValid() {\n if (this.month >= 1 && this.month <= 12 && this.day >= 1 && this.day < 32) {\n\n if ((this.month == 1 || this.month == 3 || this.month == 5 || this.month == 7 || this.month == 8\n || this.month == 10 || this.month == 12) && this.day > 30) {\n return false;\n } else if (this.month == 2 && this.day > 29) {\n return false;\n } else if (this.month == 2 && this.day > 28 && !isLeap(this.year)) {\n return false;\n } else {\n return true;\n }\n\n } else {\n return false;\n }\n }", "@Override\n public boolean isInputDateValid(String dateStr) {\n DateFormat sdf = new SimpleDateFormat(this.date);\n sdf.setLenient(false);\n try {\n sdf.parse(dateStr);\n } catch (ParseException e) {\n return false;\n }\n return true;\n }", "public static boolean isReservationDateValid(String date, String date_format) {\r\n try {\r\n DateFormat df = new SimpleDateFormat(date_format);\r\n df.setLenient(false);\r\n df.parse(date);\r\n return true;\r\n } catch (ParseException e) {\r\n return false;\r\n }\r\n }", "public boolean validateDate(String date) {\n\n\t\tDate enteredDate = null;\n\t\ttry {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tenteredDate = format.parse(date);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDate currentDate = new Date();\n\t\treturn enteredDate.before(currentDate);\n\t}", "public static boolean isValidDate(String date) {\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern( \"uuuu-MM-dd\" );\n\t\ttry {\n\t\t LocalDate localDateBad = LocalDate.parse( (CharSequence) date , f );\n\t\t} catch ( DateTimeParseException e ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isValidDate(String date) {\n try {\n LocalDate.parse(date, INPUT_FORMATTER);\n return true;\n } catch (DateTimeParseException e) {\n return false;\n }\n }", "public static boolean isValidDate(String test) {\n if (test.matches(VALIDATION_REGEX)) {\n try {\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd-MM-yyyy\");\n LocalDate date = LocalDate.parse(test, format);\n if (date.format(format).equals(test)) {\n return true;\n }\n return false;\n } catch (DateTimeParseException e) {\n return false;\n }\n }\n return false;\n }", "public Boolean validarFecha(LocalDate fechaIngresada);", "private boolean checkValidDate(String inputDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n date.setLenient(false);\n try {\n date.parse(inputDate);\n return true;\n } catch (ParseException e) {\n return false;\n }\n }", "private static boolean validDate(String date) {\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tDate tryDate = null; \n\t\t\ttry\n\t\t{\n\t\t\ttryDate = formatter.parse(date);\n\t\t}catch (ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t\tformatDate(tryDate);\n\t\treturn true; \n\t\t\n\t}", "boolean validDate(String dateString){\r\n\t\t\r\n\t\tif(DateUtil.parse(dateString) != null){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }", "public static boolean isValidDate(String input) {\n try {\n LocalDate.parse(input);\n return true;\n } catch (DateTimeParseException e) {\n return false;\n }\n }", "boolean isValidDate(String datestr)\n {\n String validch = \"1234567890/\";\n String month, day, year;\n Integer I;\n int m, d, y;\n int slash1, slash2;\n\n datestr.trim();\n if (datestr.length() == 0)\n return false;\n\n if (!checkchars(datestr, validch, false)) {\n // Invalid date entry\n return false;\n }\n\n\n slash1 = datestr.indexOf(\"/\");\n slash2 = datestr.indexOf(\"/\",slash1+1);\n if (slash1 <= 0 || slash2 <= 0)\n {\n // Invalid Entry\n return false;\n }\n\n month = datestr.substring(0,slash1);\n day = datestr.substring(slash1+1,slash2);\n year = datestr.substring(slash2+1,datestr.length());\n if ((month.length()<1 || month.length()>2) ||\n (day.length()<1 || day.length()>2) || (year.length()!=4))\n {\n // Invalid Date\n return false;\n }\n\n I = new Integer(month);\n m = I.intValue();\n I = new Integer(day);\n d = I.intValue();\n I = new Integer(year);\n y = I.intValue();\n //basic error checking\n if (m<1 || m>12 || d<1 || d>31 || y<0 || y>9999)\n return false;\n\n // months with 30 days\n if (d==31 && (m==4 || m==6 || m==9 || m==11)){\n return false;\n }\n\n // february, leap year\n if (m==2 && d>28){\n if (d > 29)\n return false;\n if ((y%4 == 0) || ((y%400==0) && (y%100!=0)))\n return false;\n }\n\n return true;\n }", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "public boolean isValidDate(String s) {\n try {\n LocalDate.parse(s);\n return true;\n } catch (DateTimeParseException e) {\n return false;\n }\n }", "private boolean validateDateAndTime(String date) {\n boolean isValid;\n Calendar prevDay;\n\n if(date != null && !date.isEmpty() && date.length() < MIN_DATE_LEN) {\n isValid = false;\n } else {\n prevDay = Calendar.getInstance(Locale.CANADA);\n prevDay.add(Calendar.DATE, -1); // All days valid from one day in the past\n Calendar cal = DateUtility.convertToDateObj(date);\n isValid = cal != null && cal.after(prevDay);\n }\n\n return isValid;\n }", "private boolean dateValidation(String userDate){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n sdf.setLenient(false);\n\n try {\n\n //if not valid, it will throw ParseException\n Date date = sdf.parse(userDate);\n System.out.println(date);\n\n } catch (ParseException e) {\n\n e.printStackTrace();\n return false;\n }\n\n return true;\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "boolean hasDate();", "public static boolean isValidDate(String inDate) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"mm/DD/yyyy\");\n dateFormat.setLenient(false);\n try {\n dateFormat.parse(inDate.trim());\n }\n catch (ParseException pe) {\n\n return false;\n }\n\n return true;\n }", "public static boolean checkDatePattern(String date) {\n return date.matches(\"^[0-9]{4}-[0-9]{2}-[0-9]{2}$\");\n }", "private static void checkDate(String date) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n if (!date.matches(RegexPattern.DATE_PATTERN)) {\n throw new DaoException(ExceptionMessage.getMessage(ExceptionMessage.DATE_PATTERN_ERROR));\n }\n try {\n Date formatDate = simpleDateFormat.parse(date);\n if (formatDate.getTime() + TIME_IN_DAY < new Date().getTime()) {\n throw new DaoException(\"Date must be in Future\");\n }\n } catch (ParseException ex) {\n throw new DaoException(ex.getMessage());\n }\n }", "public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }", "public static boolean dateFormatCheck(String date)\r\n\t{\r\n\t\treturn date.matches(\"(0?[1-9]|[12][0-9]|3[01])-(0?[1-9]|1[012])-((19|20)\\\\d\\\\d)\");\t\r\n\t}", "private void checkDate(String strDate, LocalDate localDate) {\n if (Integer.parseInt(strDate.substring(0, 4)) != localDate.getYear()\n || Integer.parseInt(strDate.substring(5, 7)) != localDate.getMonthValue()\n || Integer.parseInt(strDate.substring(8,10)) != localDate.getDayOfMonth()) {\n throw new IllegalArgumentException(\"Illegal date: date dose not exist.\");\n }\n }", "public boolean validarFecha(Date fecha) {\n\t\tif(!fecha.before(Calendar.getInstance().getTime())) {\n\t\t\tJOptionPane.showMessageDialog(null, \"La fecha introducida es invalida\",\"Fecha invalida\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\treturn false;\n\t\t}else return true; \n\t}", "public static boolean isValidDate(String dateString) {\r\n\t\tboolean convertSuccess = true;\r\n\t\tSimpleDateFormat dateformat = new SimpleDateFormat(SDF_DATE, Locale.CHINA);\r\n\t\ttry {\r\n\t\t\tdateformat.setLenient(false);\r\n\t\t\tdateformat.parse(dateString);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tconvertSuccess = false;\r\n\t\t}\r\n\t\treturn convertSuccess;\r\n\t}", "public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }", "public boolean validateDate(Date Date) {\n if (Date.after(startSemester) && Date.before(endSemester))\n if (Date.after(endHoliday) || Date.before(beginHoliday))\n return true;\n return false;\n\n }", "private static boolean dateValid(int[] time ) { \r\n\t\tfor ( int i = 0 ; i < time.length; i++) \r\n\t\t\tif (time[i] >2400 || time[i] < 0 ) \r\n\t\t\t\treturn false;\r\n\t\treturn true;\t\t\r\n\t}", "private boolean isDateValid(String date) {\n return date.contains(\"/\");\n }", "public boolean checkDate(int year, int month, int day) {\n\t\tboolean cd = checkDate(year, month, day, 0.0);\n\t\treturn cd;\n\t}", "public static boolean validateDate(String dateString) {\n boolean isValidDate = true;\n try {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(PATTERN);\n LocalDate ld = LocalDate.parse(dateString, dtf);\n } catch (Exception exc) {\n isValidDate = false;\n logger.error(\"Date found to be not parseable. Please check the \" +\n \"format!\");\n }\n return isValidDate;\n }", "@Test\n public void testIsValidateDate() {\n System.out.println(\"isValidateDate\");\n String dateString = \"2016-03-23T10:25:01Z\";\n boolean expResult = true;\n boolean result = DateUtil.isValidateDate(dateString);\n assertEquals(expResult, result);\n }", "public static boolean validDate(String fechaString) {\n // Try to parse the String.\n return DateUtil.parse(fechaString) != null;\n }", "public static boolean validateJavaDate(String strDate)\r\n {\r\n\tif (strDate.trim().equals(\"\"))\r\n\t{\r\n\t\tSystem.out.println(strDate+\" is Invalid Date format\");\r\n\t return false;\r\n\t \r\n\t}\r\n\t/* Date is not 'null' */\r\n\telse\r\n\t{\r\n\t /*\r\n\t * Set preferred date format,\r\n\t * For example MM-dd-yyyy, MM.dd.yyyy,dd.MM.yyyy etc.*/\r\n\t SimpleDateFormat sdfrmt = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t sdfrmt.setLenient(false);\r\n\t /* Create Date object\r\n\t * parse the string into date \r\n */\r\n\t try\r\n\t {\r\n\t Date javaDate = sdfrmt.parse(strDate); \r\n\t System.out.println(strDate+\" is valid date format\");\r\n\t }\r\n\t /* Date format is invalid */\r\n\t catch (ParseException e)\r\n\t {\r\n\t System.out.println(strDate+\" is Invalid Date format\");\r\n\t return false;\r\n\t }\r\n\t \r\n\t return true;\r\n\t}\r\n }", "public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }", "public static boolean validateDateFormat(String date, String format) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);\n try {\n LocalDate.parse(date, formatter);\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }", "boolean isSetDate();", "public static boolean isValidDate(String date) throws DateTimeException, NumberFormatException {\n\n if (date.length() != 10) {\n return false;\n }\n\n String[] dateComponents = date.split(\"/\");\n\n if (dateComponents.length != 3) {\n return false;\n }\n\n int day = Integer.parseInt(dateComponents[0]);\n int month = Integer.parseInt(dateComponents[1]);\n int year = Integer.parseInt(dateComponents[2]);\n\n LocalDate localdate;\n localdate = LocalDate.of(year, month, day);\n return true;\n }", "private boolean dateExists(){\n SimpleDateFormat dateFormat = getDateFormat();\n String toParse = wheels.getDateTimeString();\n try {\n dateFormat.setLenient(false); // disallow parsing invalid dates\n dateFormat.parse(toParse);\n return true;\n } catch (ParseException e) {\n return false;\n }\n }", "public boolean verifyLeaveDate(Date date){\t\t\n\t\tLocale en = new Locale(\"en\");\t\t\n\t\tString lDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn leaveDate.getText().equals(lDate);\n\t}", "public boolean verifyReturnDate(Date date){\n\t\tLocale en = new Locale(\"en\");\n\t\tString rDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn returnDate.getText().equals(rDate);\n\t}", "public static boolean isValid (int yyyy, int mm, int dd)\n {\n // null date 0000 00 00 is considered valid\n // but otherwise year 0000 never happened.\n if ( yyyy == 0 ) return(mm == 0) && (dd == 0);\n if ( (yyyy < MIN_YEAR) || (yyyy > MAX_YEAR)\n || (mm < 1) || (mm > 12)\n || (dd < 1) || (dd > 31) ) return false;\n // account for missing 10 days in 1582.\n // Thursday 1582 October 4 Julian was followed\n // immediately by Friday 1582 October 15\n // Similarly for the British Calendar\n if ( yyyy == OJC_lastYYYY\n && mm == OJC_lastMM\n && OJC_lastDD < dd\n && dd < GC_firstDD )\n return false;\n return dd <= daysInMonth(mm, yyyy);\n }", "public boolean isValidDate(String valD) { //Checks if date is in proper format\n String valDWithoutSpace = valD.replaceAll(\"\\\\s\", \"\");\n return valDWithoutSpace.length() == 8;\n}", "public static boolean isValidCreationTime(Date date) {\r\n \treturn \t(date!=null) &&\r\n \t\t\t(date.getTime()<=System.currentTimeMillis());\r\n }", "public boolean checkData(String data){\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t dateFormat.setLenient(false);\n\t try {\n\t\t\tdateFormat.parse(data.trim());\n\t\t} catch (java.text.ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t return true;\n\t}", "public static boolean isValidDt(double dt) {\n\t\treturn ((0 < dt) && (dt < 0.2));\n\t}", "public static boolean checkExpDate(String cS_exp_date) {\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Test\n public void testIsValidarFecha() {\n System.out.println(\"isValidarFecha\");\n String fecha = \"06/09/2018\";\n boolean expResult = true;\n boolean result = Entradas.isValidarFecha(fecha);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean DateValidation(String date, String startTime, String currentTime) {\n\n boolean state = false;\n\n //String x = dateChooser.getDate().toString();\n String Hyear = date.substring(24, 28); // get user input date\n String Hmonth = monthToCompare(date);\n String Hdate = date.substring(8, 10);\n String stHr = startTime.substring(0, 2);\n String stMin = startTime.substring(3, 5);\n\n int userYr, userMnth, userDate, userHour, userMin = 0;\n userYr = Integer.parseInt(Hyear); // conversion of user entered year to int\n userMnth = Integer.parseInt(Hmonth);\n userDate = Integer.parseInt(Hdate);\n userHour = Integer.parseInt(stHr);\n userMin = Integer.parseInt(stMin);\n\n String yyr = currentTime.substring(0, 4); // get currrent year from the string f\n String mmnth = currentTime.substring(5, 7);\n String ddt = currentTime.substring(8, 10); // get current date from the string f\n String hours = currentTime.substring(11, 13);\n String mins = currentTime.substring(14, 16);\n\n int yr, mnth, dt, shr, smin = 0;\n yr = Integer.parseInt(yyr); // convert current year from string to int\n mnth = Integer.parseInt(mmnth);\n dt = Integer.parseInt(ddt);\n shr = Integer.parseInt(hours);\n smin = Integer.parseInt(mins);\n\n if ((userYr == yr) || (userYr > yr)) { // if user entered year is the current year or future year, ok \n if (((userYr == yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth < mnth))) {\n if (((userYr == yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate >= dt))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour == shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour > shr) && (userMin < smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))) {\n state = true;\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid day!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid month!\");\n state = false;\n }\n } else {// if the user entered year is already passed\n JOptionPane.showMessageDialog(null, \"Invalid year\");\n state = false;\n }\n return state;\n }", "void checkForValidDate(String dateTime) {\n\n int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n Timestamp date = Timestamp.valueOf(startDateTime);\n if (date.after(now)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Date / Time later than today's date : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (date.after(now))\n\n StringTokenizer t = new StringTokenizer(dateTime, \"- :.\");\n int year = Integer.parseInt(t.nextToken());\n int month = Integer.parseInt(t.nextToken());\n int day = Integer.parseInt(t.nextToken());\n int hour = Integer.parseInt(t.nextToken());\n int minute = Integer.parseInt(t.nextToken());\n boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0));\n if (isLeapYear) daysOfMonth[1] += 1;\n if (year < 1850) {\n outputError(lineCount + \" - Fatal - \" +\n \"Year before 1850 : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (year < 1850)\n\n if (month > 12) {\n outputError(lineCount + \" - Fatal - \" +\n \"Month invalid ( > 12) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (month > 12)\n\n if (day > daysOfMonth[month-1]) {\n outputError(lineCount + \" - Fatal - \" +\n \"Day invalid ( > no of days in month) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (day > (daysOfMonth[month-1])\n\n if (hour > 23) {\n outputError(lineCount + \" - Fatal - \" +\n \"Hour invalid ( > 23) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (hour > 23)\n\n if (minute > 59) {\n outputError(lineCount + \" - Fatal - \" +\n \"Minute invalid ( > 59) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (minute > 59)\n\n }", "public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }", "public static boolean validarFecha(String fecha) {\n return validar(\"[0-9]{4}[-/][0-9]{2}[-/][0-9]{2}|[0-9]{2}[-/][0-9]{2}[-/][0-9]{4}\", fecha);\n }", "public Boolean isValidDate(int d, int m, int y)\r\n\t{\r\n\t\tint[] daysInMonth = new int[] {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\r\n\t\t\r\n\t\t//If dates negative or 0 or month beyond calender year\r\n\t\tif (d <= 0 || m <= 0 || m > 12 || y <= 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) //If leap year\r\n\t\t{\r\n\t\t\tdaysInMonth[1] = 29; //Change feb to 29 days\r\n\t\t}\r\n\t\t\r\n\t\treturn d <= daysInMonth[m - 1];\r\n\t}", "public static boolean isValidDate(String date, DateTimeFormatter formatter) {\n try {\n LocalDate.parse(date, formatter);\n } catch (DateTimeException e) {\n return false;\n }\n return true;\n }", "private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }", "public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }", "@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }", "private static boolean isValid(int m, int d, int y) {\r\n\t\tif (m < 1 || m > 12)\r\n\t\t\treturn false;\r\n\t\tif (d < 1 || d > DAYS[m])\r\n\t\t\treturn false;\r\n\t\tif (m == 2 && d == 29 && !isLeapYear(y))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "private static boolean isDate(String token) {\n return dateRegex.matcher(token).matches();\n }", "@Test\n public void isValidFormat() {\n assertFalse(Deadline.isValidFormat(VALID_DAY_1));\n\n // Deadline with day and month dd/mm -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Deadline with all 3 fields dd/mm/yyyy -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_2018.toString()));\n }", "public static boolean isValidBirthdate (String test) {\n try {\n LocalDate.parse(test);\n return isValidBirthdate(LocalDate.parse(test));\n } catch (DateTimeParseException e) {\n return false;\n }\n }", "public boolean isValid() {\n\t\tboolean result;\n\t\tDate mySD = this.getStartDate();\n\t\tDate myED = this.getEndDate();\n\t\tTime myST = this.getStartTime();\n\t\tTime myET = this.getEndTime();\n\n\t\tif (myED.isBefore(mySD)) { //end is before start\n\t\t\tresult = false;\n\t\t} else if (myED.isEquals(mySD)) { //start and end same day\n\t\t\tif (myET.compareTo(myST) < 0) { //end time before start time\n\t\t\t\tresult = false;\n\t\t\t} else { result = true;\t}\n\t\t} else { result = true;\t}\n\n\t\treturn result;\n\t}", "boolean hasStartDate();", "private boolean isDOBValid(String DOB) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n dateFormat.setLenient(false);\n try {\n dateFormat.parse(DOB.trim());\n } catch (ParseException pe) {\n return false;\n }\n return true;\n }", "public interface DateValidator {\n\n boolean isDateValid(String date);\n}", "public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "public boolean checkDate(int year, int month, int day, double hour) {\n\t\tdouble jd = swe_julday(year, month, day, hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\treturn (dt.year == year && dt.month == month && dt.day == day);\n\t}", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "private static boolean isValid(int m, int d, int y) {\n if (m < 1 || m > 12) return false;\n if (d < 1 || d > DAYS[m]) return false;\n if (m == 2 && d == 29 && !isLeapYear(y)) return false;\n return true;\n }", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "public void setValidDate(Date validDate) {\r\n this.validDate = validDate;\r\n }", "public Date getValidDate() {\r\n return validDate;\r\n }", "public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }", "public static void isValidDate(LocalDate date) throws ValidationException {\n\t\tLocalDate today = LocalDate.now();\n\t\tif (date.isBefore(today)) {\n\t\t\tthrow new ValidationException(\"Date cannot be past date\");\n\t\t}\n\t}", "public Date checkDate() {\n // Create new sdf with format is dd/MM/yyyy\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n sdf.setLenient(false); // Check special day\n Date date = null; // Create date\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n try {\n String dateStr = checkEmpty(\"DOB\"); // Call method to check input of dob\n date = sdf.parse(dateStr); // Convert string to date\n return date;\n\n } catch (ParseException e) {\n // Print error if date is invalid\n System.out.println(\"Date is invalid !\");\n System.out.print(\"Enter again (dd/MM/yyyy): \");\n }\n }\n return date; // Return date\n }", "public static boolean isValidAssignmentDeadline(String test) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HHmm\");\n sdf.setLenient(false);\n try {\n sdf.parse(test);\n return true;\n } catch (ParseException e) {\n return false;\n }\n }", "public void validateStartDateAndTime(String date){\n setStartDateAndTimeValid(validateDateAndTime(date));\n }", "@Test\n @Disabled\n public void testValidateFecha() {\n assertTrue(RegExprMain.validateFecha(\"10/06/2022\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2011\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2015\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2016\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2021\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/1999\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2007\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2000\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2002\"));\n assertFalse(RegExprMain.validateFecha(\"38/06/2009\"));\n assertFalse(RegExprMain.validateFecha(\"10/20/2010\"));\n \n \n\n }", "public static boolean isValidDate(String date, String[] openMarketTime) {\n if (date.length() != 14) {\n return false;\n }\n\n String hhmm = date.substring(8, 10) + \":\" + date.substring(10, 12); // yyyyMMddHHmmss -> hh:mm\n return Util.isBetweenTimes(openMarketTime, hhmm);\n }", "public void verifyDate(@NonNull final LocalDateTime date) {\n onView(viewMatcher).check(ViewAssertions.matches(withText(date.format(dateFormat))));\n }", "public static boolean checkLot(String title, String date) throws InvalidDateValueException {\n return (checkTitle(title) && checkDate(date));\n }", "void validateDates(ComponentSystemEvent event);", "public static boolean validarFecha(String fecha)\n\t{\n\t\tCalendar calendario = Calendar.getInstance();\n\t \tint hora,minutos,segundos,dia,mes,ano;\n\t \thora =calendario.get(Calendar.HOUR_OF_DAY);\n\t \tminutos = calendario.get(Calendar.MINUTE);\n\t \tsegundos = calendario.get(Calendar.SECOND);\t \t\n\t \t\n\t \tdia = calendario.get(Calendar.DAY_OF_MONTH);\n\t \tmes = calendario.get(Calendar.MONTH);\n\t \tmes=mes+1;\n\t\tano = calendario.get(Calendar.YEAR);\t\t\n\t\tString diaFecha;\n\t\tString mesFecha;\n\t\tString anoFecha = null;\n\t\t\n\t\tint pos = 0;\n\t\tpos = fecha.indexOf('/');\n\t\tSystem.out.println(\"la posicion del primer slash es: \"+pos);\n\t\tdiaFecha = fecha.substring(0,pos);\n\t\tString resto = fecha.substring(pos+1,fecha.length());\n\t\tint pos2 = 0;\n\t\tpos2 = resto.indexOf('/');\n\t\tmesFecha = resto.substring(0,pos2);\n\t\tString resto2 = resto.substring(pos2+1,resto.length());//resto 3 es el ano\t\t\n\t\tSystem.out.println(\"la fecha es:\"+diaFecha+\",\"+mesFecha+\",\"+resto2);\t\t\n\t\tint diaInt,mesInt,anoInt;\n\t\tdiaInt=Integer.parseInt(diaFecha);\n\t\tmesInt=Integer.parseInt(mesFecha);\n\t\tanoInt=Integer.parseInt(resto2);\t\t\n\t\tSystem.out.println(\"fechaSistema:\"+dia+\"/\"+mes+\"/\"+ano);\n\t\tSystem.out.println(\"fechaEntrada:\"+diaInt+\"/\"+mesInt+\"/\"+anoInt);\n\t\tif ((anoInt<ano))\n\t\t{\n\t\t\tSystem.out.println(\"fecha de entrada es menor\");\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mesInt<mes)\n\t\t\t{\t\t\t\t\n\t\t\t\tSystem.out.println(\"fecha de entrada es menor\");\n\t\t\t\treturn true;\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (diaInt < dia)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"fecha de entrada es menor\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n \t\n\t}", "public static boolean checkDateConstraints(Task task) {\n if (task.getBeginDate().before(new Date()) ||\n task.getBeginDate().after(task.getEndingDate()) ||\n task.getBeginDate().equals(task.getEndingDate())) {\n return false;\n }\n return true;\n }", "boolean isValidForNow ();" ]
[ "0.80980885", "0.7970524", "0.78506005", "0.78341436", "0.7819129", "0.7778189", "0.7750392", "0.77502793", "0.77304274", "0.7646913", "0.75717515", "0.7563238", "0.7550295", "0.7535916", "0.7528795", "0.75007564", "0.7495145", "0.7478475", "0.74689883", "0.744953", "0.74260235", "0.7414282", "0.73723805", "0.7361588", "0.73586136", "0.73402166", "0.733859", "0.73167855", "0.73125035", "0.72922814", "0.72860295", "0.72674626", "0.7245465", "0.7162241", "0.71449506", "0.7137375", "0.7122157", "0.7093961", "0.70750654", "0.7055343", "0.7026731", "0.7010761", "0.69932115", "0.69841665", "0.6970471", "0.6957518", "0.69451565", "0.69111484", "0.6904356", "0.69005126", "0.6865678", "0.68369853", "0.67832106", "0.6768397", "0.67537606", "0.6734377", "0.67286795", "0.67279965", "0.6726653", "0.672214", "0.67079335", "0.6700667", "0.66995615", "0.6699429", "0.6691331", "0.6689032", "0.66853535", "0.6651057", "0.6650208", "0.6647195", "0.6640521", "0.6631572", "0.6623908", "0.6622571", "0.6620444", "0.6618861", "0.6618622", "0.66005504", "0.6595127", "0.65912485", "0.6585513", "0.6564853", "0.6564144", "0.656023", "0.6551116", "0.65366834", "0.65188843", "0.6504335", "0.65003926", "0.6499207", "0.64887404", "0.64757824", "0.64675516", "0.64607143", "0.64565444", "0.6454808", "0.6451464", "0.64509743", "0.6449227", "0.6442338" ]
0.65459675
85
is y a leap year?
private static boolean isLeapYear(int y) { if (y % 400 == 0) return true; if (y % 100 == 0) return false; return y % 4 == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isLeapYear(int y) {\n if (y % 400 == 0) return true;\n if (y % 100 == 0) return false;\n return y % 4 == 0;\n }", "private static boolean isLeapYear(int y) {\r\n\t\tif (y % 400 == 0)\r\n\t\t\treturn true;\r\n\t\tif (y % 100 == 0)\r\n\t\t\treturn false;\r\n\t\treturn (y % 4 == 0);\r\n\t}", "public boolean isLeapYear(){\n\t if (((this.year % 4 == 0) && (this.year % 100 != 0)) || (this.year %400 == 0))\n\t return true;\n\treturn false;\n }", "public void leapYear() {\n System.out.print(\"\\nEnter a year: \");\n long year = in.nextLong();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n System.out.println(\"\\n\" + year + \" is a leap year.\\n\");\n } else {\n System.out.println(\"\\n\" + year + \" is not a leap year.\\n\");\n }\n }", "private boolean leapyear(int yr){\n if(yr%4 == 0 && yr%100 != 0){ //If year is divisible by 4 but not by 100\r\n days[1] = 29; //Set February's days to 29\r\n return true; //Retrn true.\r\n }\r\n return false; //Otherwise, return false.\r\n }", "boolean isLeapYear(int year){\n\tif (year % 400 == 0)\n\t\treturn true;\n\telse if (year % 100 == 0)\n\t\treturn false;\n\telse if (year % 4 == 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n }", "private static boolean isLeapYear(int year) {\n return year % 400 == 0 || (year % 100 != 0 && year % 4 == 0);\n }", "private boolean leap(int year) {\n\t\tif (!(year % 4 == 0)) {\n\t\t\treturn false;\n\t\t} else if (!(year % 100 == 0)) {\n\t\t\treturn true;\n\t\t} else if (!(year % 400 == 0)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public static boolean isLeapYear(int year) {\n if(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)){\n return true;\n } \n else{\n return false; \n } \n }", "public boolean isLeapYear() {\n\n return ((this.cyear % 4) == 3);\n\n }", "private static boolean isLeapYear(int year)\n\t{\n \t if ((year % 4 == 0) && (year % 100 != 0)) return true;\n\t\t if (year % 400 == 0) return true;\n\t\t return true;\n }", "private static boolean isLeapYear(int year)\n\t{\n\t\treturn ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);\n\t}", "public boolean isLeapYear(int year){\r\n if(year%4 != 0){\r\n return false;\r\n } else if(year%100 == 0){\r\n if(year%400 != 0) return false; \r\n }\r\n return true;\r\n }", "public static boolean getLeapYear() {\n boolean tag = false;\n Date date = new Date();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy\");\n String dt = df.format(date);\n int pastYear = Integer.parseInt(dt) - 1;\n if (pastYear % 4 == 0 && (pastYear % 100 != 0 || pastYear % 400 == 0)) tag = true;\n return tag;\n }", "public static boolean isLeap (int yyyy)\n {\n // if you change this code, make sure you make corresponding changes to\n // jan01OfYear, toGregorian, MondayIsZeroAdjustment, SundayIsZeroAdjustment,\n // AD_epochAdjustment and BC_epochAdjustment\n // yyyy & 3 is a fast way of saying yyyy % 4\n if ( yyyy < Leap100RuleYYYY )\n if ( yyyy < 0 )\n {\n return((yyyy + 1) & 3) == 0;\n }\n else\n {\n return(yyyy & 3) == 0;\n }\n if ( (yyyy & 3) != 0 ) return false;\n if ( yyyy % 100 != 0 ) return true;\n if ( yyyy < Leap400RuleYYYY ) return false;\n if ( yyyy % 400 != 0 ) return false;\n return true;\n }", "public boolean isLeap(int year) {\n\n if (year % 4 == 0) {\n if (year % 100 == 0) {\n if (year % 400 == 0) {\n return true;\n } else {\n return false;\n }\n\n } else\n return true;\n } else {\n return false;\n }\n\n }", "@Test\n public void isLeapYear() {\n assertFalse(Deadline.isLeapYear(Integer.parseInt(VALID_YEAR_2018)));\n\n // Valid leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2020)));\n\n // Valid year divisible by 4 but is common year -> returns false\n assertFalse(Deadline.isLeapYear(Integer.parseInt(NON_LEAP_YEAR_2100)));\n\n // Valid year divisible by 100 but is leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2400)));\n }", "public static boolean isLeap (int year) {\r\n\t\tif ((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0)) // uslov za prestupnu godinu\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}", "public static boolean isLeapYear(int year){\n if(year%100==0){\n if(year%400==0){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n if(year%4==0){\n return true;\n }\n else{\n return false;\n }\n }\n }", "private static boolean isLeapMonth(int m, int y) {\r\n\t\tif (isLeapYear(y))\r\n\t\t\treturn ((m == 2) ? true : false);\r\n\t\treturn false;\r\n\t}", "public static boolean isLeapYear(int year){\n\t\t\r\n\t\tif ((year%4==0&&year%100!=0)||(year%400==0)){\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test\n public void isLeapYearOk(){\n assertTrue(Date.isLeapYear(2008));\n }", "public boolean leapYear(int year) {\r\n\r\n\t\tif (year % 4 == 0 || year % 400 == 0 && year % 100 != 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public boolean isLeapYear(int year) {\n\t\tboolean isALeapYear = year % 400 == 0 || year % 4 == 0 && year % 100 != 0;\n\t\treturn isALeapYear;\n\t}", "public boolean Leap_Gregorian(double year)\n {\n return ((year % 4) == 0) && (!(((year % 100) == 0) && ((year % 400) != 0)));\n }", "public static boolean isLeapYear(int year) {\n\t\t// Calendar cal = Calendar.getInstance();\n\t\t// if (cal.YEAR % 4 == 0)\n\t\tif (year % 100 != 0 || year % 400 == 0) {\n\t\t\tif (year % 4 == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean leapYear(int year)\n\t{\n\t\tif(year<999 || year>9999) \n\t\t{\n\t\t\tSystem.out.println(\"Enter valid year\");\n\t\t}\n\t\t\n\t\tif(year%400==0 || year%4==0 && year%100!=0) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "protected static final boolean is_leap_year_gregorian (int year)\n {\n // Algorithm: Kernighan & Richie,\n // \"The C Programming Language\", 1st edition (1978), p. 37.\n //\n return (year % 4 == 0 && year % 100 != 0 || year % 400 == 0);\n }", "@Test\n public void checkLeapYearCriteria() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItLeapYear(1600);\n assertTrue(flag);\n }", "public static boolean isLeapYear(int year)\n\t{\n\t\tif(year < 0)\n\t\t\treturn false;\n\t\tif(year % 400 == 0)\n\t\t\treturn true;\n\t\tif(year % 100 != 0 && year % 4 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean LeapYearValidation(int year) {\r\n\t\tif (year >= 1582 && year <= 9999)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\r\n\t}", "public boolean isDate (int year, int doy)\n {\n return ((year >= FIRST_YEAR)\n && (1 <= doy && doy <= getLengthOfYear (year)));\n }", "boolean isLeapSecondsKnown();", "@Test\n public void test6() {\n boolean res = object.checkLeapYear(-400);\n assertEquals(false, res);\n }", "@Test\n public void test7() {\n boolean res = object.checkLeapYear(1900);\n assertEquals(false, res);\n }", "public void Leapyear(int YearToCheck) {\n\n boolean leapValue = false;\n\n if (((YearToCheck % 4 == 0) && (YearToCheck % 100 != 0)) || (YearToCheck % 400 == 0)){\n leapValue=true;}\n\n if (leapValue)\n System.out.println(YearToCheck + \" is a leap year.\");\n else\n System.out.println(YearToCheck + \" is not a leap year.\");\n }", "public abstract String reportLeapYear(int year);", "@Override\n protected boolean isLeapYear(int persianYear) {\n return ((((((persianYear - ((persianYear > 0) ? 474 : 473)) % 2820) + 474) + 38) * 682) % 2816) < 682;\n }", "static int countLeapYears(DaysBetween d) \n {\n int years = d.y;\n \n // Check if the current year needs to be considered\n // for the count of leap years or not\n if (d.m <= 2) \n {\n years--;\n }\n \n // An year is a leap year if it is a multiple of 4,\n // multiple of 400 and not a multiple of 100.\n return years / 4 - years / 100 + years / 400;\n }", "@Test\n public void leapYearIsDivisibleBy4(){\n int year = 2020;\n assertTrue(LeapYear.isLeapYear(year));\n }", "public void checkLeapYear(int year) {\r\n\t int count=1;\r\n\t int temp=year;\r\n\t\twhile(temp>10){\r\n\t\t\tint r= temp%10;\r\n\t\t\tcount++;\r\n\t\t\ttemp=temp/10;\r\n\t\t}\r\n\t\tif(count>=3){\r\n\t\t\tif(year%4==0){\r\n\t\t\t\tSystem.out.println(\"given year is leap year:\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"given year is not leap year:\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"please enter atleast 4 digit no to find leap year\");\r\n\t\t}\r\n}", "@Test\n public void test8() {\n boolean res = object.checkLeapYear(2000);\n assertEquals(true, res);\n }", "protected static final boolean is_leap_year_julian (int year)\n {\n return (year % 4 == 0);\n }", "@Test\n public void test1() {\n boolean res = object.checkLeapYear(0);\n assertEquals(false, res);\n }", "@Test\r\n\tpublic void test_leap_zero() {\r\n\t\tLeapYear year1940 = new LeapYear(1940);\r\n\t\tLeapYear year2080 = new LeapYear(2080);\r\n\t\tassertTrue(year1940.isLeapYear());\r\n\t\tassertTrue(year2080.isLeapYear());\r\n\r\n\t}", "@Test\r\n\tpublic void test_leap_five(){\r\n\t\tLeapYear year1555 = new LeapYear(1555);\r\n\t\tLeapYear year2135 = new LeapYear(2135);\r\n\t\tassertFalse(year1555.isLeapYear());\r\n\t\tassertFalse(year2135.isLeapYear());\r\n\t}", "public boolean isALeapYear(int year){\n\n if (((year%4 == 0) && (year%100!=0)) || (year%400==0)){\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n\n //take input from user and store into year variable\n System.out.printf(\"Enter a year: \");\n int year = input.nextInt();\n\n /*\n Condition:\n The year is evenly divisible by 4;\n If the year can be evenly divided by 100, it is NOT a leap year, unless;\n The year is also evenly divisible by 400. Then it is a leap year.\n */\n\n if( year%4 == 0){\n if (year%100 == 0){\n if (year%400 == 0){\n System.out.println(year + \" is leap year\");\n } else {\n System.out.println(year+\" is not leap year\");\n }\n }\n else {\n System.out.println(year + \" is leap year\");\n }\n } else {\n System.out.println(year+ \" is not leap year\");\n }\n\n\n }", "private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }", "@Property\n void nonCenturialLeapYearTest(@ForAll(\"nonCenturialLeapYears\") int year){\n assertThat(ly.isLeapYear(year));\n }", "@Property\n void centurialNonLeapYearTest(@ForAll(\"centurialNonLeapYears\") int year){\n assertThat(!ly.isLeapYear(year));\n }", "@Test\n\tpublic void testLeap002() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"2015\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_FALSE_RESULT, response.getResults());\n\t}", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter Year to check whether it is leap year or not:\");\r\n\t\tint year= scan.nextInt();\r\n\t\tscan.close();\r\n\t\tif(year%4==0)\r\n\t\t\tSystem.out.println(year+\" is leap year\");\r\n\t\telse\r\n\t\t\tSystem.out.println(year+\" is not leap year\");\r\n\t}", "@Test\n\tpublic void testLeap001() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"2014\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_FALSE_RESULT, response.getResults());\n\t}", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectLeapYear() {\r\n SimpleDate d1 = new SimpleDate(\"2/29/2000\");\r\n }", "@Property\n void nonCenturialNonLeapyearTest(@ForAll(\"nonCenturialNonLeapyears\") int year){\n assertThat(!ly.isLeapYear(year));\n }", "public static boolean esAnoBisiesto(int year) {\r\n\t\t assert year >= 1583; // not valid before this date.\r\n\t\t return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);\r\n\t}", "@Test\n\tpublic void testLeap005() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"1900\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_FALSE_RESULT, response.getResults());\n\t}", "public static void main(String[] args) {\n\t\tint y=2019; //변수를 꼭 똑같이 year로 쓸 필요 없다. 다만, 메소드의 변수명과 일치시키는게 편하므로 똑같이 쓸 뿐이다. \n\t\tisLeapYear(y);\n\t\tboolean bCheck=isLeapYear2(y);\n\t\tif(bCheck)\n\t\t\tSystem.out.println(\"윤년입니다.\");\n\t\telse\n\t\t\tSystem.out.println(\"윤년이 아닙니다.\");\n\t}", "private static boolean isValid(int m, int d, int y) {\n\t\t\tif (m < 1 || m > 12) return false;\n\t\t\tif (d < 1 || d > DAYS[m]) return false;\n\t\t\tif (m == 2 && d == 29 && !isLeapYear(y)) return false;\n\t\t\treturn true;\n\t\t}", "private static boolean isValid(int m, int d, int y) {\r\n\t\tif (m < 1 || m > 12)\r\n\t\t\treturn false;\r\n\t\tif (d < 1 || d > DAYS[m])\r\n\t\t\treturn false;\r\n\t\tif (m == 2 && d == 29 && !isLeapYear(y))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "private static boolean isValid(int m, int d, int y) {\n if (m < 1 || m > 12) return false;\n if (d < 1 || d > DAYS[m]) return false;\n if (m == 2 && d == 29 && !isLeapYear(y)) return false;\n return true;\n }", "protected static final int date2doy\n (boolean isLeapYear, int month, int day)\n {\n return (isLeapYear\n ? date2doy_in_leap_year[month][day]\n : date2doy_in_ordinary_year[month][day]);\n }", "@Test\n\tpublic void testLeap003() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"2016\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_TRUE_RESULT, response.getResults());\n\t}", "protected final void doy2date (boolean isLeapYear, int year, int doy)\n {\n this.year = year;\n if (isLeapYear) {\n month = doy2month_in_leap_year[doy];\n day = doy2day_in_leap_year[doy];\n }\n else {\n month = doy2month_in_ordinary_year[doy];\n day = doy2day_in_ordinary_year[doy];\n }\n }", "@Test\n\tpublic void testLeap006() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"2004\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_TRUE_RESULT, response.getResults());\n\t}", "@Property\n void centurialLeapYearTest(@ForAll(\"centurialLeapYears\") int year){\n assertThat(ly.isLeapYear(year));\n }", "int getYear();", "@Test\n\tpublic void testLeap004() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"2000\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_TRUE_RESULT, response.getResults());\n\t}", "private boolean isCurrentYear(Date date) {\n boolean result = false;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n Calendar today = Calendar.getInstance();\n if (today.get(Calendar.YEAR) == calendar.get(Calendar.YEAR)) {\n result = true;\n }\n return result;\n }", "public Boolean isValidDate(int d, int m, int y)\r\n\t{\r\n\t\tint[] daysInMonth = new int[] {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\r\n\t\t\r\n\t\t//If dates negative or 0 or month beyond calender year\r\n\t\tif (d <= 0 || m <= 0 || m > 12 || y <= 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) //If leap year\r\n\t\t{\r\n\t\t\tdaysInMonth[1] = 29; //Change feb to 29 days\r\n\t\t}\r\n\t\t\r\n\t\treturn d <= daysInMonth[m - 1];\r\n\t}", "@Test\n\tpublic void testLeap007() throws VistaWebServiceFault {\n\n\t\trequest.setYear(\"NINTEEN HUNDRED\");\n\n\t\t// Execute request against mocked object backend.\n\t\tresponse = service.leap(request);\n\n\t\tassertNotNull(response);\n\t\tassertEquals(EXPECTED_FALSE_RESULT, response.getResults());\n\t}", "@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }", "public static void main(String[] args) {\n\n int year = 2020; // boolean: ==, =, !=, <=, >=, <, >\n boolean result = year % 4 == 0;\n\n System.out.println(\"Year\" + year + \"is a leap year: \" + result); // 2020 is a leap year : true; 2021 is a leap year : false\n System.out.println ( 10/3.0 );\n\n System.out.println ( (int)(10.0/3) );\n\n\n\n\n\n\n\n\n }", "private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }", "public static int checkDaysInMonth(int m, int y) {\n if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) { // if it is a long month\n return 31; // the month has 31 days\n } else if (m == 4 || m == 6 || m == 9 || m == 11) { // if it is a short month\n return 30; // the month has 30 days\n } else if (m == 2) { // if the month is February\n if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0) { // if it is a leap year\n return 29; // the month has 29 days\n } else { // if it is not a leap year\n return 28; // the month has 28 days\n }\n }\n return 0; // if the month number is invalid\n }", "public void setYear(int y){\n\t\tyear = y ; \n\t}", "public static int getTodaysYear() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.year;\t\r\n\t\t\r\n\t}", "private int NumberLeapyearsSince1900 (int YearNumber) {\n int i = 1900;\n int countLeapyears = 0;\n for (i = 1900; i < YearNumber; i = i+4); {\n if (daysInYear(i) == 366) {\n countLeapyears ++;\n }\n } return countLeapyears;\n\n }", "public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "public boolean IsElectionYear(int Year) {\n\t\tif (Year % 4 == 0 && Year!=0) {\n\t\t\tif(debug) logger.info(\"IsElectionYear: true\");\n\t\t\treturn(true);\n\t\t}\n\t\telse {\n\t\t\tif(debug) logger.info(\"IsElectionYear: false\");\n\t\t\treturn(false);\t\n\t\t}\t\n\t}", "@Test public void Mdy_at_y_slash()\t\t\t\t\t\t\t\t{tst_date_(\"1/2/70\"\t\t\t\t\t, \"1970-01-02\");}", "public int getEndingYear()\n {\n return -1;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner stdIn = new Scanner(System.in);\r\n\t\t\r\n\t\tint year = stdIn.nextInt();\r\n\t\t\r\n\t\tif((year % 4) == 0 && (year % 100) != 0 || (year % 400 == 0))\r\n\t\t\tSystem.out.print(\"yes\");\r\n\t\telse\r\n\t\t\tSystem.out.print(\"no\");\r\n\r\n\t}", "private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }", "public void checkYear()\n {\n //Rat\n if (year == 1900 || year == 1912 || year == 1924 || year == 1936 || year == 1948 || year == 1960 || year == 1972 || year == 1984 || year == 1996 || year == 2008 || year == 2020)\n {System.out.println(\"Born in the year of the Rat\");}\n //Ox\n else if (year == 1901 || year == 1913 || year == 1925 || year == 1937 || year == 1949 || year == 1961 || year == 1973 || year == 1985 || year == 1997 || year == 2009 || year == 2021)\n {System.out.println(\"Born in the year of the Ox\");}\n //tiger\n else if (year == 1902 || year == 1914 || year == 1926 || year == 1938 || year == 1950 || year == 1962 || year == 1974 || year == 1986 || year == 1998 || year == 2010 || year == 2022)\n {System.out.println(\"Born in the year of the Tiger\");}\n //Hare\n else if (year == 1903 || year == 1915 || year == 1927 || year == 1939 || year == 1951 || year == 1963 || year == 1975 || year == 1987 || year == 1999 || year == 2011 || year == 2023)\n {System.out.println(\"Born in the year of the Hare/Rabbit\");}\n //Dragon\n else if (year == 1904 || year == 1916 || year == 1928 || year == 1940 || year == 1952 || year == 1964 || year == 1976 || year == 1988 || year == 2000 || year == 2012 || year == 2024)\n {System.out.println(\"Born in the year of the Dragon\");}\n //Snake\n else if (year == 1905 || year == 1917 || year == 1929 || year == 1941 || year == 1953 || year == 1965 || year == 1977 || year == 1989 || year == 2001 || year == 2012 || year == 2025)\n {System.out.println(\"Born in the year of the Snake\");}\n //Horse\n else if (year == 1906 || year == 1918 || year == 1930 || year == 1942 || year == 1954 || year == 1966 || year == 1978 || year == 1990 || year == 2002 || year == 2013 || year == 2026)\n {System.out.println(\"Born in the year of the Horse\");}\n //Ram\n else if (year == 1907 || year == 1919 || year == 1931 || year == 1943 || year == 1955 || year == 1967 || year == 1979 || year == 1991 || year == 2003 || year == 2014 || year == 2027)\n {System.out.println(\"Born in the year of the Ram\");}\n //Monkey\n else if (year == 1908 || year == 1920 || year == 1932 || year == 1944 || year == 1956 || year == 1968 || year == 1980 || year == 1992 || year == 2004 || year == 2015 || year == 2028)\n {System.out.println(\"Born in the year of the Monkey\");}\n //Rooster\n else if (year == 1909 || year == 1921 || year == 1933 || year == 1945 || year == 1957 || year == 1969 || year == 1981 || year == 1993 || year == 2005 || year == 2016 || year == 2029)\n {System.out.println(\"Born in the year of the Rooster\");}\n //Dog\n else if (year == 1910 || year == 1922 || year == 1934 || year == 1946 || year == 1958 || year == 1970 || year == 1982 || year == 1994 || year == 2006 || year == 2017 || year == 2030)\n {System.out.println(\"Born in the year of the Dog\");}\n //Pig\n else if (year == 1911 || year == 1923 || year == 1935 || year == 1947 || year == 1959 || year == 1971 || year == 1983 || year == 1995 || year == 2007 || year == 2018 || year == 2031)\n {System.out.println(\"Born in the year of the Pig\");}\n }", "public int getLastMonthOfYear (int year)\n {\n return 12;\n }", "public boolean isSupportYear() {\r\n return true;\r\n }", "public boolean checkValidationForDate(int month, int day, boolean leapYear) {\r\n\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 2:\r\n\t\t\tif (leapYear) {\r\n\t\t\t\tif (day > 0 && day <= 29) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (day > 0 && day <= 28) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\tcase 3:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 4:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 5:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 6:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 7:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 8:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 9:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 10:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 11:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 12:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Please enter valid input\");\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}", "protected static final int jan01OfYear(int yyyy)\n {\n int leapAdjustment;\n if ( yyyy < 0 )\n {\n // years -1 -5 -9 were leap years.\n // adjustment -1->1 -2->1 -3->1 -4->1 -5->2 -6->2\n leapAdjustment = (3 - yyyy) / 4;\n return(yyyy * 365) - leapAdjustment + BC_epochAdjustment;\n }\n\n // years 4 8 12 were leap years\n // adjustment 1->0 2->0, 3->0, 4->0, 5->1, 6->1, 7->1, 8->1, 9->2\n leapAdjustment = (yyyy - 1) / 4;\n\n int missingDayAdjust = (yyyy > GC_firstYYYY) ? missingDays : 0;\n\n // mod 100 and mod 400 rules started in 1600 for Gregorian,\n // but 1800/2000 in the British scheme\n if ( yyyy > Leap100RuleYYYY )\n {\n leapAdjustment -= (yyyy-Leap100RuleYYYY+99) / 100;\n }\n if ( yyyy > Leap400RuleYYYY )\n {\n leapAdjustment += (yyyy-Leap400RuleYYYY+399) / 400;\n }\n\n return yyyy * 365\n + leapAdjustment\n - missingDayAdjust\n + AD_epochAdjustment;\n }", "Year createYear();", "private static int getDaysSinceNewYear() {\n\t\tGregorianCalendar now = new GregorianCalendar();\n\n\t\treturn now.get(GregorianCalendar.DAY_OF_YEAR);\n\t}", "public boolean setYear(int newYear) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\treturn true;\n\t}", "public static void main(String[] args) {\n\t\tLeapYear c=new LeapYear();\r\n\t\t\t\t\r\n\t\tScanner scan=new Scanner(System.in);\r\n\t\tSystem.out.println(\"***** Leap Year & Non Leap Year Program *****\");\t\t\r\n\t\tSystem.out.println(\"Enter the year: \");\r\n int year=scan.nextInt();\r\n\r\n String res=c.findyear(year);\r\n System.out.println(\"The given year is \"+res);\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter FROM which year you want to check the leap years: \");\r\n\t\tint fromY = Numbers.inputPositiveInteger();\r\n\t\tSystem.out.println(\"Enter TO which year you want to check the leap years: \");\r\n\t\tint ToY = Numbers.inputPositiveInteger();\r\n\t\t\r\n\t\tif(ToY<fromY){ //if the interval is not ok, like from 90 to 20 than print\r\n\t\t\tSystem.out.println(\"The years interval you entered has no sense.\");\r\n\t\t}else{\r\n\t\t\tcountAndPrintLeapYears(fromY, ToY);//else if its ok, than calculate and print\r\n\t\t}\r\n\t}", "public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }", "Integer getTenYear();", "public boolean checkDate(int year, int month, int day) {\n\t\tboolean cd = checkDate(year, month, day, 0.0);\n\t\treturn cd;\n\t}", "@Test\n public void computeFactor_FebruaryOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-29 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 29 (days)\n assertEquals(29, factor, 0);\n }" ]
[ "0.87723", "0.8763436", "0.805778", "0.7843906", "0.78231186", "0.7775126", "0.7755014", "0.7737467", "0.7737397", "0.7732945", "0.7713731", "0.76818395", "0.76803946", "0.76695347", "0.76439667", "0.7638443", "0.7610375", "0.76091206", "0.7587896", "0.749945", "0.7467662", "0.74669856", "0.737411", "0.7336659", "0.7318283", "0.72891355", "0.7211558", "0.7186471", "0.71563876", "0.71048266", "0.708021", "0.70755976", "0.69335824", "0.6896982", "0.6866086", "0.6852557", "0.6843755", "0.6801438", "0.67914677", "0.67650807", "0.6760752", "0.6728184", "0.6718653", "0.66453", "0.6644315", "0.6600352", "0.6566559", "0.65637493", "0.65596217", "0.635222", "0.632", "0.63093734", "0.62751526", "0.6254206", "0.622805", "0.6223367", "0.6209588", "0.6200625", "0.6200057", "0.6196534", "0.6180212", "0.61673635", "0.6157266", "0.6133973", "0.61237395", "0.6118662", "0.6096375", "0.6092489", "0.60847074", "0.60624355", "0.60593027", "0.60475117", "0.60196066", "0.6014791", "0.5992317", "0.59902716", "0.5982589", "0.59358865", "0.5923357", "0.5909358", "0.585629", "0.58445954", "0.58436304", "0.582548", "0.5784321", "0.5781634", "0.5758811", "0.5724948", "0.57143766", "0.5705899", "0.5696638", "0.5674358", "0.56687605", "0.56440353", "0.5641189", "0.56173664", "0.5603397", "0.55982643", "0.55979335", "0.55359226" ]
0.8733412
2
return the next Date
public Group3Date next() { if (isValid(month, day + 1, year)) return new Group3Date(month, day + 1, year); else if (isValid(month + 1, 1, year)) return new Group3Date(month + 1, 1, year); else return new Group3Date(1, 1, year + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void calcNextDate();", "public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}", "public Date next() {\n if (isValid(month, day + 1, year)) return new Date(month, day + 1, year);\n else if (isValid(month + 1, 1, year)) return new Date(month, 1, year);\n else return new Date(1, 1, year + 1);\n }", "public String getNextDate()\n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);\n\t\treturn getTodayDate ();\n\n\t}", "public void nextDay() {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d/M/yyyy\");\n localDate = LocalDate.parse(irlDate, formatter);\n localDate = localDate.plusDays(1);\n irlDate = DateTimeFormatter.ofPattern(\"d/M/yyyy\").format(localDate);\n System.out.println(irlDate);\n currentDay = Integer.parseInt(DateTimeFormatter.ofPattern(\"d\").format(localDate));\n currentMonth = Integer.parseInt(DateTimeFormatter.ofPattern(\"M\").format(localDate)) - 1;\n currentYear = Integer.parseInt(DateTimeFormatter.ofPattern(\"yyyy\").format(localDate));\n }", "public void nextDay() {\r\n int daysMax = daysInMonth();\r\n \r\n if (day == daysMax && month == 12) { // If end of the year, set date to Jan 1\r\n setDate(1, 1);\r\n } else if (day == daysMax) { // If last day of month, set to first day of next month\r\n setDate(month + 1, 1);\r\n } else { // Otherwise, simply increment this day\r\n day++;\r\n }\r\n }", "Date NextEvent(Date d);", "private void nextDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tlong hourMills = this.nextHourMills;\r\n\t\tint day;\r\n\t\t\r\n\t\tcalendar.setTimeInMillis(this.nextHourMills);\r\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\r\n\t\tthis.nextHourMills = calendar.getTimeInMillis();\r\n\t\t\r\n\t\tday = calendar.get(Calendar.DATE);\r\n\t\tif (day != this.day) {\r\n\t\t\t// 날짜가 바뀌었으면 calendar.set(Calendar.HOUR_OF_DAY, 0) 는 불필요. 단지 최종 날짜만 바꾸어준다.\r\n\t\t\tthis.day = day;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// 바뀌지 않았으면\r\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile dir = new File(this.root, Long.toString(calendar.getTimeInMillis()));\r\n\t\t\tFile file = new File(dir, Long.toString(hourMills));\r\n\t\t\t\r\n\t\t\tthis.data = JSONFile.getJSONObject(file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthis.data = null;\r\n\t\t\t\r\n\t\t\tthis.date.setTimeInMillis(this.nextHourMills);\r\n\t\t}\r\n\t}", "public java.util.Date getNextAppointmentDate () {\n\t\treturn nextAppointmentDate;\n\t}", "@Override\n public void clickDateNextDay() {\n\n if (DateUtil.isLastDate()) {\n final WebElement divElement = DriverConfig.getDriver().findElement(\n By.id(\"ui-datepicker-div\"));\n final WebElement nextElement = retrieveElementByAttributeValueContainsForSubElement(\n DriverConfig.getDriver(), divElement, TAG_SPAN, ATTR_CLASS,\n \"ui-icon ui-icon-circle-triangle-e\", SHORT_TIMEOUT);\n nextElement.click();\n changeAwayDateValue(\"1\");\n } else {\n int current = DateUtil.getCurrentDate();\n changeAwayDateValue(String.valueOf(current + 1));\n }\n }", "public long getNextScheduled() {\n\t\tDate currDate = new Date();\n\t\t\n\t\tCalendar runTimeToday = Calendar.getInstance();\n\t\trunTimeToday.setTime(currDate);\n\t\t\n\t\trunTimeToday.set(Calendar.HOUR_OF_DAY, hour);\n\t\trunTimeToday.set(Calendar.MINUTE, minute);\n\t\trunTimeToday.set(Calendar.SECOND, 0);\n\t\t\n\t\tDate runTimeTodayDate = runTimeToday.getTime();\n\t\t\n\t\tif(currDate.before(runTimeTodayDate)) {\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is today.\");\n\t\t} else {\n\t\t\t// equals or after\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is tomorrow.\");\n\t\t\trunTimeToday.add(Calendar.DATE, 1);\n\t\t\trunTimeTodayDate = runTimeToday.getTime();\n\t\t}\n\t\t\n\t\tlong runTime = runTimeTodayDate.getTime() - currDate.getTime();\n\t\t\n\t\tif(false) {\n\t\t\t// Debugging\n\t\t\trunTime = 0;\n\t\t}\n\t\t\n\t\trunTime += randomDelay;\n\t\t\n\t\treturn runTime;\n\t}", "public Day getNextStartDay() {\n return getDay(this.days + 1);\n }", "Date getNextTodo();", "public String getRebillNextDate()\n\t{\n\t\tif(response.containsKey(\"next_date\")) {\n\t\t\treturn response.get(\"next_date\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public void nextDay() {\r\n\t\tif (day >= daysPerMonth[month] && !(month == 2 && day == 28) && !(month == 12 && day == 31)) {\r\n\t\t\tthis.month++;\r\n\t\t\tthis.day = 1;\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t\telse if (month == 2 && day == 28 && !(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))) {\r\n\t\t\tthis.month++;\r\n\t\t\tthis.day = 1;\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t\telse if (month == 12 && day == 31) {\r\n\t\t\tthis.year++;\r\n\t\t\tthis.month = 1;\r\n\t\t\tthis.day = 1;\r\n\t\t\tSystem.out.println(\"\\nhappy new year!!!\\n\");\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\tthis.day++;\r\n\t}", "public String getNextYear(String date){\r\n\t\tString registerDueDate=\"\";\r\n\t\ttry{\r\n\t\t\tList<TransferNORInPSTBean> minimumRegisterDueDateList=(List<TransferNORInPSTBean>)sqlMapClient.queryForList(\"TransferNORInPSTBean.getNextRegisterDueDate\", date);\r\n\t\t\tfor(TransferNORInPSTBean minimumRegisterDueDateValue: minimumRegisterDueDateList){\r\n\t\t\t\tregisterDueDate=minimumRegisterDueDateValue.getRegisterDueDate();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\t//System.out.println(\"Exception in add next year\"+e.getMessage());\r\n\t\t\tlogger.info(\"Exception in get next year \"+e.getMessage());\r\n\t\t}\r\n\t\treturn registerDueDate;\r\n\t}", "@Test\n\tpublic void testNextDate(){\n\t\tif(year==444 && day==29){\n\t\t\t\tday=1;\n\t\t\t\tDate actualDate = new Date(year,(month+1),day);\n\t\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\n } else if(day==30 && year==2005){ //for test case 10\n\t\t\t\tday=1;\n\t\t\t\tDate actualDate = new Date(year,(month+1),day);\n\t\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\n\n\t\t} else if(day==31 ){ //for test cases 13,14,15\n\t\t\tif(month==12){\n\t\t\tday=1;\n\t\t\tmonth=1;\n\t\t\tyear+=1;\n\t\t\tDate actualDate = new Date(year,month,day);\n\t\t\tAssert.assertEquals(expectedDate,actualDate);\n } else {\n\t\t\t\tday=1;\n\t\t\t\tDate actualDate = new Date(year,(month+1),day);\n\t\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\t\t\t}\n\n\t\t}\n\t\telse{\t\n\t\t\tDate actualDate = new Date(year,month,(day+1));\n\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\n\t\t}\n\t\n\t}", "private void nextDay() {\r\n tmp.setDay(tmp.getDay() + 1);\r\n int nd = tmp.getDayOfWeek();\r\n nd++;\r\n if (nd > daysInWeek) nd -= daysInWeek;\r\n tmp.setDayOfWeek(nd);\r\n upDMYcountDMYcount();\r\n }", "private void changeNextDay(){\n\t\tplanet.getClimate().nextDay();\n\t}", "public static String getNextDay(String nowdate, int delay)\r\n/* 111: */ {\r\n/* 112: */ try\r\n/* 113: */ {\r\n/* 114:155 */ SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 115:156 */ String mdate = \"\";\r\n/* 116:157 */ Date d = strToDate(nowdate);\r\n/* 117:158 */ long myTime = d.getTime() / 1000L + delay * 24 * \r\n/* 118:159 */ 60 * 60;\r\n/* 119:160 */ d.setTime(myTime * 1000L);\r\n/* 120:161 */ return format.format(d);\r\n/* 121: */ }\r\n/* 122: */ catch (Exception e) {}\r\n/* 123:166 */ return \"\";\r\n/* 124: */ }", "public Date tomorrow(){\n\t int nextD;\n\t Month nextM;\n\t int nextY;\n\n\t if ( this.day + 1 > this.month.nbJours(this.year)){\n\t nextD = 1;\n\t if (this.month.equals(Month.DECEMBER)){\n\t\t nextY = this.year + 1;\n\t \t nextM = this.month.nextMonth();\n\t }\n\t else{\n\t \tnextY = this.year;\n\t \tnextM = this.month.nextMonth();\n\t }\n\t }else{\n\t nextD = this.day + 1;\n\t nextM = this.month;\n\t nextY = this.year;\n\t }\n\t return new Date(nextD, nextM, nextY);\n }", "public Date getNextScheduledRun() {\n\t\tfinal Calendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 1);\n\t\tcal.set(Calendar.MINUTE, 0);\n\n\t\tif ( cal.before(Calendar.getInstance()) ){\n\t\t\tcal.add(Calendar.DATE, 7);\n\t\t}\n\t\treturn cal.getTime();\n\t\n\t}", "public static WithAdjuster firstDayOfNextYear() {\n\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }", "@Override\n\t\tpublic WeekDay1 nextDay() {\n\t\t\treturn SUN;\n\t\t}", "public static String getSQLDateNext(Date val) {\n\n\t\t\n\t\t// Adds another day to Date and converts date into SQL format, ignores time\n\t\tif (val != null) {\n\n\t\t\tDate next = DateUtils.addDays(val, 1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t\treturn \"'\" + format.format(next) + \"'\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public static WithAdjuster firstDayOfNextMonth() {\n\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }", "@Override\n\t\tpublic WeekDay1 nextDay() {\n\t\t\treturn MON;\n\t\t}", "Optional<ZonedDateTime> nextExecution(final ZonedDateTime date);", "public static String getDisplayDateNext(Date val) {\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, 1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn format.format(previous);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "protected Date nextStandardDate(Date date, DateTickUnit unit) {\n/* 1122 */ Date previous = previousStandardDate(date, unit);\n/* 1123 */ Calendar calendar = Calendar.getInstance(this.timeZone, this.locale);\n/* 1124 */ calendar.setTime(previous);\n/* 1125 */ calendar.add(unit.getCalendarField(), unit.getMultiple());\n/* 1126 */ return calendar.getTime();\n/* */ }", "@DISPID(13)\r\n\t// = 0xd. The runtime will prefer the VTID if present\r\n\t@VTID(19)\r\n\tjava.util.Date nextScheduledExecutionDateTime();", "public SubscriptionYear getNext() {\n\t\treturn this.next;\n\t\t\n\t}", "public static LocalDate getFirstOfNextMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfNextMonth());\n\t}", "static Date calculateNextNotificationDate(Date now, Date sentDate, List<Integer> remindSteps) {\n Calendar sentCal = Calendar.getInstance();\n sentCal.setTime(sentDate);\n for (int dayOffset : remindSteps) {\n sentCal.add(Calendar.DAY_OF_YEAR, dayOffset);\n if (sentCal.getTime().compareTo(now) > 0) {\n return sentCal.getTime();\n }\n }\n return null;\n }", "public Date getNextPublished() {\n return nextPublished;\n }", "public void increment()\n // Increments this IncDate to represent the next day.\n {\n\t boolean ly = false;\n\t if(((year % 4 == 0) && year % 100 != 0) || year % 400 == 0) {\n\t\t //leap year\n\t\t ly = true;\n\t }\n\t if ((month == 2 && day == 28 && !ly) || (month == 2 && day == 29 && ly)) {\n\t\t month = 3;\n\t\t day = 1;\n\t } else if (month == 2 && day == 28 && !ly) {\n\t\t day ++;\n\t } else if ((month == 4 || month == 6 || month == 9 || month == 11) && day == 30){\n\t\t month ++;\n\t\t day = 1;\n\t } else if ((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10) && day == 31){\n\t\t System.out.println(\"month is \" + month);\n\t\t month ++;\n\t\t day = 1;\n\t } else if ((month == 12) && day == 31) {\n\t\t year ++;\n\t\t month = 1;\n\t\t day = 1;\n\t } else {\n\t\t day ++;\n\t }\n }", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "public Period getNextPeriod() throws PeriodNotFoundException;", "public abstract Date getNextFireTime();", "public static long next() {\n return System.currentTimeMillis();\n }", "public Date getNextChargeTime() {\n return nextChargeTime;\n }", "protected Date findFirstGenDate(GenCtx ctx)\n\t{\n\t\treturn EX.assertn(ctx.get(Date.class));\n\t}", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "@Override\n\tprotected void setNextSiegeDate()\n\t{\n\t\tif(_siegeDate.getTimeInMillis() < Calendar.getInstance().getTimeInMillis())\n\t\t{\n\t\t\t_siegeDate = Calendar.getInstance();\n\t\t\t// Осада не чаще, чем каждые 4 часа + 1 час на подготовку.\n\t\t\tif(Calendar.getInstance().getTimeInMillis() - getSiegeUnit().getLastSiegeDate() * 1000L > 14400000)\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 1);\n\t\t\telse\n\t\t\t{\n\t\t\t\t_siegeDate.setTimeInMillis(getSiegeUnit().getLastSiegeDate() * 1000L);\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 5);\n\t\t\t}\n\t\t\t_database.saveSiegeDate();\n\t\t}\n\t}", "public static String getSQLDateTimeNext(Date val) {\n\n\t\t// Adds another day to Date and Time and converts date into SQL format\n\t\tif (val != null) {\n\n\t\t\tDate next = DateUtils.addDays(val, 1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd H:mm\");\n\t\t\treturn \"date_format('\" + format.format(next)\n\t\t\t\t\t+ \"','%Y-%m-%d %H:%i')\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public static String incrementDateByOneDay() {\n\t\ttry {\n\t\t\tcalendar.setTime(sdf.parse(newDateStr));\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcalendar.add(Calendar.DATE, 1); // number of days to add\n\t\tnewDateForTable = sdf.format(calendar.getTime());\n\t\treturn newDateForTable;\n\t}", "public LocalDate getNextWorkingDay(TradeEntity e) {\r\n\t\tLocalDate date = e.getSettlementDate();\r\n\t\twhile (!isWorkingDay(e.getCurrency(), date.getDayOfWeek())) {\r\n\t\t\tdate = date.plusDays(1);\r\n\t\t}\r\n\t\treturn date;\r\n\t}", "public Version getNext(){\n\t\treturn next;\n\t}", "private synchronized EventType scheduleNextEvent()\n {\n Date today = new Date();\n Date today_sunrise = ss.getSunrise(latitude, longitude);\n Date today_sunset = ss.getSunset(latitude, longitude);\n Date today_off = ss.getOff(off);\n\n // get sunrise and sunset time for tomorrow\n Calendar tomorrow = Calendar.getInstance();\n tomorrow.roll(Calendar.DATE, true);\n Date tomorrow_sunrise = ss.getSunrise(latitude, longitude, tomorrow.getTime());\n Date tomorrow_sunset = ss.getSunset(latitude, longitude, tomorrow.getTime());\n Date tomorrow_off = ss.getOff(off);\n\n // determine if sunrise or sunset is the next event\n if (today.after(today_sunset)) {\n // get tomorrow's date time\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + tomorrow_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule tomorrow's sunrise as next event\n timer.schedule(new SunriseTask(), tomorrow_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = tomorrow_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else if (today.after(today_sunrise)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNSET \");\n System.out.println(\" @ \" + today_sunset);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_sunset);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunsetToday;\n return nextEvent;\n } else if (today.after(today_off)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: OFF \");\n System.out.println(\" @ \" + today_off);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_off);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + today_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunrise as next event\n timer.schedule(new SunriseTask(), today_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = today_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseToday;\n return nextEvent;\n }\n }", "public void setNextAppointmentDate (java.util.Date nextAppointmentDate) {\n\t\tthis.nextAppointmentDate = nextAppointmentDate;\n\t}", "private void incrementeDate() {\n dateSimulation++;\n }", "public final String next() {\n if (this.task_set == null)\n throw new IllegalStateException(\"must initialize the scheduler before using it\");\n\n String next = scheduler_next();\n return next;\n }", "public void setNextYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()+1);\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\n\t}", "public Date getNextCheckDate(Date now)\r\n\t{\r\n\t\tsetTime(now);\r\n\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MINUTE:\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MINUTE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_HOUR:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.HALF_DAY:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tint hour = get(Calendar.HOUR_OF_DAY);\r\n\t\t\tif (hour < 12)\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 12);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\t\tadd(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_DAY:\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.DATE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_WEEK:\r\n\t\t\tset(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.WEEK_OF_YEAR, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MONTH:\r\n\t\t\tset(Calendar.DATE, 1);\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MONTH, 1);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalStateException(\"Unknown periodicity type.\");\r\n\t\t}\r\n\t\treturn getTime();\r\n\t}", "public static String getSQLDateNextLifting(Date val) {\n\n\t\t\n\t\t// Adds another day to Date and converts date into SQL format, ignores time\n\t\tif (val != null) {\n\n\t\t\tDate next = DateUtils.addDays(val, 1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t\treturn \"date_format('\" + format.format(next) + \" 6:00','%Y-%m-%d %H:%i')\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "Date getPriorDate();", "public static LocalDate generateExpiration() {\n LocalDate today = LocalDate.now(); //gives us the information at the moment the program is running\n int expYear = today.getYear() + 5;\n LocalDate exp = LocalDate.of(expYear, today.getMonth(), today.getDayOfMonth());\n return exp;\n }", "Date getNextIncomeDate() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "public java.sql.Timestamp getNextAnchor() {\n return nextAnchor;\n }", "public void lookUpNextDate(int i) throws IllegalCommandArgumentException {\n if (i < wordsOfInput.length-2) { \n if (wordsOfInput[i+2].toLowerCase().matches(Constants.DAYS)) {\n // by next (day)\n containsStartDate = true;\n index = tpsIndex > i ? i : tpsIndex ;\n produceDateFromDay(wordsOfInput[i+2], 1);\n \n // by next day (starttime)\n if (i < wordsOfInput.length-3 && wordsOfInput[i+3].toLowerCase().matches(timePattern)) {\n containsStartTime = true;\n startTime = wordsOfInput[i+3];\n \n // by next day starttime (endtime)\n if (i < wordsOfInput.length - 5 && \n wordsOfInput[i+4].toLowerCase().matches(Constants.DATE_END_PREPOSITION)) {\n checkForEndTimeInput(i+5);\n }\n } \n } else if (wordsOfInput[i+2].toLowerCase().matches(\"week|wk\")) {\n // by next (week)\n containsStartDate = true;\n index = tpsIndex > i ? i : tpsIndex ;\n produceDateFromDay(null, 2);\n } else if (wordsOfInput[i+2].toLowerCase().matches(\"month|mth\")) {\n // by next (month)\n containsStartDate = true;\n index = tpsIndex > i ? i : tpsIndex ;\n produceDateFromDay(null, 3);\n } else if (wordsOfInput[i+2].toLowerCase().matches(\"year|yr\")) {\n // by next (year)\n containsStartDate = true;\n index = tpsIndex > i ? i : tpsIndex ;\n produceDateFromDay(null, 4);\n }\n }\n }", "protected abstract String scheduler_next();", "public void next( long time );", "public void advance() {\n\n if (length == Length.DAILY) {\n startDate.add(Calendar.DATE, 1);\n } else if (length == Length.WEEKLY) {\n startDate.add(Calendar.WEEK_OF_YEAR, 1);\n } else if (length == Length.BIWEEKLY) {\n startDate.add(Calendar.DATE, 14);\n } else if (length == Length.MONTHLY) {\n startDate.add(Calendar.MONTH, 1);\n } else if (length == Length.YEARLY) {\n startDate.add(Calendar.YEAR, 1);\n }\n\n calculateEndDate();\n\n }", "public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}", "public Date getEarliestFinishingDate();", "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "public Task getNext()\n {\n\treturn new Task(toDo.get(0));\n }", "public Event getNextEvent() {\n \treturn next;\n }", "private Date randomDate() {\n int minDay = (int) LocalDate.of(2012, 1, 1).toEpochDay();\n int maxDay = (int) LocalDate.now().toEpochDay();\n int randomDay = minDay + intRandom(maxDay - minDay);\n LocalDate randomDate = LocalDate.ofEpochDay(randomDay);\n Date d = toDate(randomDate);\n return d;\n }", "public Order generateNext();", "public static String getNextSeq(String seq) {\n long intNextSeq = 0;\n// if (intSeq < 204) {\n// intNextSeq = Long.parseLong(seq)+1;\n// }\n// if (intSeq == 204) {\n// seq = seq.substring(0, seq.length() - 3);\n// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n// Date date = null;\n// try {\n// date = sdf.parse(seq);\n// } catch (ParseException e) {\n// e.printStackTrace();\n// }\n// Date date2 = DateUtils.addDays(date, 1);\n// String nextDate = sdf.format(date2) + \"000\";\n// intNextSeq = Long.parseLong(nextDate);\n// intNextSeq = intNextSeq + 1;\n// }\n return intNextSeq+\"\";\n }", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "Date getForDate();", "public void setNextChargeTime(Date nextChargeTime) {\n this.nextChargeTime = nextChargeTime;\n }", "private static Date getRandomDate(){\n Instant instant = Instant.now();\n long timeStampMillis = instant.toEpochMilli();\n long leftLimit = timeStampMillis - (1000 * 60 * 60 * 24 * 20);\n long rightLimit = timeStampMillis + (1000 * 60 * 60 * 24 * 20);\n return new Date(\n leftLimit + (long) (Math.random() * (rightLimit - leftLimit))\n );\n }", "public static String nextCalendar(String day, String month, String year) {\n int day2 = Integer.parseInt(day);\n int d = day2 + 1;\n int month2 = Integer.parseInt(month);\n int m = month2 + 1;\n int year2 = Integer.parseInt(year);\n int y = year2 + 1;\n String strd = Integer.toString(d);\n String strm = Integer.toString(m);\n String stry = Integer.toString(y);\n System.out.println(\"day:\" + strd + \" month:\" + strm + \" year:\" + stry);\n return strd;\n }", "private void scheduleNextAlarm() {\n // Cancel the currently scheduled Alarm in order to schedule the next.\n if (nextAlarm != null) {\n alarmManager.cancel(createAlarmIntent(this, nextAlarm.getId()));\n nextAlarm = null;\n }\n final Calendar calendar = Calendar.getInstance();\n Alarm alarm;\n int i = 0;\n do {\n // Look for an Alarm that is upcoming from the Calendar day and time.\n alarm = dailyDoDatabaseHelper.getNextAlarmForCalendarDay(calendar);\n if (alarm == null) {\n // If an Alarm was not found for the remainder of the day,\n // then check the next day starting midnight.\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.add(Calendar.DAY_OF_WEEK, 1);\n Log.d(CLASS_NAME, String.format(\"Checking next Calendar=%s for Alarm.\", calendar));\n }\n } while (alarm == null && i++ < 7);\n if (alarm != null) {\n nextAlarm = alarm;\n // Reusing the previous Calendar because it has scope of the future day.\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calendar.set(Calendar.MINUTE, alarm.getMinute());\n calendar.set(Calendar.SECOND, 0);\n alarmManager.set(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n createAlarmIntent(this, alarm.getId()));\n Log.d(CLASS_NAME, String.format(\"Alarm=%s was found, scheduled on Calendar=%s\", alarm.toString(), calendar.toString()));\n } else {\n Log.d(CLASS_NAME, \"No upcoming Alarm(s) found to schedule.\");\n }\n }", "public PredictDataMoneyTransfer(Date date, Date next)\n\t{\n\t\tthis.date = date;\n\t\tthis.nextTransfer = next;\n\t}", "protected abstract D getNext(D d);", "@Test\n\tpublic void advanceDayTest_Succes(){\n\t\temptyAssemblyLineTest();\n\t\tTimestamp oldTime = assemblyLine.getCurrentTime();\n\t\tassemblyLine.startNextDay();\n\t\tassertEquals(assemblyLine.getCurrentTime().compareTo(oldTime.getNextDay()),0);\n\t\t\n\t}", "public String randomDateGenerator() {\n\n\t\tLocalDate startDate = LocalDate.now();\n\n\t\tint year = startDate.getYear();\n\t\tint month = startDate.getMonthValue();\n\t\tint day = startDate.getDayOfMonth();\n\n\t\tLocalDate endDate = LocalDate.of(year + 1, month, day);\n\n\t\tlong randomDate = randBetween(startDate.toEpochDay(), endDate.toEpochDay());\n\t\treturn LocalDate.ofEpochDay(randomDate).toString();\n\n\t}", "public Date getEarliestStartDate();", "@Test\n public void tomorrowInTheSameMonth(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.tomorrow(),new Date(2,Month.january,1970));\n }", "@Test\r\n public void test14()\r\n {\r\n \tPaymentImpl p1 = null;\r\n \tString day = \"\";\t\t\r\n \t\r\n \ttry{\r\n \t\tp1 = new PaymentImpl(getCalendar(\"ltu.CalenderSaturday\"));\r\n \t\tday = p1.getNextPaymentDay();\r\n \t\tassertEquals(day, \"20160429\");\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 14, correct : 20160429, got : \" + day);\r\n \t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Clouldn't load the calender\");\r\n\t\t}\r\n }", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "private void nextRunning(Date date) {\n for (int page = 1; page < 10; page++) {\n vacancies.addAll(parser.parseHtml(URL + page, date));\n }\n LOG.info(vacancies.size());\n try (VacancyDao vacancyDao = new VacancyDao(properties)) {\n vacancyDao.insertSet(vacancies);\n vacancyDao.updateLastUpdateDate(new Date().getTime());\n } catch (Exception e) {\n LOG.error(e.getMessage(), e);\n }\n }", "private static Date nextNodeAsDate(Iterator<JsonNode> iterator) {\n if (iterator == null || !iterator.hasNext()) {\n return null;\n }\n return DateUtils.fromMillisUtc(\n (long) (Double.parseDouble(iterator.next().textValue()) * 1000));\n }", "public static Date randomDate() {\n return VALUES.get(RND.nextInt(SIZE));\n }", "long nextLong();", "long nextLong();", "public TimedVariable findNext(Date ref)\n\t{\n\t\tif (vars.isEmpty())\n\t\t\treturn null;\n\t\tint sz = vars.size();\n\n\t\tTimedVariable dummy = new TimedVariable(0);\n\t\tdummy.setTime(ref);\n\t\tint idx = Collections.binarySearch(vars, dummy, tvComparator);\n\n\t\tif (idx < 0)\n\t\t\tidx = (-idx) - 1;\n\t\telse // the exact time was found. Increment to the next value\n\t\t\tidx++;\n\t\t\n\t\tif (idx < sz)\n\t\t\treturn vars.get(idx);\n\t\telse\n\t\t\treturn null;\n\t}", "String getNext();", "String getNext();", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "public boolean getNext();", "public void nextDay(double currentDay, double totalDays)\r\n {\r\n if (loan != 0)\r\n {\r\n double interest = calculateInterest(this.interest, totalDays, loan, currentDay);\r\n loan += interest;\r\n }\r\n }", "public DateNextDateExceptionTest(int year, int month, int day) {\n\t\tthis.year = year;\n\t\tthis.month = month;\n\t\tthis.day = day;\n\t}", "Date getStartDate();", "Date getStartDate();", "Date getStartDate();" ]
[ "0.81519", "0.80676514", "0.8051648", "0.79376364", "0.7368402", "0.71293855", "0.710914", "0.7026197", "0.6930356", "0.6875625", "0.68604046", "0.6854532", "0.6774162", "0.67260545", "0.6661987", "0.6644358", "0.66157454", "0.65438855", "0.6538523", "0.6526571", "0.6511673", "0.6491328", "0.6438991", "0.6385262", "0.63324755", "0.6306252", "0.62843376", "0.6254749", "0.624518", "0.62450147", "0.61827284", "0.61562383", "0.6155463", "0.61430997", "0.609721", "0.60684556", "0.6062898", "0.6057309", "0.6043598", "0.6038103", "0.6017575", "0.5961264", "0.594994", "0.5938858", "0.5931213", "0.5928453", "0.5927609", "0.58634996", "0.583751", "0.5833423", "0.58313227", "0.5826805", "0.5814087", "0.57953787", "0.57768506", "0.57497495", "0.5734324", "0.5732479", "0.573148", "0.5701338", "0.5693695", "0.5667508", "0.56500953", "0.5648235", "0.56476814", "0.56232333", "0.5606559", "0.5595723", "0.55904335", "0.55850524", "0.5576985", "0.5559978", "0.5509371", "0.55079293", "0.5503175", "0.54936856", "0.5484284", "0.5478232", "0.5464842", "0.546397", "0.54498464", "0.5449436", "0.54156363", "0.5405853", "0.54040533", "0.5401668", "0.5392737", "0.53890663", "0.53534627", "0.53534627", "0.5349103", "0.53344756", "0.53344756", "0.5328411", "0.5319222", "0.53183085", "0.53012633", "0.52952236", "0.52952236", "0.52952236" ]
0.7288763
5
is this Date after b?
public boolean isAfter(Group3Date b) { return compareTo(b) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isAfter(Date b) {\r\n\t\treturn compareTo(b) > 0;\r\n\t}", "public boolean isPartialAfter(Date b) {\r\n\t\treturn comparePartialTo(b) > 0;\r\n\t}", "public boolean isAfter(Date that) {\n return compareTo(that) > 0;\n }", "public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}", "boolean hasDeliveryDateAfter();", "public boolean isAfter(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret > 0;\r\n\t}", "public boolean isBefore(Group3Date b) {\n\t\t\treturn compareTo(b) < 0;\n\t\t}", "public boolean isPartialBefore(Date b) {\r\n\t\treturn comparePartialTo(b) < 0;\r\n\t}", "boolean hasDeliveryDateBefore();", "public static void main(String[] args) {\nDate d1 = new Date( 2019, 02, 22);\nSystem.out.println(d1);\n\n\nDate d2= new Date();\nSystem.out.println(d2);\nDate d3 = new Date(2000,11,11);\nSystem.out.println(d3);\nint a = d1.compareTo(d3);\nSystem.out.println(a);\nboolean b = d1.after(d2);\n\tSystem.out.println(b);\n\t}", "public boolean isAfter(@NonNull final CalendarDay other) {\n return date.isAfter(other.getDate());\n }", "public boolean isAfter(Date date)\n {\n return isAfter(new SpentOn(date));\n }", "public boolean isAfter(MonthDay other) {\n if(month > other.month) {\n return true;\n } else if(month == other.month && day > other.day) {\n return true;\n } else {\n return false;\n }\n }", "public boolean pastDueDate(Date d){\r\n if(dueDate.after(d)){\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\n public void compareToWithMainDateInThePast(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.compareTo(new Date(31,Month.december,1970)),-1);\n }", "public int compareTo(Date b) {\r\n\t\tif (year != b.year)\r\n\t\t\treturn year - b.year;\r\n\t\tif (month != b.month)\r\n\t\t\treturn month - b.month;\r\n\t\treturn day - b.day;\r\n\t}", "@Test\n public void nbDaysAfterTestOk(){\n Date date = new Date(1,Month.january,1970);\n Date dateAfter = date.nbDaysAfter(10);\n assertEquals(dateAfter,new Date(11,Month.january,1970));\n assertEquals(date.nbDaysAfter(365),new Date(1,Month.january,1971));\n assertEquals(date.nbDaysAfter(31),new Date(1,Month.february,1970));\n }", "public boolean isAfter(AbsTime refEpoch)\n {\n return !isBeforeOrEquals(refEpoch);\n }", "public boolean hasPast();", "public static boolean isDateAfter(LocalDate secondDate, LocalDate firstDate) {\n return secondDate.isAfter(firstDate);\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "public static boolean isLater(int month1, int day1, int year1,\n int month2, int day2, int year2)\n {\n return (year1 > year2) || (year1 == year2 && month1 > month2) ||\n (year1 == year2 && month1 == month2 && day1 > day2);\n }", "boolean isOutOfDate(String end) {\n SimpleDateFormat ddMMyyyy = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n Calendar c = Calendar.getInstance();\n Date current = c.getTime();\n current.setTime(current.getTime() - 86400000);\n try {\n Date endDate = ddMMyyyy.parse(end);\n return (endDate.compareTo(current) < 0);\n } catch (ParseException e) {\n System.out.println(\"Error occurred parsing Date\");\n }\n return false;\n }", "boolean hasEndDate();", "public static boolean isAfterDay(Date date1, Date date2) {\n if (date1 == null || date2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(date1);\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date2);\n return isAfterDay(cal1, cal2);\n }", "public boolean isAfterNow() {\r\n return isAfter(DateTimeUtils.currentTimeMillis());\r\n }", "boolean hasDate();", "public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "public abstract Date getFireTimeAfter(Date afterTime);", "public static final Function<Date,Boolean> after(final Date date) {\r\n return new After(date);\r\n }", "protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}", "public boolean checkTimePeriod(String from, String to) throws ParseException{\r\n\t\r\n\tDateFormat df = new SimpleDateFormat (\"yyyy-MM-dd\");\r\n boolean b = true;\r\n // Get Date 1\r\n Date d1 = df.parse(from);\r\n\r\n // Get Date 2\r\n Date d2 = df.parse(to);\r\n\r\n //String relation=\"\";\r\n if (d1.compareTo(d2)<=0){\r\n \t b=true;\r\n // relation = \"the date is less\";\r\n }\r\n else {\r\n b=false;\r\n }\r\n return b;\r\n}", "public boolean isAfterOrEquals(AbsTime refEpoch)\n {\n return !isBefore(refEpoch);\n }", "public int comparePartialTo(Date b) {\r\n\t\tif (year != b.year)\r\n\t\t\treturn year - b.year;\r\n\t\tif (month != b.month)\r\n\t\t\treturn month - b.month;\r\n\t\treturn 0;\r\n\t}", "private boolean isPast(Calendar currentCal){\n Calendar presentCal = Calendar.getInstance();\n presentCal.set(Calendar.SECOND,59);\n return currentCal.before(presentCal);\n }", "public boolean isFuture()\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int dayT = currentDate.get(GregorianCalendar.DATE);\n int monthT = currentDate.get(GregorianCalendar.MONTH) + 1;\n int yearT = currentDate.get(GregorianCalendar.YEAR);\n int hourT = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minuteT = currentDate.get(GregorianCalendar.MINUTE);\n\n if (yearT < year)\n {\n return true;\n }\n else if (yearT == year && monthT < month)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT < day)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT < hour)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT == hour\n && minuteT < minute)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public static boolean a_gt_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_gt_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == 1;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" > \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "public static boolean a_lteq_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_lteq_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == -1 || result == 0;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" <= \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "public boolean isAfter(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) > spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) > spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) > spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }", "boolean hasOrderDate();", "public static boolean bhp2Old(BHP bhp) {\n\n DateTime now = new DateTime();\n LocalDate day = new LocalDate(bhp.getSoll());\n\n if (now.toLocalDate().equals(day)) return false;\n if (!now.toLocalDate().minusDays(1).equals(day)) return true; // Only ok, if its yesterday\n\n // this can only happen, when the morning part of the night shift is still active, and the BHP in question\n // belongs to the same shift on the day before. (in the late evening)\n\n// log.debug(bhp.getShift());\n\n if (bhp.getShift() == SYSCalendar.SHIFT_VERY_LATE && SYSCalendar.whatShiftIs(now.toDate()) == SYSCalendar.SHIFT_VERY_EARLY)\n return false;\n\n return true;\n }", "boolean endDateAfter(String start, String end) {\n SimpleDateFormat ddMMyyyy = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n Calendar c = Calendar.getInstance();\n try {\n Date startDate = ddMMyyyy.parse(start);\n Date endDate = ddMMyyyy.parse(end);\n c.setTime(startDate);\n return startDate.compareTo(endDate) <= 0;\n } catch (ParseException e) {\n System.out.println(\"Error occurred parsing Date\");\n }\n return true;\n }", "public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }", "boolean hasTradeDate();", "boolean hasDepositEndTime();", "public static boolean comprobarOrdenFechas (Date f1, Date f2){\n if(diferenciaFechas(f1,f2) <= 0){\n System.out.println(\"Fecha final es menor que la fecha inicial\");\n return false;\n }else{\n return true;\n }\n }", "public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public static boolean notInFuture(Date data) {\r\n if (data != null) {\r\n return data.before(new Date());\r\n }\r\n return false;\r\n }", "public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }", "private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }", "boolean hasToDay();", "boolean hasSettlementDate();", "public boolean isBabyBoomer() {\n // Unnecessary allocation of expensive object\n Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n gmtCal.set(1946, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomStart = gmtCal.getTime();\n gmtCal.set(1965, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomEnd = gmtCal.getTime();\n return birthDate.compareTo(boomStart) >= 0 && birthDate.compareTo(boomEnd) < 0;\n }", "public boolean greaterthan(Inatnum a) throws Exception{\n if((this.isZero() &&a.isZero())==true) {return false;}//if both this and a are both zero, it returns false because it is not greater than. \n if((this.isZero())==false&&a.isZero()==true) {return true;}//conditional returns if a is greater than this.\n if((this.isZero())==true&&a.isZero()==false) {return false;}//conditional returns if this is greater than a.\n else {return this.pred().greaterthan(a.pred()); }//recursive call to subtract one from this and a.\n }", "public static boolean isAfterDay(Calendar cal1, Calendar cal2) {\n if (cal1 == null || cal2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n if (cal1.get(Calendar.ERA) < cal2.get(Calendar.ERA)) return false;\n if (cal1.get(Calendar.ERA) > cal2.get(Calendar.ERA)) return true;\n if (cal1.get(Calendar.YEAR) < cal2.get(Calendar.YEAR)) return false;\n if (cal1.get(Calendar.YEAR) > cal2.get(Calendar.YEAR)) return true;\n return cal1.get(Calendar.DAY_OF_YEAR) > cal2.get(Calendar.DAY_OF_YEAR);\n }", "boolean hasDateTime();", "public static boolean a_gteq_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_gteq_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == 1 || result == 0;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" >= \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }", "public boolean isOverdue(int today);", "public boolean isPosteriorTo(Date argdate) {\r\n\t\ttry {\r\n\t\t\tthis.timeSpentSince(argdate);\r\n\t\t} catch (InvalidDateException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isBabyBoomer() {\n // Unnecessary allocation of expensive object\n Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n gmtCal.set(1946, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomStart = gmtCal.getTime();\n gmtCal.set(1965, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomEnd = gmtCal.getTime();\n\n return birthDate.compareTo(boomStart) >= 0 &&\n birthDate.compareTo(boomEnd) < 0;\n }", "public boolean isBefore(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret < 0;\r\n\t}", "public boolean isJourneyInThePast() {\n\t\t\n\t\tlong journeyStartTime = TimeParser.strDateTimeToDate(mDeparture).getTime();\n\t\tlong now = System.currentTimeMillis();\n\t\t//System.out.println(\"DBG isInPast: now:\"+now+\" start:\"+journeyStartTime);\n\t\tif (journeyStartTime >= now) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Constants.useWallClock == false) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public Boolean after(Event event) {\n int result = this.compareTo(event);\n return result > 0;\n }", "public static boolean isTimeAfter(String time)\n\t{\n\t\treturn isTimeAfter(time, getDateTimeFormat());\n\t}", "private static boolean isPast(long[][] dates){\n if(dates[0][0] > dates[1][0])\n return true;\n else if(dates[0][0] == dates[1][0]){\n // If the year matches, then check if the month of Start Date is greater than the month of End Date\n // If the month matches, then check if the day of Start Date is greater than the day of End Date\n if(dates[0][1] > dates[1][1])\n return true;\n else if(dates[0][1] == dates[1][1] && dates[0][2] > dates[1][2])\n return true;\n }\n \n // If the Start Date is older than End Date, return false\n return false;\n }", "public static boolean isPastDue(Date date) {\n\t\tthrow new IllegalStateException(\"no database connection\");\r\n\t}", "boolean hasAcquireDate();", "boolean hasFromDay();", "@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }", "public static void playgroundForTime(){\n\t\tLocalDate localDate = LocalDate.of(2013, 4, 25);\r\n\t\tSystem.out.println(localDate.now().isBefore(localDate));\r\n\t\t\r\n\t}", "public boolean isAfter(ReadableInstant instant) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[19]++;\nint CodeCoverConditionCoverageHelper_C7;\r\n if ((((((CodeCoverConditionCoverageHelper_C7 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C7 |= (2)) == 0 || true) &&\n ((instant == null) && \n ((CodeCoverConditionCoverageHelper_C7 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[7].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C7, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[7].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C7, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[13]++;\r\n return isAfterNow();\n\r\n } else {\n CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[14]++;}\r\n return isAfter(instant.getMillis());\r\n }", "@SuppressWarnings(\"deprecation\")\r\n public static final boolean compareTwoDateSpecificToEndDay(Date expiredDate, Date dateNow) {\r\n\r\n int hoursNow = dateNow.getHours();\r\n int minuteNow = dateNow.getMinutes();\r\n\r\n return ((expiredDate.compareTo(dateNow) < 0)\r\n || ((expiredDate.compareTo(dateNow) == 0) && (hoursNow > 22 && minuteNow > 58)));\r\n\r\n }", "public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }", "public boolean isSetAfter() {\n return this.after != null;\n }", "public static boolean isTimeAfter(String time1, String time2)\n\t{\n\t\treturn isTimeAfter(time1, time2, getDateTimeFormat());\n\t}", "public boolean isExpired() {\n\t\t// Return whether the exipred after time has passed in American Samoa\n\t\treturn getSamoaNow().after(this.expiredAfter);\n\t}", "@Test public void Ago()\t\t\t\t\t\t\t\t\t\t{tst_date_(\"1 month ago\"\t\t\t, \"2012-01-27\");}", "private boolean dateDiffOfWeekend(LocalDate date) {\n\n if (date.getDayOfWeek().getValue() != 6 && date.getDayOfWeek().getValue() != 7 && date.getYear() == LocalDate.now().getYear()) {\n\n return true;\n }\n\n return false;\n }", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public boolean isPastSubmissionDeadline() {\r\n\t\tCalendar currentTime = Calendar.getInstance();\r\n\t\tif(currentTime.after(getConference().getManuscriptDueDate())) {\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\treturn false;\r\n\t}", "public Date getAfterTime() {\r\n return afterTime;\r\n }", "public boolean hasBegDate() {\n return fieldSetFlags()[1];\n }", "boolean hasTransactionDateTime();", "public void updateBDate() {\n bDate = new Date();\n }", "public List<Employees> getByBirthDateGreater (Date birthDate);", "@Test\n public void compareTo() {\n assertTrue(DATE_A.compareTo(DATE_A) == 0);\n\n // testing recess week and reading week.\n assertTrue(DATE_READING.compareTo(DATE_AFTER_READING) == -1);\n assertTrue(DATE_RECESS.compareTo(DATE_AFTER_RECESS) == -1);\n }", "public boolean isBefore(Book b1, Book b2);", "public boolean checkTimeInPast() throws ParseException {\n LocalTime ltnow = LocalTime.now();\n if(b_startTime != null && checkDateIsToday()){\n LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();\n return ltstart.isBefore(ltnow);\n }else{\n return false;\n }\n }", "boolean hasEndTime();", "public static void main(String[] args) throws ParseException {\n\t\n\t\t String temp = \"2016-06-20 22:49:02.967\";\n\t\t Date date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(temp);\n\t\t System.out.println(date.after(new Date()));\n\t}", "boolean endTimeAfter(String start, String end) {\n SimpleDateFormat HHmm = new SimpleDateFormat(\"HH:mm\", Locale.UK);\n Calendar c = Calendar.getInstance();\n try {\n Date startTime = HHmm.parse(start);\n Date endTime = HHmm.parse(end);\n c.setTime(startTime);\n return startTime.compareTo(endTime) <= 0;\n } catch (ParseException e) {\n System.out.println(\"Error occurred parsing Time\");\n }\n return true;\n }", "public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public boolean checkDate(Date dateNow, Date maxAccess) {\n return dateNow.after(maxAccess);\n }", "public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }", "public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }" ]
[ "0.8393134", "0.7411943", "0.70691144", "0.70690614", "0.6930003", "0.659863", "0.65782416", "0.64170206", "0.64124584", "0.6410977", "0.6388751", "0.6329472", "0.62428135", "0.6237087", "0.6165847", "0.6050448", "0.60487235", "0.6020456", "0.6014435", "0.5884684", "0.5836024", "0.5835748", "0.58134913", "0.581211", "0.57786906", "0.5770787", "0.57692105", "0.57591844", "0.5738423", "0.5738423", "0.5730182", "0.5703081", "0.57014406", "0.56890154", "0.56657386", "0.56565917", "0.5644635", "0.5633342", "0.56215775", "0.56212544", "0.5604733", "0.5587145", "0.554509", "0.55259454", "0.55238944", "0.55127364", "0.54664564", "0.5445268", "0.5442589", "0.54422253", "0.5437939", "0.5436096", "0.5428401", "0.5420181", "0.54156256", "0.5414369", "0.5414189", "0.5408077", "0.5395794", "0.5393938", "0.53927386", "0.53740704", "0.5365914", "0.53490615", "0.53431237", "0.5341773", "0.5334719", "0.5331218", "0.5319127", "0.53156775", "0.53147876", "0.53105366", "0.5301119", "0.5297158", "0.5285398", "0.5284927", "0.5278753", "0.5276096", "0.5275563", "0.526672", "0.5256926", "0.5250856", "0.5249268", "0.5245023", "0.5223628", "0.5215493", "0.52149916", "0.52066416", "0.51889884", "0.5187137", "0.51869094", "0.51769227", "0.5175009", "0.5169606", "0.51621276", "0.5162009", "0.51476973", "0.5144713", "0.5137068", "0.5134453" ]
0.80416536
1
is this Date a before b?
public boolean isBefore(Group3Date b) { return compareTo(b) < 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}", "public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }", "public boolean isPartialBefore(Date b) {\r\n\t\treturn comparePartialTo(b) < 0;\r\n\t}", "public boolean isBefore(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret < 0;\r\n\t}", "public boolean isBefore(@NonNull final CalendarDay other) {\n return date.isBefore(other.getDate());\n }", "public boolean isBefore(Date date2)\n {\n if (year < date2.year)\n return true;\n else if (year == date2.year && month < date2.month)\n return true;\n else if (year == date2.year && month == date2.month && day < date2.day)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour < date2.hour)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour == date2.hour && minute < date2.minute)\n return true;\n else\n return false;\n }", "public boolean isAfter(Date b) {\r\n\t\treturn compareTo(b) > 0;\r\n\t}", "public static void main(String[] args) {\nDate d1 = new Date( 2019, 02, 22);\nSystem.out.println(d1);\n\n\nDate d2= new Date();\nSystem.out.println(d2);\nDate d3 = new Date(2000,11,11);\nSystem.out.println(d3);\nint a = d1.compareTo(d3);\nSystem.out.println(a);\nboolean b = d1.after(d2);\n\tSystem.out.println(b);\n\t}", "public boolean isBefore(final String date1, final String date2) {\n return compare(date1, date2) < 0;\n }", "public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }", "boolean hasDeliveryDateBefore();", "public boolean lessThan(MyDate other){\t\n \t\tif (other.year > year){\n \t\t\treturn true;\n \t\t}\n \t\telse if (other.year == year){\n \t\t\tif (other.month > month){\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\telse if (other.month == month){\n \t\t\t\tif (other.day > day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n\t}", "public boolean isBefore(AbsTime refEpoch)\n {\n // The result to return\n boolean res;\n\n // Check for special values.\n if (isASAP()) {\n // ASAP is before any other time, except ASAP.\n if (refEpoch.isASAP()) {\n res = false;\n } else {\n res = true;\n }\n } else if (isNEVER()) {\n // NEVER is after any other time, except NEVER.\n res = false;\n } else if (refEpoch.isASAP()) {\n // No time is before ASAP, including ASAP.\n res = false;\n } else if (refEpoch.isNEVER()) {\n // Any time is before NEVER, except NEVER, which is taken care\n // of above.\n res = true;\n } else {\n // Do the comparison.\n res = (itsValue < refEpoch.itsValue);\n }\n\n return res;\n }", "public boolean isBefore(Date date)\n {\n return isBefore(new SpentOn(date));\n }", "boolean IFbefore(Date day1, int ID1, Date day2, int ID2){\n if (day1.compareTo(day2) < 0) return true;\n if (day1.compareTo(day2) > 0) return false;\n if (ID1 < ID2) return true;\n return false;\n }", "public boolean isBefore(MonthDay other) {\n if(month < other.month) {\n return true;\n } else if(month == other.month && day < other.day) {\n return true;\n } else {\n return false;\n }\n }", "@Test\n public void compareToWithMainDateInThePast(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.compareTo(new Date(31,Month.december,1970)),-1);\n }", "public boolean isBefore(Book b1, Book b2);", "public static boolean isBeforeDay(Date date1, Date date2) {\n if (date1 == null || date2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(date1);\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date2);\n return isBeforeDay(cal1, cal2);\n }", "public boolean isAfter(Group3Date b) {\n\t\t\treturn compareTo(b) > 0;\n\t\t}", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "public static void before2(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,4);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==4);\n assert(ret0==false);\n System.out.println(ret0);\n }", "public static void before1(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,5);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==5);\n assert(ret0==false);\n System.out.println(ret0);\n }", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public boolean isLower(DateTime dt) {\n return Long.parseLong(this.vStamp) < Long.parseLong(dt.getStamp());\r\n }", "public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public static boolean a_lt_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_lt_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == -1;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" < \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "public boolean checkTimePeriod(String from, String to) throws ParseException{\r\n\t\r\n\tDateFormat df = new SimpleDateFormat (\"yyyy-MM-dd\");\r\n boolean b = true;\r\n // Get Date 1\r\n Date d1 = df.parse(from);\r\n\r\n // Get Date 2\r\n Date d2 = df.parse(to);\r\n\r\n //String relation=\"\";\r\n if (d1.compareTo(d2)<=0){\r\n \t b=true;\r\n // relation = \"the date is less\";\r\n }\r\n else {\r\n b=false;\r\n }\r\n return b;\r\n}", "public static void playgroundForTime(){\n\t\tLocalDate localDate = LocalDate.of(2013, 4, 25);\r\n\t\tSystem.out.println(localDate.now().isBefore(localDate));\r\n\t\t\r\n\t}", "public int compareTo(Date b) {\r\n\t\tif (year != b.year)\r\n\t\t\treturn year - b.year;\r\n\t\tif (month != b.month)\r\n\t\t\treturn month - b.month;\r\n\t\treturn day - b.day;\r\n\t}", "public boolean isBeforeOrEquals(AbsTime refEpoch)\n {\n // The result to return.\n boolean res;\n\n // Check for special values.\n if (isASAP()) {\n // ASAP is before or equal to any time, including ASAP.\n res = true;\n } else if (isNEVER()) {\n // NEVER only before or equal to NEVER.\n if (refEpoch.isNEVER()) {\n res = true;\n } else {\n res = false;\n }\n } else if (refEpoch.isASAP()) {\n // No time is before or equal ASAP, except ASAP, which is already\n // considered above.\n res = false;\n } else if (refEpoch.isNEVER()) {\n // Any time is before or equal to NEVER, including NEVER.\n res = true;\n } else {\n // Do the comparison.\n res = (itsValue <= refEpoch.itsValue);\n }\n\n return res;\n }", "Date getPriorDate();", "public boolean isBefore(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) < spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) < spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) < spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }", "public static boolean isBeforeDay(Calendar cal1, Calendar cal2) {\n if (cal1 == null || cal2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n if (cal1.get(Calendar.ERA) < cal2.get(Calendar.ERA)) return true;\n if (cal1.get(Calendar.ERA) > cal2.get(Calendar.ERA)) return false;\n if (cal1.get(Calendar.YEAR) < cal2.get(Calendar.YEAR)) return true;\n if (cal1.get(Calendar.YEAR) > cal2.get(Calendar.YEAR)) return false;\n return cal1.get(Calendar.DAY_OF_YEAR) < cal2.get(Calendar.DAY_OF_YEAR);\n }", "public static boolean lessThan(DateTime d1, DateTime d2)\n\t{\n\t\treturn Date.lessThan(d1.date,d2.date) || ( Date.equal(d1.date,d2.date) && Time12.lessThan(d1.time,d2.time)) ;\n\t}", "@Test\n public void compareTo() {\n assertTrue(DATE_A.compareTo(DATE_A) == 0);\n\n // testing recess week and reading week.\n assertTrue(DATE_READING.compareTo(DATE_AFTER_READING) == -1);\n assertTrue(DATE_RECESS.compareTo(DATE_AFTER_RECESS) == -1);\n }", "public boolean isBeforeNow() {\r\n return isBefore(DateTimeUtils.currentTimeMillis());\r\n }", "@Test\r\n public void testCompareTo2() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertFalse(d1.compareTo(d2) < 0);\r\n }", "public static void before0(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,6);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==6);\n assert(ret0==true);\n System.out.println(ret0);\n }", "public boolean isAfter(Date that) {\n return compareTo(that) > 0;\n }", "private boolean less(Comparable a, Comparable b) {\n return a.compareTo(b) < 0;\n }", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "@Test\r\n public void testCompareTo1() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertTrue(d1.compareTo(d2) > 0);\r\n }", "public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }", "protected static boolean less(Comparable a, Comparable b) {\n\t\treturn a.compareTo(b) < 0;\r\n\t}", "public boolean isOlderThan(long timeToCompareWith) {\n return (this.timestamp < timeToCompareWith);\n }", "public boolean isPartialAfter(Date b) {\r\n\t\treturn comparePartialTo(b) > 0;\r\n\t}", "@Override\n public int compareTo(Date that) {\n if (this.year < that.year) return -1;\n if (this.year > that.year) return 1;\n if (this.month < that.month) return -1;\n if (this.month > that.month) return 1;\n if (this.day < that.day) return -1;\n if (this.day > that.day) return 1;\n return 0;\n }", "private boolean isPast(Calendar currentCal){\n Calendar presentCal = Calendar.getInstance();\n presentCal.set(Calendar.SECOND,59);\n return currentCal.before(presentCal);\n }", "public static final Function<Date,Boolean> before(final Date date) {\r\n return new Before(date);\r\n }", "protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}", "private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }", "@Factory\r\n\tpublic static Matcher<Date> sameOrBefore(final Date date) {\r\n\t\treturn anyOf(sameInstant(date), before(date));\r\n\t}", "private boolean checkStartDateBeforeEndDate(String startDate, String endDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n Date startingDate = null;\n try {\n startingDate = date.parse(startDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Date endingDate = null;\n try {\n endingDate = date.parse(endDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (startingDate.before(endingDate)) {\n return true;\n } else {\n return false;\n }\n }", "com.google.protobuf.Int64Value getDeliveryDateBefore();", "public static boolean isBeforeCreatedDate(String dateStr, DateWrapper createdDateWrapper) {\n DateWrapper dateWrapper = new DateWrapper(dateStr);\n return dateWrapper.compareTo(createdDateWrapper) < 0;\n }", "public static boolean isTimeBefore(String time1, String time2)\n\t{\n\t\treturn isTimeBefore(time1, time2, getDateTimeFormat());\n\t}", "public boolean olderThan(Person compared) {\n \n if(this.birthday.earlier(compared.birthday)){\n return true;\n }\n return false;\n }", "public static boolean a_lteq_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_lteq_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == -1 || result == 0;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" <= \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "private static boolean isPast(long[][] dates){\n if(dates[0][0] > dates[1][0])\n return true;\n else if(dates[0][0] == dates[1][0]){\n // If the year matches, then check if the month of Start Date is greater than the month of End Date\n // If the month matches, then check if the day of Start Date is greater than the day of End Date\n if(dates[0][1] > dates[1][1])\n return true;\n else if(dates[0][1] == dates[1][1] && dates[0][2] > dates[1][2])\n return true;\n }\n \n // If the Start Date is older than End Date, return false\n return false;\n }", "public boolean isBefore(String start, String end) {\n\n LocalDateTime startTime = LocalDateTime.parse(start, dateTimeFormatter);\n LocalDateTime endTime = LocalDateTime.parse(end, dateTimeFormatter);\n\n return endTime.isBefore(startTime);\n }", "private int sameDateCompare(Deadline other) {\n if (!this.hasTime() && other.hasTime()) {\n return -1;\n } else if (this.hasTime() && !other.hasTime()) {\n return 1;\n } else if (this.hasTime() && other.hasTime()) {\n TimeWrapper thisTimeWrapper = this.getTime();\n TimeWrapper otherTimeWrapper = other.getTime();\n return thisTimeWrapper.compareTo(otherTimeWrapper);\n }\n return 0;\n }", "boolean hasDate();", "public static void main(String[] args) throws ParseException {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat sf = new SimpleDateFormat(pattern);\n Date yesterday = sf.parse(\"2016-12-11 23:59:59\");\n Date todayBegin = sf.parse(\"2016-12-12 00:00:00\");\n Date today1 = sf.parse(\"2016-12-12 00:00:01\");\n Date todayend = sf.parse(\"2016-12-12 23:23:59\");\n\n System.out.println(sf.format(yesterday) + \" is before \" + sf.format(todayBegin) + \":\" + yesterday.before(todayBegin));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(today1) + \":\" + todayBegin.before(today1));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(todayend) + \":\" + todayBegin.before(todayend));\n System.out.println(sf.format(today1) + \" is before \" + sf.format(todayend) + \":\" + today1.before(todayend));\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "public int comparePartialTo(Date b) {\r\n\t\tif (year != b.year)\r\n\t\t\treturn year - b.year;\r\n\t\tif (month != b.month)\r\n\t\t\treturn month - b.month;\r\n\t\treturn 0;\r\n\t}", "public boolean hasPast();", "private DeadlineDate minimumOf(DeadlineDate firstDeadlineDate, DeadlineDate secondDeadlineDate) {\n if (firstDeadlineDate.compareTo(secondDeadlineDate) < 0) {\n return firstDeadlineDate;\n } else {\n return secondDeadlineDate;\n }\n }", "public void date_not_before_createdAt_date(FacesContext context, UIComponent comp, Object value) {\n if (charge.getCreatedAt() != null) {\n Date paidAt = (Date) value;\n\n if (paidAt != null) {\n if (paidAt.before(charge.getCreatedAt())) {\n FacesMessage FMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, message.translate(\"msg.error\"), message.translate(\"msg.validation.notBeforeCreatedAt\"));\n throw new ValidatorException(FMessage);\n }\n }\n }\n }", "public boolean pastDueDate(Date d){\r\n if(dueDate.after(d)){\r\n return false;\r\n }\r\n return true;\r\n }", "boolean hasBeginDate();", "public static boolean almost_less(double a, double b) {\n if (almost_equals(a, b)) {\n return false;\n }\n return a < b;\n }", "@Test\n\tpublic void lessThanTest() {\n\t\tassertTrue(x.less(y));\n\t\tassertFalse(y.less(x));\n\t}", "public static boolean notInFuture(Date data) {\r\n if (data != null) {\r\n return data.before(new Date());\r\n }\r\n return false;\r\n }", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "public static boolean isTimeBefore(String time)\n\t{\n\t\treturn isTimeBefore(time, getDateTimeFormat());\n\t}", "public int compare(\r\n final Object objectA,\r\n final Object objectB)\r\n {\r\n final Date aAsDate = (Date)objectA;\r\n final Date bAsDate = (Date)objectB;\r\n int result = 0;\r\n\r\n if (bAsDate.after(aAsDate))\r\n {\r\n // set result to a negative integer if the first argument of this \r\n // method is less than the second\r\n result = -1;\r\n }\r\n else if (aAsDate.after(bAsDate))\r\n {\r\n // set result to a positive integer if the first argument of this \r\n // method is greater than the second\r\n result = 1;\r\n }\r\n return result;\r\n }", "public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }", "public boolean validateDate(String date) {\n\n\t\tDate enteredDate = null;\n\t\ttry {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tenteredDate = format.parse(date);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDate currentDate = new Date();\n\t\treturn enteredDate.before(currentDate);\n\t}", "public boolean isAfter(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret > 0;\r\n\t}", "public boolean isPosteriorTo(Date argdate) {\r\n\t\ttry {\r\n\t\t\tthis.timeSpentSince(argdate);\r\n\t\t} catch (InvalidDateException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public int compareTo(Date212 other) { //compareTo method\n int result = 00; //intialize int return value.\n Date date1 = new Date(), date2 = new Date(); //initalize\n\nSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n try {\n date1 = sdf.parse(full_Date); //The object calling this method.\n date2 = sdf.parse(other.full_Date); //Other date212 object being passed in.\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n //Try-catch block for parsing & formatting dates.\n \n // System.out.println(\"date1 : \" + sdf.format(date1));\n // System.out.println(\"date2 : \" + sdf.format(date2));\n\n Calendar cal1 = Calendar.getInstance(); \n Calendar cal2 = Calendar.getInstance();\n cal1.setTime(date1);\n cal2.setTime(date2);\n /*\n Use of the Calendar library and methods to compare the dates.\n */\n\n\n //cal1 is the object calling this method\n //cal2 is the object passed in.\n if (cal1.after(cal2)) { \n // System.out.println(\"Date1 is after Date2\");\n result = 1;\n }\n\n if (cal1.before(cal2)) {\n // System.out.println(\"Date1 is before Date2\");\n result = -1;\n }\n\n if (cal1.equals(cal2)) {\n System.out.println(\"Date1 is equal Date2\");\n result = 0;\n }\n return result; //Returns what the if blocks made result to be.\n }", "public boolean compareWeek(String date){\n\n LocalDateTime providedDate = LocalDateTime.parse(date, dateTimeFormatter);\n LocalDateTime currentPlusOneWeek = current.plusWeeks(1);\n\n if(providedDate.isBefore(current)){\n return false;\n }if(providedDate.isAfter(currentPlusOneWeek)){\n return false;\n }\n\n return true;\n\n }", "private boolean compararFechasConDate(String fechaMenor, String fecha2, String fechaComparar) {\n try {\n /**\n * Obtenemos las fechas enviadas en el formato a comparar\n */\n SimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date fechaDateMenor = formateador.parse(fechaMenor);\n Date fechaDateMayor = formateador.parse(fecha2);\n Date fechaDateComparar = formateador.parse(fechaComparar);\n if (fechaDateMenor.before(fechaDateComparar) && fechaDateComparar.before(fechaDateMayor)) {\n return true;\n } else {\n return false;\n }\n } catch (ParseException e) {\n System.out.println(\"Se Produjo un Error!!! \" + e.getMessage());\n return false;\n }\n }", "boolean wasSooner (int[] date1, int[] date2) {\n\n// loops through year, then month, then day if previous value is the same\n for (int i = 2; i > -1; i--) {\n if (date1[i] > date2[i])\n return false;\n if (date1[i] < date2[i])\n return true;\n }\n return true;\n }", "public boolean isLessThan(final Magnitude timeStamp) {\n this.ensureAtLeastPartResolved();\n if (timeStamp instanceof DateTime) {\n return !isNull && !timeStamp.isEmpty() && date.before(((DateTime) timeStamp).date);\n } else {\n throw new IllegalArgumentException(\"Parameter must be of type Time\");\n }\n }", "public static boolean isTimeBefore(String time1, String time2, DateFormat dateFormat)\n\t{\n\t\ttime1 = time1.trim();\n\t\ttime2 = time2.trim();\n\t\ttry\n\t\t{\n\t\t\treturn dateFormat.parse(time1).before(dateFormat.parse(time2));\n\t\t}\n\t\tcatch (ParseException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean isLater(int month1, int day1, int year1,\n int month2, int day2, int year2)\n {\n return (year1 > year2) || (year1 == year2 && month1 > month2) ||\n (year1 == year2 && month1 == month2 && day1 > day2);\n }", "public boolean checkTimeInPast() throws ParseException {\n LocalTime ltnow = LocalTime.now();\n if(b_startTime != null && checkDateIsToday()){\n LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();\n return ltstart.isBefore(ltnow);\n }else{\n return false;\n }\n }", "private Date getYestoday() {\n\t\tDate dNow = new Date(); // 当前时间\n\t\tDate dBefore = new Date();\n\t\tCalendar calendar = Calendar.getInstance(); // 得到日历\n\t\tcalendar.setTime(dNow);// 把当前时间赋给日历\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1); // 设置为前一天\n\t\tdBefore = calendar.getTime(); // 得到前一天的时间\n\t\treturn dBefore;\n\t}", "@Override\n public int compareTo(Date ARG) {\n if (year < ARG.year)\n {\n \treturn -1;\n }\n else if( year > ARG.year)\n {\n \treturn 1;\n }\n \n else{\n \tif (dayOfMonth < ARG.dayOfMonth)\n \t{\n \t\treturn -1; \n \t\t\n \t}\n \telse if (dayOfMonth > ARG.dayOfMonth)\n \t{\n \t\treturn 1; \n \t}\n \telse\n \t{\n \t\tif (dayOfMonth < ARG.dayOfMonth)\n \t\t{\n \t\t\treturn -1;\n \t\t}\n \t\telse if(dayOfMonth > ARG.dayOfMonth)\n \t\t{\n \t\t\treturn 1;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn 0; \n \t\t}\n \t}\n \t\n } \t\n }", "boolean hasStartDate();", "@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }", "public boolean dateCompareCurr(String[] inputdate){\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tDate comparedate = null; // 입력받은 날짜\r\n\t\t\r\n\t\ttry {\r\n\t\t\tDate curdate = dateFormat.parse(dateFormat.format(new Date())); // 현재날짜\r\n\t\t\t\r\n\t\t\tfor (int idx = 0; idx < inputdate.length; idx++) {\r\n\t\t\t\t\r\n\t\t\t\tcomparedate = dateFormat.parse(inputdate[idx]);\r\n\t\t\t\t\r\n\t\t\t\tif(comparedate.compareTo(curdate) >= 0){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public static boolean a_gt_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_gt_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == 1;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" > \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }", "public static void main(String[] args) {\n Date dt1 = new Date();\n System.out.println(dt1);\n \n //get the milli secs in Long from January 1st 1970 00:00:00 GMT... and then create the date Obj from that\n long millisecs = System.currentTimeMillis();\n System.out.println(millisecs);\n Date dt2 = new Date(millisecs);\n System.out.println(dt2);\n System.out.println(\"=========================\");\n\n millisecs = dt2.getTime();//convert dateObj back to millisecs\n System.out.println(millisecs);\n System.out.println(\"dt2.toString(): \" + dt2.toString());\n System.out.println(\"=========================\");\n\n //check if after?\n System.out.println(dt1.after(dt2)); \n System.out.println(dt2.after(dt1));\n //check if before?\n System.out.println(dt1.before(dt2));\n System.out.println(dt2.before(dt1));\n\n\n\n System.out.println(\"=========================\");\n\n // compare 2 date Objects\n //returns 0 if the obj Date is equal to parameter's Date.\n //returns < 0 if obj Date is before the Date para.\n //returns > 0 if obj Date is after the Date para.\n int result = dt1.compareTo(dt2);\n System.out.println(\"dt1 < dt2: \" + result);\n result = dt2.compareTo(dt1);\n System.out.println(\"dt2 > dt1: \" + result);\n\n System.out.println(\"=========================\");\n\n //return true/false on testing equality\n System.out.println(dt1.equals(dt2));\n System.out.println(dt2.equals(dt1));\n System.out.println(\"=========================\");\n\n\n\n\n\n }", "@Test\r\n public void testCompareTo3() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"3/1/2013\");\r\n assertTrue(d1.compareTo(d2) == 0);\r\n }", "public boolean isBefore(People p){\n\t\t//If P is higher age\n\t\tif( this.age==7 && p.age!=7)\n\t\t\treturn true;\n\t\t//If current is professor\n\t\tif(this.age!=7 && this.age!=8){\n\t\t\treturn p.age ==8;\n\t\t}\n\t\t//If p is professor\n\t\tif(p.age!=7 && p.age!=8){\n\t\t\treturn this.age ==7;\n\t\t}\n\t\t//If current is 8\n\t\tif(this.age==8 && p.age==7){\n\t\t\treturn false;\n\t\t}\n\t\t//Same age - age 7\n\t\tif(this.age== p.age && this.age==7){\n\t\t\treturn this.height <= p.height;\n\t\t}\n\t\tif(this.age== p.age && this.age==8){\n\t\t\treturn this.height >= p.height;\n\t\t}\n\t\tSystem.out.println(\"Some Error!!\"+this.age+\" \"+this.height+\" \"+p.age+\" \"+p.height);\n\t\treturn false;\n\t}" ]
[ "0.85625416", "0.7633203", "0.7335357", "0.7278424", "0.70823133", "0.7080194", "0.6989077", "0.6892564", "0.68599075", "0.68518996", "0.6817783", "0.6727843", "0.6724142", "0.66913444", "0.6609345", "0.6585555", "0.65461284", "0.65131736", "0.65094465", "0.6498521", "0.64619046", "0.64348966", "0.64299005", "0.6419254", "0.6408648", "0.63916975", "0.6387286", "0.63768286", "0.62964684", "0.62849224", "0.61958706", "0.61874783", "0.614741", "0.6144078", "0.6137549", "0.60956943", "0.6050381", "0.60492015", "0.60415196", "0.60333467", "0.6011774", "0.6006828", "0.5989001", "0.59676576", "0.596672", "0.592497", "0.5915665", "0.59068865", "0.5905074", "0.5899844", "0.58803046", "0.5860064", "0.5842362", "0.58383054", "0.5838195", "0.58247995", "0.5816061", "0.5802673", "0.57868683", "0.57748026", "0.5761672", "0.57415557", "0.57352823", "0.5734452", "0.5732343", "0.5732343", "0.57231385", "0.5704799", "0.5700875", "0.56934786", "0.5691405", "0.5682318", "0.56711984", "0.5661134", "0.563868", "0.5622214", "0.56060505", "0.55990946", "0.55974156", "0.55965567", "0.5596135", "0.5595132", "0.55646265", "0.55599886", "0.5553729", "0.5535499", "0.5532652", "0.552943", "0.55231434", "0.55076945", "0.55076635", "0.55059016", "0.5504009", "0.5503229", "0.54952145", "0.5494897", "0.5490559", "0.5483144", "0.5470322", "0.5467487" ]
0.7902019
1
compare this Date to that one
public int compareTo(Group3Date that) { if (this.year < that.year) return -1; if (this.year > that.year) return +1; if (this.month < that.month) return -1; if (this.month > that.month) return +1; if (this.day < that.day) return -1; if (this.day > that.day) return +1; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "@Override\n public int compareTo(Date that) {\n if (this.year < that.year) return -1;\n if (this.year > that.year) return 1;\n if (this.month < that.month) return -1;\n if (this.month > that.month) return 1;\n if (this.day < that.day) return -1;\n if (this.day > that.day) return 1;\n return 0;\n }", "private boolean equalsDate(Date thisDate, Date otherDate) {\n if (otherDate == null) {\n return false;\n }\n SimpleDateFormat dateFormating = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String thisDateString = dateFormating.format(thisDate);\n String otherDateString = dateFormating.format(otherDate);\n if (!thisDateString.equals(otherDateString)) {\n return false;\n }\n \n return true;\n }", "public boolean equals(MyDate other){\n \t\tif (other.year == year){\n \t\t\tif (other.month == month){\n \t\t\t\tif (other.day == day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n\t\treturn false;\n\t}", "private boolean isEqualDate(DateStruct d1, DateStruct d2)\n {\n boolean isEqual = false;\n if ( d1.year == d2.year && d1.month == d2.month && d1.day == d2.day )\n {\n isEqual = true;\n }\n return isEqual;\n }", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "@Override\n public boolean equals(Object other) {\n if (other == this) return true;\n if (other == null) return false;\n if (other.getClass() != this.getClass()) return false;\n Date that = (Date) other;\n return (this.month == that.month) && (this.day == that.day) && (this.year == that.year);\n }", "@Override\n public int compareTo(SmartDate o) {\n return this.date.compareTo(o.date);\n }", "@Override\n public int compareTo(Date date) {\n if (this.year > date.year) {\n return 1;\n } else if (this.year < date.year) {\n return -1;\n } else if (this.year == date.year) {\n if (this.month > date.month) {\n return 1;\n } else if (this.month < date.month) {\n return -1;\n } else if (this.month == date.month) {\n if (this.day > date.day) {\n return 1;\n } else if (this.day < date.day) {\n return -1;\n } else if (this.day == date.day) {\n return 0;\n }\n }\n }\n return 0;\n }", "@Override\n public int compareTo(Date ARG) {\n if (year < ARG.year)\n {\n \treturn -1;\n }\n else if( year > ARG.year)\n {\n \treturn 1;\n }\n \n else{\n \tif (dayOfMonth < ARG.dayOfMonth)\n \t{\n \t\treturn -1; \n \t\t\n \t}\n \telse if (dayOfMonth > ARG.dayOfMonth)\n \t{\n \t\treturn 1; \n \t}\n \telse\n \t{\n \t\tif (dayOfMonth < ARG.dayOfMonth)\n \t\t{\n \t\t\treturn -1;\n \t\t}\n \t\telse if(dayOfMonth > ARG.dayOfMonth)\n \t\t{\n \t\t\treturn 1;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn 0; \n \t\t}\n \t}\n \t\n } \t\n }", "public boolean equals(Object O){\n\t if (!(O instanceof Date))\n\t return false;\n\t Date other = (Date) O;\n\t return this.year == other.year && this.month == other.month && this.day == other.day;\n }", "private int sameDateCompare(Deadline other) {\n if (!this.hasTime() && other.hasTime()) {\n return -1;\n } else if (this.hasTime() && !other.hasTime()) {\n return 1;\n } else if (this.hasTime() && other.hasTime()) {\n TimeWrapper thisTimeWrapper = this.getTime();\n TimeWrapper otherTimeWrapper = other.getTime();\n return thisTimeWrapper.compareTo(otherTimeWrapper);\n }\n return 0;\n }", "public static void main(String[] args) \r\n {\n\t Date date = new Date();\r\n\t System.out.println(date);\r\n\t \r\n\t //comparision of dates\r\n\t /*\r\n\t Return\r\n 1. It returns the value 0 if the argument Date is equal to this Date. \r\n 2. It returns a value less than 0 if this Date is before the Date argument.\r\n 3. It returns a value greater than 0 if this Date is after the Date argument.\r\n\t */\r\n\t Date d=new Date(2021,05,31);\r\n\t System.out.println(d.equals(date));\r\n Date d1=new Date(2021,5,26); \r\n int comparison=d.compareTo(d1); \r\n System.out.println();\r\n System.out.println(\"Your comparison value is : \"+comparison); \r\n }", "public static boolean equals(Date a, Date b) {\n if (a == null || b == null) return (a == null && b == null);\n if (a == b) return true;\n Calendar cal1 = Calendar.getInstance();\n Calendar cal2 = Calendar.getInstance();\n cal1.setTime(a);\n cal2.setTime(b);\n return cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) &&\n cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR);\n }", "public boolean equals(Object obj)\n {\n if (!(obj instanceof Date))\n {\n return false;\n }\n\n Date other = (Date) obj;\n\n return day == other.day && month == other.month && year == other.year\n && hour == other.hour && minute == other.minute;\n }", "@Test\n public void equalsOk(){\n Date date = new Date(1,Month.january,1970);\n assertTrue(date.equals(date));\n }", "public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }", "public int compareTo(Date212 other) { //compareTo method\n int result = 00; //intialize int return value.\n Date date1 = new Date(), date2 = new Date(); //initalize\n\nSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n try {\n date1 = sdf.parse(full_Date); //The object calling this method.\n date2 = sdf.parse(other.full_Date); //Other date212 object being passed in.\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n //Try-catch block for parsing & formatting dates.\n \n // System.out.println(\"date1 : \" + sdf.format(date1));\n // System.out.println(\"date2 : \" + sdf.format(date2));\n\n Calendar cal1 = Calendar.getInstance(); \n Calendar cal2 = Calendar.getInstance();\n cal1.setTime(date1);\n cal2.setTime(date2);\n /*\n Use of the Calendar library and methods to compare the dates.\n */\n\n\n //cal1 is the object calling this method\n //cal2 is the object passed in.\n if (cal1.after(cal2)) { \n // System.out.println(\"Date1 is after Date2\");\n result = 1;\n }\n\n if (cal1.before(cal2)) {\n // System.out.println(\"Date1 is before Date2\");\n result = -1;\n }\n\n if (cal1.equals(cal2)) {\n System.out.println(\"Date1 is equal Date2\");\n result = 0;\n }\n return result; //Returns what the if blocks made result to be.\n }", "@Test\n public void compareToWithMainDateInThePast(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.compareTo(new Date(31,Month.december,1970)),-1);\n }", "boolean hasDate();", "public boolean equals(Date212 other) { //equals\n return( other != null\n && getClass() == other.getClass()\n && Year ==((Date212) other).Year\n && Day ==((Date212) other).Day\n && Month ==((Date212) other).Month);\n}", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "public boolean dateIsEqual(Date date){\n\t\tboolean isEqual=true;\n\t\t\n\t\tif(!(date.getMonth()==month && date.getYear()==year && date.getDay()==day)){\n\t\t\tisEqual=false;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn isEqual;\n\t}", "public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public boolean getADateChanged() {\r\n return !OpbComparisonHelper.isEqual(\r\n aDate, aDateDataSourceValue);\r\n }", "public boolean lessThan(MyDate other){\t\n \t\tif (other.year > year){\n \t\t\treturn true;\n \t\t}\n \t\telse if (other.year == year){\n \t\t\tif (other.month > month){\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\telse if (other.month == month){\n \t\t\t\tif (other.day > day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n\t}", "public boolean isAfter(Date that) {\n return compareTo(that) > 0;\n }", "@Test\n public void equals() {\n assertTrue(DATE_A.equals(DATE_A));\n\n // different object, same values -> returns true.\n assertTrue(DATE_A.equals(new Date(DATE_A.getWeek(), DATE_A.getDay(), DATE_A.getTime())));\n\n // different values -> returns false.\n assertFalse(DATE_A.equals(DATE_AFTER_READING));\n\n // different week -> returns false\n assertFalse(DATE_A.equals(DATE_B));\n }", "public boolean isEqual(DateTime dt) {\n return Long.parseLong(this.vStamp) == Long.parseLong(dt.getStamp());\r\n }", "@Test\r\n public void testCompareTo1() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertTrue(d1.compareTo(d2) > 0);\r\n }", "@Override\r\n public boolean equals(Object o) {\r\n if ((o != null) && (o instanceof HISDate)) {\r\n return compareTo((HISDate) o) == 0;\r\n }\r\n\r\n return false;\r\n }", "public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }", "@Override\r\n public int compareTo(HISDate date) {\r\n int cmpResult = -11111; // ERROR\r\n try {\r\n cmpResult = this.compare(date);\r\n } catch (Exception e) {\r\n logger.error(\"compareTo(): Ungültiges Datum: \" + date);\r\n cmpResult = -11111;\r\n }\r\n return cmpResult;\r\n }", "@Override\n public boolean equals(Object o) {\n return o instanceof Date && month == ((Date)o).month && dayOfMonth == ((Date)o).dayOfMonth && year == ((Date)o).year;\n }", "public boolean compareDates (String date1, String date2) {\n if (date1.equals(date2)) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public int compare(final Availability o1, final Availability o2) {\n DateFormat f = new SimpleDateFormat(\"dd-MM-yyyy\");\n try {\n return f.parse(o1.getDate()).compareTo(f.parse(o2.getDate()));\n } catch (ParseException e) {\n throw new IllegalArgumentException(e);\n }\n }", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "public int compareTo(Date b) {\r\n\t\tif (year != b.year)\r\n\t\t\treturn year - b.year;\r\n\t\tif (month != b.month)\r\n\t\t\treturn month - b.month;\r\n\t\treturn day - b.day;\r\n\t}", "public static boolean compareDates(Date d1, Date d2) {\n Calendar c1 = Calendar.getInstance();\n Calendar c2 = Calendar.getInstance();\n c1.setTime(d1);\n c2.setTime(d2);\n\n if (c1.get(Calendar.YEAR) != c2.get(Calendar.YEAR))\n return false;\n if (c1.get(Calendar.MONTH) != c2.get(Calendar.MONTH))\n return false;\n if (c1.get(Calendar.DAY_OF_MONTH) != c2.get(Calendar.DAY_OF_MONTH)) {\n return false;\n }\n return true;\n }", "public boolean checkDateEqual(LocalDate date) {\n return date.equals(this.date);\n }", "@Test\r\n public void testCompareTo2() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertFalse(d1.compareTo(d2) < 0);\r\n }", "boolean isSetFoundingDate();", "public static void main(String[] args) {\nDate d1 = new Date( 2019, 02, 22);\nSystem.out.println(d1);\n\n\nDate d2= new Date();\nSystem.out.println(d2);\nDate d3 = new Date(2000,11,11);\nSystem.out.println(d3);\nint a = d1.compareTo(d3);\nSystem.out.println(a);\nboolean b = d1.after(d2);\n\tSystem.out.println(b);\n\t}", "public static void main(String[] args) {\n Date dt1 = new Date();\n System.out.println(dt1);\n \n //get the milli secs in Long from January 1st 1970 00:00:00 GMT... and then create the date Obj from that\n long millisecs = System.currentTimeMillis();\n System.out.println(millisecs);\n Date dt2 = new Date(millisecs);\n System.out.println(dt2);\n System.out.println(\"=========================\");\n\n millisecs = dt2.getTime();//convert dateObj back to millisecs\n System.out.println(millisecs);\n System.out.println(\"dt2.toString(): \" + dt2.toString());\n System.out.println(\"=========================\");\n\n //check if after?\n System.out.println(dt1.after(dt2)); \n System.out.println(dt2.after(dt1));\n //check if before?\n System.out.println(dt1.before(dt2));\n System.out.println(dt2.before(dt1));\n\n\n\n System.out.println(\"=========================\");\n\n // compare 2 date Objects\n //returns 0 if the obj Date is equal to parameter's Date.\n //returns < 0 if obj Date is before the Date para.\n //returns > 0 if obj Date is after the Date para.\n int result = dt1.compareTo(dt2);\n System.out.println(\"dt1 < dt2: \" + result);\n result = dt2.compareTo(dt1);\n System.out.println(\"dt2 > dt1: \" + result);\n\n System.out.println(\"=========================\");\n\n //return true/false on testing equality\n System.out.println(dt1.equals(dt2));\n System.out.println(dt2.equals(dt1));\n System.out.println(\"=========================\");\n\n\n\n\n\n }", "boolean isSetDate();", "public boolean dateCompareCurr(String[] inputdate){\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tDate comparedate = null; // 입력받은 날짜\r\n\t\t\r\n\t\ttry {\r\n\t\t\tDate curdate = dateFormat.parse(dateFormat.format(new Date())); // 현재날짜\r\n\t\t\t\r\n\t\t\tfor (int idx = 0; idx < inputdate.length; idx++) {\r\n\t\t\t\t\r\n\t\t\t\tcomparedate = dateFormat.parse(inputdate[idx]);\r\n\t\t\t\t\r\n\t\t\t\tif(comparedate.compareTo(curdate) >= 0){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private boolean isSame(Calendar first, Calendar second)\n {\n return (first.get(Calendar.DAY_OF_MONTH) == second.get(Calendar.DAY_OF_MONTH))\n && (first.get(Calendar.MONTH) == second.get(Calendar.MONTH))\n && (first.get(Calendar.YEAR) == second.get(Calendar.YEAR));\n }", "public boolean checkTimePeriod(String from, String to) throws ParseException{\r\n\t\r\n\tDateFormat df = new SimpleDateFormat (\"yyyy-MM-dd\");\r\n boolean b = true;\r\n // Get Date 1\r\n Date d1 = df.parse(from);\r\n\r\n // Get Date 2\r\n Date d2 = df.parse(to);\r\n\r\n //String relation=\"\";\r\n if (d1.compareTo(d2)<=0){\r\n \t b=true;\r\n // relation = \"the date is less\";\r\n }\r\n else {\r\n b=false;\r\n }\r\n return b;\r\n}", "public boolean equals(Date d) {\r\n if (month == d.getMonth() && day == d.getDay()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Test\n public void compareTo() {\n assertTrue(DATE_A.compareTo(DATE_A) == 0);\n\n // testing recess week and reading week.\n assertTrue(DATE_READING.compareTo(DATE_AFTER_READING) == -1);\n assertTrue(DATE_RECESS.compareTo(DATE_AFTER_RECESS) == -1);\n }", "public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n BirthDate birthDate1 = (BirthDate) o;\n return Objects.equals(date, birthDate1.date);\n }", "@Override\n public long dateCompare(LocalDate localDate1, LocalDate localDate2) {\n return localDate1.until(localDate2, ChronoUnit.MONTHS);\n }", "public int compareWithToday() {\r\n return this.compare(HISDate.getToday());\r\n }", "public int compare(Date d){\n\t if (this.year < d.year)\n\t return 1;\n\t else if (this.year > d.year)\n\t return -1;\n\t else{\n\t int cM = this.month.compareMonth(d.month);\n\t if (cM != 0)\n\t\treturn cM;\n\t else{\n\t\tif (this.day < d.day)\n\t\t return 1;\n\t\telse if (this.day > d.day)\n\t\t return -1;\n\t\telse\n\t\t return 0;\n\t }\n\t }\n }", "public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }", "public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "@Override\n public int compareTo(Booking other) {\n // Push new on top\n other.updateNewQuestion(); // update NEW button\n this.updateNewQuestion();\n\n\n String[] arr1 = other.time.split(\":\");\n String[] arr2 = this.time.split(\":\");\n// Date thisDate = new Date(this.getCalendarYear(), this.getCalendarMonth(), this.getCalendarDay(), Integer.getInteger(arr2[0]), Integer.getInteger(arr2[1]));\n// if (this.newQuestion != other.newQuestion) {\n// return this.newQuestion ? 1 : -1; // this is the winner\n// }\n\n\n if (this.calendarYear == other.calendarYear) {\n if (this.calendarMonth == other.calendarMonth) {\n if (this.calendarDay == other.calendarDay) {\n if (Integer.parseInt(arr2[0]) == Integer.parseInt(arr1[0])) { // hour\n if (Integer.parseInt(arr2[1]) == Integer.parseInt(arr1[1])) { // minute\n return 0;\n } else {\n return Integer.parseInt(arr1[1]) > Integer.parseInt(arr2[1]) ? -1 : 1;\n }\n } else {\n return Integer.parseInt(arr1[0]) > Integer.parseInt(arr2[0]) ? -1 : 1;\n }\n }\n else\n return other.calendarDay > this.calendarDay ? -1 : 1;\n }\n else\n return other.calendarMonth > this.calendarMonth ? -1 : 1;\n }\n else\n return other.calendarYear > this.calendarYear ? -1 : 1;\n\n\n// if (this.echo == other.echo) {\n// if (other.calendarMonth == this.calendarMonth) {\n// return 0;\n// }\n// return other.calendarMonth > this.calendarMonth ? -1 : 1;\n// }\n// return this.echo - other.echo;\n }", "public boolean isBefore(Date date2)\n {\n if (year < date2.year)\n return true;\n else if (year == date2.year && month < date2.month)\n return true;\n else if (year == date2.year && month == date2.month && day < date2.day)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour < date2.hour)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour == date2.hour && minute < date2.minute)\n return true;\n else\n return false;\n }", "public boolean isBefore(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret < 0;\r\n\t}", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "public static boolean isRevdate(java.sql.Date date1,int CUST_ID,int MOVIE_ID) {\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n java.util.Date date11 = null;\n try {\n date11 = formatter1.parse(\"1970-06-06\");\n } catch (ParseException e) {\n e.printStackTrace();\n }\n long r_date = date1.getTime();\n irate_Connection om = new irate_Connection();\n om.startConnection(\"user1\", \"password\", dbName);\n conn = om.getConnection();\n s = om.getStatement();\n irate_DQL dql = new irate_DQL(conn, s);\n java.sql.Date date2 = dql.atten(CUST_ID, MOVIE_ID);\n if(date2 == date11)\n return false;\n long a_date = date2.getTime();\n long diffinmill = r_date - a_date;\n long diff = TimeUnit.DAYS.convert(diffinmill,TimeUnit.MILLISECONDS);\n if(diff > 7 || diff <= 0)\n return false;\n else\n return true;\n }", "public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}", "public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof DateCard)) {\n return false;\n }\n\n // state check\n DateCard card = (DateCard) other;\n return id.getText().equals(card.id.getText())\n && date.equals(card.date);\n }", "public boolean verifyLeaveDate(Date date){\t\t\n\t\tLocale en = new Locale(\"en\");\t\t\n\t\tString lDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn leaveDate.getText().equals(lDate);\n\t}", "public int compare(Date date){\n if(date.getYear() > this.year){\n return -1;\n }else if(date.getYear() < this.year){\n return 1;\n }\n\n if(date.getMonth() > this.month){\n return -1;\n }else if(date.getMonth() < this.month){\n return 1;\n }\n\n if(date.getDay() > this.day){\n return -1;\n }else if(date.getDay() < this.day){\n return 1;\n }\n\n return 0;\n }", "public boolean verifyReturnDate(Date date){\n\t\tLocale en = new Locale(\"en\");\n\t\tString rDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn returnDate.getText().equals(rDate);\n\t}", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "boolean hasStartDate();", "@Override\r\n\t\t\t\tpublic int compare(Comparendo o1, Comparendo o2) \r\n\t\t\t\t{\n\t\t\t\t\treturn o1.fechaHora.compareTo(o2.fechaHora);\r\n\t\t\t\t}", "public static boolean comprobarOrdenFechas (Date f1, Date f2){\n if(diferenciaFechas(f1,f2) <= 0){\n System.out.println(\"Fecha final es menor que la fecha inicial\");\n return false;\n }else{\n return true;\n }\n }", "boolean wasSooner (int[] date1, int[] date2) {\n\n// loops through year, then month, then day if previous value is the same\n for (int i = 2; i > -1; i--) {\n if (date1[i] > date2[i])\n return false;\n if (date1[i] < date2[i])\n return true;\n }\n return true;\n }", "public boolean isBefore(@NonNull final CalendarDay other) {\n return date.isBefore(other.getDate());\n }", "public boolean equals(Object obj){\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (obj == this)\n\t\t\treturn true;\n\t\tif (!(obj instanceof Date))\n\t\t return false;\n\t\tFlatCell flatCell = (FlatCell) obj;\n\t\treturn (flatCell.day == this.day && flatCell.flatCalendar == this.flatCalendar);\n\t}", "private boolean compararFechasConDate(String fechaMenor, String fecha2, String fechaComparar) {\n try {\n /**\n * Obtenemos las fechas enviadas en el formato a comparar\n */\n SimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date fechaDateMenor = formateador.parse(fechaMenor);\n Date fechaDateMayor = formateador.parse(fecha2);\n Date fechaDateComparar = formateador.parse(fechaComparar);\n if (fechaDateMenor.before(fechaDateComparar) && fechaDateComparar.before(fechaDateMayor)) {\n return true;\n } else {\n return false;\n }\n } catch (ParseException e) {\n System.out.println(\"Se Produjo un Error!!! \" + e.getMessage());\n return false;\n }\n }", "@Override\n public boolean equals (Object o){\n if(this == o){\n return true;\n }\n if(o == null){\n return false;\n }\n if(getClass() != o.getClass()){\n return false;\n }\n\n CinemaDate cd = (CinemaDate) o;\n return this.day.equals(cd.getDay()) && this.month.equals(cd.getMonth()) && this.time.equals(cd.getTime());\n }", "public boolean equals(SpentOn spentOn)\n {\n return (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) == spentOn.calendar.get(Calendar.DAY_OF_MONTH));\n }", "boolean hasEndDate();", "@Override\n public boolean equals(Object obj) {\n PlanningSalle plaS;\n if (obj ==null || obj.getClass()!=this.getClass()){\n return false;\n }\n\n else {\n plaS =(PlanningSalle)obj;\n if(\n plaS.getDateDebutR().equals(getDateDebutR()) //vu que type primitif == pas equals\n & plaS.getDateFinR().equals(getDateFinR())) { \n {\n return true;\n }\n }\n\n else {\n return false;\n }\n }\n }", "protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}", "public boolean isDate() {\n if ( expiryDate==null) return false;\n else return expiryDate.isSIPDate();\n }", "boolean hasDeliveryDateBefore();", "public boolean wasToday() {\n\t\tlong endInMillis = endTime.getTime();\n\t\tCalendar endTimeDate = Calendar.getInstance();\n\t\tendTimeDate.setTimeInMillis(endInMillis);\n\t\tCalendar today = Calendar.getInstance();\n\t\tif (today.get(Calendar.YEAR) == endTimeDate.get(Calendar.YEAR) && today.get(Calendar.DAY_OF_YEAR) == endTimeDate.get(Calendar.DAY_OF_YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isToday(Date lectureDate){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()|| lectureDate.getYear()>now.getYear()){\n return false;\n }else{\n if(lectureDate.getMonth()<now.getMonth()||(lectureDate.getMonth()>now.getMonth())){\n return false;\n }else{\n if(lectureDate.getDate()<now.getDate()|| lectureDate.getDate()>now.getDate()){\n return false;\n }else{\n return true;\n }\n }\n }\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tHoliday comparedHoliday = (Holiday) obj;\n\t\treturn (getDate() == comparedHoliday.getDate() && getMonth() == comparedHoliday.getMonth());\n\t}", "public boolean isAfter(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret > 0;\r\n\t}", "public final boolean equals(Object d)\n {\n if ( d == this ) return true;\n if ( !(d instanceof DateUtil) ) return false;\n return(ordinal == ((DateUtil)d).getOrdinal());\n }", "public Boolean validarFecha(LocalDate fechaIngresada);", "public boolean equals(Object x) {\n\t\t\tif (x == this) return true;\n\t\t\tif (x == null) return false;\n\t\t\tif (x.getClass() != this.getClass()) return false;\n\t\t\tGroup3Date that = (Group3Date) x;\n\t\t\treturn (this.month == that.month) && (this.day == that.day) && (this.year == that.year);\n\t\t}", "public boolean isAfter(Date b) {\r\n\t\treturn compareTo(b) > 0;\r\n\t}", "public Boolean sameDay(Event event) {\n int year_given = event.getDate().get(Calendar.YEAR);\n int month_given = event.getDate().get(Calendar.MONTH);\n int day_given = event.getDate().get(Calendar.DATE);\n\n int year = this.getDate().get(Calendar.YEAR);\n int month = this.getDate().get(Calendar.MONTH);\n int day = this.getDate().get(Calendar.DATE);\n\n return (year == year_given) && (month == month_given) && (day == day_given);\n }", "@SuppressWarnings(\"deprecation\")\r\n public static final boolean compareTwoDateSpecificToEndDay(Date expiredDate, Date dateNow) {\r\n\r\n int hoursNow = dateNow.getHours();\r\n int minuteNow = dateNow.getMinutes();\r\n\r\n return ((expiredDate.compareTo(dateNow) < 0)\r\n || ((expiredDate.compareTo(dateNow) == 0) && (hoursNow > 22 && minuteNow > 58)));\r\n\r\n }", "@Override\n public int compare(Date date1, Date date2) {\n if (date1.getDay() < date2.getDay() || date1.getMonth() < date2.getMonth() || date1.getYear() < date2.getYear())\n return -1;\n\n else if (date1.getDay() > date2.getDay() || date1.getMonth() > date2.getMonth() || date1.getYear() > date2.getYear())\n return 1;\n\n return 0;\n\n //Finally sort wins according to the -1, 0, 1 ascending order\n }", "boolean isValidFor (@Nonnull DATATYPE aDate);", "public final int compareTo(Object anotherDateUtil)\n {\n return this.ordinal - ((DateUtil) anotherDateUtil).ordinal;\n }" ]
[ "0.72629654", "0.7128542", "0.7104356", "0.6919287", "0.6778587", "0.6725316", "0.66796154", "0.6580225", "0.6570955", "0.65148497", "0.651267", "0.64683634", "0.64604366", "0.643445", "0.6404742", "0.6374474", "0.6309507", "0.6293106", "0.62784", "0.6266718", "0.62363666", "0.6214408", "0.6214408", "0.62027735", "0.61881953", "0.6187021", "0.61835724", "0.61595327", "0.61562026", "0.6136812", "0.61230767", "0.61216", "0.6088529", "0.60823834", "0.6075145", "0.60601115", "0.60507256", "0.6047992", "0.60345304", "0.6020729", "0.6006543", "0.5998435", "0.59483147", "0.5937588", "0.5927835", "0.5911234", "0.5911062", "0.5907771", "0.5899038", "0.5881794", "0.58567667", "0.5851304", "0.58407044", "0.58398664", "0.58391327", "0.583851", "0.5832719", "0.58258194", "0.5815595", "0.5796678", "0.5784721", "0.57838684", "0.57801485", "0.577625", "0.57745373", "0.57688606", "0.5768811", "0.57680035", "0.5760573", "0.57516754", "0.574043", "0.57336056", "0.5729945", "0.5726283", "0.57223177", "0.5709245", "0.5691773", "0.5691376", "0.5691284", "0.56841505", "0.56835383", "0.5661634", "0.5643413", "0.5642446", "0.5636672", "0.56302863", "0.5628822", "0.5615077", "0.5609243", "0.5604872", "0.56030947", "0.5600474", "0.56004304", "0.5599537", "0.55986303", "0.5596466", "0.559062", "0.55895287", "0.5589313", "0.5586952" ]
0.57649
68
return a string representation of this date
public String toString() { return month + "/" + day + "/" + year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "public String toString(){\n\t\t\n\t\treturn month+\"/\"+day+\"/\"+year;\n\t}", "public String toString() {\n\t\tdouble hour = getHour();\n\t\tString h = (hour < 10 ? \" \" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + hour;\n\n\t\treturn \"(YYYY/MM/DD) \" + getYear() + \"/\" + (getMonth() < 10 ? \"0\" : \"\") + getMonth() + \"/\"\n\t\t\t\t+ (getDay() < 10 ? \"0\" : \"\") + getDay() + \", \" + h + \"h \" + (getCalendarType() ? \"(greg)\" : \"(jul)\")\n\t\t\t\t+ \"\\n\" + \"Jul. Day: \" + getJulDay() + \"; \" + \"DeltaT: \" + getDeltaT();\n\t}", "public String toString() {\n\t\treturn String.format(\"%d/%d/%d\", year, month, day);\n\t}", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\t\tDate date = formatter.parse(month + \"/\" + day + \"/\" + year);\n\n\t\t\treturn formatter.format(date);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public String toString() {\n synchronized (FORMATTER) {\n return FORMATTER.format(_calendar.getTime());\n }\n }", "@Override\n public String toString() {\n return String.format(year + \",\" + month + \",\" + day);\n\n }", "@Override\n public String toString() {\n return (this.month + \"/\" + this.day + \"/\" + this.year);\n }", "public String toString() {\n\treturn String.format(\"%d/%d/%d\", year, month, day);\t\r\n\t}", "public String toString() {\n\t\treturn new String(dateToString() + \" \"\n\t\t\t\t+ timeToString());\n }", "public String toString() {\r\n\t\treturn String.format(\"%02d/%02d/%02d\", month, day, year);\r\n\r\n\t}", "public String getDate(){\n\t\treturn toString();\n\t}", "public String toString() {\n return this.day + \" \" + this.month + \" \" + this.time;\n }", "@Override\n public String toString() {\n String outputDate = this.date.format(outputDateFormat);\n return \"[D]\" + super.toString() + \" (by: \" + outputDate + \")\";\n }", "@Override\n public String toString() {\n return month + \"/\" + day + \"/\" + year;\n }", "public String toString()\n\t{\n\t\treturn date.toString()+\" \"+time.toString();\n\t}", "public String toString()\n {\n String str = \"\";\n\n if (day < 10)\n {\n str += \"0\";\n }\n str += day + \"/\";\n\n if (month < 10)\n {\n str += \"0\";\n }\n str += month + \"/\";\n\n str += year + \"; \";\n\n if (hour < 10)\n {\n str += \"0\";\n }\n str += hour + \":\";\n\n if (minute < 10)\n {\n str += \"0\";\n }\n str += minute;\n\n return str;\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public String toString() {\n if(getPersistedAttribute().getDatevalue() == null) {\n return \"null\";\n }\n return DateUtil.formatRfc3339Calendar(getValue());\n }", "public String toString(){\n\t\treturn \"Name: \"+name +\" Date: \"+date.getDate();\n\t}", "public String toString() {\n return String.format(\"%02d:%02dZ%02d%s%d\", hour, minute, day, months[month - 1], year);\n }", "public String toString()\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"MMM-yyyy\");\n\t\t\n\t\treturn getBank() + \" \" + getAccount() + \" \" + format.format(getDate());\n\t}", "public String toString() {\n StringBuilder output = new StringBuilder();\n LocalDateTime currentTime = getCurrentTime();\n output.append(currentTime.getYear()).append(\":\").append(currentTime.getMonthValue()).append(\":\")\n .append(currentTime.getDayOfMonth());\n return output.toString();\n }", "@Override\n public String toString() {\n // Jahr, immer 4-stellig (führenden Nullen)\n String j = String.format(\"%04d\", jahr());\n\n // Monat, immer 2-stellig (führende Null)\n String m = String.format(\"%02d\", monat());\n\n // Tag, immer 2-stellig (führende Null)\n String t = String.format(\"%02d\", tag());\n\n // Trennzeichen (char -> String für String.join())\n String tz = String.valueOf(separator);\n\n // Setzt Datum entsprechend dem festgelegten format zusammen\n String datum = switch (format) {\n case \"jmt\" -> String.join(tz, j, m, t);\n case \"tmj\" -> String.join(tz, t, m, j);\n case \"mtj\" -> String.join(tz, m, t, j);\n default -> \"Usage: jmt/tmj/mtj\";\n };\n return datum;\n }", "public String getDateString() {\n DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return format.format(mDate);\n }", "public String toString() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy\");\n\t\treturn employeeName + \" \" + EID + \" \" + address + \" \" + phoneNumber + \" \" + sdf.format(DOB) + \" \" + securityClearance;\n\t}", "public String toString() {\n return \"[E]\" + super.toString() + \" (at: \"\n + date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy hh:ss a\")) + \")\";\n }", "@Override\n public String toString() {\n return date.format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy\")) + \" - \" + note;\n }", "protected String getRentDateString() { return \"\" + dateFormat.format(this.rentDate); }", "public String toString() {\r\n\t\treturn \"[\" + month + \"-\" + day + \"-\" + year + \"]\";\r\n\t}", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "java.lang.String getDate();", "public String toString()\n {\n if ( ordinal == NULL_ORDINAL )\n {\n return \"\";\n }\n String result;\n if ( -999 <= yyyy && yyyy <= 9999 )\n {\n result = this.toLZ(yyyy,4);\n }\n else\n {\n result = Integer.toString(yyyy);\n }\n result += \"-\" + this.toLZ(mm,2) + \"-\" + this.toLZ(dd,2);\n return result;\n }", "@Override\n public String toString() {\n return (\"[E]\" + super.toString() + String.format(\"(at:%s)\", this.date));\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public String toString() {\n String eventString = \"\";\n DateTimeFormatter ft = DateTimeFormatter.ofPattern(\"ddMMyyyy\");\n String date = this.getDue().format(ft);\n eventString += (\"e,\" + this.getName() + \",\" + this.getDetails() + \",\" +\n date + \";\");\n return eventString;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tString dispyear = \"\" + this.year;\r\n\t\tString dispmonth = \"\" + this.month;\r\n\t\tString dispday = \"\" + this.day;\r\n\t\tString disphour = \"\" + this.hour;\r\n\t\tString dispminute = \"\" + this.minute;\r\n\t\tif (this.month < 10) {\r\n\t\t\tdispmonth = \"0\" + dispmonth;\r\n\t\t}\r\n\t\tif (this.day < 10) {\r\n\t\t\tdispday = \"0\" + dispday;\r\n\t\t}\r\n\t\tif (this.hour < 10) {\r\n\t\t\tdisphour = \"0\" + disphour;\r\n\t\t}\r\n\t\tif (this.minute < 10) {\r\n\t\t\tdispminute = \"0\" + dispminute;\r\n\t\t}\r\n\t\treturn disphour + \":\" + dispminute + \", \" + dispday +\"/\" + dispmonth +\"/\" + dispyear;\r\n\t}", "public String toString() {\n \tSimpleDateFormat formatter = new SimpleDateFormat(\"MMM dd, yyyy\");\n \t\n \t// convert the released date from calendar object to a date object\n \tDate gameDateobject = this.released.getTime();\n \t\n \t// convert the date object to a specific format\n \tString printDate = formatter.format(gameDateobject);\n \t\n \t// build and return the final string\n \tString finalOutput = \"\\\"\" + this.name + \"\\\"\" + \", released on: \" + printDate;\n \t\n\t\treturn finalOutput;\n }", "@Override\r\n public String toString() {\r\n \r\n DateFormat data = DateFormat.getDateInstance();\r\n return \"Nome: \" + getNome()+ \" \\nCPF: \" + getCpf() + \" \\nTelefone: \"\r\n + getTelefone() + \" \\nData de Nascimento : \" + data.format(getDataNasc())\r\n + \" \\nSexo: \" + getSexo();\r\n }", "public String toString() {\n return '[' + description + \"][\" + date + ']';\n }", "public String getFormattedDate() {\n return transactionDate.toString();\n }", "public String toString() {\r\n\t\treturn super.toString() + \" \" + this.aenderungsdatum + \" \" + this.erstelldatum;\r\n\t}", "public String toString() {\n return title() + \" \" + longValue() + \" [DateTime]\";\n }", "@Override\npublic final String toString() {\n\t if(shortFormat) {\n\t\t return toShortString();\n\t }\n if (calValue != null) {\n return dfMedium.get().format(calValue.getTime());\n }\n else {\n return \"\";\n }\n }", "public String toString() {\n\n // returns a string in a \"{standard time}: {description}\" format\n return String.format(\"%s: %s\", this.getTime(), this.description);\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "@Override\n public String toString() {\n SimpleDateFormat format = new SimpleDateFormat (\"MMM d yyyy\");\n String dateString = format.format(by);\n return \"[D]\" + super.toString() + \" (by: \" + dateString + \")\";\n }", "public String toString(){\n\t\tString result = Integer.toString(day) + \" \";\n\t\tswitch (month){\n\t\t\tcase 1:\n\t\t\t\tresult += \"January, \";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tresult += \"February, \";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tresult += \"March, \";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tresult += \"April, \";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tresult += \"May, \";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tresult += \"June, \";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tresult += \"July, \";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tresult += \"August, \";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tresult += \"September, \";\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tresult += \"October, \";\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tresult += \"November, \";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tresult += \"December, \";\n\t\t\t\tbreak;\n\t\t}\n\t\tresult += Integer.toString((year / 10 % 10)) + Integer.toString((year % 10));\n\n\t\treturn result;\n\t}", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "protected String getReturnDateString() { return \"\" + dateFormat.format(this.returnDate); }", "@Override\n public String toString() {\n String byFormatted = by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n return \"[D]\" + super.toString() + \" (by: \" + byFormatted + \")\";\n }", "public String Get_date() \n {\n \n return date;\n }", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "@Override\r\n public String toString() {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n \r\n return (\r\n \"\\n\" +\r\n \"Codigo tour: \" + this.getCodigoIdentificacion() + \"\\n\" +\r\n \"Nombre Comercial: \" + this.getNombreComercial() + \"\\n\" +\r\n \"Lugar de salida: \" + this.getLugarPartida() + \"\\n\" +\r\n \"Fecha de salida: \" + sdf.format(this.getFechaSalida()) + \"\\n\" +\r\n \"Fecha de regreso: \" + sdf.format(this.getFechaRegreso()) + \"\\n\" +\r\n \"Precio: \" + String.format(\"$ %(,.0f\", this.getPrecio()) + \"\\n\" +\r\n \"Estadía (días): \" + this.calcularEstadia() + \"\\n\" +\r\n \"Costo: \" + String.format(\"$ %(,.0f\", this.calcularPrecio()) + \"\\n\" +\r\n \"Nombre empresa: \" + this.getNombreEmpresa() + \"\\n\" +\r\n \"Tipo de empresa: \" + this.getTipo() + \"\\n\" +\r\n \"Viajero frecuente:\" + (this.isViajeroFrecuente() ? \"Si\\n\" : \"No\\n\")\r\n );\r\n }", "public String getDateCreatedAsString() {\n return dateCreated.toString(\"MM/dd/yyyy\");\n }", "public String toString() {\n if (time != null) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n return time.format(formatter);\n } else {\n return \"INVALID TIME\";\n }\n }", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "@Override\n public String save_toString() {\n return \"D | \" + super.save_toString() + \"| \" + date;\n }", "@Override\n\tpublic String asString(Object object) {\n\t\t// at this point object is a Date\n\n\t\tCalendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\tcalendar.setTime((Date) object);\n\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tint year = calendar.get(Calendar.YEAR);\n\t\tif (calendar.get(Calendar.ERA) == 0) {\n\t\t\t// https://en.wikipedia.org/wiki/ISO_8601\n\t\t\t// by convention 1 BC is labeled +0000, 2 BC is labeled −0001, ...\n\n\t\t\tif (year > 1) {\n\t\t\t\tbuilder.append('-');\n\t\t\t}\n\t\t\t--year;\n\t\t}\n\n\t\tbuilder.append(String.format(\"%04d\", year));\n\t\tbuilder.append('-');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.MONTH) + 1));\n\t\tbuilder.append('-');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.DATE)));\n\t\tbuilder.append('T');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.HOUR_OF_DAY)));\n\t\tbuilder.append(':');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.MINUTE)));\n\t\tbuilder.append(':');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.SECOND)));\n\t\tbuilder.append('Z');\n\n\t\treturn builder.toString();\n\t}", "public String getStringRepresentation() {\n StringJoiner joiner = new StringJoiner(STRING_FORMAT_DELIMITER);\n\n joiner.add(this.getCaller())\n .add(this.getCallee())\n .add(SIMPLE_DATE_FORMAT.format(startTime))\n .add(SIMPLE_DATE_FORMAT.format(endTime));\n\n return joiner.toString();\n }", "protected String getDateString() {\n String result = null;\n if (!suppressDate) {\n result = currentDateStr;\n }\n return result;\n }", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\n }", "@Override\n public String toString() {\n String result = (negative)\n ? \"-P\"\n : \"P\";\n\n if ((years > 0) || (months > 0) || (days > 0)) {\n if (years > 0) {\n result += years + \"Y\";\n }\n\n if (months > 0) {\n result += months + \"M\";\n }\n\n if (days > 0) {\n result += days + \"D\";\n }\n } else {\n result += \"0D\";\n }\n\n if ((hours > 0) || (minutes > 0) || (seconds > 0)) {\n result += \"T\";\n\n if (hours > 0) {\n result += hours + \"H\";\n }\n\n if (minutes > 0) {\n result += minutes + \"M\";\n }\n\n if (seconds > 0) {\n result += seconds + \"S\";\n }\n }\n\n return result;\n }", "public String toString()\n\t{\n\t\tif (m_nType == AT_NONE)\n\t\t\treturn \"ERROR\";\n\n\t\tString str;\n\n\t\t//Format : <type>,<title>,<time>,<zone>,[<date>|<week day>|<month date>]\n\t\t//Time is in \"hh:mm\" format; Date in \"mm-dd-yyyy\" format\n\n\t\tstr = Integer.toString(m_nType);\n\t\tstr = str + FIELD_SEP;\n\n\t\tstr = str + m_strTitle;\n\t\tstr = str + FIELD_SEP;\n\n\t\tstr = str + Integer.toString(m_nTimeHour);\n\t\tstr = str + TIME_SEP;\n\t\tstr = str + Integer.toString(m_nTimeMin);\n\t\tstr = str + FIELD_SEP;\n\t\tstr = str + m_strTimeZone;\n\n\t\tif (m_oData != null)\n\t\t\tstr = str + FIELD_SEP;\n\n\t\tif (m_nType == AT_DATE)\n\t\t\tstr = str + GValidator.DateToString((Date)m_oData);\n\t\telse if (m_nType == AT_WEEK_DAY || m_nType == AT_MONTH_DATE)\n\t\t\tstr = str + ((Integer)m_oData).toString();\n\n\t\treturn str;\n\t}", "@Override\r\n public String getAsText() {\r\n Date value = (Date) getValue();\r\n DateFormat dateFormat = this.dateFormat;\r\n if(dateFormat == null) {\r\n dateFormat = new SimpleDateFormat(TIME_FORMAT);\r\n }\r\n return (value != null ? dateFormat.format(value) : \"\");\r\n }", "@Override\n public String toString() {\n return \"[D]\" + super.toString() + \"(by: \" + date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\")) + \")\";\n }", "String getDate();", "String getDate();", "public String toString() {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\"); //Mostraremos la fecha en formato DD/MM/AAAA\r\n\t\tString nacEdad=sdf.format(fechaNac)+ \"(\"+obtenerAnios()+\" años)\";\r\n\t\treturn \"Persona [nombre=\" + nombre + \", fechaNac=\" + nacEdad + \", DNI=\" + dni\r\n\t\t\t\t+ \", sexo=\" + sexo + \", peso=\" + peso + \", altura=\" + altura\r\n\t\t\t\t+ \"]\";\r\n\t}", "@Override\n public String toString() {\n return this.getTimestamp().atZone(ZoneId.of(\"Europe/Vienna\")).format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy HH:mm\"))\n + \" \" + this.getFirstName()\n + \" \" + this.getLastName().substring(0,1) + \".\"\n //+ \", \" + this.getTelephoneNo()\n //+ \" (\" + this.getEmail() + \")\"\n ;\n }", "@Override\n public String toString() {\n return \"[D]\" + super.toString() + \" (by: \"\n + by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\")) + \")\";\n }", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "public java.lang.String getDate() {\n return date;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"value:%s;expiry:%s\", value,\n\t\t\t\tTimeHepler.getStringDateShort(expiry));\n\t}", "public String getDataNascimentoString() {\r\n\r\n\t\tSimpleDateFormat data = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\treturn data.format(this.dataNascimento.getTime());\r\n\r\n\t}", "@Override\n public String toString(){\n String format = \"%1$-30s %2$-20s %3$-20s %4$-12s %5$-3s %6$-12s\";\n return String.format(format, this.title, this.stream, this.type,\n this.start_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)), \"-\", this.end_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)));}", "java.lang.String getToDate();", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "@Override\n public String toString(){\n String ret = super.toString();\n ret += \"\\nYears Until Tenure: \" + m_yearsUntilTenure;\n return ret;\n }", "public String retornaData(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn df.format(calendar.getTime());\n\t}", "public String toString() {\n\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\tbuffer.append(\"id=[\").append(id).append(\"] \");\n\t\tbuffer.append(\"dayNum=[\").append(dayNum).append(\"] \");\n\t\tbuffer.append(\"process=[\").append(process).append(\"] \");\n\t\tbuffer.append(\"createTime=[\").append(createTime).append(\"] \");\n\n\t\treturn buffer.toString();\n\t}", "public String toString()\n {\n return String.format(\"%d:%02d:%02d %s %d/%d/%d\", \n ((getHour() == 0 || getHour() == 12) ? 12 : getHour() % 12),\n getMinute(), getSecond(), (getHour() < 12 ? \"AM\" : \"PM\"), \n \tmonth, day, year);\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\n\t}", "private String dateToString(Date d){\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.format(d);\r\n\t}", "public String marshal( Date value )\n {\n String val = \"\";\n \tif (value != null) {\n \tCalendar cal = new GregorianCalendar();\n \tcal.setTime( value );\n \treturn DatatypeConverter.printDateTime( cal );\n }\n\t\t\n\t\tSystem.out.println(\"Date value: \" + value);\n return val;\n }", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public String toString()\n {\n return toString((Format) null);\n }", "@Override\n public String toString() {\n DateTimeFormatter df = DateTimeFormatter.ofPattern(\"dd MMM yyyy HHmm\");\n return \"[\" + super.getType() + \"]\" + super.toString() + \" (by: \" + df.format(this.date) + \")\";\n }", "private static Date dateToString(Date start) {\n\t\treturn start;\n\t}", "public String toString() {\n\t\tStringBuilder result = new StringBuilder();\n\t\tresult.append(\"{\");\n\t\tresult.append(\"dataType=\").append(this.day.getDataType());\n\t\tresult.append(\";\");\n\t\tresult.append(\"dataCountry=\").append(this.day.getDataCountry());\n\t\tresult.append(\";\");\n\t\tresult.append(\"dataLanguage=\").append(this.day.getDataLanguage());\n\t\tresult.append(\";\");\n\t\tresult.append(\"language=\").append(this.day.getLanguageString());\n\t\tresult.append(\";\");\n\t\tresult.append(\"value=\").append(this.day.getValue());\n\t\tresult.append(\";\");\n\t\tresult.append(\"count=0\");\n\t\tresult.append(\"}\");\n\t\treturn result.toString();\t\n\t}", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "public String toString()\n\t{\n\t\treturn super.toString() + \"\\n\" +\n\t\t\t \"\\t\" + \"Full Time\" + \"\\n\" +\n\t\t\t \"\\t\" + \"Monthly Salary: $\" + Double.toString(monthlyEarning());\n\t}" ]
[ "0.8303326", "0.79790354", "0.78961945", "0.78527033", "0.78065485", "0.77759427", "0.77560776", "0.77245706", "0.7691528", "0.76911145", "0.76055497", "0.75852835", "0.7576582", "0.7547376", "0.7485304", "0.7461871", "0.7455377", "0.7454579", "0.7378988", "0.73748314", "0.73638606", "0.73426217", "0.7312669", "0.72996575", "0.72965974", "0.7293913", "0.72560066", "0.72506833", "0.72470915", "0.7245014", "0.72370464", "0.72366256", "0.72268844", "0.7214405", "0.7170868", "0.7148865", "0.71412283", "0.711909", "0.70794255", "0.7063159", "0.7063139", "0.70578593", "0.7054006", "0.7052997", "0.7050029", "0.7048263", "0.70478797", "0.7031188", "0.7022853", "0.7013217", "0.701283", "0.7005479", "0.6959226", "0.69488037", "0.694738", "0.6938171", "0.69318974", "0.6920452", "0.69196856", "0.6915562", "0.69068736", "0.69059736", "0.6903407", "0.6893623", "0.68801445", "0.6869252", "0.68574524", "0.6835818", "0.6817922", "0.6807791", "0.67953223", "0.67953223", "0.6792212", "0.6787156", "0.6770766", "0.6764175", "0.6759951", "0.67472917", "0.6742352", "0.674199", "0.6734819", "0.6720735", "0.6713551", "0.67106426", "0.6710241", "0.6704602", "0.6700804", "0.66968805", "0.6679875", "0.66781104", "0.6677656", "0.66695935", "0.6662557", "0.6650034", "0.6616035", "0.66048664", "0.6602587", "0.65994674", "0.659034", "0.6575403" ]
0.7770539
6
is this Date equal to x?
public boolean equals(Object x) { if (x == this) return true; if (x == null) return false; if (x.getClass() != this.getClass()) return false; Group3Date that = (Group3Date) x; return (this.month == that.month) && (this.day == that.day) && (this.year == that.year); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void equalsOk(){\n Date date = new Date(1,Month.january,1970);\n assertTrue(date.equals(date));\n }", "boolean hasDate();", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "private boolean isEqualDate(DateStruct d1, DateStruct d2)\n {\n boolean isEqual = false;\n if ( d1.year == d2.year && d1.month == d2.month && d1.day == d2.day )\n {\n isEqual = true;\n }\n return isEqual;\n }", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "public boolean equals(MyDate other){\n \t\tif (other.year == year){\n \t\t\tif (other.month == month){\n \t\t\t\tif (other.day == day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n\t\treturn false;\n\t}", "public boolean dateIsEqual(Date date){\n\t\tboolean isEqual=true;\n\t\t\n\t\tif(!(date.getMonth()==month && date.getYear()==year && date.getDay()==day)){\n\t\t\tisEqual=false;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn isEqual;\n\t}", "boolean isSetDate();", "public static boolean equals(Date a, Date b) {\n if (a == null || b == null) return (a == null && b == null);\n if (a == b) return true;\n Calendar cal1 = Calendar.getInstance();\n Calendar cal2 = Calendar.getInstance();\n cal1.setTime(a);\n cal2.setTime(b);\n return cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) &&\n cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR);\n }", "public boolean equals(Object O){\n\t if (!(O instanceof Date))\n\t return false;\n\t Date other = (Date) O;\n\t return this.year == other.year && this.month == other.month && this.day == other.day;\n }", "private boolean equalsDate(Date thisDate, Date otherDate) {\n if (otherDate == null) {\n return false;\n }\n SimpleDateFormat dateFormating = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String thisDateString = dateFormating.format(thisDate);\n String otherDateString = dateFormating.format(otherDate);\n if (!thisDateString.equals(otherDateString)) {\n return false;\n }\n \n return true;\n }", "public boolean checkDateEqual(LocalDate date) {\n return date.equals(this.date);\n }", "public boolean equals(Object obj)\n {\n if (!(obj instanceof Date))\n {\n return false;\n }\n\n Date other = (Date) obj;\n\n return day == other.day && month == other.month && year == other.year\n && hour == other.hour && minute == other.minute;\n }", "@Test\n public void equals() {\n assertTrue(DATE_A.equals(DATE_A));\n\n // different object, same values -> returns true.\n assertTrue(DATE_A.equals(new Date(DATE_A.getWeek(), DATE_A.getDay(), DATE_A.getTime())));\n\n // different values -> returns false.\n assertFalse(DATE_A.equals(DATE_AFTER_READING));\n\n // different week -> returns false\n assertFalse(DATE_A.equals(DATE_B));\n }", "public boolean equals(Date d) {\r\n if (month == d.getMonth() && day == d.getDay()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean isEqual(DateTime dt) {\n return Long.parseLong(this.vStamp) == Long.parseLong(dt.getStamp());\r\n }", "@Override\n public boolean equals(Object o) {\n return o instanceof Date && month == ((Date)o).month && dayOfMonth == ((Date)o).dayOfMonth && year == ((Date)o).year;\n }", "boolean isSetFoundingDate();", "@Override\n public boolean equals(Object other) {\n if (other == this) return true;\n if (other == null) return false;\n if (other.getClass() != this.getClass()) return false;\n Date that = (Date) other;\n return (this.month == that.month) && (this.day == that.day) && (this.year == that.year);\n }", "boolean hasDateTime();", "public boolean isDate() {\n if ( expiryDate==null) return false;\n else return expiryDate.isSIPDate();\n }", "boolean hasSettlementDate();", "boolean hasTradeDate();", "public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }", "public Boolean sameDay(Event event) {\n int year_given = event.getDate().get(Calendar.YEAR);\n int month_given = event.getDate().get(Calendar.MONTH);\n int day_given = event.getDate().get(Calendar.DATE);\n\n int year = this.getDate().get(Calendar.YEAR);\n int month = this.getDate().get(Calendar.MONTH);\n int day = this.getDate().get(Calendar.DATE);\n\n return (year == year_given) && (month == month_given) && (day == day_given);\n }", "boolean isValidFor (@Nonnull DATATYPE aDate);", "boolean isMatch(ZonedDateTime date);", "public boolean verifyReturnDate(Date date){\n\t\tLocale en = new Locale(\"en\");\n\t\tString rDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn returnDate.getText().equals(rDate);\n\t}", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public boolean isSetDate() {\n return EncodingUtils.testBit(__isset_bitfield, __DATE_ISSET_ID);\n }", "public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }", "boolean hasDay();", "boolean hasDay();", "boolean hasStartDate();", "public void testGetDate() {\r\n assertEquals(test1.getDate(), 20200818);\r\n }", "boolean hasFromDay();", "public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }", "public boolean hasDate() {\n return true;\n }", "public boolean equals(Date212 other) { //equals\n return( other != null\n && getClass() == other.getClass()\n && Year ==((Date212) other).Year\n && Day ==((Date212) other).Day\n && Month ==((Date212) other).Month);\n}", "boolean hasExpirationDate();", "@Override\r\n public boolean equals(Object o) {\r\n if ((o != null) && (o instanceof HISDate)) {\r\n return compareTo((HISDate) o) == 0;\r\n }\r\n\r\n return false;\r\n }", "public static void main(String[] args) \r\n {\n\t Date date = new Date();\r\n\t System.out.println(date);\r\n\t \r\n\t //comparision of dates\r\n\t /*\r\n\t Return\r\n 1. It returns the value 0 if the argument Date is equal to this Date. \r\n 2. It returns a value less than 0 if this Date is before the Date argument.\r\n 3. It returns a value greater than 0 if this Date is after the Date argument.\r\n\t */\r\n\t Date d=new Date(2021,05,31);\r\n\t System.out.println(d.equals(date));\r\n Date d1=new Date(2021,5,26); \r\n int comparison=d.compareTo(d1); \r\n System.out.println();\r\n System.out.println(\"Your comparison value is : \"+comparison); \r\n }", "public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "boolean hasToDay();", "public Boolean isExpired() {\n\t\tCalendar today = Calendar.getInstance();\n\t\treturn today.get(Calendar.DAY_OF_YEAR) != date.get(Calendar.DAY_OF_YEAR);\n\t}", "public static final Function<Object,Boolean> eq(final Date object) {\r\n return FnObject.eq(object);\r\n }", "@Test\n public void compareToWithMainDateInThePast(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.compareTo(new Date(31,Month.december,1970)),-1);\n }", "public boolean wasToday() {\n\t\tlong endInMillis = endTime.getTime();\n\t\tCalendar endTimeDate = Calendar.getInstance();\n\t\tendTimeDate.setTimeInMillis(endInMillis);\n\t\tCalendar today = Calendar.getInstance();\n\t\tif (today.get(Calendar.YEAR) == endTimeDate.get(Calendar.YEAR) && today.get(Calendar.DAY_OF_YEAR) == endTimeDate.get(Calendar.DAY_OF_YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public final boolean equals(Object d)\n {\n if ( d == this ) return true;\n if ( !(d instanceof DateUtil) ) return false;\n return(ordinal == ((DateUtil)d).getOrdinal());\n }", "private boolean isToday(Date lectureDate){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()|| lectureDate.getYear()>now.getYear()){\n return false;\n }else{\n if(lectureDate.getMonth()<now.getMonth()||(lectureDate.getMonth()>now.getMonth())){\n return false;\n }else{\n if(lectureDate.getDate()<now.getDate()|| lectureDate.getDate()>now.getDate()){\n return false;\n }else{\n return true;\n }\n }\n }\n }", "@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }", "@Test\n\tpublic void testDate1() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(0);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 1900);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "boolean isValidForDate(LocalDate date);", "@Override\n public boolean equals (Object o){\n if(this == o){\n return true;\n }\n if(o == null){\n return false;\n }\n if(getClass() != o.getClass()){\n return false;\n }\n\n CinemaDate cd = (CinemaDate) o;\n return this.day.equals(cd.getDay()) && this.month.equals(cd.getMonth()) && this.time.equals(cd.getTime());\n }", "@Test\n public void tomorrowInTheSameMonth(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.tomorrow(),new Date(2,Month.january,1970));\n }", "private boolean isCurrentYear(Date date) {\n boolean result = false;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n Calendar today = Calendar.getInstance();\n if (today.get(Calendar.YEAR) == calendar.get(Calendar.YEAR)) {\n result = true;\n }\n return result;\n }", "boolean hasAcquireDate();", "public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public Boolean validarFecha(LocalDate fechaIngresada);", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "boolean hasExpireDate();", "@Override\npublic final boolean eval(final Object value) {\n\n if (value instanceof Date) {\n return true;\n }\n\n return false;\n }", "private boolean isSame(Calendar first, Calendar second)\n {\n return (first.get(Calendar.DAY_OF_MONTH) == second.get(Calendar.DAY_OF_MONTH))\n && (first.get(Calendar.MONTH) == second.get(Calendar.MONTH))\n && (first.get(Calendar.YEAR) == second.get(Calendar.YEAR));\n }", "public boolean isEqual(MonthDay other) {\n if(month == other.month && day == other.day) {\n return true;\n } else {\n return false;\n }\n }", "public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }", "@Test\n\tpublic void testDate2() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36160);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public boolean isFuture()\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int dayT = currentDate.get(GregorianCalendar.DATE);\n int monthT = currentDate.get(GregorianCalendar.MONTH) + 1;\n int yearT = currentDate.get(GregorianCalendar.YEAR);\n int hourT = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minuteT = currentDate.get(GregorianCalendar.MINUTE);\n\n if (yearT < year)\n {\n return true;\n }\n else if (yearT == year && monthT < month)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT < day)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT < hour)\n {\n return true;\n }\n else if (yearT == year && monthT == month && dayT == day && hourT == hour\n && minuteT < minute)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }", "public boolean getADateChanged() {\r\n return !OpbComparisonHelper.isEqual(\r\n aDate, aDateDataSourceValue);\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n BirthDate birthDate1 = (BirthDate) o;\n return Objects.equals(date, birthDate1.date);\n }", "public boolean verifyLeaveDate(Date date){\t\t\n\t\tLocale en = new Locale(\"en\");\t\t\n\t\tString lDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn leaveDate.getText().equals(lDate);\n\t}", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean runsAt(Date date);", "boolean hasEndDate();", "boolean hasOrderDate();", "boolean hasContinuousDay();", "private static boolean isDate(final Object obj) {\n return dateClass != null && dateClass.isAssignableFrom(obj.getClass());\n }", "public boolean equals(Object obj){\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (obj == this)\n\t\t\treturn true;\n\t\tif (!(obj instanceof Date))\n\t\t return false;\n\t\tFlatCell flatCell = (FlatCell) obj;\n\t\treturn (flatCell.day == this.day && flatCell.flatCalendar == this.flatCalendar);\n\t}", "public boolean hasDate() {\n return fieldSetFlags()[5];\n }", "public static void playgroundForTime(){\n\t\tLocalDate localDate = LocalDate.of(2013, 4, 25);\r\n\t\tSystem.out.println(localDate.now().isBefore(localDate));\r\n\t\t\r\n\t}", "public boolean checkDate(int year, int month, int day, double hour) {\n\t\tdouble jd = swe_julday(year, month, day, hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\treturn (dt.year == year && dt.month == month && dt.day == day);\n\t}", "@Test\n public void testIsValidateDate() {\n System.out.println(\"isValidateDate\");\n String dateString = \"2016-03-23T10:25:01Z\";\n boolean expResult = true;\n boolean result = DateUtil.isValidateDate(dateString);\n assertEquals(expResult, result);\n }", "public boolean isEqualTo(final Magnitude timeStamp) {\n this.ensureAtLeastPartResolved();\n if (timeStamp instanceof DateTime) {\n if (isNull) {\n return timeStamp.isEmpty();\n }\n\n return this.date.equals(((DateTime) timeStamp).date);\n } else {\n throw new IllegalArgumentException(\"Parameter must be of type Time\");\n }\n }", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "public boolean checkDate(int year, int month, int day) {\n\t\tboolean cd = checkDate(year, month, day, 0.0);\n\t\treturn cd;\n\t}", "@Test\n public void isLeapYearOk(){\n assertTrue(Date.isLeapYear(2008));\n }", "public boolean equals(SpentOn spentOn)\n {\n return (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) == spentOn.calendar.get(Calendar.DAY_OF_MONTH));\n }", "public static boolean isDateInCurrentWeek(Date date) {\n Calendar currentCalendar = Calendar.getInstance();\n int week = currentCalendar.get(Calendar.WEEK_OF_YEAR);\n int year = currentCalendar.get(Calendar.YEAR);\n Calendar targetCalendar = Calendar.getInstance();\n targetCalendar.setTime(date);\n int targetWeek = targetCalendar.get(Calendar.WEEK_OF_YEAR);\n int targetYear = targetCalendar.get(Calendar.YEAR);\n return week == targetWeek && year == targetYear;\n }", "@SuppressWarnings(\"static-access\")\r\n\tpublic boolean isBirthday()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tboolean isBirthday = false;\r\n\t\tif (now.MONTH == bDate.MONTH && now.DATE == bDate.DATE)\r\n\t\t{\r\n\t\t\tisBirthday = true;\r\n\t\t}\r\n\t\treturn isBirthday;\r\n\t}", "@Test\r\n public void testCompareTo1() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertTrue(d1.compareTo(d2) > 0);\r\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public static boolean isToday(Date date) {\r\n\t\treturn isSameDay(date, Calendar.getInstance().getTime());\r\n\t}", "public static boolean isRevdate(java.sql.Date date1,int CUST_ID,int MOVIE_ID) {\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n java.util.Date date11 = null;\n try {\n date11 = formatter1.parse(\"1970-06-06\");\n } catch (ParseException e) {\n e.printStackTrace();\n }\n long r_date = date1.getTime();\n irate_Connection om = new irate_Connection();\n om.startConnection(\"user1\", \"password\", dbName);\n conn = om.getConnection();\n s = om.getStatement();\n irate_DQL dql = new irate_DQL(conn, s);\n java.sql.Date date2 = dql.atten(CUST_ID, MOVIE_ID);\n if(date2 == date11)\n return false;\n long a_date = date2.getTime();\n long diffinmill = r_date - a_date;\n long diff = TimeUnit.DAYS.convert(diffinmill,TimeUnit.MILLISECONDS);\n if(diff > 7 || diff <= 0)\n return false;\n else\n return true;\n }", "public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.74859583", "0.7240705", "0.71420777", "0.7079727", "0.69796735", "0.6956895", "0.68527555", "0.6843361", "0.68052834", "0.6744066", "0.66746205", "0.6672351", "0.66503733", "0.66422004", "0.6588826", "0.65703344", "0.65193397", "0.6517673", "0.65169805", "0.64750177", "0.642838", "0.6379898", "0.6369905", "0.63689595", "0.63273734", "0.6325146", "0.630033", "0.6300295", "0.62968594", "0.62686074", "0.62437123", "0.6231247", "0.6231247", "0.62160367", "0.62016785", "0.6184741", "0.6173963", "0.61411214", "0.6132515", "0.6127941", "0.6120279", "0.61134624", "0.6085859", "0.6082495", "0.6078696", "0.60680336", "0.6061667", "0.6052968", "0.6043147", "0.6028689", "0.6025033", "0.60212576", "0.6017941", "0.60141534", "0.60115516", "0.59973985", "0.59970695", "0.5996816", "0.5995293", "0.599501", "0.59845304", "0.59573", "0.5953241", "0.5952324", "0.59494114", "0.5949118", "0.59438", "0.594131", "0.5931758", "0.5929989", "0.59289813", "0.59231", "0.59196997", "0.5882963", "0.58643156", "0.58557916", "0.5847379", "0.5846858", "0.5845298", "0.5833225", "0.58321047", "0.58310705", "0.58268714", "0.58155084", "0.5813772", "0.5809471", "0.5806702", "0.5796201", "0.5767063", "0.5760317", "0.57530856", "0.57530856", "0.57530856", "0.57530856", "0.57530856", "0.57530856", "0.57530856", "0.5752269", "0.57376987", "0.5733677" ]
0.6961384
5
String[] rowtobeEval = getRow(rowIndex);
public Boolean isRowHomogenous(Integer rowIndex) { return checkEqual(getRow(rowIndex)); //return rowtobeEval[0].equals(rowtobeEval[1]) && rowtobeEval[1].equals(rowtobeEval[2]) && rowtobeEval[0] != " "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRow(){\r\n // return statement\r\n return row;\r\n }", "String getValue(String column, int row);", "RowFunction getRowFunction();", "String getRows(int index);", "public abstract String[] getRowValues(Cursor c);", "public ICalculator[] getRow(int row){\n return calculators[row];\n }", "int getRow();", "public int getRow(){ return (Integer)args[0]; }", "public int getRow()\n {\n return row;\n }", "private ArrayList<String[]> getTableRowData() \n {\n int numRow, numCol;\n ArrayList<String[]> data = new ArrayList<>();\n numRow = jtModel.getRowCount(); \n numCol = jtModel.getColumnCount();\n String[] row;\n for(int i = 0; i< numRow; i++)\n {\n row = new String[numCol];\n for(int j = 0; j< numCol; j++)\n {\n row[j] = jtModel.getValueAt(i, j).toString();\n } \n data.add(row);\n } \n return data;\n }", "public int getRow() {\n // YOUR CODE HERE\n return this.row;\n }", "public int[] getRow() { return _row; }", "public Row[] getRows() {return rows;}", "T getRowData(int rowNumber);", "protected void populateDynamicCells(int resultsRow) {\n }", "int atRow();", "public List<String> getRows();", "Object getDataValue(String column, int row);", "public abstract String getCurrentRow();", "public String getValueAt(int rowIndex, int columnIndex);", "public int GetRow(){\n return row;\n }", "public int getRowNum(){ return this.rowNum; }", "Value evaluateCellAt(int col, int row);", "RowValues createRowValues();", "public double[] getRowData(int row) {\n return data[row];\n }", "public int getRow() { return _row; }", "public Object eval (org.apache.spark.sql.catalyst.expressions.Row input) { throw new RuntimeException(); }", "private static String processOneRow(int[] rowSize, String[] values){\n\t\tStringBuilder result = new StringBuilder();\t\t\n\t\tprocessOneRow(rowSize, values, result, false); \n\t\treturn result.toString(); \t\n\n\t}", "io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row getRow(int index);", "RowCoordinates getRowCoordinates();", "Object[] getDataRow(final int index);", "public int getRow()\n {\n return row;\n }", "public Object evaluate(fyiReporting.RDL.Report rpt, Row row) throws Exception {\n if (row == null)\n return null;\n \n Textbox tb;\n String t = _ArgExpr.evaluateString(rpt,row);\n if (t == null)\n return null;\n \n tb = _ReportItems[t] instanceof Textbox ? (Textbox)_ReportItems[t] : (Textbox)null;\n if (tb == null)\n return null;\n \n return tb.evaluate(rpt,row);\n }", "public Row getRow() {\n\treturn new Row(rowIndex); \n }", "public int getRow()\r\n {\r\n return row;\r\n }", "@Override\n public Object getValueAt(int row, int column) { return data[row][column]; }", "public String[][] rowData(){\n\t\t int n=(int) ((endeInterval-startInterval)/schritt);\n\t\t String[][] Data = new String[n+1][2];\n\t\t for(int i = 0;i<=n;i++){\n\t\t\t Data[i][0] = String.valueOf(startInterval + i*schritt);\n\t\t\t Data[i][1] = String.valueOf(Auswerten.plotter((startInterval + i*schritt),funcString));\n\t\t }\n\t\treturn Data ; \n\t }", "public static String[] getRow(int rowIndex, String[][] dataArray) {\n\t\tString[] row = new String[dataArray[rowIndex].length];\n\t\trow = dataArray[rowIndex];\n\t\treturn row;\n\t}", "int getRows();", "int getRows();", "boolean onReadRow(int rowIndex, Map<String, String> rowData);", "@Override\n public Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(aRow, aColumn); \n }", "@Override\r\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn rowData[arg0][arg1];\r\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "List<C> getRow() throws Exception;", "@Override\n public Object getValueAt(int row, int column) {\n return sessionRow.get(row * column);\n }", "int getRowIndex();", "public List getRows() \n {\n return rows;\n }", "public int getRow(){\r\n\t\treturn this.row;\r\n\t}", "io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row getRow(int index);", "private static Integer getOutcome(List<String> row) {\n\t return Integer.parseInt(row.get(8));\n\t}", "@Override\r\n public Object getValueAt(int rowIndex, int columnIndex) {\n Hashtable rowData = fixHashtables[rowIndex];\r\n return rowData.get(getColumnName(columnIndex));\r\n }", "RowValue createRowValue();", "public Cell getRowValuesForCompare(Row row,int cellNum){\n return row.getCell(cellNum);\n }", "public String[] getRowID() {\n \treturn rowID;\n }", "public int getRow() {\r\n return row;\r\n }", "public String getid_prod(int row){\n DefaultTableModel dt =(DefaultTableModel)this.jTable1.getModel();\n String id_prod=\"\";\n id_prod = jTable1.getModel().getValueAt(row, 0).toString().trim();\n return id_prod;\n }", "public void newRow();", "public String[] getRowData(int rowIndex)\n\t{\n\t\tHSSFRow row=sheet.getRow(rowIndex);\n\t\tint cellCount=row.getPhysicalNumberOfCells();\n\t\tString [] rowData=new String[cellCount];\n\t\tfor(int i=0;i<cellCount;i++)\n\t\t{\n\t\t\trowData[i]=getData(row,i);\n\t\t}\n\t\treturn rowData;\n\t}", "public String getRows(int index) {\n return rows_.get(index);\n }", "public Clientedim getRowData(String rowKey) {\n \r\n List<Clientedim> clienti = (List<Clientedim>) getWrappedData();\r\n \r\n for(Clientedim cli : clienti) {\r\n if(cli.getGestore().getCod_gestore().equals(rowKey))\r\n return cli;\r\n }\r\n \r\n return null;\r\n }", "private Object getEntry( Object[] row, String rrName ) {\n Integer icol = colMap_.get( rrName );\n return icol == null ? null : row[ icol.intValue() ];\n }", "public String getCellText(){return cellText;}", "@Test\n public void testGetValueAt() {\n System.out.println(\"getValueAt\");\n int rowIndex = 0;\n int columnIndex = 0;\n\n Object expResult = \"Vlakna hypercasu\";\n Object result = testLibraryLibraryTableModel.getValueAt(rowIndex, columnIndex);\n assertEquals(expResult, result);\n\n\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "protected int getRow() {\r\n\t\treturn this.row;\r\n\t}", "@Override\n public void tableRows_()\n {\n }", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "public int row();", "public int getRow() {\n\t\treturn row; \n\t}", "public int getRow()\r\n\t{\r\n\t\treturn this.row;\r\n\t}", "java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> \n getRowList();", "@Override\r\n\tpublic boolean evaluate(RowSet rs) {\n\t\treturn false;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public Object getValueAt(int row, int column) {\n Preso cli = lista.get(row);\n /*if (column == Id) {\n return cli.getId();\n } else*/ if (column == Nome) {\n return cli.getNome();\n } if (column == Tempo) {\n return cli.getTempo();\n } else\n\n return \"\"; //Nunca deve ocorrer \n }", "io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row getRow(int index);", "public final String[] getRow(final GameLogEntity gameLogRow) {\n String[] row = new String[DREI];\n\n String dateString = StringWorker.getNotSetTemplate();\n String percentSolvedString = StringWorker.getNotSetTemplate();\n String typeString = StringWorker.getNotSetTemplate();\n\n // Validate\n if (gameLogRow != null) {\n if (gameLogRow.getDateTimeStamp() != null) {\n dateString = DateFormat.getDateTimeInstance().\n format(new Date(gameLogRow.getDateTimeStamp()));\n }\n if (gameLogRow.getPercentQuestionsSolved() != null) {\n percentSolvedString = String.valueOf(\n gameLogRow.getPercentQuestionsSolved());\n }\n if (gameLogRow.getType() != null) {\n typeString = gameLogRow.getType().name();\n }\n }\n\n // Set columns in this row\n row[0] = dateString;\n row[1] = percentSolvedString;\n row[2] = typeString;\n\n return row;\n }", "public void setRows(List<String> rowNames);", "public String getRows(int index) {\n return rows_.get(index);\n }", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public native int getEventRow() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n return self.getEventRow();\r\n }-*/;", "public double[] getRowVals() {\n return rowVals;\n }", "public int getRow() {\r\n return this.row;\r\n }", "@Override\n public Object getValueAt(int rowIndex, int columnIndex) {\n Object object = li.get(rowIndex);\n return object.toString();\n }", "Rows createRows();", "@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }", "java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> \n getRowList();", "java.util.List<String>\n getRowsList();", "public int[] getRow(int rowId) {\n return this.rows[rowId];\n }", "@Override\n public void tableRows(int[] arg0, boolean arg1)\n {\n }", "R getOneRowOrThrow();", "@Override\n\tpublic Object getValueAt(int rowIndex, int columnIndex) {\n\t\tTab_Product row = productList.get(rowIndex);\n\t\tif (0 == columnIndex) {\n\t\t\treturn row.getPcode();\n\t\t} else if (1 == columnIndex) {\n\t\t\treturn row.getPro_name();\n\t\t} else if (2 == columnIndex) {\n\t\t\treturn row.getPrice();\n\t\t} else if (3 == columnIndex) {\n\t\t\treturn row.getQuantity();\n\t\t} else if (4 == columnIndex) {\n\t\t\treturn row.getSale();\n\t\t} else if (5 == columnIndex) {\n\t\t\treturn row.getI();\n\t\t}\n\t\tSystem.out.println(row.toString());\n\t\treturn row;\n\t}" ]
[ "0.64263505", "0.63796884", "0.63444227", "0.6343731", "0.6325335", "0.62232846", "0.6222357", "0.6211793", "0.6184167", "0.61315745", "0.61146885", "0.6102503", "0.6094869", "0.6093127", "0.60818356", "0.6057571", "0.60302746", "0.602378", "0.59978056", "0.5993044", "0.59698683", "0.596785", "0.59359956", "0.5920853", "0.5909538", "0.5909223", "0.5901488", "0.58933127", "0.5892858", "0.588734", "0.5857589", "0.58264", "0.58051574", "0.57997334", "0.57890385", "0.5756814", "0.57482535", "0.5741292", "0.57397413", "0.57397413", "0.57376647", "0.57370996", "0.5735839", "0.57156754", "0.57156754", "0.57156754", "0.571202", "0.5708237", "0.5693237", "0.56890357", "0.56751704", "0.5666172", "0.56636834", "0.56559825", "0.5655658", "0.5646232", "0.5619994", "0.561037", "0.5605896", "0.5603518", "0.55918854", "0.55886614", "0.55820334", "0.5576002", "0.55748206", "0.5570119", "0.5569865", "0.5569865", "0.5569865", "0.5569865", "0.5569865", "0.5569865", "0.55650747", "0.55632156", "0.5561056", "0.5556274", "0.5544321", "0.55227876", "0.5522564", "0.55193806", "0.55128187", "0.55128187", "0.55125445", "0.5507658", "0.5505869", "0.5505657", "0.5499861", "0.5497059", "0.5497059", "0.5494985", "0.5492384", "0.5491357", "0.5473752", "0.5472959", "0.5464778", "0.54644644", "0.54641604", "0.5450242", "0.54497087", "0.54436415", "0.5441898" ]
0.0
-1
String[] columntobeEval = getColumn(columnIndex);
public Boolean isColumnHomogeneous(Integer columnIndex) { return checkEqual(getColumn(columnIndex)); // return columntobeEval[0].equals(columntobeEval[1]) && columntobeEval[1].equals(columntobeEval[2]) && columntobeEval[0] != " "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getColumn();", "String getColumn();", "String getColumn(int index);", "String getColumn(int index);", "public int getColumn(){ return (Integer)args[1]; }", "String getValue(String column, int row);", "public int getColumn()\n {\n return col;\n }", "int getColumn();", "public int getColumn() {\n // YOUR CODE HERE\n return this.column;\n }", "public int getColumn()\t \t\t{ return column; \t}", "Object getColumnValue(int colIndex);", "public Object[] getColumn(int c) {\n// Object[] dta = new Object[data.rows];\n// for (int i = 0; i < data.rows; i++)\n// dta[i] = data.values[c][c];\n return data.values[c];\n }", "int getColumnIndex (String columnName);", "Object getDataValue(String column, int row);", "@Override\r\n\tpublic String[] getCol(String[] sql) {\n\t\treturn null;\r\n\t}", "public Column getColumn(String columnName);", "Value evaluateCellAt(int col, int row);", "public int getColumn();", "int atColumn();", "public org.apache.spark.sql.Column apply (scala.collection.Seq<org.apache.spark.sql.Column> exprs) { throw new RuntimeException(); }", "public int getColumn(){\n return this.column;\n }", "public abstract int getColumn();", "int getColumnIndex();", "int getColumnIndex();", "int getColumnIndex();", "public int getColumn()\n {\n return column;\n }", "public Column getColumn(int pos) { return columns[pos]; }", "public int[] getCol() { return _col; }", "WebElement getColumnByName(WebElement tableRecord, String columnName);", "int getColumnIndex(String name);", "Column getCol();", "void onColumnClick(int column);", "public Class<?> getColumnClass(int column) {\r\n\tswitch (column){\r\n\t\tcase COLUMN_NAME:{\r\n\t\t\treturn String.class;\r\n\t\t}\r\n\t\tcase COLUMN_DESCRIPTION:{\r\n\t\t\treturn String.class;\r\n\t\t}\r\n\t\tcase COLUMN_UNIT:{\r\n\t\t\treturn String.class;\r\n\t\t}\r\n\t\tcase COLUMN_VALUE:{\r\n\t\t\treturn ScopedExpression.class;\r\n\t\t}\r\n\t\tdefault:{\r\n\t\t\treturn Object.class;\r\n\t\t}\r\n\t}\r\n}", "Column[] getColumns() { return columns; }", "public int getCol() {\n return this.col; \n }", "public String getValueAt(int rowIndex, int columnIndex);", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "public int getColumn() {\n return col;\n }", "public void loadData(Object[] columnData);", "int getCol();", "public int getColumn() {\r\n return column;\r\n }", "public int getColumn() {\r\n return column;\r\n }", "@Override\n public Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(aRow, aColumn); \n }", "@Override\n public Object getValueAt(int row, int column) { return data[row][column]; }", "public String getColumnone() {\n return columnone;\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "public int getColumn()\n\t{\n\t\treturn col;\n\t}", "Column getColumns(int index);", "public String getEmphcolumn()\n {\n return emphColumn;\n }", "public int getColumn() {\n return column;\n }", "public int getColumn() {\n return column;\n }", "public int getColumn() {\n return column;\n }", "public int getColumna(){\n\t\treturn columna;\n\t}", "public void visitColumn(double val);", "public Object[] getColumnNames(){\r\n if (ufeRunner == null || renders == null || htmlObjLang == null) {\r\n return null;\r\n }\r\n String[] columnNames = {\"Name\", \"Value\"};\r\n return columnNames;\r\n }", "public int getCol() { return _col; }", "@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }", "public Column[] getColumns() {return columns;}", "public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public org.apache.spark.sql.Column apply (org.apache.spark.sql.Column... exprs) { throw new RuntimeException(); }", "@Override\n\t\tpublic int getValueColumn() {\n\t\t\treturn valueColumn;\n\t\t}", "public T col(final String column) {\r\n\t\treturn op(ConditionValueType.COLUMN, column);\r\n\t}", "String getColumnName();", "public String getColumnNameOne(){\n return columnNameOneLbl.getText();\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "String getColumnField(String javaField) throws NullPointerException;", "String getSortColumn();", "@Override\r\n\tpublic boolean evaluate(Object value, int column) throws SQLException {\n\t\treturn false;\r\n\t}", "List<String> getColumns();", "protected void populateDynamicCells(int resultsRow) {\n }", "@Override\n public Object getValueAt(int row, int column) {\n return this.data[row][column];\n }", "int getColumn(int x, int y){\n return board[x][y].getColumn();\n }", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),DBSAResourceBundle.res.getString(\"mark\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"duplicate\"), \"dlsName\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "public int getColumnNumber() {\n return column;\n }" ]
[ "0.7070431", "0.6983892", "0.6718887", "0.6718887", "0.6584495", "0.65756506", "0.6367705", "0.6333483", "0.63158584", "0.6233634", "0.6204392", "0.6174", "0.61672765", "0.6160934", "0.6097755", "0.6078515", "0.605984", "0.60437024", "0.6037987", "0.599962", "0.59719336", "0.5959901", "0.59166825", "0.59166825", "0.59166825", "0.58974874", "0.589671", "0.58966666", "0.58711916", "0.58571535", "0.5844934", "0.58020306", "0.5787987", "0.5785036", "0.5751376", "0.5739345", "0.573441", "0.5708365", "0.5694987", "0.56778085", "0.5674503", "0.5674503", "0.56689477", "0.5663512", "0.5658407", "0.565062", "0.565062", "0.56485486", "0.5631859", "0.56311333", "0.5618889", "0.5618889", "0.5618889", "0.5618665", "0.5614846", "0.5609162", "0.5596835", "0.55869806", "0.55739087", "0.55623084", "0.55513805", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.55500257", "0.5547199", "0.5537183", "0.5527453", "0.5502687", "0.5485243", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54779094", "0.54769635", "0.54752266", "0.5473956", "0.5467546", "0.5456239", "0.54541826", "0.5451066", "0.5448995", "0.54356873" ]
0.0
-1
Creating a set object
@Override @SuppressWarnings("resource") public void run(String... args) throws Exception { Comparator<GradeStore> c = (c1, c2) -> (int)(c2.calcAvgGrade() - c1.calcAvgGrade()) ; TopQueue<GradeStore> topQueue = new TopQueue<>(c, 3); // Adding elements to this set Student st_10 = new Student(10, "student_10", 10); GradeStore gradeStore_10 = GradeStore.newBuilder(st_10).build(); topQueue.add(gradeStore_10); Student st_20 = new Student(20, "student_20", 20); GradeStore gradeStore_20 = GradeStore.newBuilder(st_20).build(); topQueue.add(gradeStore_20); Student st_30 = new Student(30, "student_30", 30); GradeStore gradeStore_30 = GradeStore.newBuilder(st_30).build(); topQueue.add(gradeStore_30); Student st_40 = new Student(40, "student_40", 40); GradeStore gradeStore_40 = GradeStore.newBuilder(st_40).build(); topQueue.add(gradeStore_40); // Printing the content of the set System.out.println("##### set size: " + topQueue.size()); topQueue.printQueue(); JsonSerializer serializer = new JsonSerializer(); JsonDeserializer deserializer = new JsonDeserializer(); byte[] bytes = serializer.serialize("topic", topQueue); TopQueue<GradeStore> topQueue2 = deserializer.deserialize("topic", bytes); System.out.println("%%%%% deserialized set size: " + topQueue2.size()); topQueue2.printQueue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set createSet();", "private Set() {\n this(\"<Set>\", null, null);\n }", "BSet createBSet();", "public SetSet() {\n\t}", "public static <T> HashSet<T> createHashSet() {\n \t\treturn new HashSet<T>();\n \t}", "public Set() {\n\t\tlist = new LinkedList<Object>();\n\t}", "Set<X> toSet();", "public static <T> Set<T> createSet(T... setEntries) {\n\t\tif (setEntries == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new HashSet<T>(Arrays.asList(setEntries));\n\t}", "public RandomizedSet() {\r\n set = new HashSet<>();\r\n }", "public MyHashSet() {\n \n }", "public RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "public HashSet(){\n this(17);\n }", "public RandomizedSet() {\n set = new HashSet<Integer>();\n }", "public Set(){\n setSet(new int[0]);\n }", "public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}", "GeneralizationSet createGeneralizationSet();", "public RandomizedSet() {\n set = new HashMap<>();\n list = new ArrayList<>();\n }", "public RandomizedSet() {\n }", "public RandomizedSet() {\n list = new ArrayList<>();\n map = new HashMap<>();\n }", "public RandomizedSet() {\n m = new HashMap<>();\n l = new ArrayList<>();\n }", "public PointSET() { // construct an empty set of points\n\n }", "private static <T> Set<T> Create_UnModifiableSet_By_InputElements(@NonNull Set<T> set, @NonNull T... ts) {\n for (T t : ts) {\n set.add(t);\n }\n\n return Collections.unmodifiableSet(set);\n }", "static Set createEmpty() {\n return new EmptySet();\n }", "public IdentificationSet() {\n map = new HashMap<>();\n init();\n }", "public RandomizedSet() {\n list = new HashSet<>();\n\n }", "protected Set() {\n size = 0;\n set = new int[TEN];\n }", "public RandomizedSet() {\n map = new HashMap<>();\n }", "<V extends Object> Set<V> getSet(String setName);", "public DesignHashSet() {\n map=new HashMap<>();\n }", "private EmptySet() {}", "public MyHashSet() {\n s = new ArrayList<>();\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static <T> Set<T> createConcurrentHashSet() {\n \t\treturn (Set<T>) Collections.synchronizedSet(CollectionFactory.createHashSet());\n \t}", "public PointSET() {\n pointSet = new TreeSet<>();\n }", "public static <T> Set<T> AsSet(@NonNull T... ts) {\n return Create_UnModifiableSet_By_InputElements(new HashSet<T>(), ts);\n }", "public RandomizedSet() {\n nums = new ArrayList<Integer>();\n location = new HashMap<Integer, Integer>();\n }", "public static Set typedSet(Set set, Class type) {\n/* 205 */ return TypedSet.decorate(set, type);\n/* */ }", "protected abstract Set method_1559();", "@SuppressWarnings(\"unchecked\")\n\tpublic DesignHashSet() {\n\t\t// Array of ArrayLists.\n\t\tset = (List<Integer>[]) new ArrayList[MAX_LEN];\n\t}", "public RandomizedSet() {\n map = new HashMap<Integer, Integer>();\n set = new ArrayList<Integer>();\n int validLength = 0;\n }", "@Test \r\n\t\tpublic void testCreateSetFromArray() {\n\t\t\tInteger [] array = { 1, 2, 3, 4, 5, 6,7};\r\n\t\t\t// set = to the array of values \r\n\t\t\ttestingSet2 = new IntegerSet(array);\r\n\t\t\t// set created from the array is = to the array \r\n\t\t\tassertArrayEquals(testingSet2.toArray(), array); \r\n\t\t}", "@SafeVarargs\n public static <T> Set<T> makeSet(T... entries) {\n return new HashSet<>(Arrays.asList(entries));\n }", "public OrderedSet (String setName) {\n initialize();\n name = setName;\n }", "public static <T> Set<T> createSet(Iterable<T> iterable) {\n\t\tSet<T> set = new HashSet<T>();\n\t\tfor (T entry : iterable)\n\t\t\tset.add(entry);\n\t\treturn set;\n\t}", "public StatsSet() {\n this(DSL.name(\"stats_set\"), null);\n }", "public static Set<String> createSet() {\n Set<String> set = new HashSet<>();\n set.add(\"lesson\");\n set.add(\"large\");\n set.add(\"link\");\n set.add(\"locale\");\n set.add(\"love\");\n set.add(\"light\");\n set.add(\"limitless\");\n set.add(\"lion\");\n set.add(\"line\");\n set.add(\"lunch\");\n set.add(\"level\");\n set.add(\"lamp\");\n set.add(\"luxurious\");\n set.add(\"loop\");\n set.add(\"last\");\n set.add(\"lie\");\n set.add(\"lose\");\n set.add(\"lecture\");\n set.add(\"little\");\n set.add(\"luck\");\n\n return set;\n }", "public RandomizedSet() {\n data=new ArrayList<>();\n valueIndex=new HashMap<>();\n random=new Random();\n }", "public SortedSet() {\n\n }", "public StringSet() {\r\n\t\tsuper();\r\n\t}", "public static void main(String[] args) {\n\t\tHashSet set1 = new HashSet();\n\n\t\t/*\n\t\t * It creates empty HS object with specified initial capacity and\n\t\t * default fill ratio 0.75. \n\t\t * HashSet set2 = new HashSet(int initialCapacity);\n\t\t */\n\t\tHashSet set2 = new HashSet(20);\n\n\t\t/*\n\t\t * It creates equivalent HS object for given Collection\n\t\t * HashSet set3 = new HashSet(Collection c);\n\t\t */\n\t\tArrayList list = new ArrayList();\n\t\tlist.add(1);\n\t\tlist.add(1);\n\t\tSystem.out.println(\"List is \" + list);\n\t\tHashSet set3 = new HashSet(list);\n\t\tSystem.out.println(\"equivalent HashSet is \" + set3);\n\n\t}", "public static WordSet generateSet(int tipo)\n\t{\n\t if (tipo == 1)\n\t\t return new SimpleSet();\n\telse\n {\n if (tipo == 2 )\n {\n return new RedBlackTreeSet();\n }\n if (tipo == 3)\n {\n return new SplayTreeSet(); \n }\n if (tipo == 4)\n {\n return new HashMapSet ();\n }\n \n if (tipo ==5)\n {\n return new TreeMapSet();\n }\n \n }\t\t\n return null;\t\t\n\t}", "public void createSet(String element) {\n\t\t\n\t\tSet<String> set = new HashSet<String>();\n\t\tset.add(element);\n\t\t\n\t\tMap<String, Set<String>> map = new HashMap<String, Set<String>>();\t\t\n\t\tmap.put(element, set);\n\t\t\n\t\tdisjointSet.add(map);\n\t\n\t}", "@Override\n public Set<T> asSet() {\n return new AbstractSet<T>() {\n @Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n boolean foundNext;\n boolean hasNext;\n T next;\n \n private void findNext() {\n if (!foundNext) {\n hasNext = isPresent();\n if (hasNext) {\n try {\n next = get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n hasNext = false;\n next = null;\n }\n } else {\n next = null;\n }\n foundNext = true;\n }\n }\n \n @Override\n public boolean hasNext() {\n findNext();\n return hasNext;\n }\n\n @Override\n public T next() {\n findNext();\n if (hasNext) {\n // no next after consuming the single present value \n hasNext = false;\n T ret = next;\n next = null;\n return ret;\n }\n throw new NoSuchElementException();\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }\n\n @Override\n public int size() {\n return isPresent() ? 1 : 0;\n }\n };\n }", "public HeapSet () {\r\n\t\tsuper ();\r\n\t}", "abstract CharArraySet build();", "public RandomizedSet() {\n // public RandomizedSet1() {\n lst = new ArrayList<>();\n rand = new Random();\n map = new HashMap<>();\n }", "public RandomizedSet() {\n realSet = new HashSet<>();\n allSet = new Integer[10];\n random = new Random();\n }", "public ClosedHashSet(){\r\n super();\r\n buildHashSet(capacity(), hashSet);\r\n }", "HSet entrySet();", "public static <T extends Comparable> Set<T> CreateSortedSet() {\n return new TreeSet<>();\n }", "protected Set<E> ensureSet()\n {\n Set<E> set = m_set;\n if (set == null)\n {\n set = m_set = new LiteSet<>();\n }\n return set;\n }", "public RandomizedSet() {\n\n\n sub =new ArrayList<Integer>();\n hm=new HashMap<Integer,Integer>();\n rand =new Random();\n\n }", "MultiSet<X> add(X x);", "public interface Set {\n\n /**\n * Create an empty set.\n *\n * @return the empty set\n */\n static Set createEmpty() {\n return new EmptySet();\n }\n\n /**\n * Checks if the ASet is empty.\n *\n * @return true if the set is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Given an {@code Integer} {@code element} add the element to the set. If {@code element} is\n * already a member of the set, we perform no operation and return back the set intact.\n *\n * @param element the new element to add to the set\n *\n * @return a newly created set that contains {@code element} and the original elements of the set.\n */\n Set add(Integer element);\n\n /**\n * Given an {@code Integer} {@code element} returns {@code true} if the element is already in the\n * set and {@code false} otherwise.\n *\n * @param element the element to check\n *\n * @return true if {@code element} is in the set, false otherwise\n */\n Boolean contains(Integer element);\n\n /**\n * Return the size of the set.\n *\n * @return return the size of the set\n */\n Integer size();\n\n /**\n * Given an element {@code element} remove it from the this list if it exists.\n *\n * @param element the element to remove\n *\n * @return set without {@code element}\n */\n Set remove(Integer element);\n\n\n /**\n * Given a set {@code other} return a new set which is the set union between {@code this} set and\n * {@code other} set.\n *\n * @param other set to perform union\n *\n * @return set union of this and other\n */\n Set union(Set other);\n\n\n /**\n * Returns the set intersection between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform intersection with\n *\n * @return set intersection between {@code this} and {@code otherSet}\n */\n Set intersect(Set otherSet);\n\n\n /**\n * Returns the set difference between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform set difference with\n *\n * @return set difference between {@code this} and {@code otherSet}\n */\n Set difference(Set otherSet);\n\n\n /**\n * Returns true if {@code this} set is a subset of {@code otherSet}.\n *\n * @param otherSet the set to check against\n *\n * @return true if this is a subset of otherSet, false otherwise\n */\n Boolean subset(Set otherSet);\n\n\n}", "private static HashSet<String> set(String... s)\r\n {\r\n return new HashSet<>(Arrays.asList(s));\r\n }", "public static <T> Set<T> CreateLinkedHashSet() {\n return new LinkedHashSet<>();\n }", "public static <T> FixtureBuilder<Set<T>> setOf(final Class<T> cls) {\n\t\treturn new FixtureBuilder.FixtureSetBuilder<T>(cls);\n\t}", "public Set<T> toSet()\r\n\t{\r\n\t\tSet<T> s = new HashSet<T>();\r\n//\t\tSystem.out.println(\"in toSet method\");\r\n//\t\tSystem.out.println(\"thisTable.tostring \" + this.toString());\r\n\t\tIterator<T> thisTableIter = this.iterator();\r\n\t\t\r\n\t\twhile (thisTableIter.hasNext())\r\n\t\t{\r\n\t\t\tT e = thisTableIter.next();\r\n\t\t//\tSystem.out.println(e + \" \");\r\n\t\t\ts.add(e);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public CallSet() {}", "public PointSET() {\n\n point2DSET = new SET<>();\n }", "public <T> Set<T> mo31990d(Class<T> cls) {\n return (Set) mo32007c(cls).get();\n }", "public MyHashSet() {\n nodes = new Node[Max_Size];\n }", "public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }", "public PointSET() {\n //s = new TreeSet<Point2D>(Point2D.X_ORDER);\n }", "public ArraySet() {\n\t\tthis(DEFAULT_CAPACITY);\n\t}", "public PointSET() {\n points = new SET<Point2D>();\n }", "void mo30185a(HashSet<zzawj> hashSet);", "indexSet createindexSet();", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testCreateSetFromNull() {\n\t\t\ttestingSet = new IntegerSet(null); \r\n\t\t}", "public RandomizedSet() {\n this.valueToIndex = new HashMap<>();\n this.values = new ArrayList<>();\n this.random = new Random();\n }", "public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }", "public MyHashSet() {\n hset = new boolean[bucket][]; //get the second array size only if it is required : space conservation if possible\n }", "public void makeSet(T e){\n\t\tnodes.put(e, new Node<T>(e));\r\n\t}", "public HashMultiSet() {\n\t\thMap = new HashMap<T, Integer>();\n\t\tsize = 0;\n\t}", "public Instances makeTestSet(String position) throws Exception;", "protected Set<VALUEIN> createSetForNeighbors(final boolean isSetForPrimary) {\n return new HashSet<>();\n }", "public IntHashSet()\n/* */ {\n/* 69 */ this(0, 0.3D);\n/* */ }", "public PointSET() {\n mPoints = new TreeSet<Point2D>();\n }", "ClusterSet() {\n }", "public static Set asSet(Object[] items) {\r\n \t\r\n \tSet set = new HashSet(items.length);\r\n \tfor (int i=0; i<items.length; i++) {\r\n \t\tset.add(items[i]);\r\n \t}\r\n \treturn set;\r\n }", "protected SafeHashMap.KeySet instantiateKeySet()\n {\n return new KeySet();\n }", "public JMLObjectSet (E e)\n /*@ public normal_behavior\n @ assignable objectState, elementType, containsNull, owner;\n @ ensures this.has(e) && this.int_size() == 1;\n @ ensures_redundantly\n @ (* this is a singleton set containing e *); \n @*/\n {\n //@ set owner = null;\n the_list = JMLListObjectNode.cons(e, null); // cons() clones if needed\n size = 1;\n //@ set elementType = (e == null ? \\type(Object) : \\typeof(e));\n //@ set containsNull = (e == null);\n }", "public LinkedHashSet() {\n this(10);\n }", "public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }", "HSet keySet();", "protected abstract Set<String> _addToSet(String key, Collection<String> str);", "@Test\n public void testSet() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n Integer expResult = 7;\n Integer result = instance.set(2, 9);\n assertEquals(expResult, result);\n\n }", "public PointSET() {\n pointSet = new SET<Point2D>();\n }", "@SafeVarargs\n public static <T> Set<T> set(T... values) {\n if (values == null) return new HashSet<>();\n return set(Arrays.asList(values));\n }", "public HashMultiSet() {\n\t\tmultiSet = new HashMap<>();\n\t}", "public RandomizedSet() {\r\n\t\tbucket = new BucketItem[BUCKET_SIZE];\r\n\t}" ]
[ "0.9146231", "0.7481421", "0.74087405", "0.72583085", "0.71287715", "0.7055375", "0.70145947", "0.6929472", "0.68694556", "0.68673927", "0.6849894", "0.6824409", "0.68226624", "0.68113005", "0.68022835", "0.6782211", "0.67432487", "0.67430043", "0.6741121", "0.67307025", "0.6711833", "0.6696938", "0.66878474", "0.6675988", "0.66754395", "0.6603802", "0.6582601", "0.65812176", "0.65789974", "0.6565972", "0.6565426", "0.6561168", "0.65598774", "0.65585226", "0.6540947", "0.65318924", "0.6511508", "0.65023744", "0.65019", "0.6498097", "0.6469954", "0.6444255", "0.6437383", "0.6436438", "0.6434037", "0.6379192", "0.6368133", "0.6366598", "0.6361275", "0.635758", "0.63575625", "0.6353907", "0.63517034", "0.6348499", "0.6336044", "0.6311375", "0.63065827", "0.630386", "0.6301162", "0.63003", "0.6299157", "0.6288807", "0.6275435", "0.6273488", "0.6265644", "0.6238528", "0.6233238", "0.62139744", "0.6202942", "0.61981773", "0.61884046", "0.61878574", "0.61846256", "0.6176405", "0.6175331", "0.6160668", "0.6157293", "0.61488026", "0.61460114", "0.6139726", "0.6138486", "0.6138016", "0.612101", "0.6115011", "0.61090916", "0.61084807", "0.6096382", "0.6089691", "0.6086112", "0.60802364", "0.6079165", "0.6067162", "0.6062192", "0.6056399", "0.60486734", "0.60460895", "0.6040152", "0.6034133", "0.6030376", "0.60223633", "0.6016486" ]
0.0
-1
Builds a birthday event.
public BirthdayImpl(final boolean notify, final String description, final Contact celebratedContact, final LocalTime startTime) { super(description, startTime, notify); this.celebratedContact = celebratedContact; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void creatBirth(){\n\n for (int i = 0; i < repeatLunar.size() - 1; i++) {\n mLunar = repeatLunar.get(i);\n mLunarDay = mLunar.getLunarDay();\n mLunarMonth = mLunar.getLunarMonth();\n mLunarYear = mLunar.getLunarYear();\n mRepeat = mLunar.getRepeat();\n\n createEvent(getDate(mLunarYear, mLunarMonth, mLunarDay));\n\n\n }\n\n\n\n }", "public Builder setBirthDateBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n birthDate_ = value;\n onChanged();\n return this;\n }", "public Builder setBirthdate(String birthdate) {\n this.birthdate = birthdate;\n return this;\n }", "public Builder setBirthDate(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n birthDate_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic Calendar getBirthDay() {\n\t\treturn birthday;\r\n\t}", "@Override\n\tpublic void initializeScehduleWithOneEvent() {\n\t\tdouble time = getTimeOfNextBirth();\n\t\tEvent birthEvent = new Event(time, EventType.BIRTH, this);\n\t\tbirthEvent.setTag(true);\n\t\tschedule.add(birthEvent);\t\n\t}", "public void seteBirthday(Date eBirthday) {\n this.eBirthday = eBirthday;\n }", "@Override\r\n\tpublic void setBirthDay(Calendar bday) {\n\t\tif (bday == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (bday.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.birthday = bday;\r\n\t}", "Event generateEvent(int seed) throws Exception {\n return new Event(\n new Description(\"Event \" + seed),\n new StartTime(\"0900\"),\n new StartDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new EndTime(\"1100\"),\n new EndDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new Location(\"House of \" + seed),\n new UniqueTagList(new Tag(\"tag\" + Math.abs(seed)), new Tag(\"tag\" + Math.abs(seed + 1)))\n );\n }", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "public Date getBirthday() { return birthday; }", "public static com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder newBuilder() {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder();\n }", "public Date getBirthday();", "public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }", "public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }", "public Date getBirthday() {\r\n return birthday;\r\n }", "public Date getBirthday() {\r\n return birthday;\r\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public Date getBirthday() {\n\t\treturn birthday;\n\t}", "public static String generateDOB() {\n GregorianCalendar gc = new GregorianCalendar();\n int yyyy = randBetween(1950, 2000);\n gc.set(gc.YEAR, yyyy);\n int dd = randBetween(1, gc.getActualMaximum(gc.DAY_OF_YEAR));\n gc.set(gc.DAY_OF_YEAR, dd);\n\t\tString dob= gc.get(gc.DAY_OF_MONTH)+\"-\"+(gc.get(gc.MONTH) + 1)+\"-\"+gc.get(gc.YEAR);\n System.out.println(gc.get(gc.DAY_OF_MONTH)+\"-\"+(gc.get(gc.MONTH) + 1)+\"-\"+gc.get(gc.YEAR));\n\t\treturn(dob);\n}", "private void displayBirthdayFields() {\n FieldRelatedLabel passwordLabel = new FieldRelatedLabel(\"Birthday\", 350, 470);\n\n invalidBirthdayLabel = new InvalidFormEntryLabel(\"Birthday must not be\\na day in the future\", 540, 490, true);\n\n birthdayDP = new DatePicker();\n birthdayDP.relocate(350, 500);\n birthdayDP.setOnAction(e->FormValidatorPokeMongo.handleBirthday(birthdayDP, invalidBirthdayLabel));\n\n sceneNodes.getChildren().addAll(passwordLabel, invalidBirthdayLabel, birthdayDP);\n }", "public Date getBirthDay() {\n\t\treturn birthDay;\n\t}", "public void setBirthDate(String birthday) {\n\t\tbirthDate = birthday;\n\t}", "public Date getBirthday() {\n return birthday;\n }", "public Date getBirthday() {\n return birthday;\n }", "public Date getBirthday() {\n return birthday;\n }", "public Date getBirthday() {\n return birthday;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dob, container, false);\n ButterKnife.bind(this, view);\n lytDob.setOnClickListener(this);\n btnNext.setOnClickListener(this);\n AnalyticsUtils.logEvent(getContext(), FirebaseEvents.PROFILE_SETUP_DOB, null);\n //dateOfBirth = Calendar.get().getTime();\n return view;\n }", "public void setBirthdate(java.util.Calendar birthdate) {\n this.birthdate = birthdate;\n }", "public Date geteBirthday() {\n return eBirthday;\n }", "public void setBirthDate(java.util.Calendar birthDate) {\r\n this.birthDate = birthDate;\r\n }", "public T dob(LocalDate birthday) {\n dccObject.set(\"dob\", jsonNodeFactory.textNode(toIsoDate(birthday)));\n requiredNotSet.remove(RequiredFieldsBase.dob);\n return getThis();\n }", "Date getBirthDate();", "public void setBirthDay(Date birthDay) {\n\t\tthis.birthDay = birthDay;\n\t}", "public void setBirthday(String birthday) {\n\t\tthis.birthday = birthday;\n\t}", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setDate(long value) {\n validate(fields()[5], value);\n this.date = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public void setBirthday(Date birthday);", "public io.dstore.values.StringValue.Builder getDayBuilder() {\n \n onChanged();\n return getDayFieldBuilder().getBuilder();\n }", "public String getDateOfBirth() {\r\n\t\tString year = Integer.toString(datePicker.getModel().getYear());\r\n\t\tString month = Integer.toString(datePicker.getModel().getMonth()+1);\r\n\t\tString day = Integer.toString(datePicker.getModel().getDay());\r\n\t\tString date = year+\"-\"+month+\"-\"+day;\r\n\t\treturn date;\r\n\t}", "public void dateOfBirthDropDownTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.birthMonthDropDownLocator, \"Birth month drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.birthMonthDropDownLocator,QuoteForm_ComponentObject.birthMonthDefaultLocator,\r\n\t\t\t\t\tQuoteForm_ComponentObject.birthMonthValidSelectionLocator, QuoteForm_ComponentObject.birthMonthInvalidSelectionLocator, \"MM\", \"June\");\r\n\t\t}\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.birthDayDropDownLocator, \"Birth day drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.birthDayDropDownLocator, QuoteForm_ComponentObject.birthDayDefaultLocator,\r\n\t\t\t\t\tQuoteForm_ComponentObject.birthDayValidSelectionLocator,QuoteForm_ComponentObject.birthDayInvalidSelectionLocator, \"DD\", \"14\");\r\n\t\t}\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.birthYearDropDownLocator, \"Birth year drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.birthYearDropDownLocator, QuoteForm_ComponentObject.birthYearDefaultLocator,\r\n\t\t\t\t\tQuoteForm_ComponentObject.birthYearValidSelectionLocator, QuoteForm_ComponentObject.birthYearInvalidSelectionLocator, \"YYYY\", \"1990\");\r\n\t\t}\r\n\t}", "public String getBirthDate() {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tif (jPanelFormClient.birthdayDateChooser.getDate() != null)\r\n\t\t\treturn sdf.format(jPanelFormClient.birthdayDateChooser.getDate());\r\n\t\treturn null;\r\n\t}", "public void setBirthday() { this.birthday = birthday; }", "public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}", "public static com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder newBuilder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder other) {\n if (other == null) {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder();\n } else {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder(other);\n }\n }", "public com.google.protobuf.ByteString\n getBirthDateBytes() {\n java.lang.Object ref = birthDate_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n birthDate_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBirthDateBytes() {\n java.lang.Object ref = birthDate_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n birthDate_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onBirthday();\n\t\t\t\t\t\t}", "public Date getBirthdate() {\r\n return birthdate;\r\n }", "public io.dstore.values.TimestampValue.Builder getDayBuilder() {\n \n onChanged();\n return getDayFieldBuilder().getBuilder();\n }", "public static com.opentext.bn.converters.avro.entity.DocumentEvent.Builder newBuilder() {\n return new com.opentext.bn.converters.avro.entity.DocumentEvent.Builder();\n }", "public java.util.Calendar getBirthDate() {\r\n return birthDate;\r\n }", "public String getBirthDate()\r\n\t{\r\n\t\treturn (bDate.MONTH + 1) + \"/\" + bDate.DATE + \"/\" + bDate.YEAR;\r\n\t}", "public String getBirthday() {\n return birthday;\n }", "public io.dstore.values.TimestampValue.Builder getFromDayBuilder() {\n \n onChanged();\n return getFromDayFieldBuilder().getBuilder();\n }", "public Date getBirth() {\n\t\treturn birth;\n\t}", "LocalDate getDateOfBirth();", "@SuppressWarnings(\"static-access\")\r\n\tpublic boolean isBirthday()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tboolean isBirthday = false;\r\n\t\tif (now.MONTH == bDate.MONTH && now.DATE == bDate.DATE)\r\n\t\t{\r\n\t\t\tisBirthday = true;\r\n\t\t}\r\n\t\treturn isBirthday;\r\n\t}", "private HabitEvent createHabitEventFromBundle(Bundle bundle) {\n AddHabitEventDialogInformationGetter getter =\n new AddHabitEventDialogInformationGetter(bundle);\n String title = getter.getTitle();\n String comment = getter.getComment();\n Location location = getter.getLocation();\n Date date = getter.getDate();\n String eventImage = getter.getImage();\n byte[] decodedByteArray = Base64.decode(eventImage, Base64.URL_SAFE | Base64.NO_WRAP);\n Bitmap image = BitmapFactory.decodeByteArray(decodedByteArray, 0, decodedByteArray.length);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n image.compress(Bitmap.CompressFormat.JPEG, 50, byteArrayOutputStream);\n byte[] byteArray = byteArrayOutputStream.toByteArray();\n String encodedString = Base64.encodeToString(byteArray, Base64.URL_SAFE | Base64.NO_WRAP);\n return new HabitEvent(comment, encodedString, location, date, title, userAccount.getId().toString());\n }", "public Event createEvent(String descendant, String personID, double latitude,\n double longitude, String country, String city,\n String eventType, int year)\n throws DatabaseException, InvalidValuesException {\n\n String eventID = UUID.randomUUID().toString();\n\n Event event = new Event(\n eventID,\n descendant,\n personID,\n latitude,\n longitude,\n country,\n city,\n eventType,\n year\n );\n\n addEvent(event);\n\n return event;\n }", "public Date getBirthDate();", "public Date getBirthDate() {\n\t\treturn birthDate;\n\t}", "public Date getBirth() {\r\n return birth;\r\n }", "public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "public void setBirth(Date birth) {\r\n this.birth = birth;\r\n }", "public Date getBirthdate() {\n return birthdate;\n }", "private GossipEvent buildEvent(final BaseEvent selfParent, final BaseEvent otherParent) {\n\n final BaseEventHashedData hashedData = new BaseEventHashedData(\n softwareVersion,\n selfId,\n EventUtils.getEventGeneration(selfParent),\n EventUtils.getEventGeneration(otherParent),\n EventUtils.getEventHash(selfParent),\n EventUtils.getEventHash(otherParent),\n EventUtils.getChildTimeCreated(time.now(), selfParent),\n transactionSupplier.getTransactions());\n hasher.digestSync(hashedData);\n\n final BaseEventUnhashedData unhashedData = new BaseEventUnhashedData(\n EventUtils.getCreatorId(otherParent),\n signer.sign(hashedData.getHash().getValue()).getSignatureBytes());\n final GossipEvent gossipEvent = new GossipEvent(hashedData, unhashedData);\n gossipEvent.buildDescriptor();\n return gossipEvent;\n }", "public void setBirthdate(String birthdate) {\r\n this.birthdate = birthdate;\r\n }", "public void setBirth(Date birth) {\n this.birth = birth;\n }", "public void setBirth(Date birth) {\n this.birth = birth;\n }", "Calendar getBirth() {\n\t\treturn customer.getBirth();\n\t}", "public Date getBirthdate()\n {\n return birthdate;\n }", "Event createEvent();", "Event createEvent();", "public static com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder newBuilder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo other) {\n if (other == null) {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder();\n } else {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder(other);\n }\n }", "public java.util.Calendar getBirthdate() {\n return birthdate;\n }", "@Override\n\tpublic java.util.Date getDateOfBirth() {\n\t\treturn _candidate.getDateOfBirth();\n\t}", "public void setBirthDate(GregorianCalendar newBirthDate)\r\n\t{\r\n\t\tbDate = newBirthDate;\r\n\t}", "public referential.store.v2.WeekPattern.Builder setBegDate(java.lang.String value) {\n validate(fields()[1], value);\n this.begDate = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }", "@Override\r\n public String getDateOfBirth(String entityId) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"getDateOfBirth\", new Object[]{entityId});\r\n }\r\n String dateOfBirth = getCertificationDAO().getDateOfBirth(entityId);\r\n l.exiting(this.getClass().getName(), \"getDateOfBirth\", dateOfBirth);\r\n return dateOfBirth;\r\n }", "@Override\n public String getDateofBirth() {\n return this.DateofBirth;\n\n }", "public String getBirthday(){\n return birthday;\n\t}", "public Date getBirth() {\n return birth;\n }", "public Date getBirth() {\n return birth;\n }", "abstract void birthDateValidity();", "public void setBirth(Date birth) {\n\t\tthis.birth = birth;\n\t}", "public happyBirthday() {\n\t\t\n\t\tsetTitle(\"Happy Birthday Counter!\");\n\t\tbirthdayCounter bdayCounter = new birthdayCounter();\n\t\tcontrolPanel controlP = new controlPanel(bdayCounter);\n\t\tsetLayout(new BorderLayout());\n\t\tadd(controlP, BorderLayout.CENTER);\n\t\tadd(bdayCounter, BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\tpack();\n\t\t//buildMenu();\n\t\t\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t\t\n\t\tSystem.out.println(\"DAY CURRENTLY: \" + bdayCounter.getDay());\n\t\tSystem.out.println(\"MONTH CURRENTLY: \" + bdayCounter.getMonth());\n\n\t\t\n\t}", "public void setBirth_date(java.lang.String birth_date) {\n this.birth_date = birth_date;\n }", "public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }", "public void setBorndate(Date borndate) {\r\n this.borndate = borndate;\r\n }", "private Patient setPatientDOB(Date date, Patient patient){\n\t\tint year=date.getYear()+1900;\n\t\tint age=patient.getAge();\n\t\tif(age>60){\t//If patient age above 60 years then randomize the year also\n\t\t\tyear=randBetween(1990,2010);\n\t\t}\n\t\tint dayOfMonth = randBetween(1, 31);\n\t\tint month = randBetween(0, 11);\n\t\tDate d = new Date(year-1900, month, dayOfMonth); //Random date\n\t\tpatient.setBirthdate(d);\n\t\treturn patient;\n\t}", "public BirthdayCake(double x, double y, double width, double height)\n {\n\t// construct the basic cake but leave room for our candle :)\n\tsuper(x,y+(height*0.15),width,height*0.85);\n\t\n\tdouble candleHeight = 0.08 * height;\n\tdouble flameHeight = 0.06 * height;\n\tdouble stemHeight = 0.01 * height;\n\n\tdouble candleWidth = 0.02 * width;\n\tdouble flameWidth = 0.01 * width;\n\tdouble centerHoriz = x + (width/2.0);\n\n\tRectangle2D.Double candle = new Rectangle2D.Double(centerHoriz - (candleWidth/2.0),\n\t\t\t\t\t\t\t y + flameHeight + stemHeight, \n\t\t\t\t\t\t\t candleWidth, candleHeight);\n\tLine2D.Double stem = new Line2D.Double(centerHoriz, y + flameHeight,\n\t\t\t\t\t centerHoriz, y + flameHeight + stemHeight);\n\tArc2D.Double flame = new Arc2D.Double(centerHoriz - (flameWidth/2), y,\n\t\t\t\t\t flameWidth, flameHeight, 225, 90, Arc2D.PIE);\n\n\t// add the candle to the cake\n GeneralPath birthday = this.get();\n birthday.append(candle, false);\n birthday.append(stem, false);\n\tbirthday.append(flame, false); \n }", "public void setDate_of_birth(String date_of_birth) {\n this.date_of_birth = date_of_birth;\n }", "public UserHashCode(String name, Calendar birthday) {\n super(name, birthday);\n }", "public Date getDateOfBirth() {\n return getDate(DATE_OF_BIRTH);\n }", "public Builder clearBirthDate() {\n \n birthDate_ = getDefaultInstance().getBirthDate();\n onChanged();\n return this;\n }", "public Date getBirth_date() {\n return birth_date;\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }" ]
[ "0.64759153", "0.59558165", "0.5934379", "0.58117735", "0.5787073", "0.5774245", "0.5668523", "0.56599194", "0.5616052", "0.56130147", "0.5608567", "0.5608171", "0.5588825", "0.55783004", "0.55783004", "0.5575907", "0.5575907", "0.55375224", "0.55375224", "0.55375224", "0.55337435", "0.5491009", "0.54825664", "0.5480736", "0.5474892", "0.5470747", "0.5470747", "0.5470747", "0.5470747", "0.54696333", "0.54422635", "0.5442039", "0.54405564", "0.5406622", "0.53791726", "0.5349162", "0.53353494", "0.52880824", "0.5259043", "0.5218172", "0.519532", "0.5192501", "0.5181741", "0.51813793", "0.51613927", "0.5148007", "0.5146277", "0.5136676", "0.51200813", "0.5099113", "0.5098905", "0.5097894", "0.50971866", "0.5084398", "0.50784254", "0.50775915", "0.5076369", "0.50645596", "0.5043074", "0.50426507", "0.50320405", "0.50313216", "0.502431", "0.50200427", "0.50143427", "0.50139236", "0.5010689", "0.49899116", "0.49856594", "0.4985341", "0.4983772", "0.4983772", "0.49827293", "0.49821636", "0.4982147", "0.4982147", "0.49814135", "0.49784958", "0.49731877", "0.496875", "0.49662024", "0.49647436", "0.4942206", "0.49416116", "0.492731", "0.49255598", "0.49255598", "0.4910817", "0.49103567", "0.49058452", "0.49028012", "0.48882726", "0.4875739", "0.48751524", "0.4874978", "0.48723495", "0.48723036", "0.48674908", "0.48645708", "0.48599213", "0.4858467" ]
0.0
-1
pledge vote TestCommon.getAccountInfo(topj, account); ResponseBase result = topj.stakeVote(account, new BigInteger("10002"), new BigInteger("30")); System.out.println("stake vote hash >> " + result.getData().getOriginalTxInfo().getTxHash() + " > is success > " + result.getData().isSuccess());
@Test public void pledgeRedeemVoteTest() throws IOException { TestCommon.getAccountInfo(topj, account); // redeem vote // ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger("1000")); // System.out.println("un stake vote hash >> " + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + " > is success > " + redeemTokenVote.getData().isSuccess()); // TestCommon.getAccountInfo(topj, account); // set vote // Map<String, BigInteger> voteInfo = new HashMap<>(); // String nodeAddress = "T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8"; // voteInfo.put(nodeAddress, BigInteger.valueOf(5000)); // ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo); // System.out.println("set vote hash >> " + setVoteResult.getData().getOriginalTxInfo().getTxHash() + " >> is success > " + setVoteResult.getData().isSuccess()); // // TestCommon.getAccountInfo(topj, account); // cancel vote // voteInfo.put(nodeAddress, BigInteger.valueOf(200)); // ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo); // System.out.println("cancel vote hash >> " + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + " >> is success > " + setVoteResult.getData().isSuccess()); // // TestCommon.getAccountInfo(topj, account); // account.setAddress("T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2"); // ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account); // ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, "T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe"); // System.out.println("list vote used > " + r.getData().getVoteInfos().get("T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe")); Map<String, String> result = Topj.generateV3Args("T80000968927100f3cb7b23e8d477298311648978d8613", Arrays.asList("f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee")); System.out.println("generateV3Args > " + JSON.toJSONString(result)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetReward() throws IOException {\n ResponseBase<VoterDividendResponse> voterRewardResult = topj.queryVoterDividend(account, \"T00000La8UTDgQQVRBjkCWEsKYk1XRpjZSK3zUbM\");\n System.out.println(\"voter reward result > \" + JSON.toJSONString(voterRewardResult));\n\n ResponseBase<AccountInfoResponse> accountInfoResponseBase = topj.getAccount(account);\n System.out.println(\"account address > \" + accountInfoResponseBase.getData().getAccountAddr() + \" balance > \" + accountInfoResponseBase.getData().getBalance());\n\n ResponseBase<XTransactionResponse> claimRewardResult = topj.claimVoterDividend(account);\n System.out.println(\"node claim reward hash >> \" + claimRewardResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + claimRewardResult.getData().isSuccess());\n\n voterRewardResult = topj.queryVoterDividend(account, account.getAddress());\n System.out.println(\"voter reward result > \" + JSON.toJSONString(voterRewardResult));\n\n accountInfoResponseBase = topj.getAccount(account);\n System.out.println(\"account address > \" + accountInfoResponseBase.getData().getAccountAddr() + \" balance > \" + accountInfoResponseBase.getData().getBalance());\n }", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}", "public static void main(String[] args) throws Exception {\n BTCMessage btcMessage = new BTCMessage() ;\n /*btcMessage.setIP(\"localhost\");\n btcMessage.setPORT(\"7000\");*/\n //\n // btcMessage.setIP(\"localhost\");\n BigDecimal test = new BigDecimal(\"1499000000\");\n BigDecimal digit = new BigDecimal(100000000);\n test = test.divide(digit);\n System.out.println(\"sdfadsa = \" + test.toString());\n /* btcMessage.setIP(\"127.0.01\");\n btcMessage.setPORT(\"5279\");\n btcMessage.setPASSWORD(\"sax1314\");\n btcMessage.setACCESS_KEY(\"eth123456\");\n btcMessage.setSECRET_KEY(\"eth123456\");\n LBCUtils lbcUtils = new LBCUtils(btcMessage);\n TransactionDetailResp resp = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n System.three.println(\"sdfadsa = \" + resp);*/\n //String str = lbcUtils.version();\n //String str = lbcUtils.transaction_show(\"b116e8fc03c8cfbb0a65eb6a76d0905b0f7a8e7d8289f5d34bda44221eb04a1e\");\n //BaseJson resp = lbcUtils.wallet_balance();\n //System.three.println(\"----> \" + resp.getResult());\n //String str = lbcUtils.help(\"transaction_show\");\n // String str = lbcUtils.help(null);\n //BaseJson base = lbcUtils.wallet_new_address();\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"eeb23af0ff0c0d1e0ae413960ca84206e7eb225c0377f28ad9206222b53eca66\");\n //String str = lbcUtils.help(\"transaction_show\");\n //System.three.println(\"----> \" + str);\n }", "public void sendRouletteBet() {\n\t\tif (rouletteExecutor.getAposta() == null)\n\t\t\tnew Dialeg().setWarningText(\"You must bet!\");\n\t\telse {\n\t\t\tif (bool.compareAndSet(true, false)) {\n\t\t\t\ttry {\n\t\t\t\t\tmanager.getServer().enviarTrama(new Betting(rouletteExecutor.getAposta()));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//// e.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnew Dialeg().setWarningText(\"You can't bet to the same number\");\n\t\t\t}\n\t\t}\n\t}", "private void botVoting(){\n int stockPos;\n int myStockPos = getMostShares(playerList.lastIndexOf(player));\n Collections.sort(playerList);\n if(playerList.get(0) == player){ //if i am the leader\n stockPos = getMostShares(1); //get the second players info\n }else{\n stockPos = getMostShares(0); //else get the first players info\n }\n\n //if my most shares are the same as other players most shares, don't vote.\n if(game.getStockByIndex(stockPos) != game.getStockByIndex(myStockPos)){\n //offensive play against leader\n if(game.isCardPositive(game.getStockByIndex(stockPos))){\n game.getStockByIndex(stockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(stockPos).getName() );\n }else{\n game.getStockByIndex(stockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(stockPos).getName());\n }\n //defensive play, votes that will benefit me\n if(game.isCardPositive(game.getStockByIndex(myStockPos))){\n game.getStockByIndex(myStockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(myStockPos).getName());\n }else{\n game.getStockByIndex(myStockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(myStockPos).getName());\n }\n }\n }", "public static void doVote() {\n }", "int getLuckyTicket();", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "@Test\n public void cash() {\n System.out.println(BotClient.getCash(0));\n }", "@Test\n\tpublic void moneyTrnasferSucess() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 500.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(amountToBeTranfered);\n\t\tsb.append(\" has been transferred to : \");\n\t\tsb.append(accountNumberTo);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n public void TestUserEntersCoinsSeesValueReturnedwithEject()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse result = vendingController.Post(request);\n assertThat(result.TenderValue, Is.is(25));\n\n }", "BigInteger getTotalDifficulty();", "@Test\n public void spendShouldBeOK() throws Exception {\n UnsecureCompactBuilder compactBuilder = new UnsecureCompactBuilder();\n\n NonceClaim nonceClaim = new NonceClaim();\n nonceClaim.setNonce(\"nonce\");\n\n String jwt = compactBuilder.claims(nonceClaim).build().toString();\n\n NonceType nonceType = new NonceType();\n nonceType.setName(\"welcome\");\n\n Nonce nonce = new Nonce();\n nonce.setId(UUID.randomUUID());\n ResourceOwner ro = FixtureFactory.makeResourceOwner();\n nonce.setResourceOwner(ro);\n nonce.setNonceType(nonceType);\n\n when(mockHashToken.run(\"nonce\")).thenReturn(\"hashedNonce\");\n when(mockNonceRepository.getByTypeAndNonce(NonceName.WELCOME, \"hashedNonce\")).thenReturn(nonce);\n\n subject.spend(jwt, NonceName.WELCOME);\n\n verify(mockNonceRepository).setSpent(nonce.getId());\n verify(mockNonceRepository).revokeUnSpent(nonce.getNonceType().getName(), nonce.getResourceOwner().getId());\n }", "public int getCoinsNum();", "@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "@Override\n public String solve() {\n\n long firstCoin = 1504170715041707L;\n long modValue = 4503599627370517L;\n //System.out.println(\"Second Coin \" + (firstCoin - (4503599627370517L % firstCoin)));\n long secondCoin = firstCoin - (modValue % firstCoin);\n long ans = firstCoin + secondCoin;\n while(secondCoin > 1) {\n modValue = firstCoin;\n firstCoin = secondCoin;\n secondCoin = firstCoin - (modValue % firstCoin);\n //System.out.println(secondCoin);\n ans += secondCoin;\n }\n return Long.toString(ans);\n }", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public void sendPostDownVote(){\n Intent intent = getIntent();\n final int heritageId = intent.getIntExtra(\"heritageId\", -1);\n Retrofit retrofit = ApiClient.getApiClient();\n final SharedPreferences sharedPref = getSharedPreferences(\"TOKENSHARED\", Context.MODE_PRIVATE);\n final String token = sharedPref.getString(\"TOKEN\", null);\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n Call<JsonResponseVote> call = apiInterface.vote(new VoteBody(false, heritageId),\"Token \" + token);\n call.enqueue(new Callback<JsonResponseVote>() {\n @Override\n public void onResponse(Call<JsonResponseVote> call, Response<JsonResponseVote> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"SUCCESSFUL DOWNVOTE\", Toast.LENGTH_SHORT).show();\n voteCount.setText(Integer.toString(response.body().getUpvote_count()-response.body().getDownvote_count()));\n deleteVote.setEnabled(true);\n downVote.setEnabled(false);\n upVote.setEnabled(true);\n\n } else {\n Toast.makeText(getApplicationContext(), \"Sorry for inconvince server is down\" + response.code(), Toast.LENGTH_SHORT).show();\n Log.d(\"response\", response.raw().body().toString());\n }\n\n }\n\n @Override\n public void onFailure(Call<JsonResponseVote> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"ERROR while posting\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}", "public void receiveResult( int flipResult, BigInteger x);", "int getBuyCurrentRaw();", "void confirmRealWorldTrade(IUserAccount user, ITransaction trans);", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public int calculateVotes() {\n return 1;\n }", "boolean placeBet(Player player, int bet);", "public void sendPostUpVote(){\n Intent intent = getIntent();\n final int heritageId = intent.getIntExtra(\"heritageId\", -1);\n Retrofit retrofit = ApiClient.getApiClient();\n final SharedPreferences sharedPref = getSharedPreferences(\"TOKENSHARED\", Context.MODE_PRIVATE);\n final String token = sharedPref.getString(\"TOKEN\", null);\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n Call<JsonResponseVote> call = apiInterface.vote(new VoteBody(true, heritageId),\"Token \" + token);\n call.enqueue(new Callback<JsonResponseVote>() {\n @Override\n public void onResponse(Call<JsonResponseVote> call, Response<JsonResponseVote> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"SUCCESSFUL UPVOTE\", Toast.LENGTH_SHORT).show();\n voteCount.setText(Integer.toString(response.body().getUpvote_count()-response.body().getDownvote_count()));\n deleteVote.setEnabled(true);\n upVote.setEnabled(false);\n downVote.setEnabled(true);\n\n } else {\n Toast.makeText(getApplicationContext(), \"Sorry for inconvince server is down\" + response.code(), Toast.LENGTH_SHORT).show();\n Log.d(\"response\", response.raw().body().toString());\n }\n\n }\n\n @Override\n public void onFailure(Call<JsonResponseVote> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"ERROR while posting\", Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getIndex(game.getHighestSharePriceStock())) + numShares);\n player.setFunds(-numShares*(game.getHighestSharePriceStock().getSharePrice()+3));\n }\n }", "@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }", "int getVoteValue(UserId userId, QuestionId questionId);", "int getRent(Player owner, int tenantDiceRoll);", "private void botBuy(Stock stock, int numShares){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) + numShares);\n player.setFunds(-numShares*(stock.getSharePrice()+3));\n System.out.println(\"purchase made\"); //rem\n }", "@Test\n\t\tpublic void testGetBestBid()\n\t\t{\n\t\t\tassertEquals(\"Best bid incorrect\", buyOrder2, exchange.getBestBid(stock));\n\t\t\t\n\t\t}", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "@Test\n public void testSuccessWithDrawSufficientFund() throws IOException, URISyntaxException {\n URI uri = builder.setPath(\"/accounts/1/withdraw/10\").build();\n\n HttpPut request = new HttpPut(uri);\n request.setHeader(\"Content-type\", \"application/json\");\n HttpResponse response = client.execute(request);\n int statusCode = response.getStatusLine().getStatusCode();\n assertTrue(statusCode == 200);\n\n assertTrue(mapper.readValue(EntityUtils.toString(response.getEntity()), AccountDetails.class).getAccountBalance()\n .equals(new BigDecimal(100).setScale(4, RoundingMode.HALF_EVEN)));\n\n }", "@Test\n public void testAmountLeftToPay() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getAmountLeftToPay(), results.getAmountLeftToPay(), 0.15);\n }", "public Integer getVotes();", "public int getBet(Shoe shoe, OUTCOME lastOutcome) {\n\t\treturn baseBet;\r\n\t}", "@Test\r\n void shouldReturnOneRiskPoint() {\r\n InsuranceRiskService insuranceRiskService = new DisabilityInsuranceRiskService();\r\n InsuranceRiskRequest insuranceRiskRequest = new InsuranceRiskRequest();\r\n insuranceRiskRequest.setAge(25);\r\n HouseRequest houseRequest = new HouseRequest();\r\n houseRequest.setOwnershipStatus(\"mortgaged\");\r\n insuranceRiskRequest.setHouse(houseRequest);\r\n insuranceRiskRequest.setIncome(BigDecimal.valueOf(999999));\r\n insuranceRiskRequest.setDependents(2);\r\n insuranceRiskRequest.setMaritalStatus(\"married\");\r\n Assertions.assertEquals(1, insuranceRiskService.calculate(3, insuranceRiskRequest));\r\n }", "@Test\n\t//getting errors recognizing labooncoin so i used 'one'\n\tpublic void testHappyBlockPrint()\n\t{\n\t\tLaboonCoin one = new LaboonCoin();\n\t\tone.blockchain.add(\"All your base\");\n\t\tone.blockchain.add(\"are belong\");\n\t\tone.blockchain.add(\"to us\");\n\t\tassertEquals(\"All your base\" + '\\n' + \"are belong\" + '\\n' + \"to us\" + '\\n', one.getBlockChain());\n\t}", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "int getBet() {\n\t\treturn _bet;\n\t}", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Test\n public void testValidHashMax() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tboolean result = l.validHash(8,0);\n\tassertEquals(result, true);\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void testInterestPayment ()\n {\n initializeService();\n //assertEquals(0.10, accountingService.bankInterest, \"interest set by bootstrap\")\n \n // set the interest to 12%\n accountingService.setBankInterest(0.12);\n\n // bob is in the hole\n bob.updateCash(-1000.0);\n\n // move to midnight, activate and check messages\n timeService.setCurrentTime(new DateTime(2011, 1, 27, 0, 0, 0, 0, DateTimeZone.UTC).toInstant());\n final Map<Broker, List> msgMap = new HashMap<Broker, List>();\n doAnswer(new Answer() {\n public Object answer(InvocationOnMock invocation) {\n Object[] args = invocation.getArguments();\n msgMap.put((Broker)args[0], (List)args[1]);\n return null;\n }\n }).when(mockProxy).sendMessages(isA(Broker.class), anyList());\n accountingService.activate(timeService.getCurrentTime(), 3);\n verify(mockProxy, times(2)).sendMessages(isA(Broker.class), anyList());\n\n // should have bank tx and cash position for Bob\n assertEquals(2, msgMap.get(bob).size(), \"two messages\");\n Object btx1 = findFirst(msgMap.get(bob), new Predicate<Object>() {\n public boolean apply (Object thing) {\n return (thing instanceof BankTransaction);\n }\n });\n assertNotNull(btx1, \"found bank tx\");\n assertEquals(-1000.0 * 0.12 / 365.0, ((BankTransaction)btx1).getAmount(), 1e-6, \"correct amount\");\n Object cp1 = findFirst(msgMap.get(bob), new Predicate<Object>() {\n public boolean apply (Object thing) {\n return (thing instanceof CashPosition);\n }\n });\n assertNotNull(cp1, \"found cash posn\");\n assertEquals(-1000.0 * (1.0 + 0.12 / 365.0), ((CashPosition)cp1).getBalance(), 1e-6, \"correct amount\");\n }", "public static void main(String[] args) throws NoSuchAlgorithmException,\n SignatureException, InvalidKeyException {\n Random random = new Random();\n int numBitsKeyPair = 512;\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(numBitsKeyPair);\n KeyPair scroogeKeyPair = keyPairGenerator.genKeyPair();\n KeyPair aliceKeyPair = keyPairGenerator.genKeyPair();\n KeyPair bobKeyPair = keyPairGenerator.genKeyPair();\n\n // Always create genesis block first\n Block genesis = new Block(null, scroogeKeyPair.getPublic()); // new Block (byte[] prevHash, PublicKey address)\n genesis.finalize(); // Computes the message digest/hash\n\n // Then, create blockchain from genesis block\n BlockChain blockchain = new BlockChain(genesis);\n\n // And initialize BlockHandler with \"genesis blockchain\".\n // I personally think that the framework is inkonsistent here.\n // If all access to the blockchain is supposed to be done through the BlockHandler,\n // then the blockchain should be initialized there as well.\n // Anyways, further access to the blockchain is done through the BlockHandler\n BlockHandler blockHandler = new BlockHandler(blockchain);\n\n // Now, let the tests begin!\n\n //***********************************\n // Test 1: Process a block with no transactions\n Block block = new Block(genesis.getHash(), aliceKeyPair.getPublic()); // previous: the genesis block\n block.finalize();\n // Process block immediately without adding any transactions\n if (blockHandler.processBlock(block)) { // basically invokes blockchain.addBlock()\n System.out.println(\"Successfully added valid block. Test 1 is passed.\\n\");\n } else {\n System.out.println(\"Failed to add valid block. Test 1 has failed.\\n\");\n }// again, unit tests are way better than this!\n\n\n //***********************************\n // Test 22: Process a transaction, create a block, process a transaction, create a block, ...\n // For a clean test, recreate the blockchain\n blockchain = new BlockChain(genesis);\n blockHandler = new BlockHandler(blockchain);\n\n boolean testIsPassed = true;\n\n // some transaction to play with\n Transaction transaction;\n Signature signature = Signature.getInstance(\"SHA256withRSA\");\n // start with a successor of the genesis block\n Block previousBlock = genesis;\n\n for (int i = 0; i < 20; i++) {\n // create a new transaction in every round\n transaction = new Transaction();\n // every block consists of its hash, a hash of the previous block,\n // exactly one coinbase transaction and a list of other transactions.\n // here, we only want to reassign the coinbase transaction\n transaction.addInput(previousBlock.getCoinbase().getHash(), 0); // addInput(byte[] prevTxHash, int outputIndex)\n\n // let's assign all outputs of all transactions to scrooge\n // I personally would prefer a getter here for the coinbase\n transaction.addOutput(Block.COINBASE, scroogeKeyPair.getPublic()); // transaction.addOutput(double value, PublicKey address)\n signature.initSign(scroogeKeyPair.getPrivate());\n signature.update(transaction.getRawDataToSign(0));\n transaction.addSignature(signature.sign(), 0);\n transaction.finalize(); // Computes the message digest/hash\n\n blockHandler.processTx(transaction); // basically invokes blockchain.addTransaction() that adds transaction to the transaction pool\n\n // so far, we have created a valid transaction that should be available in the transaction pool\n // so let's try to create a block from it\n Block newBlock = blockHandler.createBlock(scroogeKeyPair.getPublic());\n testIsPassed = testIsPassed &&\n newBlock != null &&\n newBlock.getPrevBlockHash().equals(previousBlock.getHash()) &&\n newBlock.getTransactions().size() == 1 &&\n newBlock.getTransaction(0).equals(transaction);\n\n if (!testIsPassed) {\n System.out.println(i + \"Failed to add block with valid transaction. Test 22 has failed.\\n\");\n return;\n }\n previousBlock = newBlock;\n }\n System.out.println(\"Successfully added blocks with valid transactions. Test 22 is passed.\\n\");\n }", "@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }", "private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}", "void tradePokemon(Long pokemonId1, Long pokemonId2);", "private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Test\r\n\tpublic void testReturnChange() {\r\n\t\tvendMachine.insertMoney(5.0);\r\n\t\tassertEquals(5.0, vendMachine.returnChange(), 0.001);\r\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testSHARE1B() {\n CuteNetlibCase.doTest(\"SHARE1B.SIF\", \"-76589.31857918584\", \"74562.53714565346\", NumberContext.of(4, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSHARE2B() {\n CuteNetlibCase.doTest(\"SHARE2B.SIF\", \"-4.1573224074E+02\", \"-265.0981144446295\", NumberContext.of(7, 4));\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}", "public BigDecimal getStake() {\n return stake;\n }", "@Test\n void executeMoneyTransfer() throws ParseException, JsonProcessingException {\n\n String idAccount = \"14537780\";\n String receiverName = \"Receiver Name\";\n String description = \"description text\";\n String currency = \"EUR\";\n String amount = \"100\";\n String executionDate = \"2020-12-12\";\n MoneyTransfer moneyTransfer = Utils.fillMoneyTransfer(idAccount, receiverName, description, currency, amount, executionDate);\n\n Response response = greetingWebClient.executeMoneyTransfer(moneyTransfer, idAccount);\n assertTrue(response.getStatus().equals(\"KO\"));\n\n\n }", "@Test\n\tpublic void testSettleCreditDifference() {\n\t\tint creditEstimate = 50;\n\t\tLong originalAccBalance = 150l;\n\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"3\");\n\t\tsmsAccount.setSakaiSiteId(\"3\");\n\t\tsmsAccount.setMessageTypeCode(\"3\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(originalAccBalance);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSenderUserName(\"sakaiUserId\");\n\t\tsmsTask.setSmsAccountId(smsAccount.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.setCreditEstimate(creditEstimate);\n\t\tsmsTask.setGroupSizeActual(0);\n\t\tsmsTask.setMessageTypeId(SmsConstants.MESSAGE_TYPE_SYSTEM_ORIGINATING);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(smsTask.getDateToSend());\n\t\tcal.add(Calendar.SECOND, smsTask.getMaxTimeToLive());\n\t\tsmsTask.setDateToExpire(cal.getTime());\n\t\thibernateLogicLocator.getSmsTaskLogic().persistSmsTask(smsTask);\n\n\t\tsmsBillingImpl.reserveCredits(smsTask);\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\t\tAssert.assertNotNull(smsAccount);\n\n\t\t// Account was credited\n\t\tAssert.assertTrue(smsAccount.getCredits() < originalAccBalance);\n\n\t\tsmsBillingImpl.settleCreditDifference(smsTask, smsTask.getCreditEstimate(), smsTask.getCreditsActual());\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\n\t\t// Account balance was returnd to origional state since the actual\n\t\t// groups size on the task was zero\n\t\tAssert.assertTrue(smsAccount.getCredits() == originalAccBalance);\n\n\t}", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "@Test\n public void getVote() throws IOException {\n URL url = new URL(BASE_URL + \"1/1/vote/1/object\");\n InputStream input = url.openStream();\n Vote vote\n = JAXB.unmarshal(new InputStreamReader(input), Vote.class);\n \n System.out.println(vote);\n //from there we can use the assertEquals to doing th evarious test\n }", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "void makeMarketBuyOrder(AuthInfo authInfo, String pair, String money,HibtcApiCallback<Object> callback);", "@Test\n public void testUpdateCoin() throws Exception {\n VirtualCoinAddReq update = new VirtualCoinAddReq();\n update.setId(1l);\n update.setShortName(\"btc\");\n update.setName(\"btc\");\n update.setSecretKey(\"btc123456\");\n update.setAccessKey(\"btcabc87654321\");\n update.setIp(\"130.252.100.93\");\n update.setPort(\"8385\");\n update.setIconUrl(\"xx\");\n update.setIsWithDraw(\"\");\n update.setIsRecharge(\"\");\n update.setIsAuto(\"\");\n update.setMainAddress(\"main1\");\n update.setLowRechargeFees(new BigDecimal(1.0));\n update.setRechargeFees(new BigDecimal(1.0));\n update.setLowWithdrawFees(new BigDecimal(1.0));\n update.setWithdrawFees(new BigDecimal(1.0));\n update.setSingleLowRecharge(new BigDecimal(1.0));\n update.setSingleHighRecharge(new BigDecimal(1.0));\n update.setDayHighRecharge(new BigDecimal(1.0));\n update.setSingleLowWithdraw(new BigDecimal(1.0));\n update.setSingleHighWithdraw(new BigDecimal(1.0));\n update.setDayHighWithdraw(new BigDecimal(1.0));\n update.setLowTradeFees(new BigDecimal(6.0));\n update.setTradeFees(new BigDecimal(9.0));\n String token = CacheHelper.buildTestToken(\"1\");\n update.setToken(token);\n LOG.d(this,update);\n WebApiResponse response = virtualCoinCtrl. updateCoin(update);\n LOG.d(this,response);\n }", "public TransactionResponse sell() {\r\n \t\ttry {\r\n \t\t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tint id = hyperObject.getId();\r\n \t\t\tint data = hyperObject.getData();\r\n \t\t\tString name = hyperObject.getName();\r\n \t\t\tif (giveInventory == null) {\r\n \t\t\t\tgiveInventory = hp.getPlayer().getInventory();\r\n \t\t\t}\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tif (id >= 0) {\r\n \t\t\t\t\tint totalitems = im.countItems(id, data, giveInventory);\r\n \t\t\t\t\tif (totalitems < amount) {\r\n \t\t\t\t\t\tboolean sellRemaining = hc.getYaml().getConfig().getBoolean(\"config.sell-remaining-if-less-than-requested-amount\");\r\n \t\t\t\t\t\tif (sellRemaining) {\r\n \t\t\t\t\t\t\tamount = totalitems;\r\n \t\t\t\t\t\t} else {\t\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (amount > 0) {\r\n \t\t\t\t\t\tdouble price = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\tBoolean toomuch = false;\r\n \t\t\t\t\t\tif (price == 3235624645000.7) {\r\n \t\t\t\t\t\t\ttoomuch = true;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!toomuch) {\r\n \t\t\t\t\t\t\tint maxi = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\tboolean isstatic = false;\r\n \t\t\t\t\t\t\tboolean isinitial = false;\r\n \t\t\t\t\t\t\tisinitial = Boolean.parseBoolean(hyperObject.getInitiation());\r\n \t\t\t\t\t\t\tisstatic = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\tif ((amount > maxi) && !isstatic && isinitial) {\r\n \t\t\t\t\t\t\t\tamount = maxi;\r\n \t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\t\t\t\tif (acc.checkshopBalance(price) || sunlimited) {\r\n \t\t\t\t\t\t\t\tif (maxi == 0) {\r\n \t\t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tim.removeItems(id, data, amount, giveInventory);\r\n \t\t\t\t\t\t\t\tdouble shopstock = 0;\r\n \t\t\t\t\t\t\t\tshopstock = hyperObject.getStock();\r\n \t\t\t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setStock(shopstock + amount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint maxi2 = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\t\tif (maxi2 == 0) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setInitiation(\"false\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble salestax = hp.getSalesTax(price);\r\n \t\t\t\t\t\t\t\tacc.deposit(price - salestax, hp.getPlayer());\r\n \t\t\t\t\t\t\t\tacc.withdrawShop(price - salestax);\r\n \t\t\t\t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"SELL_MESSAGE\"), amount, calc.twoDecimals(price), name, calc.twoDecimals(salestax)), price - salestax, hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"sale\", name, (double) amount, calc.twoDecimals(price - salestax), calc.twoDecimals(salestax), playerecon, type);\r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(name, null, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t\treturn response;\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"CURRENTLY_CANT_SELL_MORE_THAN\"), hyperObject.getStock(), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"CANNOT_BE_SOLD_WITH\"), name), hyperObject);\r\n \t\t\t\t\treturn response;\t\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_SELL_LESS_THAN_ONE\"), name), hyperObject);\r\n \t\t\t\treturn response;\t\r\n \t\t\t}\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction sell() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', id='\" + hyperObject.getId() + \"', data='\" + hyperObject.getData() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public double getBet() {\n return bet;\n }", "@Test\n public void testGetCoinTypeDetail() throws Exception {\n WebApiBaseReq req = new WebApiBaseReq();\n req.setId(2l);\n String token = CacheHelper.buildTestToken(\"1\");\n req.setToken(token);\n LOG.d(this,req);\n String str = JsonHelper.obj2JsonStr(req);\n WebApiResponse response = virtualCoinCtrl.getCoinTypeDetail(str);\n LOG.d(this, response);\n }", "public Float getVote() {\n return vote;\n }", "@Test\n public void testFindRewardForDiningAccount8() {\n Calendar calendar = Calendar.getInstance();\n Date date = calendar.getTime();\n Dining dining = new Dining((float) 100.0, \"4320123412340008\", \"123456008\", date);\n Account account = createAccount8();\n AccountContribution contribution = account.makeContribution(new MonetaryAmount(8));\n RewardConfirmation confirmation0 = repository.confirmReward(contribution, dining);\n AccountContribution expectedContribution =\n new AccountContribution(contribution.getAccountNumber(), contribution.getAmount(),\n contribution.getDistributions());\n RewardConfirmation expectedConfirmation =\n new RewardConfirmation(confirmation0.getConfirmationNumber(), expectedContribution);\n\n RewardConfirmation confirmation = repository.findConfirmationFor(dining);\n Assert.assertEquals(\"confirmation found\", expectedConfirmation, confirmation);\n }", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "@Test\n public void buy() {\n System.out.println(client.purchase(1, 0, 1));\n }", "public String doPayy(Expence expence, BankRunning bankRunning, User user)\r\n/* 89: */ {\r\n/* 90: 86 */ String result = \"\";\r\n/* 91: 87 */ Expence persistent = (Expence)this.expenceDao.load(expence.getId());\r\n/* 92: 88 */ if ((\"3\".equals(persistent.getStat())) || (persistent.getStat() == \"3\")) {\r\n/* 93: 89 */ return result = \"[id=\" + persistent.getId() + \", \" + persistent.getStat() + \"]该项数据已经审批!\";\r\n/* 94: */ }\r\n/* 95: 92 */ ExpenceFlow expenceFlow = new ExpenceFlow();\r\n/* 96: 93 */ expenceFlow.setGxsj(new Date());\r\n/* 97: 94 */ expenceFlow.setExpence(expence);\r\n/* 98: 95 */ expenceFlow.setUser(user);\r\n/* 99: 96 */ expenceFlow.setOptContent(\"审批\");\r\n/* 100: 97 */ expenceFlow.setYwlc(Integer.valueOf(3));\r\n/* 101: 98 */ this.expenceFlowDao.save(expenceFlow);\r\n/* 102: */ \r\n/* 103: */ \r\n/* 104:101 */ BeanUtils.copyProperties(expence, persistent, new String[] { \"id\", \"user\", \"bxsj\", \"fssj\", \"bxnr\", \"bxje\", \"bxr\", \"skzh\", \"bxlx\" });\r\n/* 105:102 */ persistent.setGxr(user.getName());\r\n/* 106:103 */ persistent.setGxsj(new Date());\r\n/* 107:104 */ persistent.setStat(\"3\");\r\n/* 108:108 */ if (bankRunning != null)\r\n/* 109: */ {\r\n/* 110:110 */ bankRunning.setZcje(Double.parseDouble(bankRunning.getFkje()));\r\n/* 111:111 */ bankRunning.setLrje(0.0D - Double.parseDouble(bankRunning.getFkje()));\r\n/* 112:112 */ bankRunning.setLrsj(new Date());\r\n/* 113:113 */ bankRunning.setLrr(user.getName());\r\n/* 114:114 */ bankRunning.setShbj(\"1\");\r\n/* 115:115 */ bankRunning.setOrderId(expenceFlow.getId().toString());\r\n/* 116:116 */ bankRunning.setBz(expenceFlow.getOptContent());\r\n/* 117:117 */ Integer b_r_id = (Integer)this.bankRunningService.save(bankRunning);\r\n/* 118: */ \r\n/* 119:119 */ persistent.setBankRunningId(b_r_id);\r\n/* 120:120 */ this.expenceDao.update(persistent);\r\n/* 121: */ \r\n/* 122:122 */ Bank b = (Bank)this.bankService.get(bankRunning.getBank().getId());\r\n/* 123:123 */ double cush = new Double(b.getCush() + bankRunning.getLrje()).doubleValue();\r\n/* 124:124 */ this.bankService.updateBankCush(cush, Integer.valueOf(bankRunning.getBank().getId().intValue()));\r\n/* 125: */ }\r\n/* 126:126 */ return result;\r\n/* 127: */ }", "private static void VergleichsTest()\r\n{\r\n\tSecp256k1 g = new Secp256k1();\r\n\tBigInteger[] NULL= new BigInteger[2];\r\n\tNULL[0] = BigInteger.ZERO;\r\n\tNULL[1] = BigInteger.ZERO; \r\n\tBigInteger[] pubK1 = new BigInteger[2];\r\n\tBigInteger[] pubK2 = new BigInteger[2];\r\n\tlong msec = 0;\r\n\tlong t0 = System.currentTimeMillis(); \r\n\tfor(int i=0; i<testRuns; i++)\r\n\t{\r\n\t\tt0 = System.currentTimeMillis();\r\n\t\tRandom rn = new Random();\r\n\t\tBigInteger priK = new BigInteger(255,rn);\r\n\t\tpubK1 = g.multiply_G(priK);\r\n\t\tString b = pubK1[0].toString(16);\r\n\t\tSystem.out.printf(\"\\nPublic Key: %S\",b);\r\n\t\tpubK2 = getPublicKeyOriginal(priK);\r\n\t\tb = pubK2[0].toString(16);\r\n\t\tSystem.out.printf(\"\\nPublic Key: %S\\n\",b);\t \r\n\t\tif(pubK1[0].equals(pubK2[0])) System.out.println(\"correct!\");\r\n\t\telse {System.out.println(\" >>>>>>>>>>>>>>>>>> Not correct! Schlüssel sind nicht gleich! <<<<<<<<<<<<\"); break;}\t \r\n\t\tSystem.out.printf(\"Zeit: %d ms\\n\", msec);\r\n\t\tmsec = System.currentTimeMillis()-t0;\r\n\t}\r\n}", "public upvote_result(upvote_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n if (other.isSetE()) {\n this.e = new com.moseeker.thrift.gen.common.struct.BIZException(other.e);\n }\n }", "int getVotes(QuestionId questionId);", "public void receiveResultadd2(\n loadbalance.LoadBalanceStub.Add2Response result\n ) {\n }", "@Override\n public void run() {\n System.out.println(\"Sent coins onwards! Transaction hash is \" + sendResult.tx.getTxId());\n }", "@Test\r\n public void testCalculateNet() {\r\n int hours = 30;\r\n int rate = 15;\r\n int tax = 58;\r\n CalculateNet test = new CalculateNet();\r\n int result = CalculateNet.calculateNet(hours, rate, tax);\r\n assertEquals(392, result);\r\n }", "@Test\n public void testSomeMethod() throws Exception {\n String test= Hash.getSaltedHash(\"UND123\");\n \n System.out.println(\"------------------------------------\");\n System.out.println(\"Hash code \\n\");\n System.out.println(test +\"\\n\");\n assertEquals(true,Hash.check(\"UND123\", \"P1Rlnnlc9wJZXmieTCsZwFs0ppnQpOXjLPIuju0BaFE=$WuRG4kAGPpkR2XxRMH4Dz7T39iHttGzCrDIMaEMYvhA=\"));\n }", "boolean hasSingleBet();", "public Integer getTradeSuccess() {\n return tradeSuccess;\n }", "@Override\n public int howManyCoins() {\n return 7;\n }", "private static int coinFlip() {\n\t\tint num = (Math.random() <= 0.5) ? 1 : 2; \n\t\tString answer;\n\t\tif ( num == 1) {\n\t\t\tanswer = \"h\";\n\t\t}else {\n\t\t\tanswer = \"t\";\n\t\t}\n\t\t\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n System.out.print(\"Enter you guess (h = heads, t = tails):\");\n String guess = input.next();\n //change the guess to lower case to accept both capital or lower case answer\n guess.toLowerCase();\n \n //gain 50 points if win the toss\n if ( guess.equals(answer)) {\n \t//System.out.println(\"You won the toss, congratulation! +50 points\");\n \treturn 50;\n }else {\n \t //System.out.println(\"Wrong guess! 0 points\");\n \t return 0;\n }\n \n\t}", "@Override\n public void testConnection() {\n\n String in = posId + \"|\" + crc;\n String sig = DigestUtils.md5Digest(in);\n\n logger.debug(in);\n logger.debug(sig);\n\n MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();\n\n map.add(\"p24_merchant_id\", String.valueOf(merchantId));\n map.add(\"p24_pos_id\", String.valueOf(posId));\n map.add(\"p24_sign\", sig);\n\n String res = restTemplate.postForObject(url + \"/testConnection\", map, String.class);\n\n logger.debug(res);\n\n }", "public GameObject getSpinResult(GameRequest gameRequest) {\n\t\tString cookie = gameRequest.getHeader().getCustomer().getCookie();\r\n\t\tint playerId = getPlayerIdFromCookie(cookie);\r\n\r\n\t\tdouble realBalance = 0;\r\n\t\tdouble dummyBalance = 0;\r\n\t\ttry {\r\n\t\t\tcookie = gameRequest.getHeader().getCustomer().getCookie();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_MALFORMED_XML, ExceptionMessage.ERROR_MSG_MALFORMED_XML);\r\n\t\t}\r\n\t\tHashMap<String, Object> requestesParameters = new HashMap<String, Object>();\r\n\t\trequestesParameters.put(\"session_key\", cookie);\r\n\t\tString url = config.getApiBaseUrl() + UrlCall.API_MY_ACCOUNT;\r\n\t\tString response = null;\r\n\t\ttry {\r\n\t\t\tresponse = webServiceCalling.sendPost(requestesParameters, url, cookie, false);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_API_ERROR, e.getMessage());\r\n\t\t}\r\n\r\n\t\tif (response != null) {\r\n\t\t\ttry {\r\n\t\t\t\tMap<String, Object> value = new Gson().fromJson(\r\n\t\t\t\t\t\tresponse, new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t);\r\n\t\t\t\tLOGGER.info(\"my account api response : \"+value);\r\n\t\t\t\tMap<String, Object> data = new Gson().fromJson(\r\n\t\t\t\t\t\tvalue.get(\"data\").toString(), new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t);\r\n\t\t\t\tMap<String, Object> userBalance = new Gson().fromJson(\r\n\t\t\t\t\t\tdata.get(\"user_balance\").toString(), new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t);\r\n\t\t\t\tif(data.containsKey(\"user_details\")) {\r\n\t\t\t\t\tMap<String, Object> userDetails = new Gson().fromJson(\r\n\t\t\t\t\t\t\tdata.get(\"user_details\").toString(), new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tDouble userId = (Double) userDetails.get(\"user_id\");\r\n\t\t\t\t\tplayerId = userId.intValue();\r\n\r\n\t\t\t\t}\r\n\t\t\t\trealBalance = (Double) userBalance.get(\"real_amount\");\r\n\t\t\t\tdummyBalance = (Double) userBalance.get(\"dummy_amount\");\r\n\t\t\t\tSystem.out.println(\"spin result - player id - \" + playerId + \" .realBalance - \" + realBalance + \" .dummyBalanace - \" + dummyBalance);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_API_ERROR, ExceptionMessage.ERROR_MSG_API_ERROR + \" error decoding api response\" );\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_API_ERROR, ExceptionMessage.ERROR_MSG_API_ERROR + \" session key expired.\" );\r\n\t\t}\r\n\r\n\r\n\t\tGtGameAccount lastGame = getLastSpinGame(playerId);\t\t\t\t\t\t// get last game not closed.\r\n\t\tGameObject gameObj = new GameObject();\r\n\t\tgameObj.setUserId(playerId);\r\n\r\n\t\tList<Integer> lastDraws = getLastDraws();\r\n\t\tgameObj.setLastDraws(lastDraws);\r\n\t\tif(lastGame==null) {\r\n\t\t\tgameObj.setResultInfo(null);\r\n\t\t}else {\r\n\t\t\tResultInfo resultInfo = new ResultInfo(lastGame.getBetAmount(), lastGame.getWinnings(),null,lastGame.getDraw());\r\n\t\t\tgameObj.setResultInfo(resultInfo);\r\n\t\t\t// TODO : add betState of that game.\r\n\t\t\tList<GtSpinBets> bets = gtSpinBetsService.findBetsBySpinIdPlayerId(lastGame.getSpinId(), lastGame.getPlayerId());\r\n\t\t\tBetState betState = new BetState();\r\n\t\t\tbetState.setDrawn(lastGame.getDraw());\r\n\t\t\tbetState.setTotalBets((byte) bets.size());\r\n\t\t\tfor(GtSpinBets playerBet : bets) {\r\n\t\t\t\tbetState.getBet().add(new Bet(playerBet.getBetName(), playerBet.getStake(), playerBet.getSelection()));\r\n\t\t\t}\r\n\t\t\tGameLogic logic = new GameLogic();\r\n\t\t\tbetState = logic.calculateWinnings((byte)lastGame.getDraw(), betState);\r\n\t\t\tgameObj.setBetState(betState);\r\n\t\t}\r\n\t\tgameObj.setSpinId(lastGame.getSpinId());\r\n\r\n\t\t// set player's balance\r\n\t\tgameObj.setRealBalance(realBalance);\r\n\t\tgameObj.setDummyBalance(dummyBalance);\r\n\t\treturn gameObj;\r\n\r\n\t}", "public static void main(String[] args) {\n EosApi api = EosApiFactory.create(\"https://api.jungle.alohaeos.com\");\n //EosApi api = EosApiFactory.create(\"https://jungle.cryptolions.io\");\n //EosApi api = EosApiFactory.create(\"https://eos.newdex.one\");\n //System.out.println(api.getChainInfo());\n //buyRam(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"bihuexwallet\",15000);\n //delegate(api, \"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\", \"carilking111\", \"carilking444\",\"1.5000 EOS\",\"1.5000 EOS\");\n //updateAuth(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\",\"carilking444\",\"EOS82Psyaqk86jbSdSmGzonNCUHsBp1Xj42q37g6UkiA1UhzLe57j\",\"active\");\n //updateAuth(api,\"5JrTcSsUmzoLDxsNFcpGBRt2Wd488qTmHp5yfBPy71MbxaqSJ4g\",\"carilking555\",\"EOS5X6Sbmbc2zaJ8EHNZmdSnA26DsuTim59pdUNiNd34HugzvTp5m\",\"active\");\n //transfer(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\", \"carilking444\",\"carilking111\",BigDecimal.valueOf(0.01),\"喵喵喵~\");\n //Object obj=api.getTransaction(new TransactionRequest(\"e5aeee319e8c767cdda35a3b6d460328f958833e58723bc18581765494018700\"));\n //System.out.println(obj);\n List<String> accounts = new ArrayList<>();\n accounts.add(\"carilking111\");\n accounts.add(\"carilking444\");\n //updateMultipleAuth(api, \"5JPNqMSZ8M567hgDGW9CmD9vr2RaDm1eWpJqHaHa2S5xKTMmFKm\", \"heydoojqgege\", 2, accounts, \"active\");\n //proposeTransfer(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"firstmsig152\", \"heydoojqgege\", \"carilking222\", BigDecimal.valueOf(0.2), \"test1\", accounts);\n //approveTransfer(api,\"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\",\"carilking111\",\"bihuexwallet\",\"firstmsig151\");\n //execPropose(api,\"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\",\"bihuexwallet\",\"bihuexwallet\",\"firstmsig151\");\n }", "@Test\n public void testCalculation() {\n int expResult = 321;\n game.calculation(180);\n int result = Integer.valueOf(game.getRemainigScore());\n assertEquals(\"testCalculation: \",expResult, result);\n }", "int getBid();", "protected void increaseCoin(String userID, double coin){\n }", "public void getBet(int[] turnData) {\n Player player = GameEngine.activePlayer;\n\n player.changeBank(turnData[5]-turnData[4]);\n String winLose, loseMessage = \"\", fMessage = \"\";\n if(turnData[5]-turnData[4] > 0) {\n winLose = \"You won \" + turnData[5] + \" points and your score is now \";\n fMessage = \"You guessed \" + turnData[2] + \" and \" + turnData[3] + \" and you were right!\";\n }\n else if (turnData[5]-turnData[4] < 0){\n winLose = \"You lost \" + turnData[4] + \" points and your score is now \";\n loseMessage = \"Better luck next time!\";\n fMessage = \"You guessed \" + turnData[2] + \" and \" + turnData[3] + \" and the right answer is:\";\n } else {\n winLose = \"You didn't bet anything! Your score is now \";\n fMessage = \"You guessed \" + turnData[2] + \" and \" + turnData[3] + \" and the right answer is:\";\n }\n\n String[] myMessage = new String[5];\n myMessage[0] = fMessage;\n myMessage[1] = winLose + player.getBank() + \".\";\n myMessage[2] = loseMessage;\n myMessage[3] = \"\" + turnData[0];\n myMessage[4] = \"\" + turnData[1];\n\n GameMain.userInterface.setTurnMessage(myMessage);\n\n }", "@Test\n public void testSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"Chisom\", 2, 2, 2,\n 2, SolarSystems.SOMEBI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n good.getGood().sell(good.getGood(), 1);\n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n water.setQuantity(2);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n food.setQuantity(1);\n good.setQuantity(0);\n int P = good.getGood().getPrice(1);\n int total = game.getPlayer().getCredits();\n boolean quan = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(total);\n assertTrue(quan && total == 1560);\n //assertEquals(true, quan && total == 1560);\n }", "public void receiveResultadd3(\n loadbalance.LoadBalanceStub.Add3Response result\n ) {\n }", "@Order(14)\n\t@Test\n\tpublic void Attempt_OfferBid()\n\t{\n\t\tBigDecimal BuyOut = new BigDecimal(405);\n\t\tItem testItem = new Item(0,\"Changed ItemName\",\"Changed Description\",new BigDecimal(505),new BigDecimal(404),\"NoOne\");\n\t\tint Expected = -1, actual = os.offerBid(BuyOut, testItem, \"NoOne\");\n\t\tassertTrue(actual > Expected);\n\t}", "public static void main(String[] args)\r\n{\r\n\tresetVotes();\r\n\tVoteRecorder voter1 = new VoteRecorder();\t\r\n\tvoter1.getAndConfirmVotes();\r\n\tSystem.out.println(\"President: \" + getCurrentVotePresident());\r\n\tSystem.out.println(\"Vice President: \" + getCurrentVoteVicePresident());\r\n\tSystem.out.println(votesCandidatePresident1);\r\n\r\n}" ]
[ "0.6276756", "0.6021025", "0.59885395", "0.595836", "0.57543325", "0.5658556", "0.56329304", "0.558471", "0.55174226", "0.550901", "0.5454089", "0.5315225", "0.53126943", "0.5311029", "0.5279232", "0.527632", "0.5245743", "0.5245638", "0.52298766", "0.522307", "0.5215949", "0.5204369", "0.5195085", "0.51943123", "0.5189053", "0.5170022", "0.51537395", "0.51526606", "0.5152006", "0.51205844", "0.5120438", "0.51167864", "0.5101255", "0.5086905", "0.508623", "0.50719184", "0.5068133", "0.50459003", "0.5038568", "0.503481", "0.5031509", "0.5021975", "0.5012294", "0.50109214", "0.5008438", "0.49960402", "0.49956077", "0.49916205", "0.498969", "0.49853903", "0.49851862", "0.498262", "0.4982037", "0.49794796", "0.49752185", "0.49731067", "0.49729303", "0.49716553", "0.49667028", "0.4965354", "0.49632034", "0.4963079", "0.49626502", "0.49620998", "0.49606153", "0.4946213", "0.49461278", "0.49445197", "0.49427837", "0.49374786", "0.4918032", "0.49121588", "0.49098033", "0.49096656", "0.49081337", "0.4897287", "0.48944476", "0.48883614", "0.48844218", "0.48841313", "0.48841196", "0.48805672", "0.48799157", "0.48786587", "0.4878422", "0.48728338", "0.48711097", "0.48707926", "0.48676324", "0.48671377", "0.4865595", "0.486365", "0.48630697", "0.48585543", "0.48579937", "0.4857423", "0.48561877", "0.48554558", "0.4854096", "0.484131" ]
0.83452266
0
ResponseBase nodeRewardResult = topj.getNodeReward(account); System.out.println("node reward result > " + JSON.toJSONString(nodeRewardResult)); TestCommon.getAccountInfo(topj, account);
@Test public void testGetReward() throws IOException { ResponseBase<VoterDividendResponse> voterRewardResult = topj.queryVoterDividend(account, "T00000La8UTDgQQVRBjkCWEsKYk1XRpjZSK3zUbM"); System.out.println("voter reward result > " + JSON.toJSONString(voterRewardResult)); ResponseBase<AccountInfoResponse> accountInfoResponseBase = topj.getAccount(account); System.out.println("account address > " + accountInfoResponseBase.getData().getAccountAddr() + " balance > " + accountInfoResponseBase.getData().getBalance()); ResponseBase<XTransactionResponse> claimRewardResult = topj.claimVoterDividend(account); System.out.println("node claim reward hash >> " + claimRewardResult.getData().getOriginalTxInfo().getTxHash() + " >> is success > " + claimRewardResult.getData().isSuccess()); voterRewardResult = topj.queryVoterDividend(account, account.getAddress()); System.out.println("voter reward result > " + JSON.toJSONString(voterRewardResult)); accountInfoResponseBase = topj.getAccount(account); System.out.println("account address > " + accountInfoResponseBase.getData().getAccountAddr() + " balance > " + accountInfoResponseBase.getData().getBalance()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void getAccountBalance() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n\n Response response = greetingWebClient.getAccountBalance(idAccount);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "@Test\n public void testAccountGET() {\n Response response = webTarget\n .path(\"account/1\")\n .request(APPLICATION_JSON)\n .get();\n ChequingAccount c = response.readEntity(ChequingAccount.class);\n assertThat(response.getStatus(), is(200));\n assertEquals(1000.00, c.getBalance(),0.01);\n }", "public String ExecuteCypherQueryJSONStringReturnCrumbCardDetails(String cypherQuery) {\r\n String nodeString = \"\";\r\n NodeController nc = new NodeController();\r\n ExecutionEngine engine = new ExecutionEngine( _db );\r\n ExecutionResult result = null;\r\n Transaction tx = _db.beginTx();\r\n try {\r\n result = engine.execute(cypherQuery);\r\n JSONObject tempNode = new JSONObject(nc.convertIteratorToJSONOfHomeCardDetails(result));\t\r\n nodeString = tempNode.toString();\r\n tx.success();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n System.out.print(\"issues with fetching node and its relations\");\r\n tx.failure();\r\n //return \"failed\";\r\n } finally {\r\n tx.close();\r\n }\r\n\r\n return nodeString;\r\n }", "@Test\n void executeMoneyTransfer() throws ParseException, JsonProcessingException {\n\n String idAccount = \"14537780\";\n String receiverName = \"Receiver Name\";\n String description = \"description text\";\n String currency = \"EUR\";\n String amount = \"100\";\n String executionDate = \"2020-12-12\";\n MoneyTransfer moneyTransfer = Utils.fillMoneyTransfer(idAccount, receiverName, description, currency, amount, executionDate);\n\n Response response = greetingWebClient.executeMoneyTransfer(moneyTransfer, idAccount);\n assertTrue(response.getStatus().equals(\"KO\"));\n\n\n }", "public static void main(String[] args) throws Exception {\n BTCMessage btcMessage = new BTCMessage() ;\n /*btcMessage.setIP(\"localhost\");\n btcMessage.setPORT(\"7000\");*/\n //\n // btcMessage.setIP(\"localhost\");\n BigDecimal test = new BigDecimal(\"1499000000\");\n BigDecimal digit = new BigDecimal(100000000);\n test = test.divide(digit);\n System.out.println(\"sdfadsa = \" + test.toString());\n /* btcMessage.setIP(\"127.0.01\");\n btcMessage.setPORT(\"5279\");\n btcMessage.setPASSWORD(\"sax1314\");\n btcMessage.setACCESS_KEY(\"eth123456\");\n btcMessage.setSECRET_KEY(\"eth123456\");\n LBCUtils lbcUtils = new LBCUtils(btcMessage);\n TransactionDetailResp resp = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n System.three.println(\"sdfadsa = \" + resp);*/\n //String str = lbcUtils.version();\n //String str = lbcUtils.transaction_show(\"b116e8fc03c8cfbb0a65eb6a76d0905b0f7a8e7d8289f5d34bda44221eb04a1e\");\n //BaseJson resp = lbcUtils.wallet_balance();\n //System.three.println(\"----> \" + resp.getResult());\n //String str = lbcUtils.help(\"transaction_show\");\n // String str = lbcUtils.help(null);\n //BaseJson base = lbcUtils.wallet_new_address();\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"eeb23af0ff0c0d1e0ae413960ca84206e7eb225c0377f28ad9206222b53eca66\");\n //String str = lbcUtils.help(\"transaction_show\");\n //System.three.println(\"----> \" + str);\n }", "@Path(\"/node\")\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response nodeRead() {\n HashMap<String, String> schema = new HashMap<>();\n schema.put(\"key_url\",\"string\");\n schema.put(\"num_inlinks\", \"int\");\n schema.put(\"num_outlinks\",\"int\");\n schema.put(\"inlink_score\",\"float\"); \n schema.put(\"outlink_score\",\"float\"); \n schema.put(\"metadata\",\"string\");\n return Response.ok(schema).type(MediaType.APPLICATION_JSON).build();\n }", "public BigDecimal getReward() {\n return reward;\n }", "double getTotalReward();", "@GetMapping(\"/test\")\n public String test() throws Throwable {\n// List<Object> mempoolInfo = bitcoinRestApi.getBlockHeaders(5,\"000000000000011814d4acab99e4ee03267caa4193523fc2a894e0bf8d9b627d\");\n// return JSONObject.toJSONString(mempoolInfo);\n\n //JSONObject mempoolInfo = bitcoinRestApi.getBlockNoDetails(\"000000000000011814d4acab99e4ee03267caa4193523fc2a894e0bf8d9b627d\");\n JSONObject blockchainInfo = bitcoinJsonRpcApi.getBlockchainInfo();\n return null;\n }", "@Test\n public void getretrieveAllOffersTest() throws IOException {\n\n ObjectMapper mapper = new ObjectMapper();\n RetrieveAllOffersgetResponse response = api.getretrieveAllOffers( null, null);\n\n String json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(response);\n System.out.println(json);\n }", "public GameObject getSpinResult(GameRequest gameRequest) {\n\t\tString cookie = gameRequest.getHeader().getCustomer().getCookie();\r\n\t\tint playerId = getPlayerIdFromCookie(cookie);\r\n\r\n\t\tdouble realBalance = 0;\r\n\t\tdouble dummyBalance = 0;\r\n\t\ttry {\r\n\t\t\tcookie = gameRequest.getHeader().getCustomer().getCookie();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_MALFORMED_XML, ExceptionMessage.ERROR_MSG_MALFORMED_XML);\r\n\t\t}\r\n\t\tHashMap<String, Object> requestesParameters = new HashMap<String, Object>();\r\n\t\trequestesParameters.put(\"session_key\", cookie);\r\n\t\tString url = config.getApiBaseUrl() + UrlCall.API_MY_ACCOUNT;\r\n\t\tString response = null;\r\n\t\ttry {\r\n\t\t\tresponse = webServiceCalling.sendPost(requestesParameters, url, cookie, false);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_API_ERROR, e.getMessage());\r\n\t\t}\r\n\r\n\t\tif (response != null) {\r\n\t\t\ttry {\r\n\t\t\t\tMap<String, Object> value = new Gson().fromJson(\r\n\t\t\t\t\t\tresponse, new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t);\r\n\t\t\t\tLOGGER.info(\"my account api response : \"+value);\r\n\t\t\t\tMap<String, Object> data = new Gson().fromJson(\r\n\t\t\t\t\t\tvalue.get(\"data\").toString(), new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t);\r\n\t\t\t\tMap<String, Object> userBalance = new Gson().fromJson(\r\n\t\t\t\t\t\tdata.get(\"user_balance\").toString(), new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t);\r\n\t\t\t\tif(data.containsKey(\"user_details\")) {\r\n\t\t\t\t\tMap<String, Object> userDetails = new Gson().fromJson(\r\n\t\t\t\t\t\t\tdata.get(\"user_details\").toString(), new TypeToken<HashMap<String, Object>>() {}.getType()\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tDouble userId = (Double) userDetails.get(\"user_id\");\r\n\t\t\t\t\tplayerId = userId.intValue();\r\n\r\n\t\t\t\t}\r\n\t\t\t\trealBalance = (Double) userBalance.get(\"real_amount\");\r\n\t\t\t\tdummyBalance = (Double) userBalance.get(\"dummy_amount\");\r\n\t\t\t\tSystem.out.println(\"spin result - player id - \" + playerId + \" .realBalance - \" + realBalance + \" .dummyBalanace - \" + dummyBalance);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_API_ERROR, ExceptionMessage.ERROR_MSG_API_ERROR + \" error decoding api response\" );\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tthrow new ExceptionManagement(ExceptionMessage.ERROR_CODE_API_ERROR, ExceptionMessage.ERROR_MSG_API_ERROR + \" session key expired.\" );\r\n\t\t}\r\n\r\n\r\n\t\tGtGameAccount lastGame = getLastSpinGame(playerId);\t\t\t\t\t\t// get last game not closed.\r\n\t\tGameObject gameObj = new GameObject();\r\n\t\tgameObj.setUserId(playerId);\r\n\r\n\t\tList<Integer> lastDraws = getLastDraws();\r\n\t\tgameObj.setLastDraws(lastDraws);\r\n\t\tif(lastGame==null) {\r\n\t\t\tgameObj.setResultInfo(null);\r\n\t\t}else {\r\n\t\t\tResultInfo resultInfo = new ResultInfo(lastGame.getBetAmount(), lastGame.getWinnings(),null,lastGame.getDraw());\r\n\t\t\tgameObj.setResultInfo(resultInfo);\r\n\t\t\t// TODO : add betState of that game.\r\n\t\t\tList<GtSpinBets> bets = gtSpinBetsService.findBetsBySpinIdPlayerId(lastGame.getSpinId(), lastGame.getPlayerId());\r\n\t\t\tBetState betState = new BetState();\r\n\t\t\tbetState.setDrawn(lastGame.getDraw());\r\n\t\t\tbetState.setTotalBets((byte) bets.size());\r\n\t\t\tfor(GtSpinBets playerBet : bets) {\r\n\t\t\t\tbetState.getBet().add(new Bet(playerBet.getBetName(), playerBet.getStake(), playerBet.getSelection()));\r\n\t\t\t}\r\n\t\t\tGameLogic logic = new GameLogic();\r\n\t\t\tbetState = logic.calculateWinnings((byte)lastGame.getDraw(), betState);\r\n\t\t\tgameObj.setBetState(betState);\r\n\t\t}\r\n\t\tgameObj.setSpinId(lastGame.getSpinId());\r\n\r\n\t\t// set player's balance\r\n\t\tgameObj.setRealBalance(realBalance);\r\n\t\tgameObj.setDummyBalance(dummyBalance);\r\n\t\treturn gameObj;\r\n\r\n\t}", "JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 24: */ throws NxtException\r\n/* 25: */ {\r\n/* 26:24 */ Account localAccount = ParameterParser.getAccount(paramHttpServletRequest);\r\n/* 27: */ \r\n/* 28:26 */ JSONObject localJSONObject1 = JSONData.accountBalance(localAccount);\r\n/* 29:27 */ JSONData.putAccount(localJSONObject1, \"account\", localAccount.getId());\r\n/* 30:29 */ if (localAccount.getPublicKey() != null) {\r\n/* 31:30 */ localJSONObject1.put(\"publicKey\", Convert.toHexString(localAccount.getPublicKey()));\r\n/* 32: */ }\r\n/* 33:32 */ if (localAccount.getName() != null) {\r\n/* 34:33 */ localJSONObject1.put(\"name\", localAccount.getName());\r\n/* 35: */ }\r\n/* 36:35 */ if (localAccount.getDescription() != null) {\r\n/* 37:36 */ localJSONObject1.put(\"description\", localAccount.getDescription());\r\n/* 38: */ }\r\n/* 39:38 */ if (localAccount.getCurrentLesseeId() != 0L)\r\n/* 40: */ {\r\n/* 41:39 */ JSONData.putAccount(localJSONObject1, \"currentLessee\", localAccount.getCurrentLesseeId());\r\n/* 42:40 */ localJSONObject1.put(\"currentLeasingHeightFrom\", Integer.valueOf(localAccount.getCurrentLeasingHeightFrom()));\r\n/* 43:41 */ localJSONObject1.put(\"currentLeasingHeightTo\", Integer.valueOf(localAccount.getCurrentLeasingHeightTo()));\r\n/* 44:42 */ if (localAccount.getNextLesseeId() != 0L)\r\n/* 45: */ {\r\n/* 46:43 */ JSONData.putAccount(localJSONObject1, \"nextLessee\", localAccount.getNextLesseeId());\r\n/* 47:44 */ localJSONObject1.put(\"nextLeasingHeightFrom\", Integer.valueOf(localAccount.getNextLeasingHeightFrom()));\r\n/* 48:45 */ localJSONObject1.put(\"nextLeasingHeightTo\", Integer.valueOf(localAccount.getNextLeasingHeightTo()));\r\n/* 49: */ }\r\n/* 50: */ }\r\n/* 51:48 */ DbIterator localDbIterator = localAccount.getLessors();Object localObject1 = null;\r\n/* 52: */ JSONArray localJSONArray3;\r\n/* 53: */ Object localObject2;\r\n/* 54: */ try\r\n/* 55: */ {\r\n/* 56:49 */ if (localDbIterator.hasNext())\r\n/* 57: */ {\r\n/* 58:50 */ JSONArray localJSONArray1 = new JSONArray();\r\n/* 59:51 */ localJSONArray3 = new JSONArray();\r\n/* 60:52 */ while (localDbIterator.hasNext())\r\n/* 61: */ {\r\n/* 62:53 */ localObject2 = (Account)localDbIterator.next();\r\n/* 63:54 */ localJSONArray1.add(Convert.toUnsignedLong(((Account)localObject2).getId()));\r\n/* 64:55 */ localJSONArray3.add(Convert.rsAccount(((Account)localObject2).getId()));\r\n/* 65: */ }\r\n/* 66:57 */ localJSONObject1.put(\"lessors\", localJSONArray1);\r\n/* 67:58 */ localJSONObject1.put(\"lessorsRS\", localJSONArray3);\r\n/* 68: */ }\r\n/* 69: */ }\r\n/* 70: */ catch (Throwable localThrowable2)\r\n/* 71: */ {\r\n/* 72:48 */ localObject1 = localThrowable2;throw localThrowable2;\r\n/* 73: */ }\r\n/* 74: */ finally\r\n/* 75: */ {\r\n/* 76:60 */ if (localDbIterator != null) {\r\n/* 77:60 */ if (localObject1 != null) {\r\n/* 78: */ try\r\n/* 79: */ {\r\n/* 80:60 */ localDbIterator.close();\r\n/* 81: */ }\r\n/* 82: */ catch (Throwable localThrowable5)\r\n/* 83: */ {\r\n/* 84:60 */ ((Throwable)localObject1).addSuppressed(localThrowable5);\r\n/* 85: */ }\r\n/* 86: */ } else {\r\n/* 87:60 */ localDbIterator.close();\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91:62 */ localDbIterator = localAccount.getAssets(0, -1);localObject1 = null;\r\n/* 92: */ try\r\n/* 93: */ {\r\n/* 94:63 */ JSONArray localJSONArray2 = new JSONArray();\r\n/* 95:64 */ localJSONArray3 = new JSONArray();\r\n/* 96:65 */ while (localDbIterator.hasNext())\r\n/* 97: */ {\r\n/* 98:66 */ localObject2 = (Account.AccountAsset)localDbIterator.next();\r\n/* 99:67 */ JSONObject localJSONObject2 = new JSONObject();\r\n/* :0:68 */ localJSONObject2.put(\"asset\", Convert.toUnsignedLong(((Account.AccountAsset)localObject2).getAssetId()));\r\n/* :1:69 */ localJSONObject2.put(\"balanceQNT\", String.valueOf(((Account.AccountAsset)localObject2).getQuantityQNT()));\r\n/* :2:70 */ localJSONArray2.add(localJSONObject2);\r\n/* :3:71 */ JSONObject localJSONObject3 = new JSONObject();\r\n/* :4:72 */ localJSONObject3.put(\"asset\", Convert.toUnsignedLong(((Account.AccountAsset)localObject2).getAssetId()));\r\n/* :5:73 */ localJSONObject3.put(\"unconfirmedBalanceQNT\", String.valueOf(((Account.AccountAsset)localObject2).getUnconfirmedQuantityQNT()));\r\n/* :6:74 */ localJSONArray3.add(localJSONObject3);\r\n/* :7: */ }\r\n/* :8:76 */ if (localJSONArray2.size() > 0) {\r\n/* :9:77 */ localJSONObject1.put(\"assetBalances\", localJSONArray2);\r\n/* ;0: */ }\r\n/* ;1:79 */ if (localJSONArray3.size() > 0) {\r\n/* ;2:80 */ localJSONObject1.put(\"unconfirmedAssetBalances\", localJSONArray3);\r\n/* ;3: */ }\r\n/* ;4: */ }\r\n/* ;5: */ catch (Throwable localThrowable4)\r\n/* ;6: */ {\r\n/* ;7:62 */ localObject1 = localThrowable4;throw localThrowable4;\r\n/* ;8: */ }\r\n/* ;9: */ finally\r\n/* <0: */ {\r\n/* <1:82 */ if (localDbIterator != null) {\r\n/* <2:82 */ if (localObject1 != null) {\r\n/* <3: */ try\r\n/* <4: */ {\r\n/* <5:82 */ localDbIterator.close();\r\n/* <6: */ }\r\n/* <7: */ catch (Throwable localThrowable6)\r\n/* <8: */ {\r\n/* <9:82 */ ((Throwable)localObject1).addSuppressed(localThrowable6);\r\n/* =0: */ }\r\n/* =1: */ } else {\r\n/* =2:82 */ localDbIterator.close();\r\n/* =3: */ }\r\n/* =4: */ }\r\n/* =5: */ }\r\n/* =6:83 */ return localJSONObject1;\r\n/* =7: */ }", "@Test\n public void testNodeDefault() throws Exception, JSONException {\n WebResource r = resource();\n ClientResponse response = r.path(\"ws\").path(\"v1\").path(\"node\").get(ClientResponse.class);\n Assert.assertEquals((((MediaType.APPLICATION_JSON) + \"; \") + (JettyUtils.UTF_8)), response.getType().toString());\n JSONObject json = response.getEntity(JSONObject.class);\n verifyNodeInfo(json);\n }", "@Test\n void getTransactionList() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n String fromAccountingDate = \"2019-01-01\";\n String toAccountingDate = \"2019-12-01\";\n\n Response response = greetingWebClient.getTransactionList(idAccount, fromAccountingDate, toAccountingDate);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }", "public String ExecuteCypherQueryReturnTrailDetails(String cypherQuery) {\n\t\tString nodeString = \"\";\r\n\t\tNodeController nc = new NodeController();\t \r\n\t UserService userService = new UserService();\r\n\t\tExecutionEngine engine = new ExecutionEngine( _db );\r\n\t\tExecutionResult result = null;\r\n\t\tTransaction tx = _db.beginTx();\r\n\t\ttry {\r\n\t\t result = engine.execute(cypherQuery);\r\n\t\t Iterator<Map<String, Object>> it = result.iterator();\r\n\t\t Map map = it.next();\t \r\n\t\t // Get objects\r\n\t\t Object descriptionObject = map.get(\"trail.Description\");\r\n\t\t Object viewsObject = map.get(\"trail.Views\");\r\n\t\t Object userIdObject = map.get(\"trail.UserId\");\r\n\t\t Object trailNameObject = map.get(\"trail.TrailName\");\r\n\t\t Object coverIdObject = map.get(\"trail.CoverPhotoId\");\t\r\n\t\t System.out.print(\"Fetched objects from map\");\r\n\t\t String description = \"\";\r\n\t\t String views = \"\";\r\n\t\t String userId = \"\";\r\n\t\t String userName = \"\";\r\n\t\t String trailName = \"\";\r\n\t\t String coverPhotoId = \"\";\r\n\t\t \r\n\t\t if (descriptionObject != null) {\r\n\t\t \tdescription = descriptionObject.toString();\r\n\t\t }\r\n\t\t if (viewsObject != null) {\r\n\t\t \tviews = viewsObject.toString();\r\n\t\t }\r\n\t\t \r\n\t\t if (userIdObject != null) {\r\n\t\t \tuserId = userIdObject.toString();\r\n\t\t }\r\n\t\t \r\n\t\t if (trailNameObject != null) {\r\n\t\t \ttrailName = trailNameObject.toString();\r\n\t\t }\r\n\t\t \r\n\t\t if (coverIdObject != null) {\r\n\t\t \tcoverPhotoId = coverIdObject.toString();\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t // Put objects\r\n\t\t JSONObject tempNode = new JSONObject();\t\r\n\t\t tempNode.put(\"description\", description);\r\n\t\t tempNode.put(\"views\", views);\r\n\t\t tempNode.put(\"userId\", userId);\r\n\t\t tempNode.put(\"userName\", userService.FetchUserName(userId));\r\n\t\t tempNode.put(\"trailName\", trailName);\r\n\t\t tempNode.put(\"coverPhotoId\", coverPhotoId);\t\t\t \r\n\t\t nodeString = tempNode.toString();\r\n\t\t tx.success();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.print(\"issues with fetching node and its relations\");\r\n\t\t\ttx.failure();\r\n\t\t} finally {\r\n\t\t\ttx.finish();\r\n\t\t}\t\t\r\n\t\treturn nodeString;\r\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "public void receiveResultadd2(\n loadbalance.LoadBalanceStub.Add2Response result\n ) {\n }", "@Test\n public void testNodeInfoDefault() throws Exception, JSONException {\n WebResource r = resource();\n ClientResponse response = r.path(\"ws\").path(\"v1\").path(\"node\").path(\"info\").get(ClientResponse.class);\n Assert.assertEquals((((MediaType.APPLICATION_JSON) + \"; \") + (JettyUtils.UTF_8)), response.getType().toString());\n JSONObject json = response.getEntity(JSONObject.class);\n verifyNodeInfo(json);\n }", "@Test\n public void testGetCoinTypeDetail() throws Exception {\n WebApiBaseReq req = new WebApiBaseReq();\n req.setId(2l);\n String token = CacheHelper.buildTestToken(\"1\");\n req.setToken(token);\n LOG.d(this,req);\n String str = JsonHelper.obj2JsonStr(req);\n WebApiResponse response = virtualCoinCtrl.getCoinTypeDetail(str);\n LOG.d(this, response);\n }", "public void receiveResultadd3(\n loadbalance.LoadBalanceStub.Add3Response result\n ) {\n }", "public BigDecimal getRewardMoney() {\r\n return rewardMoney;\r\n }", "public void createInventoryReward() {\n if (inventoryEntityToRetrieve == null) {\n try {\n inventoryEntityToRetrieve = RandomBenefitModel.getInventoryRewards(application, encounter, characterVM.getDistance());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "@Test\n public void getVote() throws IOException {\n URL url = new URL(BASE_URL + \"1/1/vote/1/object\");\n InputStream input = url.openStream();\n Vote vote\n = JAXB.unmarshal(new InputStreamReader(input), Vote.class);\n \n System.out.println(vote);\n //from there we can use the assertEquals to doing th evarious test\n }", "POGOProtos.Rpc.VsSeekerRewardTrack getRewardTrack();", "public String getBalanceInfo(String request,String user);", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "public JSONObject getAdvanceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountAdv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n if (reqParams.optBoolean(\"at\")) {\n /**\n * Get Advance for which invoice not linked yet\n */\n\n reqParams.put(\"at\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = (advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount)) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n } else {\n /**\n * Get Advance for which invoice isLinked\n */\n reqParams.put(\"atadj\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.adjustedamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = advanceobj.optDouble(GSTRConstants.adjustedamount) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvDataLinked = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvDataLinked) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n }\n\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountAdv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountAdv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n return jSONObject;\n }", "public ArrayList<Integer> getRankReward() {\n/* 46 */ return this.rankReward;\n/* */ }", "@Test\n public void destiny2GetClanWeeklyRewardStateTest() {\n Long groupId = null;\n InlineResponse20039 response = api.destiny2GetClanWeeklyRewardState(groupId);\n\n // TODO: test validations\n }", "public double getReward() {\n return reward;\n }", "pb4server.SetMainHeroRewardAskReq getSetMainHeroRewardAskReq();", "private void getNodeInfo(HttpServletRequest request, HttpServletResponse response) throws NumberFormatException, ClassNotFoundException, QueryExecutionException, IOException {\n int nodeId = Integer.parseInt(request.getParameter(\"node\"));\n String nodeProp = request.getParameter(\"prop\");\n\n if (nodeProp == null) {\n response.getWriter().write(SimApi.getNodeInfo(nodeId));\n } else {\n response.getWriter().write(SimApi.getNodeInfo(nodeId, nodeProp));\n }\n }", "@Test\n public void getResultTest() throws IOException {\n System.setProperty(\"REPO_HG_19_PATH\", REPO_PATH_RANGES);\n System.setProperty(\"REPO_HG_38_PATH\", REPO_PATH_RANGES);\n System.setProperty(\"MAX_RANGE_RECORDS_IN_RESULT\", \"10\");\n\n // test common valid flow\n Response response = new Main().getResult19(\"X:77633124\");\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n Assert.assertNotNull(response.getEntity());\n JsonNode result = ((ArrayNode) new ObjectMapper().readTree((String)response.getEntity()).get(\"entries\")).get(0);\n Assert.assertEquals(\"G\", result.get(\"ref\").asText());\n Assert.assertEquals(\"A\", result.get(\"alt\").asText());\n ArrayNode homArray = (ArrayNode) result.get(\"hom\");\n Assert.assertEquals(1, homArray.size());\n Assert.assertEquals(\"SRR14860530\", homArray.get(0).asText());\n ArrayNode hetArray = (ArrayNode) result.get(\"het\");\n Assert.assertEquals(1, hetArray.size());\n Assert.assertEquals(\"SRR14860527\", hetArray.get(0).asText());\n\n // test lower case\n response = new Main().getResult(\"x:77633124\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n Assert.assertNotNull(response.getEntity());\n result = ((ArrayNode) new ObjectMapper().readTree((String)response.getEntity()).get(\"entries\")).get(0);\n Assert.assertEquals(\"G\", result.get(\"ref\").asText());\n Assert.assertEquals(\"A\", result.get(\"alt\").asText());\n homArray = (ArrayNode) result.get(\"hom\");\n Assert.assertEquals(1, homArray.size());\n Assert.assertEquals(\"SRR14860530\", homArray.get(0).asText());\n hetArray = (ArrayNode) result.get(\"het\");\n Assert.assertEquals(1, hetArray.size());\n Assert.assertEquals(\"SRR14860527\", hetArray.get(0).asText());\n\n //test range query\n response = new Main().getResult(\"2:25234482-26501857\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n\n JsonNode jsonResult = new ObjectMapper().readTree((String)response.getEntity());\n Assert.assertEquals(11, jsonResult.get(\"count\").asInt());\n\n ArrayNode dataArray = (ArrayNode)jsonResult.get(\"data\");\n Assert.assertEquals(10, dataArray.size());\n\n JsonNode first = dataArray.get(0);\n Assert.assertEquals(25234482, first.get(\"pos\").asInt());\n Assert.assertEquals(\"C\", ((ArrayNode)first.get(\"entries\")).get(0).get(\"ref\").asText());\n Assert.assertEquals(\"T\", ((ArrayNode)first.get(\"entries\")).get(0).get(\"alt\").asText());\n\n JsonNode last = dataArray.get(9);\n Assert.assertEquals(25313958, last.get(\"pos\").asInt());\n Assert.assertEquals(\"G\", ((ArrayNode)last.get(\"entries\")).get(0).get(\"ref\").asText());\n Assert.assertEquals(\"A\", ((ArrayNode)last.get(\"entries\")).get(0).get(\"alt\").asText());\n\n // test empty case\n response = new Main().getResult(\"x:15000112\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n Assert.assertNotNull(response.getEntity());\n Assert.assertEquals(EMPTY_RESULT, response.getEntity());\n\n // test bad input 1\n response = new Main().getResult(\"adkwjfh\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n\n // test bad input 2\n response = new Main().getResult(\"s:sss\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n\n // test bad input 3\n response = new Main().getResult(\"s:12345\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n\n // test bad input 4\n response = new Main().getResult(\"x:500000000\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n }", "@GET\n @Path(\"bank/account/{account_id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getBankAccountDetails(@PathParam(\"account_id\") \n String accountId) {\n \n int id = Integer.parseInt(accountId);\n Account a1 = new Account(1234, 12345678, 123.47, \"Current\", id, 1);\n return Response.status(200).entity(gson.toJson(a1)).build();\n \n }", "void giveReward(BPlayer bPlayer, int tier, int status);", "public static JSONObject match(JSONObject json)throws JSONException {\n\t\tJSONObject obj = json.getJSONObject(\"match\");\n\t\tString ID = obj.getString(\"ID\");\n\t\tString answer = obj.getString(\"answer\");\n\t\tString stage=\"\";\n\t\tString common_interests=\"\";\n\t\tJSONObject respon = new JSONObject();\n\t\tJSONObject temp = new JSONObject();\n\n\t\tInterest interest=new Interest();\n\t\tRDS_connection rds=new RDS_connection();\n\t\trds.createConnectionAndStatement();\n\t\tuser user_t=rds.new user();\n\n\t\n\t\tString mate=\"\";\n\t\tstage=user_t.Get_Status(ID);\n\t\tSystem.out.println(\"ID stage is \"+stage+ID);\n\t\tif(answer.equals(\"new\")){// user request a new match\n\t\t\t//call ML algorithm\n\t\t\tSystem.out.println(\"answer is in\"+ID);\n\t\t\tmate= interest.ML_matching(ID);\n \n////////////////////////////\n\n\t\t\ttemp.put(\"OK\", \"match\");\n// JSONObject matchrequest = new JSONObject();\n// matchrequest.put(\"ID\", mate);\n// matchrequest.put(\"commoninterest\", common_interests);\n// matchrequest.put(\"pic\", common_interests);\n// matchrequest.put(\"piechart\", common_interests);\n// matchrequest.put(\"rate\", common_interests);\n\n////////////////////////////\n\n\t\t\t//we should get mathing score according to ID and mate.\n\n\t\t\tString[] M1=user_t.Get_MATM(ID);\n\t\t\tString[] M2=user_t.Get_MATM(mate);\n\t\t\tcommon_interests=Interest.match_interest(M1,M2);\n//\t\t\tString score = \"\"+Interest.match_score(common_interests);\n\t\t\tString score=\"1341\";\n\t\t\tif(score.length()>0){\n\t\t\t\tuser_t.FL_Insert(ID, mate, score);}\n\t\t\telse{\n\t\t\t\tuser_t.FL_Insert(ID, mate,\"0\");\n\t\t\t}\n\t\t\t\n\t\t\tif(stage.equals(\"-1\")){\n\t\t\t\tmate=user_t.Get_Matching_FL(ID);\n\t\t\t\tSystem.out.println(\"answer new, ID status=-1\");\n\t\t\t\tuser_t.Updata_Online(ID, \"online\");\n\t\t\t\tuser_t.Updata_Stage(ID, \"wait\");\n\t\t\t\tstage=\"wait\";\n\t\t\t\tuser_t.Updata_Stage(mate, \"respond\");\n\t\t\t\tString time =\"\"+ System.currentTimeMillis();\n\t\t\t\tuser_t.Update_TimeStamp(ID, time);\n\t\t\t\tuser_t.Update_TimeStamp(mate, time);\n\t\t\t\ttemp.put(\"ID\",ID);\n\t\t\t\ttemp.put(\"OK\", \"wait\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"wrong\");\n\t\t\t}\n\t\t}else if(answer.equals(\"quit\")) {\n\t\t\tmate=user_t.Get_Matching_FL(ID);\n\t\t\tuser_t.Updata_Stage(ID, \"-1\");\n\t\t\tuser_t.Updata_Stage(mate, \"quit\");\n\t\t\ttemp.put(\"OK\",\"OK+liguifan\");\n\t\t}else{\n\t\t\tmate=user_t.Get_Matching_FL(ID);\n\t\t\tif(stage.equals(\"quit\")){\n\t\t\t\tuser_t.Updata_Stage(ID, \"-1\");\n\t\t\t\ttemp.put(\"OK\", \"quit\");\n\t\t\t}else if (stage.equals(\"wait\")) {\n\t\t\t\tmate=user_t.Get_Matching_FL(ID);\n\t\t\t\ttemp.put(\"OK\", \"wait\");\n\t\t\t\tString mate_stage=user_t.Get_Status(mate);\n\n\t\t\t\tif(!mate_stage.equals(\"ready\")){\n\t\t\t\t\tuser_t.Updata_Stage(ID, \"ready\");\n\t\t\t\t\ttemp.put(\"OK\", \"wait\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"enter mate_ready stage \"+mate);\n\t\t\t\t\ttemp.put(\"OK\", \"enter\");\n\t\t\t\t\tuser_t.Updata_Stage(ID, \"0\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trespon.put(\"respond\", temp);\n\t\treturn respon;\n\t}", "private void getNodeOperation(OperationResponse response, ObjectIdData requestData) {\n\t\t\n//\t\tString gehtNichtMeldung = \"{\\\"message\\\":\\\"MaPL currently is missing appropriate APIs to filter nodes intelligently.\\\"}\";\n//\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(200), ResponseUtil.toPayload(gehtNichtMeldung));\n\t\t\n\t\t\n\t\trestWrapper = MapsHelpers.initRestWrapperAndLogin(getContext());\n\t\tint httpStatusCode = 200;\n\t\tLogger.severe(\"Object ID : \" + requestData.getObjectId());\n\t\tLogger.severe(\"Dynamic props : \" + requestData.getDynamicProperties().toString());\n\t\tLogger.severe(\"User def props: \" + requestData.getUserDefinedProperties().toString());\n\t\t\n\t\tif ( restWrapper != null ) {\n\t\t\tJSONArray allNodes = new JSONArray();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tString additionalInfo = \"?withAdditionalInfo=true\";\n\t\t\t\t\n\t\t\t\tString treeId = requestData.getObjectId();\n\t\t\t\t\n\t\t\t\tLogger.severe(\"Find all nodes for tree ID \" + treeId );\n\t\t\t\t\n//\t\t\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(httpStatusCode), ResponseUtil.toPayload(allNodes.toString(4)));\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tString restPath = \"/node/root/\" + treeId + additionalInfo;\n\t\t\t\t\n\t\t\t\tObject result = restWrapper.httpGetRequest(restPath, new HashMap<String, String>());\n\t\t\t\t\n\t\t\t\tallNodes.put(result);\n\t\t\t\n\t\t\t\tgetChildren(allNodes, treeId, (JSONObject)result, 0);\n\t\t\t\tLogger.severe(\"Found nodes: \" + allNodes.length() );\n\t\t\t\t\n\t\t\t\thttpStatusCode = restWrapper.getHttpClient().getLastStatus();\n\t\t\t\t\n\t\t\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(httpStatusCode), ResponseUtil.toPayload(allNodes.toString(4)));\n\t\t\t\t\n\t\t\t} catch (JSONException e) {\n\t\t\t\tLogger.log(Level.SEVERE, \"An error\", e);\n\t\t\t\tthrow new ConnectorException(e);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} else {\n\t\t\tresponse.addResult(requestData, OperationStatus.FAILURE, null, \"Authentication failed\", null);\n\t\t}\n\t\t\n\t}", "@Test\n public void testGetJsonPayload() {\n System.out.println(\"getJsonPayload\");\n String expResult = (\"{\\n\"\n + \" \\\"iss\\\": \\\"https://ConsumerSystemURL\\\",\\n\"\n + \" \\\"sub\\\": \\\"1\\\",\\n\"\n + \" \\\"aud\\\": \\\"https://authorize.fhir.nhs.net/token\\\",\\n\"\n + \" \\\"exp\\\": 1503995882,\\n\"\n + \" \\\"iat\\\": 1503995582,\\n\"\n + \" \\\"reason_for_request\\\": \\\"directcare\\\",\\n\"\n + \" \\\"requesting_device\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Device\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"GPConnectTestSystem\\\",\\n\"\n + \" \\\"value\\\": \\\"Client\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"type\\\": {\\n\"\n + \" \\\"coding\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"DeviceIdentifierSystem\\\",\\n\"\n + \" \\\"code\\\": \\\"DeviceIdentifier\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"model\\\": \\\"v1\\\",\\n\"\n + \" \\\"version\\\": \\\"1.1\\\"\\n\"\n + \" },\\n\"\n + \" \\\"requesting_organization\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Organization\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/Id/ods-organization-code\\\",\\n\"\n + \" \\\"value\\\": \\\"GPCA0001\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"name\\\": \\\"GP Connect Assurance\\\"\\n\"\n + \" },\\n\"\n + \" \\\"requesting_practitioner\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Practitioner\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/sds-user-id\\\",\\n\"\n + \" \\\"value\\\": \\\"GCASDS0001\\\"\\n\"\n + \" },\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"LocalIdentifierSystem\\\",\\n\"\n + \" \\\"value\\\": \\\"1\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"name\\\": {\\n\"\n + \" \\\"family\\\": [\\n\"\n + \" \\\"AssurancePractitioner\\\"\\n\"\n + \" ],\\n\"\n + \" \\\"given\\\": [\\n\"\n + \" \\\"AssuranceTest\\\"\\n\"\n + \" ],\\n\"\n + \" \\\"prefix\\\": [\\n\"\n + \" \\\"Mr\\\"\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"practitionerRole\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"role\\\": {\\n\"\n + \" \\\"coding\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/ValueSet/sds-job-role-name-1\\\",\\n\"\n + \" \\\"code\\\": \\\"AssuranceJobRole\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"requested_scope\\\": \\\"patient/*.read\\\",\\n\"\n + \" \\\"requested_record\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Patient\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"https://fhir.nhs.uk/Id/nhs-number\\\",\\n\"\n + \" \\\"value\\\": \\\"9476719931\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \"}\\n\").replaceAll(\"\\n\", \"\\r\\n\");\n String result = instance.getJsonPayload();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void moneyTrnasferSucess() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 500.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(amountToBeTranfered);\n\t\tsb.append(\" has been transferred to : \");\n\t\tsb.append(accountNumberTo);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n public void testPurInStock() {\n\n String s = \"{\\\"infos\\\":[{\\\"goodsCode\\\":\\\"A07090202450\\\",\\\"inStockNum\\\":1}],\\\"ouserId\\\":2,\\\"ouserName\\\":\\\"001\\\",\\\"purchaseNo\\\":\\\"CG160109000001\\\"}\";\n PurchaseBillInfo purchaseBillInfo = JSON.parseObject(s, PurchaseBillInfo.class);\n\n try {\n ServerStatus serverStatus = purchaseBillService.purInStock(purchaseBillInfo);\n// System.out.println(\"---------------------\" + JSON.toJSONString(pinfo));\n System.out.println(serverStatus);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String getBalance(String accountNo ,String bank) {\r\n\t ClientBuilder clientBuilder = ClientBuilder.newBuilder();\r\n\t String message = null;\r\n\t //creating empty Client\r\n\t Client client = clientBuilder.build(); \r\n\t WebTarget target = client.target(JERSEY_BASE_URI).path(\"/account\").path(\"/balance\").queryParam(\"bank\", bank);\r\n\t System.out.println(\"base uri \"+target.toString());\r\n\t Invocation.Builder invocationBuilder = target.request();\r\n\t invocationBuilder.header(\"accountNo\",accountNo);\r\n\t /*After creation of invocation Builder Object we need to pass header or cookie parameter values to it \r\n\t * There are Two parts of the request is there\r\n\t * 1)Address part or WebAddress(Url with query and path and matrix paramters available)\r\n\t * 2)Request Part\r\n\t * Again it was divided into two more parts \r\n\t * 1)Cokkie or Requesty Headers \r\n\t * 2)Request Body(Here you can pass your own object or text or any thing as Entity class)\r\n\t * ## Once after completion of request object means after providing the webaddress to it we can able to send the \r\n\t * Header Parameters and cookie parameters to it \r\n\t * \r\n\t * Here Invocation invocation = invocationBuilder.build(\"GET\");\r\n\t * or\r\n\t * Invocation invocation = invocationBuilder.buildGet();\r\n\t * Then invocation.invoke() or invocation.invoke(ClassType) so that it will invoke the target class resource \r\n\t * \r\n\t * or \r\n\t * Response response = invocationBuilder.get() \r\n\t * Here This class contains one builder method that internally creates Invoke object and and it will invoke on it and \r\n\t * it will return Response to us directly\r\n\t * \r\n\t * \r\n\t * */\r\n\t Invocation invocation = invocationBuilder.buildGet();\r\n\t Response response = invocation.invoke();\r\n\t if(response.getStatus() == 200) {\r\n\t\t System.out.println(\"inside if block\");\r\n\t\t response.bufferEntity(); //To strore in buffer before closing outputstream \r\n\t\t message = response.readEntity(String.class);\r\n\t }\r\n\t return message;\r\n }", "@Test\n public void testScoresAPI() throws IOException, InterruptedException, JSONException {\n MockWebServer server = new MockWebServer();\n MockResponse response = new MockResponse();\n response.setResponseCode(HTTP_OK);\n String bodyStr = \"{\\n\" +\n \" \\\"status\\\": 0, \\n\" +\n \" \\\"error_message\\\": \\\"OK\\\", \\n\" +\n \" \\\"user_id\\\": \\\"billy_jones_301\\\",\\n\" +\n \" \\\"scores\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.898391231245,\\n\" +\n \" \\\"reasons\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"name\\\": \\\"UsersPerDevice\\\",\\n\" +\n \" \\\"value\\\": 4,\\n\" +\n \" \\\"details\\\": {\\n\" +\n \" \\\"users\\\": \\\"a, b, c, d\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.472838192111,\\n\" +\n \" \\\"reasons\\\": []\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"latest_labels\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": true,\\n\" +\n \" \\\"time\\\": 1352201880,\\n\" +\n \" \\\"description\\\": \\\"received a chargeback\\\"\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": false,\\n\" +\n \" \\\"time\\\": 1362205000\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\";\n response.setBody(bodyStr);\n server.enqueue(response);\n server.start();\n\n // Create a new client and link it to the mock server.\n SiftClient client = new SiftClient(\"YOUR_API_KEY\", \"YOUR_ACCOUNT_ID\",\n new OkHttpClient.Builder()\n .addInterceptor(OkHttpUtils.urlRewritingInterceptor(server))\n .build());\n\n List<String> abuseTypes = new ArrayList<>();\n abuseTypes.add(\"payment_abuse\");\n abuseTypes.add(\"promotion_abuse\");\n ScoreRequest request = client.buildRequest(\n new ScoreFieldSet()\n .setUserId(\"billy_jones_301\")\n .setAbuseTypes(abuseTypes));\n ScoreResponse siftResponse = request.send();\n\n\n // Verify the request.\n RecordedRequest request1 = server.takeRequest();\n Assert.assertEquals(\"GET\", request1.getMethod());\n Assert.assertEquals(\"/v205/score/billy_jones_301?api_key=YOUR_API_KEY&\" +\n \"abuse_types=payment_abuse,promotion_abuse\", request1.getPath());\n\n // Verify the response.\n Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());\n Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());\n JSONAssert.assertEquals(response.getBody().readUtf8(),\n siftResponse.getBody().toJson(), false);\n\n server.shutdown();\n\n }", "String responseToString(MovilizerResponse response);", "private InstanceGetStarRewardRt(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private static Object doMpesa(Request req, Response res){\n System.out.println(\"Here is the confirmation: \" + req.body());\n\n Mpesa received = new Gson().fromJson(req.body(),Mpesa.class);\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"Payment Status: \"+ received.getStatus());\n publisher send_0k = new publisher();\n send_0k.setContent(received.getStatus());\n send_0k.publish();\n return received;\n }", "public void receiveResultadd(\n loadbalance.LoadBalanceStub.AddResponse result\n ) {\n }", "@Override\n\tprotected JsonObject startResponse() {\n\t\tJsonObject startResp = new JsonObject();\n\t\tstartResp.addProperty(\"rootValue\", this.root.getValue());\n\t\tstartResp.addProperty(\"currValue\", this.currDisplayedNumber);\n\t\treturn startResp;\n\t}", "@Test\n\tvoid testJSONObject1() {\n\t\tassertNotNull(r1.getOutput());\n\t}", "public void jointAcc()\n {\n int c=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Holdertype=response.jsonPath().getList(\"'Holder type'\");\n System.out.println(Holdertype);\n for(int i=0;i<Holdertype.size();i++)\n {\n if(Holdertype.get(i)!=null)\n {\n if(Holdertype.get(i).equalsIgnoreCase(\"joint\"))\n {\n c++;\n }\n }\n }\n System.out.println(\"The total number of accounts that are of the type joint = \"+c);\n \n \n }", "@Test\r\n public void testParseResult() throws Exception \r\n {\r\n System.out.println(\"parseResult\");\r\n JsonObject data = null;\r\n CPTAYahooEODMessage instance = new CPTAYahooEODMessage();\r\n JsonArray expResult = null;\r\n // instance.parseResult(data, null);\r\n }", "protected void erweimaJsonInfo(String result) {\n\t\ttry {\n\t\t\tJSONObject object = new JSONObject(result);\n\t\t\tString status = object.getString(\"code\");\n\t\t\tif (\"200\".equals(status)) {\n\t\t\t\tmember_qrcode = object.getString(\"member_qrcode\");\n\t\t\t\tJSONObject jo = object.getJSONObject(\"data\");\n\t\t\t\tmember_name = jo.getString(\"member_name\");\n\t\t\t\tString avator = jo.getString(\"avator\");\n\t\t\t\thandler.sendEmptyMessage(HANDLER_ERWEIMA_SUCCESS);\n\t\t\t} else if (\"700\".equals(status)){\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendEmptyMessage(HANDLER_TOKEN_FAILURE);\n\t\t\t}else {\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendMessage(handler.obtainMessage(\n\t\t\t\t\t\tHANDLER_GETINFO_FAILURE, message));\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\thandler.sendEmptyMessage(HANDLER_NN_FAILURE);\n\t\t}\n\t}", "public void setReward(BigDecimal reward)\n {\n this.reward = reward;\n }", "public static void main(String[] args) {\n EosApi api = EosApiFactory.create(\"https://api.jungle.alohaeos.com\");\n //EosApi api = EosApiFactory.create(\"https://jungle.cryptolions.io\");\n //EosApi api = EosApiFactory.create(\"https://eos.newdex.one\");\n //System.out.println(api.getChainInfo());\n //buyRam(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"bihuexwallet\",15000);\n //delegate(api, \"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\", \"carilking111\", \"carilking444\",\"1.5000 EOS\",\"1.5000 EOS\");\n //updateAuth(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\",\"carilking444\",\"EOS82Psyaqk86jbSdSmGzonNCUHsBp1Xj42q37g6UkiA1UhzLe57j\",\"active\");\n //updateAuth(api,\"5JrTcSsUmzoLDxsNFcpGBRt2Wd488qTmHp5yfBPy71MbxaqSJ4g\",\"carilking555\",\"EOS5X6Sbmbc2zaJ8EHNZmdSnA26DsuTim59pdUNiNd34HugzvTp5m\",\"active\");\n //transfer(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\", \"carilking444\",\"carilking111\",BigDecimal.valueOf(0.01),\"喵喵喵~\");\n //Object obj=api.getTransaction(new TransactionRequest(\"e5aeee319e8c767cdda35a3b6d460328f958833e58723bc18581765494018700\"));\n //System.out.println(obj);\n List<String> accounts = new ArrayList<>();\n accounts.add(\"carilking111\");\n accounts.add(\"carilking444\");\n //updateMultipleAuth(api, \"5JPNqMSZ8M567hgDGW9CmD9vr2RaDm1eWpJqHaHa2S5xKTMmFKm\", \"heydoojqgege\", 2, accounts, \"active\");\n //proposeTransfer(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"firstmsig152\", \"heydoojqgege\", \"carilking222\", BigDecimal.valueOf(0.2), \"test1\", accounts);\n //approveTransfer(api,\"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\",\"carilking111\",\"bihuexwallet\",\"firstmsig151\");\n //execPropose(api,\"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\",\"bihuexwallet\",\"bihuexwallet\",\"firstmsig151\");\n }", "public void createExpReward() {\n try {\n int exp = RandomBenefitModel.getExpReward(encounter, characterVM.getDistance());\n if (exp > 0) characterVM.addExp(exp);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public String ExecuteCypherQueryJSONStringReturn(String cypherQuery) {\r\n\t\tString nodeString = \"\";\r\n\t\tNodeController nc = new NodeController();\r\n\t\tExecutionEngine engine = new ExecutionEngine( _db );\r\n\t\tExecutionResult result = null;\r\n\t\tTransaction tx = _db.beginTx();\r\n\t\ttry {\r\n\t\t result = engine.execute(cypherQuery);\r\n\t\t JSONObject tempNode = new JSONObject(nc.convertIteratorToJSON(result));\t\r\n\t\t nodeString = tempNode.toString();\r\n\t\t tx.success();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.print(\"issues with fetching node and its relations\");\r\n\t\t\ttx.failure();\r\n\t\t\t//return \"failed\";\r\n\t\t} finally {\r\n\t\t\ttx.close();\r\n\t\t}\r\n\t\t\r\n\t\treturn nodeString;\r\n\t}", "private JsonObject getRatesFromApi(){\n try {\n // Setting URL\n String url_str = \"https://v6.exchangerate-api.com/v6/\"+ getApiKey() +\"/latest/\"+ Convert.getBaseCurrency();\n\n // Making Request\n URL url = new URL(url_str);\n HttpURLConnection request = (HttpURLConnection) url.openConnection();\n request.connect();\n\n // Return parsed JSON object\n return parseRequest(request);\n\n } catch (IOException e) {\n e.printStackTrace();\n return new JsonObject();\n }\n }", "public static void main(String[] args) {\n\t\tString baseUri=\"https://pro-api.coinmarketcap.com\";\t\r\n\t\tResponse response = given().\r\n\t\theader(\"Accepts\", \"application/json\").\r\n\t\theader(\"X-CMC_PRO_API_KEY\", \"f0d24ee2-323d-429b-9c91-925336acae42\").\r\n\t\tqueryParam(\"id\", \"1,2,3,4,5,6,7,8,9,10\").\r\n\t\tbaseUri(baseUri).\r\n\t\twhen().get(\"/v1/cryptocurrency/info\").\r\n\t\tthen().assertThat().statusCode(200).and().extract().response();\r\n\t\tSystem.out.println(response.asPrettyString());\r\n\t\tJSONObject obj = new JSONObject(response.asString());\r\n\t\tSystem.out.println(obj.getJSONObject(\"data\").isNull(\"10\"));\r\n\t\t\r\n//\t\tfor(int i=0;i<array.length();i++) {\r\n//\t\t\tString s =(String) array.get(i);\r\n//\t\t\tif(s.equals(\"mineable\")) {\r\n//\t\t\t\tSystem.out.println(s);\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint b=0;\r\n\t}", "public void createGoldReward() {\n try {\n int gold = RandomBenefitModel.getGoldReward(encounter, characterVM.getDistance());\n if (gold > 0) characterVM.goldChange(gold);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public PointRewardData getPointRewardData(Customer fromAccount, Customer toAccount, RewardCurrency fromRewardCurrency, RewardCurrency toRewardCurrency,double rewardQty, TransferPointSetting transferPointSetting ) {\n\n // Create the PointRewardData object\n PointRewardData pointRewardData = new PointRewardData();\n\n\n // Set the fields\n pointRewardData.setMerchantNo(toAccount.getCusMerchantNo());\n\n pointRewardData.setLoyaltyId(toAccount.getCusLoyaltyId());\n\n\n pointRewardData.setRwdCurrencyId(toRewardCurrency.getRwdCurrencyId());\n\n pointRewardData.setRwdCurrencyName(toRewardCurrency.getRwdCurrencyName());\n\n\n\n // Get the creditRewardQty\n double creditRewardQty = getCreditRewardQty(fromRewardCurrency,toRewardCurrency,rewardQty);\n\n pointRewardData.setRewardQty(creditRewardQty);\n\n pointRewardData.setTxnType(TransactionType.TRANSFER_POINT_TO);\n\n\n\n pointRewardData.setTxnLocation(toAccount.getCusLocation());\n\n pointRewardData.setTxnDate(new Date(new java.util.Date().getTime()));\n\n pointRewardData.setExpiryDt(getExpiryDateForPoints(transferPointSetting));\n\n\n // Check if tierAffected field is set\n if ( transferPointSetting.getTpsIsTierAffected() == IndicatorStatus.YES ) {\n\n pointRewardData.setAddToAccumulatedBalance(true);\n\n } else{\n\n pointRewardData.setAddToAccumulatedBalance(false);\n\n }\n\n\n // Return the object\n return pointRewardData;\n }", "public static void main(String[] args) {\n\t\tMap<String, Object> testMap = new HashMap<>();\n\t\ttestMap.put(\"userAccount\", \"10000\");\n\t\ttestMap.put(\"where\", \"1=1 and Mobile='15507599162'\");\n\t\ttestMap.put(\"pageIndex\", 0);\n\t\ttestMap.put(\"pageSize\", 10);\n\t\ttestMap.put(\"orderBy\", \"\");\n\t\ttestMap.put(\"cardId\", \"desc\");\n\t\tOpenApiClient apiClient = new OpenApiClient(\"C2549D33134942FB94E936205AA57AA8\", \"I0AAQY\");\n\t\tJsonObject jsonObject = apiClient.CallHttpPost(\"Get_MembersPagedV2\", testMap);\n\n\n\t\tint status = jsonObject.get(\"status\").getAsInt();\n\t\tJsonArray array = jsonObject.get(\"data\").getAsJsonArray();\n\t\tfor(int i=0; i<array.size(); i++){\n\t\t\tSystem.out.println(\" i = \" + i + \" value = \" + array.get(i));\n\t\t\tJsonObject object = array.get(i).getAsJsonObject();\n\t\t\tSystem.out.println(\" ---------->> guid = \" + object.get(\"Guid\").getAsString());\n\t\t}\n\n\t\t BigInteger b = new BigInteger(\"-1888832\");\n b = b.abs();\n System.out.println(b.toString());\n BigInteger bs = new BigInteger(\"1888832\");\n bs = bs.abs();\n System.out.println(bs.toString());\n\t\t//System.out.println(getOrderNo());\n\t\tSystem.out.println(getCommonOrderNumber(Const.System_Module_Enum.LogisticsWebSystem,1));\n\t}", "private void lookupUserAccount() {\n String userId = tokens.getString(\"principalID\", \"\");\n String accessToken = tokens.getString(\"authorisationToken\", \"\");\n\n if (!\"\".equals(userId) && !\"\".equals(accessToken)) {\n // Make new json request\n String url = String.format(Constants.APIUrls.lookupUserAccount, userId);\n JsonRequest jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n String email;\n try {\n email = response.getString(\"email\");\n } catch (JSONException ex){\n email = \"unknown\";\n }\n String name;\n try{\n JSONObject nameObject = response.getJSONObject(\"name\");\n String firstName = nameObject.getString(\"givenName\");\n String lastName = nameObject.getString(\"familyName\");\n name = firstName + \" \" + lastName;\n } catch (JSONException ex){\n name = \"unknown\";\n }\n Boolean accountBlocked;\n try{\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n accountBlocked = accountInfo.getBoolean(\"isCircBlocked\");\n } catch (JSONException ex){\n ex.printStackTrace();\n accountBlocked = true;\n }\n String borrowerCategory;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n borrowerCategory = accountInfo.getString(\"borrowerCategory\");\n } catch (JSONException ex){\n borrowerCategory = \"\";\n }\n String userBarcode;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n userBarcode = accountInfo.getString(\"barcode\");\n } catch (JSONException ex){\n userBarcode = \"\";\n }\n tokens.edit().putString(\"name\", name).apply();\n tokens.edit().putString(\"email\", email).apply();\n tokens.edit().putBoolean(\"accountBlocked\", accountBlocked).apply();\n tokens.edit().putString(\"borrowerCategory\", borrowerCategory).apply();\n tokens.edit().putString(\"userBarcode\", userBarcode).apply();\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_ERROR));\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Authorization\", accessToken);\n return headers;\n }\n };\n\n requestQueue.add(jsonRequest);\n\n\n Log.e(TAG, \"user response sent\");\n }\n\n }", "protected String getRequestMessage() {\n NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO();\n nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_MIBFOLLOWUP);\n nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL);\n nbaTXRequest.setBusinessProcess(NbaUtils.getBusinessProcessId(getUser()));\n //create txlife with default request fields\n NbaTXLife nbaTXLife = new NbaTXLife(nbaTXRequest);\n TXLife tXLife = nbaTXLife.getTXLife();\n UserAuthRequestAndTXLifeRequest userAuthRequestAndTXLifeRequest = tXLife.getUserAuthRequestAndTXLifeRequest();\n userAuthRequestAndTXLifeRequest.deleteUserAuthRequest();\n TXLifeRequest tXLifeRequest = userAuthRequestAndTXLifeRequest.getTXLifeRequestAt(0);\n \tnbaTXLife.getTXLife().setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n \tOLifE olife = nbaTXLife.getTXLife().getUserAuthRequestAndTXLifeRequest().getTXLifeRequestAt(0).getOLifE();\n \tolife.setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n\n tXLifeRequest.setPrimaryObjectID(CARRIER_PARTY_1);\n tXLifeRequest.setMaxRecords(getMibFollowUpMaxRecords());\n tXLifeRequest.setStartRecord(getStartRecord().intValue());\n tXLifeRequest.setStartDate(NbaUtils.addDaysToDate(getStartDate(),-1));\n tXLifeRequest.setEndDate(NbaUtils.addDaysToDate(getEndDate(),-1));\n tXLifeRequest.setTestIndicator(getTestIndicator());\n MIBRequest mIBRequest = new MIBRequest();\n tXLifeRequest.setMIBRequest(mIBRequest);\n MIBServiceDescriptor mIBServiceDescriptor = new MIBServiceDescriptor();\n MIBServiceDescriptorOrMIBServiceConfigurationID mIBServiceDescriptorOrMIBServiceConfigurationID = new MIBServiceDescriptorOrMIBServiceConfigurationID();\n mIBServiceDescriptorOrMIBServiceConfigurationID.addMIBServiceDescriptor(mIBServiceDescriptor);\n mIBRequest.setMIBServiceDescriptorOrMIBServiceConfigurationID(mIBServiceDescriptorOrMIBServiceConfigurationID);\n mIBServiceDescriptor.setMIBService(NbaOliConstants.TC_MIBSERVICE_CHECKING);\n OLifE oLifE = tXLifeRequest.getOLifE();\n Party party = new Party();\n oLifE.addParty(party);\n party.setId(CARRIER_PARTY_1);\n party.setPartyTypeCode(NbaOliConstants.OLIX_PARTYTYPE_CORPORATION);\n party.setPersonOrOrganization(new PersonOrOrganization());\n party.getPersonOrOrganization().setOrganization(new Organization());\n Carrier carrier = new Carrier();\n party.setCarrier(carrier);\n carrier.setCarrierCode(getCurrentCarrierCode());\n String responseMessage = nbaTXLife.toXmlString();\n if (getLogger().isDebugEnabled()) {\n getLogger().logDebug(\"TxLife 404 Request Message:\\n \" + responseMessage);\n }\n return responseMessage;\n }", "protected abstract void serializeNodeBody(final Sequence result, final HttpResponse response, final Map<SerializationProperty, String> serializationProperties) throws RestXqServiceException;", "public void setReward(BigDecimal reward) {\n this.reward = reward;\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "public static JSONObject sendRequest(){\n \tJSONObject exchangeRates = null;\n \t \n try {\n \t stream = new URL(BASE_URL + \"?access_key=\" + ACCESS_KEY).openStream();\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(stream, Charset.forName(\"UTF-8\")));\n \t exchangeRates = new JSONObject(streamToString(rd)).getJSONObject(\"rates\");;\n \n }catch(MalformedURLException e) {\n \t e.printStackTrace();\n \t \n }catch (IOException e) {\n \n e.printStackTrace();\n }catch (JSONException e) {\n \n e.printStackTrace();\n } \n\t\treturn exchangeRates;\n \n }", "@Test\n public void destiny2GetCollectibleNodeDetailsTest() {\n Long characterId = null;\n Long collectiblePresentationNodeHash = null;\n Long destinyMembershipId = null;\n Integer membershipType = null;\n List<DestinyDestinyComponentType> components = null;\n InlineResponse20043 response = api.destiny2GetCollectibleNodeDetails(characterId, collectiblePresentationNodeHash, destinyMembershipId, membershipType, components);\n\n // TODO: test validations\n }", "@Override\n public String toString()//to show data\n {\n return \"the balance = \" + balance + \"\\n the account_number = \" + account_number + \"\\n\";\n }", "@Test\n public void toJson_0_1() {\n String walletName = UUID.randomUUID().toString();\n String walletKey = UUID.randomUUID().toString();\n String endpointUrl = \"http://localhost:4000\";\n String verityUrl = \"http://localhost:3000\";\n Context context;\n try(TestWallet testWallet = new TestWallet(walletName, walletKey)) {\n JSONObject config = new JSONObject();\n config.put(\"walletName\", walletName);\n config.put(\"walletKey\", walletKey);\n config.put(\"verityUrl\", verityUrl);\n config.put(\"verityPublicDID\", testWallet.getVerityPublicDID());\n config.put(\"verityPublicVerkey\", testWallet.getVerityPublicVerkey());\n config.put(\"verityPairwiseDID\", testWallet.getVerityPairwiseDID());\n config.put(\"verityPairwiseVerkey\", testWallet.getVerityPairwiseVerkey());\n config.put(\"sdkPairwiseDID\", testWallet.getSdkPairwiseVerkey());\n config.put(\"sdkPairwiseVerkey\", testWallet.getSdkPairwiseVerkey());\n config.put(\"endpointUrl\", endpointUrl);\n context = ContextBuilder.fromJson(config).build();\n assertEqualsJSONObject(withNewKeys(config.put(\"version\", \"0.2\")), context.toJson());\n\n context.closeWallet();\n } catch(Exception e) {\n e.printStackTrace();\n fail();\n }\n }", "@Test\n public void TestUserEntersCoinsSeesValueReturnedwithEject()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse result = vendingController.Post(request);\n assertThat(result.TenderValue, Is.is(25));\n\n }", "private static void TestMetaQ() {\n\t\t\r\n\t\tJSONObject ployInfo = new JSONObject();\r\n//\t\tployInfo = JSONObject.fromObject(\"{'__OP_FLAG__': 'new','__TEMPLATE_ID__': 5800,'expDate': '2017-12-01 00:00:00','relOpers': [{'__OP_FLAG__': 'new','operId': '191000000004'},{'__OP_FLAG__': 'new','operId': '191000000016'}],'relRoles': {'__OP_FLAG__': 'new','roleName': '手机主角色','roleId': '181000000001'},'relRoles_roleName': '手机主角色','relFriendOffers': {'__OP_FLAG__': 'new','offerId': '0'},'relProds': [{'prodId': '390000050347','prodName': '充值送礼活动用户预存','optionType': '0','rowDataId': '0','__OP_FLAG__': 'new','relId': '0'}],'relRegions': [{'regionId': '1','regionName': 'RBOSS营业厅','saleStartTime': '','saleEndTime': '','rowDataId': '5','__OP_FLAG__': 'new','relId': '0'},{'regionId': '2','regionName': '网上营业厅','saleStartTime': '','saleEndTime': '','rowDataId': '6','__OP_FLAG__': 'new','relId': '0'},{'regionId': '18','regionName': '自助终端系统','saleStartTime': '20091231','saleEndTime': '20991231','rowDataId': '12','__OP_FLAG__': 'new','relId': '0'}], 'special': {'__OP_FLAG__': 'new','featureValue': '1001'}, 'name': '校园充值送(2017迎新篇)100元档测试','month': {'__OP_FLAG__': 'new','featureValue': '12'},'effDate': '2017-07-01 00:00:00','bootMessage': {'__OP_FLAG__': 'new','templateContent': ''},'comfirMes': {'__OP_FLAG__': 'new','templateContent': ''},'offerReport': {'__OP_FLAG__': 'new','rptType': '3','acctCode': '5505051','extendAttrB': '3520024','catalogId': '200000000021'},'ifIncludeComb': {'__OP_FLAG__': 'new','extendAttrF': '181000000001','relatProductItemIdName': '流量10元可选包(100M)','relatProductItemId': '350353001404','paramValueName': '移动数据10元档以上套餐','paramValue': '380000021335'},'relPromOfferVas': [],'BOUpOuterPloyH5': [],'': [],'outerSMSPloy': [],'relSKU': [],'BOUpOuterPloyComb': [],'prestoreDivideMoney': {'__OP_FLAG__': 'new','promoType': '1','allotAmount': '10000','allotModeValue': '3','prestoreFee': '10000','bookItemIdOut': '5505051','bookItemIdIn': '5024051','allotScaleName': '8|8|8|8|8|8|8|8|8|8|8|12|','allotScale': '800|800|800|800|800|800|800|800|800|800|800|1200|','divideMonth': '12','validDate': '2017-07-01 00:00:00','promoName': '校园充值送(2017迎新篇)100元档测试','allotBusiCode': '202014001','allotSmsType': '1','allotSmsExpr': '881 '},'deposit': {'__OP_FLAG__': 'new','feeAmount': '10000','prodName': '充值送礼活动用户预存100(元)','accCode': '5505051'},'desc': '校园充值送(2017迎新篇)100元档测试','renewOfferKind1': {'__OP_FLAG__': 'new','relKindName': '1','relKindId': '391000039503'},'renewOfferKind2': {'__OP_FLAG__': 'new','relKindId': '391000039503','relKindName': '1'},'punishFeeY': '100','catalogId': {'__OP_FLAG__': 'new','catalogName': '校园充值送(2017迎新篇)','catalogId': '200000000021','busiDesc': '活动内容:客户预存和包并承诺月最低消费及流量可选包(或为18元及以上档次4G套餐),即可获赠相应金额的和包。赠送和包一次性立即到账,预存和包分12个月返还。每个号码办理1次。','busiRuleDesc': '一、活动规则<br>(一)活动对象:<br>1、本活动仅向全球通、动感地带、神州行三大品牌客户开放(神州行易通卡和初始套装除外)。<br>2、本活动仅向上海移动1-5星客户开放,客户可发送CXXJ到10086查询客户星级。随e行品牌、和多号业务中的副号码、流量无限量套餐客户、新激活不超过6个自然月内的客户不能办理此类活动。<br>3、统付类-家庭畅享计划/和家庭副号码客户,需在主号码授权后方可参加此类活动。<br>4、客户办理此类活动时需状态有效、未停机。后付费客户需先结清所有账单,预付费客户需已激活入网。<br>5、此类活动需做好真实有效实名制登记后方可办理。个人客户凭本人有效真实身份证件原件,经办人凭机主有效身份证件原件和本人有效身份证原件办理;单位客户提供与客户名称一致的企业介绍信(加盖公章),经办人凭本人有效身份证原件,携带有效的企业单位营业执照副本原件办理。<br>6、已办理过充值送礼(含充值送话费、充值送和包电子券、充值送积分等)活动且尚未到期的客户不能办理本活动。<br>(二)办理次数:<br>同一个号码最多可参加1次本活动。<br>(三)预存话费返还与月个人最低消费规则:<br>1、活动办理成功后次月开始生效。预存话费从次月起分月返还,每月5日前到账,活动赠返话费均不能进行通信账户支付。<br>2、若客户通过话费支付方式参加活动,需在办理活动前10天内累计充值达到活动相应预存话费+5元,才可参加活动。客户只有自行预存的话费才可以作为活动预存款,赠返话费均不可作为活动预存款。<br>3、活动设定每月个人最低消费,若协议期内每月未满足当月个人最低消费,则按最低消费金额补足。账单中一级科目“代收费业务费用”不纳入月个人最低消费额度。如参加活动号码是家庭统付主号码,每月承诺的最低消费仅指主号码产生的费用,不包含统付成员费用。<br>4、如参与档次设定每月最低流量可选包档次,客户在协议期间每月使用不低于活动要求的流量可选包档次【18元及以上档次4G资费套餐无需开通】。参与活动时,若客户次月不满足最低流量可选包档次要求的,系统将自动为客户按最低流量可选包档次开通并于活动受理次月生效。协议期间,客户不可转入低档次的流量可选包。<br>5、其他承诺消费类活动的客户与本活动每月个人最低消费金额需叠加。<br>6、参加了家庭营销活动的家庭统付群组中的主、副号码若参加了个人营销活动,除个人需补足其个人营销活动的最低消费外,还需在家庭类活动的最低消费上叠加所有主副号码个人营销活动等额的最低消费对群组进行补足。<br>(四)赠送规则:<br>活动办理成功后,可立即获赠相应的和包电子券。本活动赠送的和包电子券自发放之日起90天内有效,过期不补。和包电子券不可回退、不可转赠、不可转让、不能兑现。<br>(五)其他规则:<br>1、活动成功受理后默认开通手机支付功能(免费)、和生活普通会员(免费)、移动杉德卡(优惠期内免费)。<br>2、此类活动办理后,不可回退,不可变更档次。活动预存话费不可退费,不可资金转移。协议期内,客户不可办理过户、销户、停机保号等业务。<br>3、如办理客户当前品牌具有有效期,则受理后将根据预存金额一次性延长有效期,后续返还话费不再增加有效期。<br>4、如办理客户为家庭统付活动(如畅享计划、和家庭等)的副号码,在家庭统付期间,获赠话费暂无法使用。客户如需使用,可通过“家庭统付副号码话费转赠”业务,每月开账时由系统根据副号码当月实际开账金额,将账户余额中可用于抵扣当月消费的部分结转至主号码账户。<br>5、如参加活动号码是家庭统付主号码,每月承诺的最低消费仅指主号码产生的费用,不包含统付成员费用。<br>'},'relProds4': {'__OP_FLAG__': 'new','prodName': '补足28元','extendName': '补足28元','extendId': '41000043'},'monthFee': {'__OP_FLAG__': 'new','featureValue': '2800'},'directFee': {'__OP_FLAG__': 'new','feeAmount': '10000','prodName': '承诺消费系列活动抵扣预存100(元)'},'__OBJECT_ID__': 20000,'preFeeRuleComb': {'__OP_FLAG__': 'new','paramValue': 100,'effDate': '2017-04-01','expDate': '2099-12-31'},'offerId': 111000307276,'alphaName': 'XYCZS(2017YXP)100YDCS','prestoreExtendId': 12060,'noPrepayBack': '0','type': 'OFFER_PLOY','trademark': '0','offerPlanType': '5','offerType': 'OFFER_PLOY','prodSpecId': '171000000001','isGlobal': '0','smsTamplateChoose': '1'}\");\r\n\t\tployInfo = JSONObject.fromObject(\"{'__OP_FLAG__': 'new','prodSpecId': '171000000001','prodSpecName': 'GSM产品规格','busiType': '1','relRegions': [{'regionId': '0','rowDataId': '0','__OP_FLAG__': 'new','relId': '0'}],'relPlanGroup': { '__OP_FLAG__': 'new','tagName': '后付费4G流量卡','tagId': '130006'},'name': '后付费流量至尊套餐288元档','offerType': 'OFFER_PLAN','payType': '0','tradeMark': '161000000012','offerPlanType': '1','effDate': '2018-01-01 00:00:00','expDate': '2099-12-31 00:00:00','relSameNameProd': {'__OP_FLAG__': 'new','isMain': '0','extendIdName': '后付费流量至尊套餐288元档','extendId': '82700004','upProdItemObject': {'__OP_FLAG__': 'new','type': 'SRVC_SINGLE'},'upPlanProdRel': {'__OP_FLAG__': 'new','extendF': '181000000001'},'relService': {'__OP_FLAG__': 'new','offerGroupId': '270000050001','relType': 'SRVC_SINGLE_PRICE_SERVICE'},'upItemFeature': {'__OP_FLAG__': 'new','featureId': '10000017','featureValue': '1'}},'BossType': {'__OP_FLAG__': 'new','featureValue': '1'},'preOpenLever': {'__OP_FLAG__': 'new','featureValue': '1'},'relRoles': {'__OP_FLAG__': 'new','roleName': '手机主角色','roleId': '181000000001','isMainRole': '1'},'desc': '后付费流量至尊套餐288元档介绍','pointPlan': {'__OP_FLAG__': 'new','featureValue': '1'},'__TEMPLATE_ID__': 666,'relCatalogInfo': [{'catalogId': '250000000003','catalogName': '基本套餐','rowDataId': '1','__OP_FLAG__': 'new','relId': '0'},{'catalogId': '950641000308','catalogName': '基本策划','baseCatalogFlag': '策划销售目录','rowDataId': '2','__OP_FLAG__': 'new','relId': '0'},{'catalogId': '950500000012','catalogName': '个人套餐','rowDataId': '3','__OP_FLAG__': 'new','relId': '0'},{'catalogId': '950641000110','catalogName': '4G套餐','baseCatalogFlag': '策划销售目录','rowDataId': '4','__OP_FLAG__': 'new','relId': '0'},{'catalogId': '950641000111','catalogName': '4G套餐','baseCatalogFlag': '策划销售目录','rowDataId': '5','__OP_FLAG__': 'new','relId': '0'},{'catalogId': '950641000112','catalogName': '4G套餐','baseCatalogFlag': '策划销售目录','rowDataId': '6','__OP_FLAG__': 'new','relId': '0'},{'catalogId': '950641000113','catalogName': '4G套餐','baseCatalogFlag': '策划销售目录','rowDataId': '7','__OP_FLAG__': 'new','relId': '0'}],'refOfferTemp': {'__OP_FLAG__': 'new','isRefOffer': '1','refOfferId': '390000020081','refCondition': '191000000003'},'refOfferName': '后付费4G飞享套餐58元档','entityId': 111000303477,'bootMessage': {'__OP_FLAG__': 'new','templateContent': '入'},'relProds': [{'prodId': '310014001001','prodName': '移动IP17951电话','optionType': '0','rowDataId': '0','__OP_FLAG__': 'new','relId': '0'},{'prodId': '310090106001','prodName': '呼叫等待','optionType': '2','rowDataId': '1','__OP_FLAG__': 'new','relId': '0'},{'prodId': '310090112001','prodName': '国内呼叫转移','optionType': '1','rowDataId': '2','__OP_FLAG__': 'new','relId': '0'},{'prodId': '310090113001','prodName': '国内长话','optionType': '0','rowDataId': '3','__OP_FLAG__': 'new','relId': '0'},{'prodId': '310090116001','prodName': '国内漫游','optionType': '0','rowDataId': '4','__OP_FLAG__': 'new','relId': '0'}],'relOpers': [],'relOffers': [{'offerType': '增值策划','prodSpecName': 'GSM产品规格','relOfferId': '350315001001','relOfferName': 'WLAN标准资费','relType': 'OFFER_PLAN_INCLUDE_OFFER_PLAN','includeType': '1','autoDiscountProdId': '','autoDiscountProdIdName': '','rowDataId': '0','__OP_FLAG__': 'new','relId': '0'},{'offerType': '增值策划','prodSpecName': 'GSM产品规格','relOfferId': '350350005001','relOfferName': '点对点短信息','relType': 'OFFER_PLAN_INCLUDE_OFFER_PLAN','includeType': '1','autoDiscountProdId': '','autoDiscountProdIdName': '','rowDataId': '1','__OP_FLAG__': 'new','relId': '0'},{'offerType': '增值策划','prodSpecName': 'GSM产品规格','relOfferId': '350353001001','relOfferName': '移动数据标准资费','relType': 'OFFER_PLAN_INCLUDE_OFFER_PLAN','includeType': '1','autoDiscountProdId': '','autoDiscountProdIdName': '','rowDataId': '2','__OP_FLAG__': 'new','relId': '0'},{'offerType': '增值策划','prodSpecName': 'GSM产品规格','relOfferId': '350390103001','relOfferName': '主叫显示','relType': 'OFFER_PLAN_INCLUDE_OFFER_PLAN','includeType': '1','autoDiscountProdId': '','autoDiscountProdIdName': '','rowDataId': '3','__OP_FLAG__': 'new','relId': '0'},{'offerType': '增值策划','prodSpecName': 'GSM产品规格','relOfferId': '350390208001','relOfferName': '直拨长途一费制','relType': 'OFFER_PLAN_INCLUDE_OFFER_PLAN','includeType': '0','autoDiscountProdId': '','autoDiscountProdIdName': '','rowDataId': '4','__OP_FLAG__': 'new','relId': '0'},{'offerType': '增值策划','prodSpecName': 'GSM产品规格','relOfferId': '390000000092','relOfferName': '移动数据资费(0.29元/M,满60元1G)','relType': 'OFFER_PLAN_INCLUDE_OFFER_PLAN','includeType': '0','autoDiscountProdId': '','autoDiscountProdIdName': '','rowDataId': '5','__OP_FLAG__': 'new','relId': '0'}],'preStoreLevel': [],'relSKU': [],'relChgOffers': [],'relChgOffersIn': [],'relKinds': [],'upOuterPloy': [],'relNewRpt': {'__OP_FLAG__': 'new','rptType': '6','extendAttrA': '卡类'},'privilege': {'__OP_FLAG__': 'new','privId': '90000003'},'extendName': '后付费流量至尊套餐288元档','extendId': '22000003','__OBJECT_ID__': 10000,'offerId': 111000303477,'alphaName': 'HFFLLZZTC288YD','type': 'OFFER_PLAN'}\");\r\n//\t\t\r\n\t\t\r\n\t\tString offerId = null;\r\n\t\tString buss_name = null;\r\n\t\tString main_business_id = null;\r\n\t\t//资费\r\n\t\tString saleStartTime = null; //上架时间\r\n\t\tString saleEndTime = null; //下架时间\r\n\t\tString tagName = null;\t//大类名称\r\n\t\tString tagId = null;\t//大类分组\r\n\t\tString bussdesp = null; //业务介绍\r\n\t\t\r\n\t\tofferId = ployInfo.get(\"offerId\").toString();\r\n\t\tbuss_name = ployInfo.get(\"name\").toString();\r\n\t\t\r\n\t\tbussdesp = ployInfo.get(\"desc\").toString();\r\n\t\t\r\n\t\tif(ployInfo.containsKey(\"relPlanGroup\")){ //大类分组\r\n\t\t\tJSONObject relPlanGroup = ployInfo.getJSONObject(\"relPlanGroup\");\r\n\t\t\ttagName = relPlanGroup.get(\"tagName\").toString();\r\n\t\t\ttagId = relPlanGroup.get(\"tagId\").toString();\r\n\t\t\tif(\"130001\".equals(tagId)){\t\t\t//预付费4G飞享套餐\r\n\t\t\t\tmain_business_id = \"165\";\r\n\t\t\t}else if(\"130002\".equals(tagId)){\t//后付费4G飞享套餐\r\n\t\t\t\tmain_business_id = \"166\";\r\n\t\t\t}else if(\"130003\".equals(tagId)){\t//预付费4G无线上网套餐\r\n\t\t\t\tmain_business_id = \"173\";\r\n\t\t\t}else if(\"130004\".equals(tagId)){\t//后付费4G无线上网套餐\r\n\t\t\t\tmain_business_id = \"174\";\r\n\t\t\t}else if(\"130005\".equals(tagId)){\t//预付费4G流量卡\r\n\t\t\t\tmain_business_id = \"178\";\r\n\t\t\t}else if(\"130006\".equals(tagId)){\t//后付费4G流量卡\r\n\t\t\t\tmain_business_id = \"179\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(ployInfo.containsKey(\"relRegions\")){ //渠道信息,上下架时间\r\n\t\t\tJSONArray relRegions = ployInfo.getJSONArray(\"relRegions\");\r\n\t\t\tfor(int i = 0; i<relRegions.size(); i++){\r\n\t\t\t\tJSONObject term = relRegions.getJSONObject(i);\r\n\t\t\t\tif(\"18\".equals(term.get(\"regionId\"))){ //18-自助终端\r\n\t\t\t\t\tsaleStartTime = term.get(\"saleStartTime\").toString();\r\n\t\t\t\t\tsaleEndTime = term.get(\"saleEndTime\").toString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSimpleDateFormat formatter = new SimpleDateFormat (\"yyyy-MM-dd hh:mm:ss\"); \r\n\t\tString ctime = formatter.format(new Date()); //当前时间\r\n\t\tSystem.out.println(\"当前时间 ---- \" + ctime);\r\n\t\t\r\n\t\tSystem.out.println(\"业务ID = \" + offerId);\r\n\t\tSystem.out.println(\"业务名称 = \" + buss_name);\r\n\t\tSystem.out.println(\"上架时间 = \" + saleStartTime);\r\n\t\tSystem.out.println(\"下架时间 = \" + saleEndTime);\r\n\t\tSystem.out.println(\"业务描述 = \" + bussdesp);\r\n\t\tSystem.out.println(\"大类名称 = \" + tagName);\r\n\t\tSystem.out.println(\"大类分组 = \" + tagId);\r\n\t\tSystem.out.println(\"父类ID = \" + main_business_id);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public abstract int getReward(int initialState, int initialAction);", "protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }", "@GET\n @Path(\"/tree/current-person\")\n @Produces(\"application/x-gedcomx-v1+xml\")\n public Response getCurrentTreePerson() {\n\n String retVal = new String();\n String request = \"https://integration.familysearch.org/platform/tree/current-person\";\n\n try {\n\n //======\n\n URL url = new URL(request);\n try {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setDoInput(true);\n urlConnection.setRequestMethod(\"GET\"); // default\n urlConnection.setRequestProperty(\"Accept\", \"application/x-gedcomx-v1+xml\");\n urlConnection.setRequestProperty(\"Authorization\", \"Bearer \" + gAccessToken);\n urlConnection.setRequestProperty(\"charset\", \"utf-8\");\n urlConnection.setUseCaches(false);\n\n int responseCode = 0;\n\n try {\n\n responseCode = urlConnection.getResponseCode();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(urlConnection.getInputStream()));\n String inputLine;\n StringBuilder response = new StringBuilder();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n retVal = response.toString();\n\n }\n catch (java.io.IOException ioException) {\n // handle ioException...\n retVal = \"Failed opening post outputstream...response code = \" + responseCode + \" Access token = \" + gAccessToken;\n return Response.status(Response.Status.BAD_REQUEST).entity(retVal).build();\n }\n }\n catch (java.io.IOException ioException) {\n // handle ioException...\n retVal = \"Failed opening http connection...\";\n return Response.status(Response.Status.BAD_REQUEST).entity(retVal).build();\n }\n }\n catch (java.net.MalformedURLException urlException) {\n // report bad URL\n retVal = \"Mal-formed URL request...\";\n return Response.status(Response.Status.BAD_REQUEST).entity(retVal).build();\n }\n\n return Response.status(Response.Status.OK).entity(retVal).build();\n\n }", "entities.Torrent.SearchResponse getSearchResponse();", "entities.Torrent.RegistrationResponse getRegistrationResponse();", "@Test\n public void printResponse(){\n when().get(\"http:://34.223.219.142:1212/ords/hr/countries\")\n .body().prettyPrint();\n\n }", "private void toRent() {\n }", "private static ObjectNode createJsonNode(Player player, Reply reply, ChoiceDescriptor choiceDescriptor, QuestionDescriptor questionDescriptor) {\n ObjectNode jsonObject = objectMapper.createObjectNode();\n\n jsonObject.put(\"playerId\", player.getId());\n jsonObject.put(\"type\", TYPE.QUESTION.toString());\n jsonObject.put(\"teamId\", player.getTeamId());\n jsonObject.put(\"gameId\", player.getGameId());\n jsonObject.put(\"name\", player.getName());\n jsonObject.put(\"starttime\", (new Date()).getTime());\n jsonObject.put(\"choice\", choiceDescriptor.getName());\n jsonObject.put(\"question\", questionDescriptor.getName());\n jsonObject.put(\"result\", reply.getResult().getName());\n jsonObject.put(\"times\", reply.getQuestionInstance().getReplies().size());\n if (reply.getResult().getImpact() != null) {\n jsonObject.put(\"impact\", StringEscapeUtils.escapeEcmaScript(reply.getResult().getImpact().getContent()));\n } else {\n jsonObject.put(\"impact\", \"\");\n }\n jsonObject.put(\"logID\", player.getGameModel().getProperties().getLogID());\n return jsonObject;\n }", "@Test\n public void test002() {\n int total = response.extract().path(\"total\");\n\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The search query is: \" + total);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }", "java.lang.String getResponse();", "@Override\n public void onRedBagTip(RewardResult arg0) {\n\n }", "@Test\n\tpublic void moneyTrnasferExcetionAccountNumberWrong() {\n\t\t\n\t\tint accountNumberNotExist = 1820;\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(accountNumberNotExist);\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account not found with Account Number : \");\n\t\tsb.append(accountNumberNotExist);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "public JSONObject getInvoiceForGSTR3BNillRated(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n double taxableAmountInv = 0d;\n double taxableAmountCN = 0d;\n double taxableAmountAdv = 0d;\n double taxableAmountAdvAdjusted = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n JSONObject jSONObject = new JSONObject();\n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n reqParams.put(\"GST3B\", !reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.remove(\"zerorated\");\n List invoiceData = accEntityGstDao.getNillInvoiceDataWithDetailsInSql(reqParams);\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n taxableAmountInv = data[0] != null ? (Double) data[0] : 0;\n count = data[1] != null ? ((BigInteger) data[1]).intValue() : 0;\n }\n\n//\n// /**\n// * Get CN amount\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// List cnData = accEntityGstDao.getNillCNDNWithInvoiceDetailsInSql(reqParams);\n// if (!cnData.isEmpty() && cnData.get(0) != null) {\n// taxableAmountCN = (Double) cnData.get(0);\n// }\n//\n// /**\n// * Get Advance for which invoice not linked yet\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// reqParams.put(\"at\", true);\n// reqParams.remove(\"atadj\");\n// List AdvData = accEntityGstDao.getNillAdvanceDetailsInSql(reqParams);\n// if (!AdvData.isEmpty() && AdvData.get(0) != null) {\n// taxableAmountAdv = (Double) AdvData.get(0);\n// }\n// /**\n// * Get Advance for which invoice isLinked\n// */\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// reqParams.put(\"isGSTINnull\", false);\n// reqParams.put(\"GST3B\", true);\n// reqParams.remove(\"at\");\n// reqParams.put(\"atadj\", true);\n// AdvData = accEntityGstDao.getNillAdvanceDetailsInSql(reqParams);\n// if (!AdvData.isEmpty() && AdvData.get(0) != null) {\n// taxableAmountAdvAdjusted = (Double) AdvData.get(0);\n// }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"Nature of Supplies\", \"e) Non GST outward supplies\");\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv,companyId));\n } else {\n jSONObject = accGSTReportService.getSalesInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "@Test\n public void GetMEthod() {\n\n RestAssured.baseURI = \"http://www.omdbapi.com/\";\n\n RequestSpecification request = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response = request\n\n .when()\n\n .get(\"/?apikey=5148dbc1&s=Harry Potter\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n int responseCode = response.getStatusCode();\n ResponseBody responseBody = response.getBody();\n ArrayList<String> list=new ArrayList<String>();\n\n //System.out.println(response.asString());\n Gson gson=new Gson();\n String json=response.asString();\n Search obj=gson.fromJson(json,Search.class);\n String imdb=\"\";\n for (Element e:obj.Search\n ) {\n String title=e.getTitle();\n if (title.equals(\"Harry Potter and the Sorcerer's Stone\")){\n imdb=e.getimdbID();\n }\n }\n System.out.println(\"imdbID:\"+imdb);\n //http://www.omdbapi.com/?apikey=5148dbc1&i=tt0241527&type=movie\n RequestSpecification request1 = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response1 = request1\n\n .when()\n\n .get(\"/?apikey=5148dbc1&i=\"+imdb+\"&type=movie\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n String json1=response1.asString();\n Movie obj1=gson.fromJson(json1,Movie.class);\n\n System.out.println(\"Title:\" +obj1.getTitle() + \" Year: \" + obj1.getYear()+ \" Released: \"+obj1.getReleased());\n\n System.out.println(\"---------------------\");\n\n\n\n\n\n }", "@Test\n public void contextLoads() throws JSONException {\n\n System.out.println(userService.getMyWallet(\"awdawd\"));\n\n\n }", "private void printAll() {\n\n String infuraAddress = \"70ddb1f89ca9421885b6268e847a459d\";\n dappSmartcontractAddress = \"0x07d55a62b487d61a0b47c2937016f68e4bcec0e9\";\n smartContractGetfunctionAddress = \"0x7355a424\";\n\n CoinNetworkInfo coinNetworkInfo = new CoinNetworkInfo(\n CoinType.ETH,\n EthereumNetworkType.ROPSTEN,\n \"https://ropsten.infura.io/v3/\"+infuraAddress\n );\n\n List<Account> accountList = sBlockchain.getAccountManager()\n .getAccounts(hardwareWallet.getWalletId(), CoinType.ETH, EthereumNetworkType.ROPSTEN);\n\n ethereumService = (EthereumService) CoinServiceFactory.getCoinService(this, coinNetworkInfo);\n\n\n ethereumService.callSmartContractFunction(\n (EthereumAccount) accountList.get(0),\n dappSmartcontractAddress,\n smartContractGetfunctionAddress\n ).setCallback(new ListenableFutureTask.Callback<String>() {\n @Override\n public void onSuccess(String result) { //return hex string\n Log.d(\"SUCCESS TAG\", \"transaction data : \"+result);\n\n getPost(result, accountList);\n\n\n }\n\n @Override\n public void onFailure(@NotNull ExecutionException e) {\n Log.d(\"ERROR TAG #101\",e.toString());\n }\n\n @Override\n public void onCancelled(@NotNull InterruptedException e) {\n Log.d(\"ERROR TAG #102\",e.toString());\n }\n });\n\n\n }", "@Test\n\tpublic void testGetYards() throws UnirestException {\n\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/api/service/getYards\")\n\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t .header(\"Postman-Token\", \"0e777d04-8184-440d-a59e-1e9df67d7543\")\n\t\t\t .asString();\n\t}", "interface RmbtbApi {\n\n\tpublic static final String urlBaseLoc = \"https://www.rmbtb.com/api/secure/\";\n\n\t/**\n\t * Gets useful information about your account Authentication required.\n\t *\n\t * @return JSONObject account details\n\t */\n\tpublic JSONObject getInfo() throws Exception;\n\n\t/**\n\t * Gets your wallet balances Authentication required.\n\t *\n\t * @return JSONObject account balances\n\t */\n\tpublic JSONObject getFunds() throws Exception;\n\n\t/**\n\t * Gets your wallet balances Authentication required.\n\t *\n\t * @return JSONObject account balances\n\t */\n\tpublic JSONObject ticker() throws Exception;\n\n\t/**\n\t * Gets useful market information\n\t *\n\t * @return JSONObject market info\n\t */\n\tpublic JSONArray getOrders() throws Exception;\n\n\t/**\n\t * Adds an order -- double params\n\t *\n\t * @param String\n\t * type bid | ask\n\t * @param double amount the amount to buy/sell\n\t * @param souble\n\t * price the price to buy/sell at\n\t * @return JSONObject containing the Order ID\n\t */\n\tpublic JSONObject addOrder(String type, double amount, double price)\n\t\t\tthrows Exception;\n\n\t/**\n\t * Adds an order -- long integer params\n\t *\n\t * @param String\n\t * type bid | ask\n\t * @param long amount the amount to buy/sell\n\t * @param long price the price to buy/sell at\n\t * @return JSONObject containing the Order ID\n\t */\n\tpublic JSONObject addOrder(String type, long amount, long price)\n\t\t\tthrows Exception;\n\n\t/**\n\t * Cancels an order\n\t *\n\t * @param long orderId the Order ID to cancel\n\t * @return JSONObject containing the Order ID\n\t */\n\tpublic JSONObject cancelOrder(long orderId) throws Exception;\n\n\t/**\n\t * fetches info about an order\n\t *\n\t * @param long orderId the Order ID to cancel\n\t * @return JSONObject of info\n\t */\n\tpublic JSONObject fetchOrder(long orderId) throws Exception;\n\n\t/**\n\t * Gets your 50 most recent trades\n\t *\n\t * @return JSONArray of trades\n\t */\n\tpublic JSONArray getTrades() throws Exception;\n\n\t/**\n\t * returns the most recent market transactions\n\t *\n\t * @return JSONArray of trades\n\t */\n\tpublic JSONArray lastTrades() throws Exception;\n\n\t/**\n\t * returns the market depth\n\t *\n\t * @return JSONObject showing bids and asks\n\t */\n\tpublic JSONObject getDepth() throws Exception;\n\n}", "@Test(description = \"Verify node's update reject request with the same responsible for different matching \"\n + \"node_type+External ID (Negative)\", groups = \"smoke\")\n public void updateRegisteredNodeWithSameResponsibleForDifferentMatchingTest() {\n AccountEntity cameraResponsible = new AccountEntityManager().createAccountEntity();\n Response cameraResponsibleResponse =\n AccountEntityServiceMethods.createAccountEntityRequest(cameraResponsible);\n Integer cameraResponsibleId = getAccountId(cameraResponsibleResponse);\n\n //Create responsible for airsensor\n AccountEntity airsensorResponsible = new AccountEntityManager().createAccountEntity();\n Response airsensorResponsibleResponse =\n AccountEntityServiceMethods.createAccountEntityRequest(airsensorResponsible);\n Integer airsensorResponsibleId = getAccountId(airsensorResponsibleResponse);\n\n //LWA Camera registration\n LightWeightAccount.Node node = createDefaultNode();\n\n LightWeightAccount lwa = createDefaultLightWeightAccount(node)\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getCurrentDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START));\n\n LightWeightAccountServiceMethods.newNodeRegistration(lwa).then().statusCode(200);\n\n //LWA Airsensor registration\n LightWeightAccount.Node node2 = createDefaultNode()\n .setNodeType(\"AIRSENSOR\")\n .setAttributes(new HashMap<String, Object>() {{\n put(\"msisdn\", \"value1\");\n put(\"oem\", \"11\");\n put(\"location\", \"12356\");\n put(\"model\", \"1234\");\n }});\n\n LightWeightAccount lwa2 = createDefaultLightWeightAccount(node2)\n .setResponsibleId(airsensorResponsibleId.toString())\n .setStartDate(DateTimeHelper.getCurrentDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START));\n\n LightWeightAccountServiceMethods.newNodeRegistration(lwa2).then().statusCode(200);\n\n //Update camera with same responsible\n LightWeightAccount lwaCameraUpdated = new LightWeightAccount()\n .setExternalId(lwa.getExternalId())\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getTomorrowDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START))\n .setNode(new LightWeightAccount.Node().setNodeType(node.getNodeType()));\n\n //request rejection check\n LightWeightAccountServiceMethods.updateNodeRegistration(lwaCameraUpdated).then().statusCode(428);\n\n //Update airsensor with new responsible\n LightWeightAccount lwaAirsensorUpdated = new LightWeightAccount()\n .setExternalId(lwa2.getExternalId())\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getTomorrowDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START))\n .setNode(new LightWeightAccount.Node().setNodeType(\"AIRSENSOR\"));\n\n //request rejection check\n LightWeightAccountServiceMethods.updateNodeRegistration(lwaAirsensorUpdated).then().statusCode(200);\n }", "@Test\n public void testSuccessWithDrawSufficientFund() throws IOException, URISyntaxException {\n URI uri = builder.setPath(\"/accounts/1/withdraw/10\").build();\n\n HttpPut request = new HttpPut(uri);\n request.setHeader(\"Content-type\", \"application/json\");\n HttpResponse response = client.execute(request);\n int statusCode = response.getStatusLine().getStatusCode();\n assertTrue(statusCode == 200);\n\n assertTrue(mapper.readValue(EntityUtils.toString(response.getEntity()), AccountDetails.class).getAccountBalance()\n .equals(new BigDecimal(100).setScale(4, RoundingMode.HALF_EVEN)));\n\n }", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "@RequestLine(\"GET /status\")\n Status getNeustarNetworkStatus();", "@Test\n public void create() throws RazorpayException{\n JSONObject request = new JSONObject(\"{\" +\n \"\\\"amount\\\":\\\"100\\\",\" +\n \"\\\"speed\\\":\\\"normal\\\",\" +\n \"\\\"notes\\\":{\\\"notes_key_1\\\":\\\"BeammeupScotty.\\\",\" +\n \"\\\"notes_key_2\\\":\\\"Engage\\\"},\" +\n \"\\\"receipt\\\":\\\"ReceiptNo.31\\\"}\");\n\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 500100,\\n\" +\n \" \\\"receipt\\\": \\\"Receipt No. 31\\\",\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FCXKPFtYfPXJPy\\\",\\n\" +\n \" \\\"notes\\\": [],\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": null\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078866,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\"\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.create(request);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n assertEquals(\"refund\",fetch.get(\"entity\"));\n assertEquals(500100,(int)fetch.get(\"amount\"));\n assertEquals(\"INR\",fetch.get(\"currency\"));\n String createRequest = getHost(Constants.REFUNDS);\n verifySentRequest(true, request.toString(), createRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "@Override\n\t\t\t\t\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\t\t\t\t\tString json = response;\n\t\t\t\t\t\t\t\tLog.d(\"arv\", \"arv\"+json);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Test\n public void atrnTest() {\n assertEquals(\"atrn1\", authResponse.getAtrn());\n }", "com.google.openrtb.OpenRtb.BidResponse getBidresponse();", "public Node getGoal(){\n return goal;\n }", "public JSONObject ReVersCar(String member_no,String remember_token,String getIdx){\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(\"tag\", reserveCar_tag));\n params.add(new BasicNameValuePair(\"member_no\", member_no));\n params.add(new BasicNameValuePair(\"remember_token\", remember_token));\n params.add(new BasicNameValuePair(\"idx\", getIdx));\n JSONObject json = jsonParser.getJSONFromUrl(postOrder, params);\n return json;\n }" ]
[ "0.61826766", "0.5962999", "0.5817008", "0.57038105", "0.5654893", "0.5537359", "0.5443613", "0.54339457", "0.5423826", "0.5358858", "0.53545", "0.5344043", "0.5303979", "0.5292864", "0.529044", "0.52683425", "0.52430516", "0.5211834", "0.5186491", "0.5185468", "0.5176195", "0.514865", "0.5146245", "0.5132946", "0.5131126", "0.51309955", "0.51295567", "0.51267236", "0.5123836", "0.511839", "0.51159954", "0.51031286", "0.51025796", "0.50997066", "0.50920784", "0.5083697", "0.50835705", "0.50736606", "0.5056171", "0.50513554", "0.50443494", "0.50411916", "0.5020915", "0.50090176", "0.5007032", "0.5004839", "0.4993119", "0.49820888", "0.4981095", "0.4969773", "0.49568477", "0.49509364", "0.4947975", "0.49400198", "0.49145174", "0.4911338", "0.4907871", "0.49048692", "0.4900181", "0.48999718", "0.48838028", "0.48798096", "0.4873842", "0.48716724", "0.48716196", "0.48694205", "0.48679695", "0.48664102", "0.48637223", "0.4861189", "0.48606998", "0.4849716", "0.48486575", "0.48409253", "0.48350623", "0.4827325", "0.4824179", "0.4821056", "0.48151636", "0.48071998", "0.47958934", "0.47946027", "0.4793326", "0.4791919", "0.47906536", "0.47834098", "0.4772813", "0.47699556", "0.47679445", "0.4765287", "0.47644737", "0.47598308", "0.47589925", "0.475163", "0.47431925", "0.4742445", "0.47363284", "0.4733181", "0.4730232", "0.47229126" ]
0.79598755
0
Creates a bird object with specified x and y position & specified sizes
public Flappy() { //sets the properties of the bird x = 100; y = 150; yVel = 0; width = 45; height = 32; gravity = 0.5; jDelay = 0; rotate = 0.0; alive = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Ball create(int xpos, int ypos);", "protected GameObject(double x, double y, double xSize, double ySize, ID id) {\n\t\tthis.pos = new Point2D(x, y);\n\t\tthis.body = new Rectangle2D.Double(pos.getX(), pos.getY(), xSize, ySize);\n\t\tthis.id = id;\n\t}", "public Object2D(double xs,double ys,Dimension sizes)\r\n\t{\r\n\t\tx = xs;\r\n\t\ty = ys;\r\n\t\twidth = (int)sizes.getHeight();\r\n\t\theight= (int)sizes.getWidth();\r\n\t}", "Polymorph(int x, int y, int height, int width){\n \t this.x = x;\n \t this.y = y;\n \t this.height = height;\n \t this.width = width;\n }", "public Ball(Binge game, int x, int y, int diameter){\n\t\tsuper(game,x,y);\n\t\tthis.xcenter = x + diameter/2;\n\t\tthis.ycenter = y + diameter/2;\n\t\tthis.diameter = diameter;\n\t\tthis.theball = new Ellipse2D.Double(x,y,diameter,diameter);\n\t}", "public Ball(double x, double y, double diameter, String col)\n\t{\n\t\tthis.xPosition = x;\n\t\tthis.yPosition = y;\n\t\tthis.size = diameter;\n\t\tthis.colour = col;\n\t\tthis.layer = 0;\n\t}", "public BodyPart(int x, int y, int size){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.size = size;\n\t}", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "public Ball(double x, double y, double diameter, String col, int layer)\n\t{\n\t\tthis.xPosition = x;\n\t\tthis.yPosition = y;\n\t\tthis.size = diameter;\n\t\tthis.colour = col;\n\t\tthis.layer = layer;\n\t}", "public Ball(int x, int y, int diameter)\n {\n currentBallX = x;\n currentBallY = y;\n this.diameter = diameter;\n }", "TwoDShape5(double x) {\n width = height = x;\n }", "public World(double width, double height) {\n this.width = width;\n this.height = height;\n\n\n shapes = new Shape[3]; // an array of references (change to non-zero size)\n // Create the actual Shape objects (sub types)\n // ....\n\n shapes[0] = new Line(50,100,50,50, Color.BLUE);\n shapes[1] = new Circle(75,75,30,Color.BLACK);\n shapes[2] = new Rectangle(40,50,40,40,Color.GREEN);\n\n\n }", "public Bomb(int x, int y){\r\n\t\t\r\n\t\t//Bomb image.\r\n\t\tImageIcon bombIMG = new ImageIcon(\"src/sprites/bullet9.png\");\r\n\t\tsetImage(bombIMG.getImage());\r\n\t\t\r\n\t\t//It just so works out that the bombs drop nicely from the alien sprite so no offset is needed.\r\n\t\tsetx(x);\r\n\t\tsety(y);\r\n\t\t\r\n\t}", "private GRect makeBrick(int x, int y) {\r\n\t\treturn new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);\r\n\t}", "public CarrierShape(int x, int y, int deltaX, int deltaY, int width, int height)\n {\n super(x,y,deltaX,deltaY,width,height);\n }", "public Ball(int x, int y, int radius, Color color, int xVelocity, int yVelocity, int xWall, int yWall){\n this.x=x;\n this.y=y;\n this.radius=radius;\n this.color=color;\n this.xVelocity=xVelocity;\n this.yVelocity=yVelocity;\n this.xWall=xWall;\n this.yWall=yWall;\n\n}", "public CarrierShape(int x,int y)\n {\n super(x,y);\n }", "public BuildingBlock(int setX, int setY, int size, int blockId) {\n\n this.blockId = blockId;\n revertColor = GameGrid.GAMEGRID_COLOR;\n createRectangle(setX, setY , size, revertColor);\n double circleAdjuster = size / 2.0;\n circle = new Circle(setX + circleAdjuster, setY + circleAdjuster, circleAdjuster);\n circle.setFill(revertColor);\n gridList.put(blockId, this);\n explosionSound = new AudioClip(getClass().getResource(\"explosion.wav\").toExternalForm());\n }", "public GameObject(int x, int y, int width, int height, int[] velocity){\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.velocity= velocity;\n }", "Box(double w, double h, double d) {\n\n widgh =w;\n height =h;\n depth =d;\n\n}", "Block create(int xpos, int ypos);", "public Asteroid(String textureFileName, float x, float y, int sizeX, int sizeY){\r\n super(textureFileName, x, y, sizeX, sizeY);\r\n rotationNumber = randomRotation();\r\n setRotation(rotationNumber);\r\n getSprite().setOriginCenter();\r\n }", "public Shape(int x, int y, int deltaX, int deltaY, int width, int height) {\n\t\t_x = x;\n\t\t_y = y;\n\t\t_deltaX = deltaX;\n\t\t_deltaY = deltaY;\n\t\t_width = width;\n\t\t_height = height;\n\t}", "public void AddAnimal(float xPos, float yPos)\n {\n Animal newAnimal = new Animal(xPos, yPos, birds.size());\n birds.add(newAnimal);\n }", "public void createObject(float posX, float posY)\n\t{\n\t\tdrawableItems.add(new ObjectItem(posX,posY));\n\t}", "public Ball(double x, double y, int r, java.awt.Color color) {\n this.center = new Point(x, y);\n this.r = r;\n this.color = color;\n this.gameEnvironment = new GameEnvironment();\n }", "public void createNew(int xSize, int ySize, int countOfMines);", "public BodyPart(int xcoord, int ycoord, int tileSize) {\r\n\t\tthis.xcoord = xcoord;\r\n\t\tthis.ycoord = ycoord;\r\n\t\twidth = tileSize;\r\n\t\theight = tileSize;\r\n\t}", "public Bomb(int x, int y) {\n\t\tsuper(x, y);\n\t\tthis.state = new Spawned();\n\t\tthis.visualStatus = new SimpleIntegerProperty(0);\n\t}", "public Mountain(int x, int y, double scale, GWindow window) {\r\n\t\t// Initialize the instance fields\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\toriginaly = bottom;\r\n\t\tthis.window = window;\r\n\t\tthis.scale = scale;\r\n\t\tmountainSize = (int) (this.scale * 100);\r\n\t\tside1 = this.x + mountainSize / 8;\r\n\t\tside2 = this.x + (mountainSize / 8) * 3;\r\n\t\tthis.direction = OUT;\r\n\r\n\t\t// Draw the boat\r\n\t\tthis.draw();\r\n\t}", "public Ball(int x, int y, URL url) \n\t{\n\t\tsuper(x, y, 0, 0, url, false);\n\t}", "public Bomb(int x, int y, String xFunction, String yFunction)\r\n\t{\t\r\n\t\tsuper(x, y, new Image[] { bombImage } , 0, 0, 1000, xFunction, yFunction);\r\n\t\tstartX = x;\r\n\t\tstartY = y;\r\n\t\t\r\n\t\t// Play the bomb sound when a bomb is made\r\n\t\tbombSound = new Sound(\"bomb.wav\");\r\n bombSound.playOnce();\r\n\t}", "public Ninja(int x, int y)\r\n {\r\n super(x, y, 5);\r\n }", "public BlueCrab(int xPos, int yPos, int width, int height, Game game) {\n\t\tsuper(xPos, yPos, width, height, game);\n\t\tthis.life = 3;\n\t\tcreateImage();\n\t\t\n\t}", "void addBrick(int x, int y, int w, int h)\n {\n Brick b = new Brick(this, x, y, w, h);\n sprites.add(b);\n }", "public CarrierShape(int x,int y, int deltaX, int deltaY)\n {\n super(x,y,deltaX,deltaY);\n }", "public SnowmanShape(int x, int y, int width) {\n\t\tsuper(x, y);\n\t\tthis.width = width;\n\t\tUNIT = width/3;\n\t\tfinal double ARM_OFFSET = 5;\n\t\tdouble diameter = UNIT;\n\t\tdouble topLeft = x + ((width / 2) - (UNIT / 2));\n\t\tdouble topTop = y;\n\t\tEllipse2D.Double topBall = \n\t\t\t\tnew Ellipse2D.Double(topLeft, topTop, diameter, diameter);\n\n\t\ttopTop = topTop + diameter;\n\t\tEllipse2D.Double midBall = \n\t\t\t\tnew Ellipse2D.Double(topLeft, topTop, diameter, diameter);\n\t\tPoint2D.Double armLeftStart = new Point2D.Double(topLeft, topTop + (diameter/2));\n\t\tPoint2D.Double armRightStart = new Point2D.Double(topLeft + diameter, topTop + (diameter/2));\n\t\tPoint2D.Double armLeftEnd = new Point2D.Double(x, topTop + (diameter/2) - ARM_OFFSET);\n\t\tPoint2D.Double armRightEnd = new Point2D.Double(x + width, topTop + (diameter/2) - ARM_OFFSET);\n\t\t\n\t\ttopTop = topTop + diameter;\n\t\tEllipse2D.Double botBall = \n\t\t\t\tnew Ellipse2D.Double(topLeft, topTop, diameter, diameter);\n\t\t\n\t\t\n\t\tLine2D.Double armLeft = new Line2D.Double(armLeftStart, armLeftEnd);\n\t\tLine2D.Double armRight = new Line2D.Double(armRightStart, armRightEnd);\n\t\t\n\t\tadd(topBall);\n\t\tadd(midBall);\n\t\tadd(botBall);\n\t\tadd(armLeft);\n\t\tadd(armRight);\n\t\t\n\t}", "public Building (Pixmap image,\n Location3D center,\n Dimension size,\n Sound sound,\n int playerID,\n int health,\n double buildTime) {\n super(image, center, size, sound, playerID, MAXHEALTH, buildTime);\n myRallyPoint = new Location3D(getWorldLocation().getX(), getWorldLocation().getY() + 150, 0);\n \n }", "public Ball(AbstractGame world) {\n super(world);\n innerColor = Color.WHITE;\n myCircle = new Circle(15);\n myCircle.setFill(innerColor);\n myCircle.setCenterX(x);\n myCircle.setCenterY(y);\n myShape = myCircle;\n }", "public Shape(int x, int y, int wid, int ht, Color col, int xSpd, int ySpd)\r\n {\r\n\t\txPos = x;\r\n\t\tyPos = y;\r\n\t\twidth=wid;\r\n\t\theight= ht;\r\n\t\tcolor=col;\r\n\t\txSpeed=xSpd;\r\n\t\tySpeed=ySpd;\r\n\t\t//finish this constructor\r\n }", "public Circle(int x, int y) {\n super(x-5,y-5);\n name = \"Circle\";\n width = 2*5;\n height = 2*5;\n radius = 5;\n }", "private Entity createBoid(Pane pane) {\n Random randGen = new Random();\n double randX = randGen.nextDouble() * pane.getWidth();\n double randY = randGen.nextDouble() * pane.getHeight();\n Entity e = new Entity(randX, randY);\n entities.add(e);\n\n Circle cir = new Circle();\n e.setShape(cir);\n cir.setCenterX(randX);\n cir.setCenterY(randY);\n cir.setRadius(2);\n cir.setFill(Color.rgb(255,255,255));\n pane.getChildren().add(cir);\n return e;\n }", "public Dragon(int x,int y, int size, Color c, String n){\n this.x = x;\n this.y = y;\n this.size = size;\n this.c = c; // You saw nothing.\n health = 50;\n name = n;\n bodyX = x + size * 25;\n bodyY = y + size * 25;\n bodyWidth = size * 60;\n bodyHeight = size * 50;\n }", "public Spider(double x, double y)\n\t{\n\t\tsuper(x, y, \"Res/indaSpider.png\", 2);\n\t\thspd = 0.4;\n\t\tvspd = 0.4;\n\t\tspeed = 0.4;\n\t\timageSpeed = 0.05;\n\t\tdamage = 1;\n\t\talarm = new Alarm(50);\n\t\tshootTimer = new Alarm(200);\n\t\trandom = new Random();\n\t\tclose = false;\n\t}", "GameObject(int x, int y){\n loadSprite();\n this.x = x;\n this.y = y;\n }", "public Ball(Vector2 position) {\n this.position = position;\n build();\n }", "public Absorber(String name, int x, int y, int width, int height) {\n this.name = name;\n this.boundingBoxPosition = new Vect(x,y);\n this.width = width;\n this.height = height;\n this.storedBalls = new LinkedList<Ball>(); //initially has no stored ball\n this.storePosition = new Vect(boundingBoxPosition.x()+this.width-.25,boundingBoxPosition.y()+this.height-.25);\n\n //construct bounding lines\n LineSegment top = new LineSegment(x,y,x+width,y);\n LineSegment left = new LineSegment(x,y,x,y+height);\n LineSegment right = new LineSegment(x+width,y,x+width,y+height);\n LineSegment bottom = new LineSegment(x,y+height,x+width,y+height);\n this.boundaries = new ArrayList<LineSegment>(Arrays.asList(left,right,top,bottom));\n \n instanceUID = NetworkProtocol.getUID();\n }", "public Entity(double x, double y, double width, double height) {\n\t\tsuper(x, y, width, height);\n\t}", "public SnakeGame(Context context, Point size) {\r\n super(context);\r\n\r\n playState = new PlayState();\r\n\r\n // Initialize the drawing objects\r\n mSurfaceHolder = getHolder();\r\n mPaint = new Paint();\r\n\r\n // Call the constructors of our two game objects\r\n gameObjects = new GameObject(context, size);\r\n }", "Item(int x, int y) {\n this.posX = x;\n this.posY = y;\n }", "public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),110,60);\n addObject(new Kid(),300,200);\n addObject(new Sofa(),190,270);\n addObject(new Piano(),275,100);\n }", "public MyShape(Component c, int height, int width, int x, int y) {\n\t\tthis.r = new Rectangle(x, y, width,height);//height and width had to be changed to match the actual objects\n\t\tsetX(x);\n\t\tsetY(y);\n\t\tthis.width = width;\n\t\tthis.height = height;\t\n\n\t}", "public BoxBall(int xPos, int yPos, int ballDiameter, Color ballColor,\n int groundPos1, int groundPos2, int groundPos3, int groundPos4, Canvas drawingCanvas)\n {\n xPosition = xPos; // Initial position\n yPosition = yPos; // Initial position\n color = ballColor;\n diameter = ballDiameter;\n groundPositionX1 = groundPos1;\n groundPositionY1 = groundPos2;\n groundPositionX2 = groundPos3;\n groundPositionY2 = groundPos4;\n canvas = drawingCanvas; \n \n Random aleatorio = new Random();\n int y = aleatorio.nextInt(2);\n if(y == 0){\n ySpeed = -ySpeed;\n }\n int x = aleatorio.nextInt(2);\n if(x == 0){\n xSpeed = -xSpeed;\n }\n }", "public Ground(int x, int y)\n {\n // initialise instance variables\n xleft= x;\n ybottom= y;\n \n }", "public RectangleShape(int xCoord, int yCoord, int widthOfRect, int heightOfRect)\n {\n System.out.println(\"setting x to: \"+ xCoord+\" & setting y to: \"+ yCoord);\n x = xCoord;\n y = yCoord;\n width = widthOfRect;\n height = heightOfRect;\n }", "@Override\r\n\tpublic void create() {\n\t\tsuper.create();\r\n\t\t// Ground\r\n\t\tBodyDef groundBodyDef = new BodyDef();\r\n\t\tgroundBody = world.createBody(groundBodyDef);\r\n\t\tEdgeShape edgeShape = new EdgeShape();\r\n\t\tedgeShape.set(new Vector2(50.0f, 0.0f), new Vector2(50.0f, 0.0f));\r\n\t\tgroundBody.createFixture(edgeShape, 0.0f);\r\n \r\n\t\tcreateFirstGroupShape();\r\n\t\t// the second group\r\n\t\tcreateSecondGroupShape();\r\n\t}", "public void createBalls() {\n // add the required amount of balls according to the levelinfo.\n for (int i = 0; i < this.levelInfo.numberOfBalls(); i++) {\n Ball ball = new Ball(new Point(400, 580), 5, java.awt.Color.WHITE);\n // let the ball know the frame limits.\n ball.updateFrame(this.upper, this.lower, this.right, this.left);\n // let the ball know the collidables.\n ball.setGameEnvironment(this.environment);\n // use the velocity from the velocity list of levelinfo.\n Velocity v = this.levelInfo.initialBallVelocities().get(i);\n ball.setVelocity(v);\n // add the ball to the game.\n ball.addToGame(this);\n // increase the ball counter by 1.\n this.ballCounter.increase(1);\n }\n }", "public Frog(int xIn, int yIn, int frogSizeIn, int frogVelocityXIn)\n\t{\n\t\t// Nothing to do but save the data in the object's data fields.\n\t\tx = xIn;\n\t\ty = yIn;\n\t\tfrogSize = frogSizeIn;\n\t\tfrogVelocityX = frogVelocityXIn;\n\t}", "public Pillar(int x, int y)\n {\n // initialise instance variables\n xleft= x;\n ybottom= y;\n }", "public Stone(int x, int y, int width, int height) {\n\t\tsuper(x, y, width, height);\n\t\t\n\t}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "BoxX(double w, double h, double d) {\n width = w;\n height = h;\n depth = d;\n }", "void spawnEntityAt(String typeName, int x, int y);", "Box(double len){\r\n Height = Width = Depth = len;\r\n\r\n }", "public void AddAnimal(int amount, float xPos, float yPos)\n {\n for (int i = 0; i < amount; i++)\n {\n Animal newAnimal = new Animal(xPos, yPos, birds.size());\n birds.add(newAnimal);\n }\n }", "Box(double h, double w, Double d){\r\n\r\n Height = h;\r\n Width = w;\r\n Depth = d;\r\n }", "public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "private void boxCreator(int[] pos, int width, int height) {\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1]] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height; y++) {\n tiles[pos[0]][y] = Tileset.WALL;\n }\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1] + height] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height + 1; y++) {\n tiles[pos[0] + width][y] = Tileset.WALL;\n }\n for (int y = pos[1] + 1; y < pos[1] + height; y++) {\n for (int x = pos[0] + 1; x < pos[0] + width; x++) {\n tiles[x][y] = Tileset.FLOWER;\n }\n }\n }", "public ComplexSprite(double x, double y, double width, double height) {\r\n\t\tthis.factory = SpriteFactory.getInstance();\r\n\t\tthis.dx = factory.getDX();\r\n\t\tthis.dy = factory.getDY();\r\n\t\tthis.sprites = new ArrayList<>();\r\n\t}", "void createRectangles();", "public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public Entity(Point position, int gridSize) {\n this.position = new Point(position);\n this.gridSize = gridSize;\n direction = UP;\n\n // without this dummy node, rotation does not work properly\n getChildren().add(new Rectangle(gridSize, gridSize, Color.TRANSPARENT));\n\n update();\n }", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "public Bomb(int x, int y, Mouse mouse)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.mouse = mouse;\r\n\t\tdetonated = false;\r\n\t}", "public Entity(int x, int y){\n \t\tlocation = new Point(x,y);\n \t\twidth = 0;\n\t\theight = 0;\n\t\timage = null;\n\t\t\n\t\tvisible = false;\n \t}", "public Brick(int points){\r\n\t\tthis.points = points;\r\n\t\tthis.setSizeX(58);\r\n\t\tthis.setSizeY(this.getSizeX() / 3);\r\n\t}", "public Ball(Point center, int r, GameEnvironment environment) {\n this.center = center;\n this.startingLoc = center;\n this.radius = r;\n this.gameEnvironment = environment;\n }", "public Ball(int x, int y, int radius, Color c, int sp) {\n\t\tsetBounds(x, y, 2 * radius, 2 * radius);\n\t\tdx = sp;\n\t\tdy = -sp;\n\t\tcolor = c;\n\t\t// message = \"\";\n\t}", "public CrocodileBodyView(double positionX, double positionY, double size, double speed) {\n createModel(speed);\n createController();\n setImage(new Image(this.filePath, size, size, true, true));\n setX(positionX);\n setY(positionY);\n }", "public GameObject(int width, int height, Side side) {\r\n\t\tthis.width = width; \r\n\t\tthis.height = height;\r\n\t\tthis.side = side;\r\n\t\tthis.mouseClicked = false; //mouse clicked set to false in default\r\n\t\tthis.diameter = 30; //diameter set to 30 in default\r\n\t\ttimer = 0;//timer set to 0 in default\r\n\t}", "public Shape (int x, int y, Color color)\r\n {\r\n\tthis.x = x;\r\n\tthis.y = y;\r\n\tthis.color = color;\r\n }", "TwoDShape5() {\n width = height = 0.0;\n }", "public Box(int x, int y) {\r\n\t\tsuper(x,y);\r\n\t\tloadImage(\"box.png\");\r\n\t\tgetImageDimensions();\r\n\t}", "@Override\n protected void spawnInWorld(float x, float y, float xVel, float yVel)\n {\n PolygonShape hitbox = new PolygonShape();\n hitbox.setAsBox(3.0F, 1.0F, new Vector2(0, 0), 0);\n \n //Set up body definition - Defines the type of physics body that this is\n BodyDef bodyDef = new BodyDef();\n bodyDef.type = BodyDef.BodyType.DynamicBody;\n bodyDef.position.set(x, y);\n \n //Set up physics body - Defines the actual physics body\n this.physBody = this.world.getPhysWorld().createBody(bodyDef);\n this.physBody.setUserData(this); //Store this object into the body so that it isn't lost\n \n //Set up physics fixture - Defines physical properties\n FixtureDef fixtureDef = new FixtureDef();\n fixtureDef.shape = hitbox;\n fixtureDef.density = 100.0F; //About 1 g/cm^2 (2D), which is the density of water, which is roughly the density of humans.\n fixtureDef.friction = 0.1F; //friction with other objects\n fixtureDef.restitution = 0.1F; //Bouncyness\n \n //Set which collision type this object is\n fixtureDef.filter.categoryBits = COL_SEA_CREATURE;\n //Set which collision types this object collides with\n fixtureDef.filter.maskBits = COL_ALL ^ COL_SEA_PROJECTILE; //Collide with everything except sea creature projectiles\n \n this.physBody.createFixture(fixtureDef);\n \n //Set the linear damping\n this.physBody.setLinearDamping(5F);\n \n //Set the angular damping\n this.physBody.setAngularDamping(2.5F);\n \n //Apply impulse\n this.physBody.applyLinearImpulse(xVel, yVel, x, y, true);\n \n //Dispose of the hitbox shape, which is no longer needed\n hitbox.dispose();\n }", "public static Goodie makeAsBox(float x, float y, float width, float height, String imgName) {\n Goodie g = new Goodie(width, height, imgName);\n g.setBoxPhysics(0, 0, 0, BodyType.StaticBody, false, x, y);\n g.setCollisionsEnabled(true);\n Lol.sGame.mCurrentLevel.addActor(g, 0);\n return g;\n }", "public Bombas(int x,int y) {\n \tsuper(x,y);\n }", "private void constructBody( Vector2 position, float height, float width ) {\n\t\tBodyDef bodyDef = new BodyDef( );\n\t\tbodyDef.type = BodyType.KinematicBody;\n\t\tbodyDef.position.set( position.x * Util.PIXEL_TO_BOX, position.y\n\t\t\t\t* Util.PIXEL_TO_BOX );\n\t\tbody = world.createBody( bodyDef );\n\n\t\tPolygonShape polygon = new PolygonShape( );\n\t\tpolygon.setAsBox( width * Util.PIXEL_TO_BOX, height * Util.PIXEL_TO_BOX );\n\t\tFixtureDef steamFixtureDef = new FixtureDef( );\n\t\tsteamFixtureDef.shape = polygon;\n\t\tsteamFixtureDef.isSensor = true;\n\t\tbody.createFixture( steamFixtureDef );\n\n\t\tpolygon.dispose( );\n\n\t\tbody.setUserData( this );\n\n\t}", "public MineLayer(int height, int width, int bombs) {\n\t\tthis.height = height;\n\t\tthis.width = width;\n\t\tgrid = new int[height][width];\n\t\tbomblocate = new int[bombs];\n\t\t\n\t\tPopulate(bombs);\n\t}", "Oval(int width, int height, int x, int y){\n setWidth(width);\n setHeight(height);\n setX(x);\n setY(y);\n }", "public Asteroid(double xLoc, double yLoc) {\n\t\tsuper(resource.Constants.SPR_ASTEROID);\n\t\tsetX(xLoc);\n\t\tsetY(yLoc);\n\t\tthis.xLoc = xLoc;\n\t\tthis.yLoc = yLoc;\n\t}", "public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }", "public flappyBird(){\n GreenfootImage image = getImage();\n image.scale(image.getWidth(),image.getHeight());\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n \n Player player = new Player();\n Point point0 = new Point();\n Point point1 = new Point();\n Point point2 = new Point();\n Point point3 = new Point();\n Point point4 = new Point();\n Danger danger0 = new Danger();\n Danger danger1 = new Danger();\n addObject(player, getWidth()/2, getHeight()/2);\n \n addObject(point0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point2,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point3,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point4,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n \n addObject(danger0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(danger1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n }", "public Bishop(int x_pos, int y_pos, Color color) {\n\t\tsuper(x_pos, y_pos, color);\n\t}", "public Shape(int x, int y, int deltaX, int deltaY) {\n\t\tthis(x, y, deltaX, deltaY, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public Entity( int x, int y){\n this.x = x;\n this.y = y;\n }", "Box(Box ob)\n\t{\n\t\t//pass object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t\n\t\t\n\t}", "public Shark(int x,int y) {\n\t\tsetImage(new Image(\"/shark.png\"));\n\t\tsetLocationX(x);\n\t\tsetLocationY(y);\n\t}", "public Ship(String name, int size) {\r\n this.name = name;\r\n this.size = size;\r\n this.livesLeft = size;\r\n this.isSunk = false;\r\n }", "Box(Box ob){ //passing object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t}" ]
[ "0.6532229", "0.6485097", "0.6375604", "0.6357875", "0.6305713", "0.61705405", "0.60854983", "0.6046852", "0.60255134", "0.60189307", "0.59713084", "0.58830726", "0.58801097", "0.58747363", "0.5866349", "0.5839597", "0.57529217", "0.5751176", "0.5738883", "0.57373947", "0.5735129", "0.57150716", "0.57139844", "0.5699948", "0.56768376", "0.56559473", "0.5642622", "0.56262755", "0.5616769", "0.5581399", "0.557687", "0.55746096", "0.556884", "0.5543603", "0.55224323", "0.55144376", "0.550881", "0.5504181", "0.5497503", "0.5495071", "0.5493972", "0.54868054", "0.5473227", "0.5473143", "0.5470702", "0.5467784", "0.54669243", "0.545958", "0.545152", "0.54500633", "0.54385185", "0.5429662", "0.54192185", "0.5414837", "0.5414208", "0.5409545", "0.5403797", "0.53773934", "0.53767365", "0.5371401", "0.53510165", "0.53457373", "0.53403527", "0.5330926", "0.53300893", "0.53243005", "0.5322178", "0.53148854", "0.53099376", "0.5308139", "0.530167", "0.5297103", "0.5291331", "0.52907115", "0.5287322", "0.52850246", "0.5284775", "0.5284501", "0.5282868", "0.5281876", "0.52750903", "0.5273644", "0.52726585", "0.52719605", "0.5265941", "0.5260832", "0.5260003", "0.5255493", "0.52441275", "0.52428997", "0.5241217", "0.52362156", "0.52335584", "0.5232428", "0.5226848", "0.52244174", "0.52205527", "0.5216404", "0.5205262", "0.5201733", "0.51969194" ]
0.0
-1
Updates the y velocity of the bird and jump delay
public void act() { yVel += gravity; //Resets the jump delay to when greater than 0 if (jDelay > 0) { jDelay--; } //Sets the vertical velocity and jump delay of the bird after a jump if (alive == true && (Menu.keyPress == KeyEvent.VK_SPACE) && jDelay <= 0) { Menu.keyPress = 0; yVel = -10; jDelay = 10; } y += (int)yVel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void jump(){\n if(onGround)\n y_velocity = -0.45f;\n }", "public void setVelocityY(double y) {\n\t\tvelocity.setY(y);\n\t}", "public void changeDy() {\n this.dyVelocity = -dyVelocity;\n }", "public void moveY(int dir) { velocity.add(PVector.mult(up, speed * dir)); }", "public void setyVelocity(float yVelocity) {\n if (moves) {\n this.yVelocity = yVelocity;\n }\n }", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public void slowDownY() {\n double temp;\n temp = this.getySpeed();\n if (temp > 0.1 || temp < -0.1) {\n temp /= 1.1;\n } else {\n temp = 0;\n }\n this.setySpeed(temp);\n }", "public void update (int dy) {\n y += dy;\n }", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }", "public void up() {dy = -SPEED;}", "public void update() {\n \n // move\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n location.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n \n // decay life\n leftToLive = lifespan - (millis() - birth);\n }", "public void moveBird() {\n\t\t// your code here\n\t\txBird += xVelo;\n\t\tyBird += yVelo;\n\t\t\n\t\tif(gSwitch) {\n\t\t\tyVelo += G;\n\t\t}\n\t\t\n\t\tif (yI >= W_HEIGHT) {\n\t\t\txI = 200; yI = 300;\n\t\t\tgSwitch = false;\n\t\t\txVelo = 0; yVelo = 0;\n\t\t\t}\n\t\t}", "public void move() {\n\t\tdy += acceleration;\n\t\tupdateTail();\n\t\ty += dy;\n\t}", "private void updateJump()\n {\n\t\tif(isJumping && jumpKeyDown)\n\t\t{\n\t\t\tif(ySpeed > maxJumpSpeed)\n\t\t\t{\n\t \t\tySpeed -= jumpIncr;\n\t \t\tSystem.out.println(\" Player.updateJump() : \" + ySpeed);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\n \t\t\t\t\"updateJump() --> maximum jump speed reached : \" + ySpeed);\n\t\t\t\tisJumping = false;\n\t\t\t}\n\t\t}\n\t}", "public void updateYPosition(){\r\n if (centerY + speedY >= 630) {\r\n centerY = 630;\r\n\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }else if(!collide){\r\n\r\n centerY += speedY;\r\n\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n else if((jumped && collide && Keyboard.isKeyPressed (Keyboard.Key.W )&& collidedTop)){\r\n speedY=-20;\r\n centerY +=speedY;\r\n }\r\n }", "public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }", "public void reverseYVelocity() {\n yVelocity = -yVelocity + 50;\n this.normalizeVelocity(this.xVelocity, this.yVelocity);\n }", "public void setVelY(int velY){\r\n\t\tthis.velY = velY;\r\n\t}", "private void jump() {\r\n\t\tvelocity = new Vector(velocity.getX(), 7.0);\r\n\t}", "public void changeVel(double xV, double yV){ \n this.xVel += xV;\n this.yVel += yV;\n }", "public void yDelta(float y_delta)\n {\n super.setY(super.getY() + y_delta);\n }", "public void updateVelocity(double ax, double ay, double timestep){\n\t\tvx = vx + ax * timestep;\n\t vy = vy + ay * timestep;\n\t}", "@Override\n\tpublic void step() {\n\t\tthis.y-= speed;\t\n\t}", "public void moveY(boolean isDown){\n if(isDown){\n this.y += velocity[1];\n } else{\n this.y -= velocity[1];\n }\n }", "protected void calcVelocity()\n\t{}", "public void setVelY(int velY) {\r\n\t\tthis.velY = velY;\r\n\t}", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "@Override\n\tpublic void step() {\n\t\ty += speed;\n\t}", "public void setVelocity(double x, double y) {\n velocity[X] = x;\n velocity[Y] = y;\n //velocity[Z] = z;\n }", "public void setVelocity(double x, double y) {\n getMotion().setVelocity(x, y);\n }", "public void update(){\n\t\ttime += System.currentTimeMillis() - lastTime;\n\t\tlastTime = System.currentTimeMillis();\n\t\t\n\t\t/*fin quando il tempo Ŕ maggiore della velocita incrementa gli indici*/\n\t\tif(time > velocity){\n\t\t\tindex++;\n\t\t\ttime = 0;\n\t\t\tif(index >= animation_frame.length)\n\t\t\t\t{\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t}\n\t}", "public void updatePhysics() {\n ball.setLayoutX(ball.getLayoutX() + velX);\n ball.setLayoutY(ball.getLayoutY() - velY);\n\n velY += accelY;\n velX += accelX;\n }", "public void resetYVel() {\n this.yVel = 0;\n }", "public void moveY() {\n\t\tsetY( getY() + getVy() );\n\t}", "public void update()\n {\n long elapsed = (System.nanoTime()-startTime)/1000000;\n if(elapsed>100)\n {\n hard += 20; // increase difficulty\n score = Dynamics.getPosition();\n startTime = System.nanoTime();\n }\n dx = (int)Dynamics.getVelocityX();\n\n animation.update();\n x += dx;\n if(x < 0){\n x = 0;\n } else if (x+width > GamePanel.WIDTH){\n x = GamePanel.WIDTH-width;\n }\n\n }", "@Override\n\tpublic void tick() {\n\t\tif(levelOver) {\n\t\t\tif(this.getY()+this.getHeight() > flag.getY() + flag.getBounds().getHeight() - 60) {\n\t\t\t\tthis.setVelY(0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ty += velY;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(y > Window.HEIGHT + 2000) {\n\t\t\tif(!played) {\n\t\t\t\tAudioHandler.getMusic(\"theme\").pause();\n\t\t\t\tAudioHandler.getSound(\"died\").play();\n\t\t\t\tplayed = true;\n\t\t\t}\n\t\t\tDrawingCanvas.gameState = GameState.End;\n\t\t\treturn;\n\t\t}\n\n\t\tif(!died) {\n\t\t\t\n\t\t\tif(velX > 0 || KeyBoard.cameraVelX < 0) {\n\t\t\t\tcountRight += 0.5;\n\t\t\t\tif(countRight >= 6) countRight = 0;\n\t\t\t\tfacingRight = true;\n\t\t\t\tfacingLeft = false;\n\t\t\t} else if(velX < 0 || KeyBoard.cameraVelX > 0) {\n\t\t\t\tcountLeft += 0.5;\n\t\t\t\tif(countLeft >= 6) countLeft = 0;\n\t\t\t\tfacingRight = false;\n\t\t\t\tfacingLeft = true;\n\t\t\t} \n\t\t\t\n\t\t//\tSystem.out.println(\"dPressed: \"+KeyBoard.dPressed+\" aPressed: \"+KeyBoard.aPressed);\n\t\t\t\n\t\t\t\n\t\t\tx += velX;\n\t\t\ty += velY;\n\t\t\t\n\t\t\t/*if(!collideCheck()) {\n\t\t\t\tvelY -= accY;\n\t\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\tvelY+=accY;\n\t\t\tcollideCheck();\n\t\t\t\n\t\t\t//if(jumping) velY += accY;\n\t//\t\tif(velX > 0) velX += accX;\n\t//\t\telse if(velX < 0) velX -= accX;\n\t\t\t\n\t\t\tvelY = Window.clamp(80, -30, velY);\n\t\t} else if(died) {\n\t\t\ty += velY;\n\t\t\tvelY += accY;\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}", "public void update(float delta)\n {\n\n x = acceleration.x;\n y = acceleration.y;\n x = x * delta; //to scale by frame rate to keep things smooth\n y = y * delta;\n\n velocity.add(x, y); //sets new velocity\n\n if(velocity.y >350)\n {\n velocity.y = 350;\n //Gdx.app.log(\"Block\", \"MAX SPEED\");\n }\n\n x = velocity.x;\n y = velocity.y;\n x = x * delta;\n y = y * delta;\n\n position.add(x,y); //sets new position\n\n //position.add(velocity.cpy().scl(delta));\n\n rect.set(position.x, position.y, width,height);\n\n if(position.y > gameHeight) //determine if object is still on screen\n {\n isScrolled = true;\n }\n }", "public void update(float delta){\n\t\tposition.add(velocity.cpy().mul(delta));\n\t\tthis.bounds.setPosition(position.x, position.y);\n\t}", "public void jump()\n {\n \ttry {\n \t\tif(!secret)\n \t\t\timg = ImageIO.read(new File(\"FlappyBirdUp.png\"));\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n yVelocity = -8;\n }", "public void jump(){\n if(isOnGround()){\n setDy(0.08f);\n setOnGround(false);\n }\n }", "public static void new_speed( Body body, double t ){\r\n body.currentState.vx = body.currentState.vx + body.currentState.ax * t; // new x velocity\r\n body.currentState.vy = body.currentState.vy + body.currentState.ay * t; // new y velocity\r\n body.currentState.vz = body.currentState.vz + body.currentState.az * t; // new z velocity\r\n }", "@Override\n\tpublic void tick() {\n\t\n\t\t\n\t\tx += velX;\n\t\ty += velY;\n\t\t\n\t\tcollision();\n\t\t\n\t\tif (input.keys[0]) {velY -= accel;}\n\t\tif (input.keys[2]) {velY += accel;}\n\t\tif (!input.keys[0] && !input.keys[2]) {\n\t\t\tif (velY > 0) {\n\t\t\t\tvelY -= deccel;\n\t\t\t} else if (velY < 0) {\n\t\t\t\tvelY += deccel;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (input.keys[1]) {velX -= accel;}\n\t\tif (input.keys[3]) {velX += accel;}\n\t\tif (!input.keys[1] && !input.keys[3]) {\n\t\t\tif (velX > 0) {\n\t\t\t\tvelX -= deccel;\n\t\t\t} else if (velX < 0) {\n\t\t\t\tvelX += deccel;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (velX >= 6) {velX = 6;} else if (velX <= -6) {velX = -6;}\n\t\tif (velY >= 6) {velY = 6;} else if (velY <= -6) {velY = -6;}\n\t\t\n\t\t\n\t\tanim.runAnimation();\n\t}", "@Raw\n protected void setVelocity(double xVelocity, double yVelocity){\n if ( !isValidVelocity(xVelocity, yVelocity)){\n this.velocity.setVelocity(0.0, 0.0);\n }\n else {\n this.velocity.setVelocity(xVelocity, yVelocity);\n }\n }", "public void setYSpeed(int speed){\n ySpeed = speed;\n }", "public void update() {\n //Increments the ticks and tube ticks\n ++ticks;\n ++ticksTubes;\n\n //Once ticksTubes is equal to speed, it is time to add a new tube with\n //random height. ticksTubes is reset to 0\n if (ticksTubes == speed) {\n final int height = FLOOR_OFFSET + 100\n + rnd.nextInt(HEIGHT - 200 - TUBE_APERTURE - FLOOR_OFFSET);\n tubes.add(new Tube(height));\n ticksTubes = 0;\n }\n\n //Iterates through each tube and determines if it is off screen and needs\n //to be removed. Determines if the bird has passed the current tube and \n //increments the score\n final Iterator<Tube> it = tubes.iterator();\n while (it.hasNext()) {\n final Tube tube = it.next();\n tube.position -= FLOOR_SPEED;\n if (tube.position + TUBE_WIDTH < 0.0)\n it.remove();\n if (!tube.passed && tube.position + TUBE_WIDTH < WIDTH / 3\n - BIRD_WIDTH / 2) {\n ++score;\n if (score % 10 == 0) {\n speed -= 5;\n speed = Math.max(speed, 20);\n }\n tube.passed = true;\n }\n }\n\n //Goes through each alive bird and updates its velocity, angle, position\n for (final Bird bird : birds) {\n \n //If bird is dead, go to next bird\n if (bird.dead)\n continue;\n\n //If bird 'flap' is true, adjust the velocity and set to false\n if (bird.flap) {\n bird.velocity = 10;\n bird.flap = false;\n ++bird.flaps;\n }\n\n //Adjust the height by adding the current velocity\n bird.height += bird.velocity;\n //Decrease the velocity\n bird.velocity -= 0.98;\n //Adjust the angle to a limit of 90 degrees\n bird.angle = 3.0 * bird.velocity;\n bird.angle = Math.max(-90.0, Math.min(90.0, bird.angle));\n\n //Make sure bird does not go past the upper bounds of the screen\n if (bird.height > HEIGHT) {\n bird.height = HEIGHT;\n bird.velocity = 0.0;\n bird.angle = -bird.angle;\n }\n\n //If bird hits the floor, kill the bird\n if (bird.height < FLOOR_OFFSET + BIRD_HEIGHT / 2)\n bird.dead = true;\n\n //transforms the bird by rotating it\n final AffineTransform at = new AffineTransform();\n at.translate(WIDTH / 3 - BIRD_HEIGHT / 2, HEIGHT - bird.height);\n at.rotate(-bird.angle / 180.0 * Math.PI, BIRD_WIDTH / 2,\n BIRD_HEIGHT / 2);\n at.translate(0, 52);\n final Shape bounds = new GeneralPath(BOUNDS)\n .createTransformedShape(at);\n \n //Goes through each tube and determines if the top 'cielTube' or bottom\n //'floorTube' hits the bird. If so, the bird dies\n for (final Tube tube : tubes) {\n final Rectangle2D ceilTube = new Rectangle2D.Double(\n tube.position,\n HEIGHT - tube.height - TUBE_APERTURE - TUBE_HEIGHT,\n TUBE_WIDTH, TUBE_HEIGHT);\n final Rectangle2D floorTube = new Rectangle2D.Double(\n tube.position, HEIGHT - tube.height, TUBE_WIDTH,\n TUBE_HEIGHT);\n if (bounds.intersects(ceilTube)\n || bounds.intersects(floorTube)) {\n bird.dead = true;\n break;\n }\n }\n }\n }", "public void inertia_y() {\n if (!isMovingUp && !isMovingDown) {\n if (Math.abs(speedY) < acceleration) speedY = 0;\n else if (speedY < 0) speedY += acceleration;\n else speedY -= acceleration;\n }\n }", "public void setVelocity(double x, double y) {\n velocityX = x;\n velocityY = y;\n }", "public void accelerateYU() {\n double temp;\n temp = this.getySpeed();\n if (temp >= -this.getMaxSpeed()) {\n temp += -this.getMaxSpeed() / 10;\n }\n this.setySpeed(temp);\n\n }", "private void updateBit() {\r\n float frameTime = 10f;\r\n xVel += (xAccel * frameTime);\r\n yVel += (yAccel * frameTime);\r\n\r\n float xS = (xVel / 20) * frameTime; //PROVIDE THE ANGULE OF THE POSITION\r\n float yS = (yVel / 20) * frameTime; // WITH LESS DENOMINADOR THE BALL MOVE IS MORE DIFFICULT\r\n\r\n xPos -= xS;\r\n yPos -= yS;\r\n\r\n if (xPos > xMax) {\r\n xPos = xMax;\r\n } else if (xPos < 0) {\r\n xPos = 0;\r\n }\r\n\r\n if (yPos > yMax) {\r\n yPos = yMax;\r\n } else if (yPos < 0) {\r\n yPos = 0;\r\n }\r\n\r\n\r\n }", "@Override\n public void update(float deltaTime) {\n this.lastPosition.set(this.position.x, this.position.y, this.position.z);\n\n this.velocity.x -= (K_M * this.velocity.x) * deltaTime;\n this.velocity.y -= (K_M * this.velocity.y) * deltaTime;\n this.velocity.z -= (K_M * this.velocity.z + GRAVITY) * deltaTime;\n\n // update position\n if (this.position.z > 0) {\n this.velocity.add(0, 0, -GRAVITY);\n }\n\n this.velocity.scl(deltaTime);\n this.position.add(this.velocity.x, this.velocity.y, this.velocity.z);\n if (this.position.z < 0) { // ball bounces on floor\n this.velocity.z = -this.velocity.z;\n this.position.z += this.velocity.z;\n\n if (this.velocity.z > 0.9f) {\n this.bounce.play(0.2f);\n }\n\n this.velocity.z -= this.velocity.z / 4;\n this.velocity.x -= this.velocity.x / 32;\n this.velocity.y -= this.velocity.y / 32;\n }\n this.velocity.scl(1 / deltaTime);\n }", "@Override\n public void update() {\n y += velY;\n setRectHitBox();\n }", "public abstract void update(float dt);", "public abstract void update(float dt);", "public abstract void update(float dt);", "public void setY_vel(double setYVel) {\n this.y_vel = setYVel;\n }", "public void moveY(double y) {\n this.y += y;\n }", "public void update(){\n if (boatStats.getSpeed() > 0){\n boatStats.setSpeed(boatStats.getSpeed() - boatStats.getDeceleration());\n boatPosition.setPosY(boatPosition.getPosY() + boatStats.getSpeed());\n } else {\n boatStats.setSpeed(0);\n }\n }", "void setVelocity(int vel) {\n\t\tthis.velocity = vel;\n\t}", "public void jump(int dyIn)\n\t{\n\t\ty = y - dY;\n\t}", "public void setVelocity(double dx, double dy) {\n this.v = new Velocity(dx, dy);\n }", "public void setVelocity(float x, float y)\n\t{\n\t\tthis.vel.x = x;\n\t\tthis.vel.y = y;\n\t}", "public void update(){\n posX += velX;\n posY += velY;\n }", "public void addVelocity(double x, double y) {\n velocityX += x;\n velocityY += y;\n }", "void moveY(float y) {\n _y += y;\n }", "public void setVelocity(double dx, double dy) {\n this.velocity = new Velocity(dx, dy);\n }", "public void setVelocity(double dx, double dy) {\n this.velocity = new Velocity(dx, dy);\n }", "public void update(){\n\t\tx+=xspeed; \n\t\ty+=yspeed;\t\n\t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public void moveY(){\n\t\tfor(int i = 0; i < level.solids.size(); i++){\n\t\t\tBlock solid = level.solids.get(i);\n\t\t\tif(solid != this && isColliding(solid, x, y)){\n\t\t\t\tif(solid.type.equals(\"Projectile\") && this.type.equals(\"Projectile\")){\n\t\t\t\t\tPlayer parent = ((Projectile)this).parent;\n\t\t\t\t\tPlayer other = ((Projectile)solid).parent;\n\n\t\t\t\t\tif(parent != other){\n\t\t\t\t\t\tstun(parent);\n\t\t\t\t\t\tstun(other);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint clangTemp = Gameplay.random.nextInt(8) + 1;\n\t\t\t\t\tif(clangTemp <= 4){\n\t\t\t\t\t\tparent.clang1.play();\n\t\t\t\t\t}\n\t\t\t\t\telse if(clangTemp >= 5 && clangTemp <= 6){\n\t\t\t\t\t\tparent.clang2.play();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tparent.clang3.play();\n\t\t\t\t\t}\n\n\t\t\t\t\tlevel.solids.remove(this);\n\t\t\t\t\tlevel.solids.remove(solid);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(solid.type.equals(\"Hitbox\")){\n\t\t\t\t\tif(solid != parent.hitbox){\n\t\t\t\t\t\tdouble dist = Math.abs(solid.y - this.y);\n\t\t\t\t\t\tfor(int n = 1; n <= dist && !isColliding(solid, x, y + Math.signum(velY)) && Math.signum(velY) != 0; n++){\n\t\t\t\t\t\t\ty += Math.signum(velY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trelativeY += velY;\n\t\tvelY += accelY;\n\t\ty = (float) (parent.y + parent.hitbox.height / 2.0 + relativeY); //start it at the center of the player's hitbox, then move to its relative x\n\t}", "public void setVelocity(double dx, double dy) {\r\n this.vel = new Velocity(dx, dy);\r\n }", "public void update(){\n velX *= damp;\n velY *= damp;\n posX += velX;\n posY += velY;\n }", "public void translateY(float y) {\n if (collides((int) x, (int) (this.y + y))) return;\n this.y += y;\n this.model.setY(this.y);\n }", "public void setVelocity(double dx, double dy) {\r\n this.v.setVelocity(dx, dy);\r\n }", "public void flap(){\n bird.setY(bird.getY() - 6);\n }", "public void accelerateYD() {\n double temp;\n temp = this.getySpeed();\n if (temp <= this.getMaxSpeed()) {\n temp += this.getMaxSpeed() / 10;\n }\n this.setySpeed(temp);\n\n }", "public static void applyGravity() {\n\n\t\tfor (Ball b : Panel.balls) {\n\t\t\tb.setyVelocity(b.getyVelocity() + 2);\n\t\t}\n\t}", "public void moveBall()\n\t{\n\t\tx -= vx;\n\t\ty += vy;\n\t}", "public void moveJump() {\n\t\t// getSpeed().setY(-getClimbPertTick());\n\t\t// setJumpTTL(getJumpTTL() - 1);\n\n\t}", "public void updateVelocity() {\n \t// Step 1: input power and convert the power to a force based on the starting velocity\n \tsetWeight();\n \tdouble trainMass = trainWeight*KG_PER_POUND;\n \t\n \t// this is ensuring that we never get a negative speed\n \tif (this.currentSpeed == 0) {\n \t\tthis.force = (this.powerIn)/1;\n \t} else {\n \t\tthis.force = (this.powerIn)/this.currentSpeed;\n \t}\n \tsetGrade();\n \t\n \t// Step 2: Calculate the slope of the train's current angle (Degrees = Tan-1 (Slope Percent/100))\n \tthis.slope = Math.atan2(this.grade,100);\n \tdouble angle = Math.toDegrees(this.slope);\n \t\n \t// Step 3: Calculate the forces acting on the train using the coefficient of friction\n \t// and the train's weight in lbs converted to kg divided over the wheels (where the force is technically\n \t// being applied times gravity (G)\n \tthis.normalForce = (trainMass/this.trainWheels) * G * Math.sin((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n \tthis.downwardForce = (trainMass/this.trainWheels) * G * Math.cos((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n\n \t// compute friction force\n \tthis.friction = (FRICTION_COEFFICIENT * this.downwardForce) + this.normalForce;\n \t\n \t// sum of the forces\n \tthis.totalForce = this.force - this.friction;\n \t \t\n \tthis.force = this.totalForce;\n \t\n \t// Step 4: Calculate acceleration using the F = ma equation, where m = the mass of the body moving\n \tthis.trainAcceleration = this.force/trainMass;\n \t\n \t// and have to check to make sure this acceleration does not exceed our max.\n \tif (this.trainAcceleration >= TRAIN_MAX_ACCELERATION * 1) {\t// time elapsed (one second)\n \t\t// set the acceleration as the max acceleration because we cannot exceed that\n \t\tthis.trainAcceleration = TRAIN_MAX_ACCELERATION * 1;\t// time elapsed (one second)\n \t}\n \t\n\t\temerBrake = this.getEBrake();\n \t// decelerates the train based on the values given in the spec sheet for the emergency brake\n \tif (emerBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_E_BRAKE*1);\n \t}\n \t\n \t// decelerates the train based onthe values given in the spec sheet for the service brake\n \tif(serviceBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_SERVICE_BRAKE*1);\n \t}\n \t\n \t// Step 5: Calculate the final speed by adding the old speed with the acceleration x the time elapsed (one second)\n \tthis.finalSpeed = this.currentSpeed + (this.trainAcceleration * 1);\n \t\n \t// NO NEGATIVE SPEEDS YINZ\n \tif(this.finalSpeed < 0) {\n this.finalSpeed = 0;\n }\n \t\n \t// resetting the current speed based on our calculations\n \tthis.currentSpeed = this.finalSpeed;\n \tthis.distTravelled = this.currentSpeed * 1; // speed times the time between clock ticks = distance travelled\n \t//System.out.println(finalSpeed);\n \t\n \tif(!(currentBlock == this.position.getCurrentBlock())) {\n \t\tmetersIn = 0;\n \t} else {\n \t\tmetersIn += this.distTravelled;\n \t}\n \tthis.position.moveTrain(this.distTravelled); // method call to tell the position class how far to move the train\n \t\n }", "public void update(){\n\t\t\tif (x<200){\n\t\t\t\txmoving=1; \n\t\t\t}\n\t\t\tif (x>900){ \n\t\t\t\txmoving=-.1; \n\t\t\t} \n\n\t\t\tx+=xmoving;\n\n\t}", "private void updateAi() {\n this.paddleL.setY(this.fakeBall.getY() - this.paddleL.getHeight()/2 + this.fakeBall.getHeight()/2);\n\n // Boundary check\n if (this.paddleL.y < 0) {\n this.paddleL.setY(0);\n } else if (this.paddleL.y + this.paddleL.getHeight() > this.getHeight()) {\n this.paddleL.setY(this.getHeight() - this.paddleL.getHeight());\n }\n }", "public void onUpdateTimerTick() {\r\n\t\tx = x+dx;\r\n\t\ty = y+dy;\r\n\t\tgame.updateWorld();\r\n\r\n\t}", "@Override\n public void update(float dt) {\n //bulletUpdate(dt,b2body);\n stateTime += dt;\n bulletUpdate(b2body,bulletSprite1);\n bulletUpdate(b2body2,bulletSprite2);\n bulletUpdate(b2body3,bulletSprite3);\n\n\n\n }", "public void setSpring_damping_ang_y(float spring_damping_ang_y) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 120, spring_damping_ang_y);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 112, spring_damping_ang_y);\n\t\t}\n\t}", "public double getYVel() {\n return this.yVel;\n }", "public void addVelocity(double x, double y) {\n\t\tvelocity.add(x, y);\n\t}", "public final MotionUpdateEvent setY(double y) {\n pos.setY(y);\n return this;\n }", "public void update(double dt, double fX, double fY){\n\n\t\tdouble aX = fX/mass;\n\t\tdouble aY = fY/mass;\n\n\t\tdouble xxNewVel = dt*aX;\n\t\tdouble yyNewVel = dt*aY;\n\n\n\t\txxVel = xxVel + xxNewVel;\n\t\tyyVel = yyVel + yyNewVel;\n\n\t\txxPos += dt*xxNewVel;\n\t\tyyPos += dt*yyNewVel;\n\t}", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "public void move_down() {\n\t\tlocation.setY(location.getY()+y_velocity);\n\t\timage.setTranslateY(location.getY());\n\t}", "public void setSpring_damping_y(float spring_damping_y) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 108, spring_damping_y);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 100, spring_damping_y);\n\t\t}\n\t}", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update(double dt,double fX,double fY){\n\t\tdouble ax = fX/mass;\n\t\tdouble ay = fY/mass; \n\t\txxVel= xxVel + ax * dt;\n\t\tyyVel= yyVel + ay * dt;\n\t\txxPos = xxPos + xxVel * dt;\n\t\tyyPos = yyPos + yyVel * dt; \n\t}", "public void move() {\r\n if (y > HEIGHT)\r\n y = initialY;\r\n y = y + speed;\r\n }", "public void update(float dt) {\n\t\tIterator<Alien> iter = aliens.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tAlien alien = iter.next();\n\t\t\t\n\t\t\talien.setY(alien.getY() + alien.v * dt);\n\t\t\tif(alien.getY() > 480 - alien_size) iter.remove();\n\t\t}\n\t}", "@Basic\n\tpublic double getYVelocity(){\n\t\treturn this.yVelocity;\n\t}", "public void updateVelocity(double lagFactor) {\n\t\tsetVelocitiesToOriginals();\n\t\t\n\t\tif(lagFactor >= 1) {\n\t\t\tvelocityX *= (int) lagFactor;\n\t\t\tvelocityY *= (int) lagFactor;\n\t\t}\n\t}" ]
[ "0.696752", "0.69258744", "0.68889374", "0.66853404", "0.6656453", "0.6640907", "0.6567879", "0.656535", "0.6479058", "0.6436102", "0.64262587", "0.6425999", "0.64200634", "0.6412514", "0.6406407", "0.64063907", "0.63985115", "0.63795775", "0.6363525", "0.63351303", "0.63166744", "0.6313471", "0.63115966", "0.63078004", "0.62266225", "0.62253594", "0.62036204", "0.62003493", "0.6177474", "0.6169362", "0.6168597", "0.61541665", "0.6127184", "0.61082554", "0.6098664", "0.6094382", "0.60752535", "0.6074353", "0.6072763", "0.6072085", "0.6063289", "0.60206276", "0.6013923", "0.60038066", "0.6001928", "0.5999965", "0.59790623", "0.59757197", "0.59747255", "0.5972427", "0.5969869", "0.59623086", "0.5952876", "0.5952876", "0.5952876", "0.5950128", "0.5936426", "0.5935113", "0.59314585", "0.59262943", "0.59165305", "0.5906036", "0.59056073", "0.58930904", "0.5891441", "0.5890959", "0.5890959", "0.5889065", "0.5886192", "0.5883686", "0.5877705", "0.5877545", "0.5875005", "0.58731157", "0.58704305", "0.58695346", "0.586804", "0.58660704", "0.5865217", "0.58570856", "0.5854624", "0.584892", "0.5848087", "0.58447075", "0.583593", "0.5831979", "0.58280206", "0.58210695", "0.58190197", "0.5811792", "0.58043844", "0.5800441", "0.58003896", "0.5782439", "0.5782439", "0.5779571", "0.5773158", "0.5764199", "0.5759499", "0.5754675" ]
0.6928318
1
Sets and updates the image of the bird when in motion
public Picture render() { Picture r = new Picture(); //Creates a new picture r.x = x; r.y = y; //Loads and sets the bird's image if (Bird == null) { Bird = Picture.loadImage("img/bird.png"); } r.image = Bird; rotate = (90 * (yVel + 20) / 20) - 90; rotate = rotate * Math.PI / 180; //Rotates the Bird if (rotate > Math.PI / 2) { rotate = Math.PI / 2; } r.transform = new AffineTransform(); //Creates a new graphical transformation r.transform.translate(x + width / 2, y + height / 2); //Moves the picture r.transform.rotate(rotate); //Rotates the picture r.transform.translate(-width / 2, -height / 2); //Moves the picture return r; //Returns the graphic }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "public void act() {\n setImage(myGif.getCurrentImage());\n }", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}", "private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "@Override\n protected void animateWalking() {\n if (seqIdx > 7) {\n seqIdx = 0;\n }\n if (walking) {\n this.setImage(\"images/bat/bat_\" + seqIdx + FILE_SUFFIX);\n } else {\n this.setImage(\"images/bat/bat_0.png\");\n }\n seqIdx++;\n }", "@Override\n\tpublic void pintar() {\n\t\n\t\tapp.image(water, this.px, this.py);\n\t\t\n\t}", "public flappyBird(){\n GreenfootImage image = getImage();\n image.scale(image.getWidth(),image.getHeight());\n }", "public void imageSwap() {\n GreenfootImage image = (movement.dx < 1) ? leftImage : rightImage;\n setImage(image);\n }", "public void onLivingUpdate()\n {\n this.updateArmSwingProgress();\n float var1 = this.getBrightness(1.0F);\n\n if (var1 > 0.5F)\n {\n this.entityAge += 2;\n }\n\n super.onLivingUpdate();\n }", "@Override\r\n\tpublic void motion() {\r\n\t\tframeCount = frameCount== IMAGE_RATE*getImages().size() ? 1 : frameCount+1; \t//count the frames\r\n\r\n\t\tif(frameCount%IMAGE_RATE == 0 || isDirectionChanged() ) {\r\n\t\t\tsetDirectionChanged(false);\r\n\r\n\t\t\tif(isLeft()) {\r\n\t\t\t\tif(imgIndex < getImages().size()/2)\r\n\t\t\t\t\timgIndex =+ getImages().size()/2;\t\t\t\t\t\t\t\t\t\t\t\t\t//Set left Images [4,5,6,7]\r\n\t\t\t\telse\r\n\t\t\t\t\timgIndex = imgIndex == getImages().size()-1 ? getImages().size()/2 : imgIndex+1; \t//if index == list.size() -1 than index will be list.size()/2\r\n\t\t\t}else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//otherwise it will increment by 1\r\n\t\t\t\tif(imgIndex >= getImages().size()/2) \r\n\t\t\t\t\timgIndex -= 4;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set right Images [0,1,2,3]\r\n\t\t\t\telse\r\n\t\t\t\t\timgIndex = imgIndex == getImages().size()/2 -1 ? 0 : imgIndex+1; \t\t\t\t\t//if index == list.size()/2 -1 than index will be 0\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//otherwise it will increment by 1\r\n\r\n\t\t\tsetImage(getImages().get(imgIndex));\r\n\t\t}\r\n\t}", "public void setImage(VolatileImage back, VolatileImage image, VolatileImage over){\n try{\n backVimImage = back;\n turnedVimImage = image;\n overVimImage = over;\n \n if(IS_TURNED) vimage = turnedVimImage;\n else vimage = backVimImage;\n }\n catch(Exception e){\n System.err.println(\"FUCK!!\");\n }\n this.repaint();\n }", "public void moveBird() {\n\t\t// your code here\n\t\txBird += xVelo;\n\t\tyBird += yVelo;\n\t\t\n\t\tif(gSwitch) {\n\t\t\tyVelo += G;\n\t\t}\n\t\t\n\t\tif (yI >= W_HEIGHT) {\n\t\t\txI = 200; yI = 300;\n\t\t\tgSwitch = false;\n\t\t\txVelo = 0; yVelo = 0;\n\t\t\t}\n\t\t}", "private void update(){\n\n//\t\tif(frameSupplier != null){\n//\n//\t\t\tBufferedImage frame = frameSupplier.getFrame();\n//\n//\t\t\tvideoContainer.setIcon(new ImageIcon(frame));\n//\t\t\tvideoContainer.setText(null);\n//\n//\t\t}\n\n\t\tBufferedImage frame = camera.getImage();\n\t\tvideoContainer.setIcon(new ImageIcon(frame));\n\t\tvideoContainer.setText(null);\n\n\t\tgpioManager.setStatusColour(Color.getHSBColor((System.currentTimeMillis() % 3000) / 3000f, 1, 1));\n\n\t\tgpioManager.setShutterLEDState(System.currentTimeMillis() % 1000 > 500);\n\n\t\tjFrame.repaint();\n\t}", "public void run() {\n sight.setImageBitmap(bmp);\n // old = null;\n }", "@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}", "public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }", "public void flap(){\n bird.setY(bird.getY() - 6);\n }", "public void setActiveImage() {\n\t\tsetGraphic(new ImageView(activePiece));\n\t\tisActiveImageOn = true;\t\t\n\t}", "public void changeState() {\n if (!isDead) {\n Bitmap temp = getBitmap();\n setBitmap(stateBitmap);\n stateBitmap = temp;\n }\n }", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "public void update() {\n\t\tif (MainClass.getPlayer().isJumping()) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(Math.abs(MainClass.getPlayer().getSpeedY()) > Player.getFallspeed() ) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(MainClass.getPlayer().isCovered() == true) {\n\t\t\tcurrentImage = characterCover;\n\t\t} else if(MainClass.getPlayer().isJumping() == false && MainClass.getPlayer().isCovered() == false) {\n\t\t\tcurrentImage = super.getCurrentImage();\n\t\t}\n\t\tthis.update(25);\n\t\n\t}", "private void updateBay(int indx, boolean newState)\n {\t\n \tImageView iv;\n \tif (indx == 0)\n \t\tiv = (ImageView) findViewById(R.id.imageView1);\n \t\telse if (indx == 1)\n \t\t\tiv = (ImageView) findViewById(R.id.imageView2);\n \t\t\telse if (indx ==2)\n \t\t\t\tiv = (ImageView) findViewById(R.id.imageView1);\n \t\t\telse iv = (ImageView) findViewById(R.id.imageView1);\n \t\n \t//ImageButton btn = (ImageButton) findViewById(R.id.bay0000);\n \t//ImageView iv = (ImageView) findViewById(R.id.imageView1);\n \t\n \tif( states[indx] == false && newState == true)\n \t{\n \t//btn.setImageResource(R.drawable.occupied);\n \tiv.setImageResource(R.drawable.occupied);\n \tiv.animate();\n \tstates[indx] = true;\n \t}\n \telse if( states[indx] == true && newState == false)\n \t{\n \t//btn.setImageResource(R.drawable.avail);\n \tiv.setImageResource(R.drawable.avail);\n \tiv.animate();\n \t//iv.\n \tiv.refreshDrawableState();\n \tstates[indx] = false;\n \t}\n \t\n }", "@Override\n\tpublic void draw() {\n\t\tfloat delta = Gdx.graphics.getDeltaTime();\n\t\ti+= delta;\n\t\timage.setRegion(animation.getKeyFrame(i, true));\n\t\t//this.getSpriteBatch().draw(animation.getKeyFrame(i, true), 0, 0);\n\t\t\n\t\tGdx.app.log(\"tag\", \"delta = \" + i);\n\t\t\n\t\tsuper.draw();\n\t}", "protected void setPic() {\n }", "public void updateImage(GameObject.Direction direction) {\n switch (direction) {\n case NORTH:\n currentImage = north;\n break;\n\n case SOUTH:\n currentImage = south;\n break;\n\n case WEST:\n currentImage = west;\n break;\n\n case EAST:\n currentImage = east;\n break;\n }\n }", "@Override\n public Action update() {\n // draws the image \"image\" at position \"this.x\" and \"this.y\" and then returns null\n Thing.getProcessing().image(this.image, this.x, this.y);\n return null;\n }", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }", "protected void animate(GreenfootImage[] images, int currentFrame)\n {\n setImage(images[currentFrame]);\n }", "public void changeDirection(int image){\n this.image = image; \n }", "public void updateValue (BufferedImage bi)\n {\n String text = bi.getWidth()+ \" x \"+ bi.getHeight();\n GreenfootImage tempTextImage = new GreenfootImage (text, 20, Color.RED, null);\n myImage = new GreenfootImage (tempTextImage.getWidth() + 8, tempTextImage.getHeight() + 8); \n myImage.drawImage (tempTextImage, 4, 4);\n\n setImage(myImage);\n }", "public void update(BufferedImage newImg, structs.ScreenRegion frame) {\r\n\t\tfeed.updateImage(newImg, frame);\r\n\t}", "public void updateCam()\r\n {\n \ttry{\r\n \tSystem.out.println();\r\n \tNIVision.IMAQdxGrab(curCam, frame, 1);\r\n \tif(curCam == camCenter){\r\n \t\tNIVision.imaqDrawLineOnImage(frame, frame, NIVision.DrawMode.DRAW_VALUE, new Point(320, 0), new Point(320, 480), 120);\r\n \t}\r\n server.setImage(frame);}\n \tcatch(Exception e){}\r\n }", "public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "private void change_im_val(int boo, ImageView im_obj){\r\n if(boo == 200){ //IMAGEN SI EL VEHICULO ES CORRECTO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img57a.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN VEHICULO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img61a.png\")));\r\n }\r\n }", "public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }", "@Override public BufferedImage getImg(){\n if(jumpState >= 1){\n return jumpingImg;\n }\n else\n return super.getImg();\n}", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "public void setState(boolean isOn, boolean isClicked) {\n\n // YOUR CODE HERE\n \n BufferedImage img0 = ImageIO.read(new File(\"./Icons/Light-0.png\"));\n icon0 = new ImageIcon(img0);\n \n \n \n\n BufferedImage img1 = ImageIO.read(new File(\"./Icons/Light-1.png\"));\n icon1=new ImageIcon(img1);\n \n \n \n\n BufferedImage img2 = ImageIO.read(new File(\"./Icons/Light-2.png\"));\n icon2=new ImageIcon(img2);\n \n \n\n BufferedImage img3 = ImageIO.read(new File(\"./Icons/Light-3.png\"));\n icon3=new ImageIcon(img3);\n \n \n \n\n\n if(isOn == true){\n lbl.setIcon(icon0);\n state = 1; \n }else{ \n lbl.setIcon(icon1);\n state = 0;\n }\n if(isClicked == true){\n //0 means light off\n //1 means light on\n //2 means light on for solution\n //3 means light on for optimal solution\n if(state == 0 ){\n lbl.setIcon(icon0);\n state = 1;\n }\n if(state == 1){\n lbl.setIcon(icon1);\n state = 0; \n }\n if(state == 2 ){\n lbl.setIcon(icon2);\n state = 1;\n }\n if(state == 3){\n lbl.setIcon(icon3);\n state = 1;\n }\n }\n\n }", "public void affiche() {\n\t\tcontroller.image.repaint();\n\t}", "@Override\n public void paint(final Graphics g_) {\n final Graphics2D g2d = (Graphics2D) g_;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g2d.drawImage(BACK_IMAGE, 0, 0, WIDTH, HEIGHT, null);\n\n for (final Tube tube : tubes) {\n g2d.drawImage(TUBE1_IMAGE, (int) tube.position,\n HEIGHT - (int) tube.height - TUBE_APERTURE - TUBE_HEIGHT,\n TUBE_WIDTH, TUBE_HEIGHT, null);\n g2d.drawImage(TUBE2_IMAGE, (int) tube.position,\n HEIGHT - (int) tube.height, TUBE_WIDTH, TUBE_HEIGHT, null);\n }\n\n g2d.drawImage(GROUND_IMAGE,\n -(FLOOR_SPEED * ticks % (WIDTH - FLOOR_WIDTH)),\n HEIGHT - FLOOR_OFFSET, FLOOR_WIDTH, FLOOR_HEIGHT, null);\n\n //Number of birds alive\n int alive = 0;\n final int anim = ticks / 3 % 3;\n \n //For each bird, if not dead increment the number of birds alive\n for (final Bird bird : birds) {\n if (bird.dead)\n continue;\n ++alive;\n \n //Handles rotation of the bird as it moves\n final AffineTransform at = new AffineTransform();\n at.translate(WIDTH / 3 - BIRD_HEIGHT / 3, HEIGHT - bird.height);\n at.rotate(-bird.angle / 180.0 * Math.PI, BIRD_WIDTH / 2,\n BIRD_HEIGHT / 2);\n //Draws the bird\n g2d.drawImage(bird.images[anim], at, null);\n }\n \n \n //Toggle speed\n g2d.setColor(Color.BLACK);\n Font trb = new Font(\"TimesRoman\", Font.BOLD, 18);\n g2d.setFont(trb);\n g2d.drawString(\"Click Mouse to Toggle Speed\", 160, 700);\n \n //Draw number of birds that are alive\n g2d.drawString(\"\" + alive +\"/\"+POPULATION + \" alive\", 470, 50);\n \n //Display fitness\n g2d.drawString(\"Fitness \" + best.genome.fitness + \"/\" + Pool.maxFitness,\n 10, 50);\n \n //Generation\n g2d.drawString(\"Generation \" + Pool.generation, 10, 80);\n \n //Draw score\n g2d.setColor(Color.WHITE);\n trb = new Font(\"TimesRoman\", Font.BOLD, 28);\n g2d.setFont(trb);\n g2d.drawString(\"\" + score, WIDTH/2, 100);\n \n }", "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "@Override\n\tpublic void renderAnimation(RenderEvent event, int x, int y)\n\t{\n\t\t// Update the current frame\n\t\tselectFrame();\n\t\tif (isFinished)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t// Get the actual image\n\t\tBufferedImage img =\n\t\t\t\tGraphicsManager.getResManager().getRes(currFramePath);\n\t\tint imgWidth = this.imgWidth;\n\t\tint imgHeight = this.imgHeight;\n\t\t// Width needs to be scaled\n\t\tif (specialWidth == SpecialDimension.SCALE)\n\t\t{\n\t\t\t// Use both original image dimensions\n\t\t\tif (specialHeight == SpecialDimension.SCALE || specialHeight == SpecialDimension.ORIGINAL)\n\t\t\t{\n\t\t\t\timgWidth = img.getWidth();\n\t\t\t\timgHeight = img.getHeight();\n\t\t\t}\n\t\t\t// Scale only the width\n\t\t\telse\n\t\t\t{\n\t\t\t\timgWidth = imgHeight * img.getWidth() / img.getHeight();\n\t\t\t}\n\t\t}\n\t\t// Height needs to be scaled\n\t\telse if (specialHeight == SpecialDimension.SCALE)\n\t\t{\n\t\t\t// Use both original image dimensions\n\t\t\tif (specialWidth == SpecialDimension.ORIGINAL)\n\t\t\t{\n\t\t\t\t\n\t\t\t\timgWidth = img.getWidth();\n\t\t\t\timgHeight = img.getHeight();\n\t\t\t}\n\t\t\t// Scale only the height\n\t\t\telse\n\t\t\t{\n\t\t\t\timgHeight = imgWidth * img.getHeight() / img.getWidth();\n\t\t\t}\n\t\t}\n\t\t// Use the original image width\n\t\telse if (specialWidth == SpecialDimension.ORIGINAL)\n\t\t{\n\t\t\timgWidth = img.getWidth();\n\t\t\t// Use the original image height\n\t\t\tif (specialHeight == SpecialDimension.ORIGINAL)\n\t\t\t{\n\t\t\t\timgHeight = img.getHeight();\n\t\t\t}\n\t\t}\n\t\t// Use the original image height\n\t\telse if (specialHeight == SpecialDimension.ORIGINAL)\n\t\t{\n\t\t\timgHeight = img.getHeight();\n\t\t}\n//\t\tSystem.out.print(\"Original Width:\");\n//\t\tSystem.out.print(img.getWidth());\n//\t\tSystem.out.print(\", Original Height:\");\n//\t\tSystem.out.println(img.getHeight());\n//\t\t// Print special stuff\n//\t\tSystem.out.print(\"Spec. Width:\" + specialWidth.toString());\n//\t\tSystem.out.println(\", Spec. Height:\" + specialHeight.toString());\n//\t\t// Print calculated dims\n//\t\tSystem.out.print(\"Width:\");\n//\t\tSystem.out.print(imgWidth);\n//\t\tSystem.out.print(\", Height:\");\n//\t\tSystem.out.println(imgHeight);\n\t\t// Reset back to actual image size for testing\n\t\timgWidth = img.getWidth();\n\t\timgHeight = img.getHeight();\n\t\t// Draw the current frame\n\t\tif (centerOverCoords)\n\t\t{\n\t\t\tImageDrawer.drawGraphic(\n\t\t\t\t\tevent.getGC(),\n\t\t\t\t\timg,\n\t\t\t\t\tx-imgWidth/2,\n\t\t\t\t\ty-imgHeight/2,\n\t\t\t\t\timgWidth,\n\t\t\t\t\timgHeight\n\t\t\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tImageDrawer.drawGraphic(\n\t\t\t\t\tevent.getGC(),\n\t\t\t\t\timg,\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\timgWidth,\n\t\t\t\t\timgHeight\n\t\t\t\t\t);\n\t\t}\n\t}", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void setIm(double im) {\r\n this.im = im;\r\n }", "@Override\n public void run() {\n Mat frame = grabFrame();\n // convert and show the frame\n Image imageToShow = FXDIPUtils.mat2Image(frame);\n updateImageView(getCurrentFrame(), imageToShow);\n }", "public void draw() {\n if(gamestate == 0) {\n //The reason we put up two of the backimg is so that it will always cover\n //the whole screen. The backimg has been drawn so that it will line up\n //perfectly when putting two of them side by side\n imageMode(CORNER);\n image(backImg, x, 0);\n image(backImg, x+backImg.width, 0);\n\n //x -= 6 will move the background image 6 pixels to the left (see above, where we\n //use x to place the image). Next iteration of draw, the background image\n //will be placed 6 pixels further to the left, giving the illusion of movement\n x -= 6;\n //vy += 1 increases vy every time draw is called.\n //In other words, we increase how fast the bird drops every time we call\n //draw() (which happens 60 times a second). This is a simulation of gravity\n vy += 1;\n //Increasing y will make the bird appear at a lower point (bird falling)\n //because we always place the bird at x, y. The higher y is, the lower on\n //the screen it will be placed\n y += vy;\n\n //This if sentence checks if we're at the end of our bckimage. If we are,\n //we simply reset where the backimage is drawn.\n if(x == -1800){\n x = 0;\n }\n\n //This draws the two walls. Notice that there's always two walls visible\n //in our game.\n for(int i = 0 ; i < 2; i++) {\n imageMode(CENTER);\n //Places two walls with a space of 200 pixels between them.\n image(wallImg, wx[i], wy[i] - (wallImg.height/2+100));\n image(wallImg, wx[i], wy[i] + (wallImg.height/2+100));\n\n //When one pair of walls goes out of the picture on the left,\n //we create a new pair of walls that start at the right side\n //(wx[i] = width), and with a randomly placed hole\n //(wy[i] = (int)random(200,height-200)).\n if(wx[i] < 0) {\n wy[i] = (int)random(200,height-200);\n wx[i] = width;\n }\n\n //If a wall is at the middle point, it means the bird is about to\n //\"pass\" the wall.\n if(wx[i] == width/2){\n //We add to our score\n score++;\n //and we check if current score is higher than the highScore and set\n //the highScore variable equal to the highest of the variables score\n //and highScore\n highScore = max(score, highScore);\n }\n\n //If we go off the screen, or we hit one of the walls, it's gameOver,\n //and we set gamestate to 1\n if(y>height || y<0 || (abs(width/2-wx[i])<25 && abs(y-wy[i])>100)){\n gamestate=1;\n }\n\n //This moves the pair of walls to the left (just like bckimage)\n wx[i] -= 6;\n }\n\n //We draw the bird. Notice we use y here, which is the variable we change\n //with the help of vy above\n image(birdImg, width/2, y);\n //Prints the text to the screen\n text(\"\"+score, width/2-15, 700);\n }\n //Gamestate is equal to 1, and we're not playing.\n else {\n imageMode(CENTER);\n //startimage is shown\n image(startImg, width/2,height/2);\n //highscore is shown\n text(\"High Score: \"+highScore, 50, width);\n }\n}", "public void makeActive(){\n active = true;\n \n // loads in asset and turns it into bitmaps\n ballBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.ball);\n ballBitmap = Bitmap.createScaledBitmap(ballBitmap,\n bitmapDimensions.width, bitmapDimensions.height, true);\n }", "@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }", "private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame + 1 % (SHEET_H* SHEET_W);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tMat frame = grabFrame();\n\t\t\t\t\t\t// convert and show the frame\n\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\n\t\t\t\t\t\tupdateImageView(imgPanel, imageToShow);\n\t\t\t\t\t}", "public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}", "public void resetBird() { //at object collision i.e. game-over\n\t\tx = 100;\n\t\ty = 100;\t\n\t\tyVel = 0;\n\t\tgravity = 0;\t\n\t\t}", "private void changeToPhotoBurstView(Boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.BURST_SHOOTING);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.setSceneNotificationIndicatorsInvisible(false);\n if (bl == false) return;\n this.startCaptureFeedbackAnimation();\n }", "@Override\n\tvoid update(){\n\n\t\t\tif(Frogger.flag==1){\n\t\t\t\tif(orientation == Orientation.UP) y -= step;\n\t\t\t\telse if (orientation == Orientation.DOWN) y += step;\n\t\t\t\telse if (orientation == Orientation.RIGHT) x += step;\n\t\t\t\telse if (orientation == Orientation.LEFT) x -= step;\n\t\t}\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}", "private void setNote(ImageView image) {\n\n // In order to get dimensions of the screen- will be used for determining bounds of transformation\n Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n // Log.d(LOG_TAG, \"Screen dimensions: \" + width + \", \" + height);\n\n // Getting random point for transformation\n Random rand = new Random();\n float x = rand.nextInt(width - image.getWidth()); // new x coordinate\n float y = rand.nextInt((int) (height)) + height / 2; // new y coordinate\n\n // Setting new coordinates\n image.setX(x);\n image.setY(y);\n // Log.d(LOG_TAG, \"New coordinates \" + x + \", \" + y);\n }", "public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}", "public void setImageView(double x, double y) {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image);\n \tboss.setTranslateX(x);\n \tboss.setTranslateY(y);\n }", "@Override\n\tpublic void draw(){\n\t\tif( HighGui.queryFrame(capture, im) ){\n\t\t\tbackground(70);\n\n\t\t\t// Draw it\n\t\t\timage(PUtils.getPImage(im), 0, 0);\n\n\t\t\tSmoothType type = SmoothType.CV_BLUR;\n\t\t\tif( r.value() != -1) type = SmoothType.values()[(int)r.value()-1];\n\n\t\t\tint size1 = (int)size1_slider.value();\n\t\t\tif( size1%2 == 0 ) size1++;\n\t\t\tint size2 = (int)size2_slider.value();\n\t\t\tif( size2%2 == 0 ) size2++;\n\n\t\t\tImgProc.smooth(im, im_smooth, type, size1, size2, param3_slider.value(), param4_slider.value());\n\t\t\timage(PUtils.getPImage(im_smooth), w, 0);\n\t\t}\n\t}", "public void takePicture() {\n LightMeter lightMeter = new LightMeter(film.getSpeed());\n shutter.setSeconds(lightMeter.getRecommendedSpeed());\n aperture.setSize(lightMeter.getRecommendedAperture());\n shutter.trigger();\n }", "public void animate()\n\t{\n\t\tanimation.read();\n\t}", "public void death(){\n setCoordinate(super.getGameImage().getCoordInit());\n diminueVies();\n super.initAnimation();\n\n }", "public void actualizarFrame(float delta) {\n stateTime += delta;\n switch (estado) {\n case DERECHA:\n aspectoActual = (TextureRegion) animacionDerecha.getKeyFrame(stateTime, false);\n break;\n case IZQUIERDA:\n aspectoActual = (TextureRegion) animacionIzquierda.getKeyFrame(stateTime, false);\n break;\n default:\n aspectoActual = aspectoBasico;\n break;\n }\n }", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "public void act() \n {\n String worldname = getWorld().getClass().getName();\n if (worldname == \"Level0\")\n setImage(new GreenfootImage(\"vibranium.png\"));\n else if (worldname == \"Level1\")\n setImage(rocket.getCurrentImage());\n setLocation(getX()-8, getY()); \n if (getX() == 0) \n {\n getWorld().removeObject(this);\n }\n \n }", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n if (game.hasPlayer(row, column)){\n setImage2(\"images/player.png\");\n } else {\n player = null;\n }\n \n //ImageIcon image = null;//new ImageIcon(\"images/blank.png\");\n JLabel lblImage = new JLabel(); // create a new label to put an image on\n \n // call the method to set a new Buffered image to this panel\n \n if (squareVisible && image == null){\n switch ( terrain )\n {\n case SAND : setImage(\"images/sand.png\"); break;// = new ImageIcon(\"images/sand.png\"); break;\n case FOREST : setImage(\"images/forest.png\"); break;\n case WETLAND : setImage(\"images/wetland.png\"); break;\n case SCRUB : setImage(\"images/scrub.png\"); break;\n case WATER : setImage(\"images/water.png\"); break;\n default : image = null; break;\n }\n }\n \n// this is old code that use to change the graphics, trying BufferedImage instead of IconImage\n// switch ( terrain )\n// {\n// case SAND : setImage(\"images/forest.png\");// = new ImageIcon(\"images/sand.png\"); break;\n// case FOREST : image = new ImageIcon(\"images/forest.png\"); break;\n// case WETLAND : image = new ImageIcon(\"images/wetland.png\"); break;\n// case SCRUB : image = new ImageIcon(\"images/scrub.png\"); break;\n// case WATER : image = new ImageIcon(\"images/water.png\"); break;\n// default : image = null; break;\n// }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column)); \n }\n else {\n lblText.setText(\"\");\n image = null;\n }\n \n // if the game is not being played, remove the activeBorder (this fixes the multiple borders glitch)\n// if (game.getState() != GameState.PLAYING) {\n// setBorder(normalBorder);\n// } \n \n // set the redsquare border to active if the player is here\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n \n\n // add the imageIcon to the gridsquare panel\n //lblImage.setIcon((Icon) image); // add the image to the label\n this.add(lblImage); // add the jlabel image to the current gridsquare\n \n JLabel lblImage2 = new JLabel(); \n this.add(lblImage2);\n \n }", "public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }", "public void set(RenderedImage im) {\n this.im = im;\n ic.set(im);\n }", "public void resetImageToFaceState() {\n String iconPath = Global.IMAGE_PATH;\n switch (game.getFinished()) {\n case 0:\n iconPath += \"face-normal.png\";\n break;\n\n case 1:\n iconPath += \"face-win.png\";\n break;\n\n case 2:\n iconPath += \"face-lose.png\";\n break;\n\n default:\n iconPath += \"face-normal.png\";\n break;\n }\n face.setIcon(new ImageIcon(iconPath));\n }", "private void handleObjectStateChange(GameObject obj){\n ImageView imageView = (ImageView) getNodeById(obj.getObjID());\n if(imageView != null) {\n imageView.setImage(resources.getImage(obj.getClassName(), obj.getState()));\n System.out.println(obj + \" changed state to: \" + obj.getState());\n }\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\timgView.setImageBitmap(pngBM);\n\t\t\t\t\t\t}", "@Override\n public void run() {\n AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();\n frameAnimation.start();\n }", "void lSetImage(Image img);", "public void jump()\n {\n \ttry {\n \t\tif(!secret)\n \t\t\timg = ImageIO.read(new File(\"FlappyBirdUp.png\"));\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n yVelocity = -8;\n }", "public void update(Graphics g) {\n\t\tjava.awt.Image i = image;\n\t\tg.drawImage(i, 0, 0, this);\n\t\t// Graphics gr = this.getGraphics();\n\n\t}", "void setImage(BufferedImage i);", "public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}", "@Override\n\tpublic void update() {\n\n\t\t// Update camera coordinates based off of the width and height.\n\t\tif (cameraStalk != null) {\n\t\t\tint width = dc.getWidth();\n\t\t\tint height = dc.getHeight();\n\n\t\t\tcamera[0] = cameraStalk.coor_x - (width - m.cellWidth) / 2;\n\t\t\tcamera[1] = cameraStalk.coor_y - (height - m.cellHeight) / 2;\n\t\t\tif (camera[0] < 0) {\n\t\t\t\tcamera[0] = 0;\n\t\t\t} else {\n\t\t\t\tint x;\n\t\t\t\tif (camera[0] > (x = m.mapWmax - width + m.cellWidth)) {\n\t\t\t\t\tcamera[0] = x;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (camera[1] < 0) {\n\t\t\t\tcamera[1] = 0;\n\t\t\t} else {\n\t\t\t\tint y;\n\t\t\t\tif (camera[1] > (y = m.mapHmax - height + m.cellHeight)) {\n\t\t\t\t\tcamera[1] = y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Draw in the background.\n\t\tif (background != NullImg.getInstance()) {\n\t\t\tint bg_width = background.getWidth();\n\t\t\tint bg_height = background.getHeight();\n\t\t\t// The offset of the image must decrease as the camera's position\n\t\t\t// increases.\n\t\t\tfor (int x = (-camera[0] % -bg_width); x < dc.getWidth(); x += bg_width) {\n\t\t\t\tfor (int y = (-camera[1] % -bg_height); y < dc\n\t\t\t\t\t\t.getHeight(); y += bg_height) {\n\t\t\t\t\tbackground.drawSlide(x, y, dc);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update all objects.\n\t\tif (update) {\n\t\t\tfor (SimpleObject s = m.getDrawBegin(); s != null; s = s.updateNext) {\n\t\t\t\ts.newUpdate();\n\t\t\t}\n\t\t}\n\n\t\t// Paint all objects.\n\t\tfor (SimpleObject s = m.getDrawBegin(); s != null; s = s.drawNext) {\n\t\t\ts.updateNext = s.drawNext;\n\t\t\ts.i.drawSlide(s.coor_x + s.off[0] - camera[0], s.coor_y + s.off[1]\n\t\t\t\t\t- camera[1], dc);\n\t\t}\n\n\t\t// Update the world object last.\n\t\tswo.update();\n\t\tdc.paint();\n\t}", "@Override\n public void run(){\n store.phaser.arriveAndAwaitAdvance();\n //System.out.println(Thread.currentThread().getName() + \" is started.\");\n for(int y = startLine; y < endLine; y++){\n for(int x = 0; x < store.image.getWidth(); x++){\n Color c = new Color(store.image.getRGB(x, y));\n int grayScale = (int) ((c.getRed() * 0.299) + (c.getGreen() * 0.587) + (c.getBlue() * 0.114));\n Color newColor = new Color(grayScale, grayScale, grayScale);\n store.image.setRGB(x, y, newColor.getRGB());\n }\n }\n store.phaser.arriveAndAwaitAdvance();\n }", "private void updateContPicture(String path) {\n \t\t// don't update if its already correct!\n \t\tif (imgPath == path) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\ttry {\n \t\t\tImage img = ImageIO.read(new File(path));\n \t\t\tif(img==null)\n \t\t\t\tthrow new IOException();\n \t\t\t// scale the image!\n \t\t\tif (img.getWidth(null) > 200 ||\n \t\t\t\t\timg.getHeight(null) > 200) {\n \t\t\t\timg = img.getScaledInstance(200, 200, Image.SCALE_SMOOTH);\n \t\t\t}\n \t\t\t\n \t\t\t// NO IO errors occured if getting here:\n \t\t\tImageIcon imgD = new ImageIcon(img);\n \t\t\timgDisplay.setIcon(imgD);\n \t\t\timgPath = path;\n \t\t} catch (IOException e) {\n \t\t\tSystem.out.println(\"Exception loading image for contestant \" +\n \t\t\t\t\t\"picture [\" + path + \"]\");\n \t\t\timgDisplay.setIcon(null);\n \t\t\timgDisplay.setText(\"Could not load: \" + path);\n \t\t}\n \t\t\n \t}", "public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}", "public void ChangeImage(Image SymImage){\n\n this.imgBackground = SymImage;\n /**\n imwidth = (double) this.imgBackground.getWidth(null);\n oldwidth = 461;\n oldheight = 361;\n */\n }", "@Override\r\n public void paint(Graphics g){\n if(ch.moveCountY == 1 && flag == false){ \r\n flag = true;\r\n animator = new Thread(this);\r\n animator.start();\r\n }\r\n \r\n super.paint(g);\r\n \r\n Graphics2D g2d = (Graphics2D) g;\r\n \r\n if(ch.v == 330){\r\n ch.mainC = img;\r\n }\r\n \r\n if(pos2 < -15){\r\n // g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n b.setBounds(pos2, 0, 995, 610);\r\n \r\n }\r\n \r\n if(pos <= -15){\r\n b.setBounds(pos2, 0, 995, 610);\r\n //g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n \r\n }\r\n \r\n \r\n a.setBounds(pos, 0, 995, 610);\r\n g2d.drawImage(ch.getImage() , ch.getMoveX() , ch.v , null);\r\n g2d.drawImage(obs1.getImage() , obs1.getX() , obs1.getY() , null);\r\n g2d.drawImage(obs2.pic2 , obs2.getX() , obs2.getY() , null);\r\n \r\n }", "public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}", "@Override\n public void run() {\n imgFinger.setImageBitmap(bitmap);\n }", "public void putFrame()\n {\n if (currImage != null)\n {\n super.putFrame(currImage, faceRects, new Scalar(0, 255, 0), 0);\n }\n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif(directY != 0){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\tif(lastDirectX == 1){\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t\t}else{\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(isMove){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 1) * 150, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 4)* 150, 150, 150, 150);\n\t\t\t}\n\t\t}else{\n\t\t\tif(lastDirectX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),0, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 150, 150, 150);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgc.drawImage(hanzoBody, x-55, y-50);\n\t\tgc.drawImage(hanzoLeg, x-55, y-50);\n\t\t//gc.drawImage(hanzoFX, x-55, y-50);\n\t\t\n\t}", "private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tPicture unfiltered = copy(_original_pic);\n\n\t\tint blurFactor = _blur_slider.getValue();\n\t\tdouble brightenFactor = _brightness_slider.getValue();\n\t\tdouble saturateFactor = _saturation_slider.getValue();\n\n\t\tPicture blurredOutput = blur(unfiltered, blurFactor);\n\t\tPicture saturatedOutput = saturate(blurredOutput, saturateFactor);\n\t\tPicture brightenedOutput = brighten(saturatedOutput, brightenFactor);\n\t\tObservablePicture output = brightenedOutput.createObservable();\n\t\t_picture_view.setPicture(output);\n\t}", "public void draw() {\r\n PennDraw.clear();\r\n\r\n for (int i = 0; i < targets.length; i++) {\r\n targets[i].draw();\r\n }\r\n\r\n bird.draw(); \r\n\r\n if (mouseWasPressedLastUpdate) {\r\n bird.drawVelocity();\r\n }\r\n\r\n PennDraw.advance();\r\n }", "private void changeToPhotoIdleView(boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.PREVIEW);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.changeScreenButtonImage(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY, false);\n if (bl) {\n this.mFocusRectangles.clearExceptTouchFocus();\n } else {\n this.mFocusRectangles.onUiComponentRemoved();\n }\n this.mFocusRectangles.onRecordingStop();\n if (this.mCameraDevice.getCameraId() == 0) {\n super.setSceneIndicatorVisibleAllNotificationIndicators(1);\n }\n this.getBaseLayout().showLeftIconContainer();\n this.setOrientation(this.getOrientation());\n }" ]
[ "0.67409706", "0.66639143", "0.6653405", "0.6620958", "0.63784575", "0.6374666", "0.62807685", "0.62759215", "0.624358", "0.6237894", "0.6226056", "0.62218916", "0.62030464", "0.616474", "0.6164669", "0.6124642", "0.6105144", "0.6102239", "0.6082951", "0.6056575", "0.6043315", "0.6038237", "0.60247743", "0.60238", "0.6011901", "0.6011809", "0.6008681", "0.5982969", "0.59800243", "0.5973752", "0.59606314", "0.59561163", "0.5954726", "0.5942963", "0.59402764", "0.5932707", "0.5926511", "0.59121877", "0.5898437", "0.58794504", "0.584315", "0.5824239", "0.58231556", "0.5810076", "0.579485", "0.57824874", "0.57824874", "0.57696724", "0.57575935", "0.57434475", "0.573001", "0.57241964", "0.5722576", "0.57206553", "0.5720409", "0.5720211", "0.5718221", "0.57163507", "0.5715762", "0.57033616", "0.57009506", "0.56975085", "0.56919676", "0.56785107", "0.56723744", "0.56679165", "0.5663033", "0.5655705", "0.56541437", "0.5653705", "0.5648518", "0.56423336", "0.5641883", "0.56356114", "0.56354254", "0.56250125", "0.5618325", "0.56167626", "0.56133205", "0.5609719", "0.5603413", "0.5602641", "0.55954546", "0.55951184", "0.5589515", "0.5579024", "0.55732816", "0.557262", "0.55722934", "0.55662525", "0.5565377", "0.5556644", "0.55508816", "0.55504507", "0.5548056", "0.5547895", "0.55418426", "0.5538269", "0.55349505", "0.55343837" ]
0.5767669
48
==================================================================================================================== Test Case Name: VINDEX ====================================================================================================================
@Test public void vinDex() throws Exception { reportLog("1.0: verify VIN Promo page is loaded "); promoPage.verifyPromoPage(); reportLog("1.1.0: Call Login method"); loginPage = promoPage.clickOnLoginButton(); reportLog("1.1.1: Verify login page is displayed"); loginPage.verifyUserLoginPage(); reportLog("1.1.2: Log in to the Portal "); securityQuestionPage = loginPage.loginInApplication(UserID, UserPswrd); reportLog("1.1.3: Verify Security Question Page displayed"); securityQuestionPage.verifySecurityQuestionPageDisplayed(); reportLog("1.1.4: Enter Security Answer and Login if Security Question Page displayed"); frontPage = securityQuestionPage.enterSecurityAnswerAndLogin(FrontPage.class,SecurityAnswerSecoreIDNumber, SecurityAnswerMothersMaidenName); reportLog("1.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("2.1: Select 'VINdex' from the toolbar"); vindexPage = frontPage.clickOnVindex(); reportLog("2.1.1 Verify VINDEX pop out window is displayed "); parentwin = switchToChildWindow(); vindexPage.verifyVindexWindowDisplayed(Constants.TitleVINDEX); reportLog("2.2: Select the VINdex tab"); vindexPage.clickOnVindex(); // reportLog("4.2 Verify VINdex tab is loaded "); // vindexPage.verifyVindexWindowDisplayed(Constants.TitleVINDEX); reportLog("3.1 Select 'Medical FAQs' link"); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MedicalFaqs); reportLog("3.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("3.2.1: Verify Medical FAQs page is loaded "); multipleWindows = getAllWindowsOpenInUI(); parentWindow = multipleWindows.get(0); mediacalFaqWindow = multipleWindows.get(1); vindexPopOutWindow = multipleWindows.get(2); switchToWindow(parentWindow); switchToWindow(mediacalFaqWindow); switchToWindow(vindexPopOutWindow); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.MedicalFaqs); reportLog("4.1: Select 'Drug Resourc/es' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.DrugResources); reportLog("4.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("4.2.1 Verify Drug Resources page is loaded "); multipleWindows = getAllWindowsOpenInUI(); String parentWindow1 = multipleWindows.get(0); String mediacalFaqWindow = multipleWindows.get(1); String vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.DrugResourcesPageTitle); reportLog("5.1 Select 'Drug Hndbk. VIN (VVDH)' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.DrugHndbk); reportLog("5.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("5.2.1: Verify VIN Veterinary Drug Handbook page is loaded "); multipleWindows = getAllWindowsOpenInUI(); String mediacalFaqWindow1 = multipleWindows.get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.DrugHndbkPageTitle); reportLog("6.1: Select 'Drug Formulary, VIN Exotic' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.DrugFormuLary); reportLog("6.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("6.2.1: Verify VIN Formulary page is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow1 = multipleWindows.get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.DrugFormuLaryPageTitle); reportLog("7.1: Select '20 Years of VIN' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.TwentyYearsOfVin); reportLog("7.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("7.2.1: Verify 20 years of VIN page is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow1 = multipleWindows.get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VIN20YearsPageTitle); reportLog("8.1: Select '3D Learning - IVALA' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ThreeDLearning); reportLog("8.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("8.2.1: Verify 3D Learning IVALA page is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow1 = multipleWindows.get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.threeDLearningPageTitle); reportLog("9.1 Select 'Abbreviations' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.Abbreviation); reportLog("9.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("9.2.1 Common Abbreviations And Acronyms page is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.CommonAbbreviationsAndAcronymsPage); reportLog("10.1: Select 'About This Folder Pages' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.AboutThisFolderLink); reportLog("10.2: Dismiss Alert Notifications if displayed"); frontPage.dismissNotifications(); reportLog("10.2.1: Vet-to-Vet About Pages is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VetToVETAboutPage); reportLog("11.1: Select 'Anatomy in 3D' Link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.anatomyIn3D); reportLog("11.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("11.2.1: Learn anatomy in 3d Pages is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.LearnAnatomyPage); reportLog("12.1: Select 'Anesthesia Protocols' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.anesthesiaLink); reportLog("12.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("12.2.1: Learn anatomy in 3d Pages is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.anesthesiaLinkPage); reportLog("13.1 Select 'Article copies' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ArticleCopies); reportLog("13.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("13.2.1: How do I order the full text of an article? page is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.HowDoOrderFullTextOfAnArticlePage); reportLog("14.1 Select 'Associate' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnAssociateLink(Constants.Associate); reportLog("14.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("14.2 Associate page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.AssociatePage); reportLog("15.1: Select 'BestBETs for Vets' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnAssociateLink(Constants.bestBETs); reportLog("15.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("15.2.1: BestBETs for vets page is loaded"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.bestBETsPage); reportLog("16.1: Select 'BETA.VIN.COM' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnAssociateLink(Constants.betaVINLink); reportLog("16.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("16.2.1: BestBETs for vets page is loaded"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.pageTitle_FrontPage); reportLog("17.1: Select 'VIN Video Tips' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnAssociateLink(Constants.VinVideoTips); reportLog("17.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("17.2.1: BestBETs for vets page is loaded"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VinVideoTipsPage); reportLog("18.1 Select 'Books' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.BookLink); reportLog("18.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("18.2.1 Books & Manuals page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.BookAndManualsLibraryPage); reportLog("19.1 Select 'VIN Store' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VinStoreLink); reportLog("19.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("19.2.1 VIN Book store is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VinBookstorePage); reportLog("20.1 Select 'Calculators/Conversions' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.CalculatorLink); reportLog("20.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("20.2.1 Calculators page is loaded "); multipleWindows = getAllWindowsOpenInUI(); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyCalculatorPage(); reportLog("21.1 Select 'Cases: Challenging & Fun' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.CasesChallenging_FunLink); reportLog("21.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("21.2.1 Avian & Exotics page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.Avian_ExoticsPage); reportLog("22.1 Select 'CE' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.CE); reportLog("22.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("22.2.1 Continual Education page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.ContinualEducationPage); reportLog("23.1 Select 'Classified Ads' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ClassifiedAds); reportLog("23.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("23.2.1 VETQuest Classified page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VetQuestClassifiedsPage); reportLog("24.1 Select 'Client Education' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ClientEducation); reportLog("24.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("24.2.1 Forms and Handouts page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.FormsHandoutsPage); reportLog("25.1 Select 'Clinical Trials/Research' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ClinicalTrialsLink); reportLog("25.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("25.2.1 Vet Clinical Trials page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VetClinicalTrialsPage); reportLog("26.1 Select 'Contact VIN' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage._waitForJStoLoad(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ContactVINLink); reportLog("26.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("26.2.1 Contact us page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyContactUsPageISDisplayed(); reportLog("27.1: Select 'Continual Education' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage._waitForJStoLoad(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.continualEducationLink); reportLog("27.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("27.2.1 Contact us page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.continualEducationPage); reportLog("28.1 Select 'Drug Label Database' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.DrugLabelLink); reportLog("28.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("28.2.1 DrugLabel database page displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.drugDatabasePage); //vindexPage.verifyDrugResourceFilterIsSelected(); reportLog("29.1: Select 'eVetsites' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.eVetsitesLink); reportLog("29.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("29.2.1: eVETSItes page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyEvetSitePageDisplayed(); reportLog("30.1: Select 'FAQs - Medical' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.faqMedicalLink); reportLog("30.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("30.2.1: Verify FAQ medical page is opened"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.MedicalFaqsPage); reportLog("31.1: Select 'Forms & Handouts' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.formsHandoutsLink); reportLog("31.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("31.2.1: Verify FAQ medical page is opened"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.FormsHandoutsPage); reportLog("32.1: Select 'Front Page' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.frontPageLink); reportLog("32.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("32.2.1: Verify Front page is opened"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.pageTitle_FrontPage); reportLog("33.1: Select 'Fun & Challenging Cases' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.CasesChallenging_FunLink); reportLog("33.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("33.2.1: Verify Fun and challenging page is opened"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.funChallengingPage); reportLog("34.1 Select 'Help' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.HelpLink); reportLog("34.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("34.2.1 VIN Help Resource Center id displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyHelpVinCentreIdDisplayed(); reportLog("35.1 Select 'Explore Discover Learn VIN' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ExploreDiscoverLearnVINLink); reportLog("35.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("35.2.1 Explore, Discover, Learn VIN or How to Use VIN is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.ExploreDiscoverLearnVINPage); reportLog("36.1 Select 'Image Library' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ImageLibraryLink); reportLog("36.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("36.2.1 Image Library is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.ImageLibraryPage); reportLog("37.1 Select 'Proud to be a VINner' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ImProudToBeViNner); reportLog("37.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("37.2.1 Proud to be a VINner page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.ProudToBeViNnerPage); reportLog("38.1 Select 'Insurance Options' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.InsuranceOptionsLink); reportLog("38.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("38.2.1 Insurance Products for Veterinarians is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.InsuranceProductsPage); reportLog("39.1 Select 'Journals & Pubs' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.JournalsPubsLink); reportLog("39.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("39.2.1 Welcome to VIN journals is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyVinJournalsPageISDisplayed(); reportLog("40.1 Select 'Legal Bites' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.LegalBitesLink); reportLog("40.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("40.2.1 Legal Specialty Center is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyLegalSpecialityCentre(); reportLog("41.1 Select ' Library' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.libraryLink); reportLog("41.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("41.2.1 VIN Library page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); // vindexPage.verifyVinLibraryPageDislplayed(); vindexPage.verifyPageDisplayed(Constants.booksAndManualPageTitle); reportLog("42.1: Select 'Medical FAQs' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MedicalFaqLink); reportLog("42.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("42.2.1 Medical FAQ page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.MedicalFaqsPage); reportLog("43.1 Select 'Message Boards' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MessageBoardsLink); reportLog("43.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("43.2.1 VIN Message Boards is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyMessageBoardIsDisplayed(); reportLog("44.1 Select 'Mentor-procedure videos' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MentorprocedurevideosLinks); reportLog("44.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("44.2.1 VIN Mentor: Visual Procedures Manual is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyVinMentorVisualProcedureManualIsDisplayed(); reportLog("45.1: Select 'Mobile (VIN Homepage)."); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.mobileVinHomePageLink); reportLog("45.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("45.2.1 VIN Mobile page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.vinHomePageMobileTitle); reportLog("46.1 Select 'MSDS Database' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MSDSDatabaseLink); reportLog("46.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("46.2.1 MSDS page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.MSDSSDSPage); reportLog("47.1 Select 'MyActivities' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MyActivitiesLink); reportLog("47.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("47.2.1 Activities page is displayed with 'My most viewed discussion 'tab is selected "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyMyMostViewActivitiesIsDislpayed(Constants.pageTitle_MyActivity); reportLog("48.1 Select 'MyVIN' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.MyVINLink); reportLog("48.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("48.2.1 MyStuff page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyMyStuffPageIsDisplayed(); reportLog("49.1 Select 'News' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.NewsLink); reportLog("49.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("49.2.1 VIN News page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.NewsPage); reportLog("50.1: Select 'Password Vault (BETA)' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.passwordVaultLink); reportLog("50.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("50.2.1: Password vault beta page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.passwordVaultBetaPage); reportLog("51.1: Select 'Password Vault (WWW)' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.passwordVaultLinkwww); reportLog("51.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("51.2.1: Password vault www page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.passwordVaultwwwPage); reportLog("52.1: Select 'Podcasts (VINCasts)"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.podcastLink); reportLog("52.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("52.2.1: podcast page is displayed"); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.podcastPage); reportLog("53.1: Select 'Proceedings' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ProceedingsLink); reportLog("53.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("53.2.1 Proceedings by Conference page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.ProceedingsByConferencePage); reportLog("54.1: Select 'PUBMED\" link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.PubmedLink); reportLog("54.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("54.2.1 Pubmed page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.pubmedPage); reportLog("55.1 Select 'Recall Center' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.RecallCenterLink); reportLog("55.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("55.2.1 Drug and Food Recall Center is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.RecallCenterPage); reportLog("56.1 Select 'Rounds' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.RoundsLink); reportLog("56.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("56.2.1 Rounds Homepage is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.RoundsHomePage); reportLog("57.1: Select ' Rounds Transcripts' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.scrollDown(); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.RoundsTranscriptsLink); reportLog("57.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("57.2.1: Search 4 page is displayed with VIN Rounds filter selected "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.Search4Page); reportLog("58.1: Select ' Search' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.SearchLink); reportLog("58.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("58.2.1: Search 4 page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.Search4Page); reportLog("59.1 Select 'Specialty Centers' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.SpecialtyCentersLink); reportLog("59.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("59.2.1 Specialty Centers page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.SpecialtyCentersPage); reportLog("60.1: Select 'Student Center' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.StudentCenterLink); reportLog("60.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("60.2.1 VIN Student Center is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.StudentCenterPage); reportLog("61.1: Select 'Surveys' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.SurveyLink); reportLog("61.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("61.2.1 survey page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.SurveyPage); reportLog("62.1: Select 'Tough Questions/Answers' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.ToughQuestions_AnswersLink); reportLog("62.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("62.2.1: VINner Answers to Tough Questions is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.ToughQuestions_AnswersPage); reportLog("63.1: Select ' Veterinary Partner' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VeterinaryPartnerLink); reportLog("63.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("63.2.1: Veterinary Partner page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VeterinaryPartnerPage); reportLog("64.1: Select 'VetQuest' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VetQuestLink); reportLog("64.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("64.2.1: Veterinary Partner page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VetQuestPage); reportLog("65.1 Select 'Vets4Vets' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.Vets4VetsLink); reportLog("65.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("65.2.1 VETS4VETS page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.Vets4Vetspage); reportLog("66.1 Select 'VetzInsight' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VetzInsightLink); reportLog("66.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("66.2.1 VetzInsight portal is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VetzInsightPage); reportLog("67.1: Select 'VINCasts (Rounds Podcasts)' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINCastsLink); reportLog("67.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("67.2.1: Search page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.Search4Page); reportLog("68.1: Select 'VINcyclopedia (Associate)' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINCyclopediaLink); reportLog("68.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("68.2.1: Search page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VINCyclopediaPage); reportLog("69.1: Select 'VIN Drug Hndbk. (VVDH)' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VVDHLink); reportLog("69.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("69.2.1: VVDH page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VVDHPage); reportLog("70.1: Select 'VIN Exotic Animal Formulary'"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINExoticLink); reportLog("70.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("70.2.1: VVDH page is loaded "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VINExoticPage); reportLog("71.1 Select 'VIN Foundation' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINFoundationLink); reportLog("71.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("71.2.1 VIN Foundation portal is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VINFoundationPage); reportLog("72.1 Select ' VIN Policies' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINPoliciesLink); reportLog("72.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("72.2.1 VIN Policies page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VINPoliciesPage); reportLog("73.1 Select 'VIN This Week' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINThisWeekLink); reportLog("73.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("73.2.1 VIN this week is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VINThisWeekPage); reportLog("74.1 Select 'VINx' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VINxLink); reportLog("74.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("74.2.1 VINx page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VINxPage); reportLog("75.1 Select 'Virtual Clinic' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VirtualClinicLink); reportLog("75.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("75.2.1 VIN Virtual Clinic portal is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VirtualClinicPage); reportLog("76.1 Select 'VSPN' link"); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.VSPNLink); reportLog("76.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("76.2.1 VSPN page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyPageDisplayed(Constants.VSPNPage); reportLog("77.1 Select 'WWW Directory' link "); vindexPage.switchChildWindowByClosingParent( mediacalFaqWindow); vindexPage.clickOnLInksPresentInTheVindexTab(Constants.WWWDirectoryLink); reportLog("77.2: Dismiss Alert Notifications if displayed "); frontPage.dismissNotifications(); reportLog("77.2.1: WWW Resources page is displayed "); mediacalFaqWindow = getAllWindowsOpenInUI().get(1); vindexPopOutWindow = getAllWindowsOpenInUI().get(2); switchToWindowWithBrowser(vindexPopOutWindow); vindexPage.verifyResourcePageDislplayed(); vindexPage.getDriver().close(); reportLog("78.1: Close VINdex window"); switchToWindowWithBrowser(parentwin); reportLog("79.1: Call Logout Method"); logoutPage=frontPage.logoutApplication(); reportLog("79.2: Verify user logged out successfully"); logoutPage.verifyLogoutPageDisplayed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(10)\n int getIndex();", "public int getIndex(V v);", "@Test\n public void testGetIndex() {\n System.out.println(\"getIndex\");\n Data instance = null;\n ArrayList<IndexKey> expResult = null;\n ArrayList<IndexKey> result = instance.getIndex();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "private int getVInfoIndex(Object v) {\n Integer indexObj = vtxMap.get(v);\n\n // if value is null, there is not entry in\n // the map; return -1; otherwise, convert\n // object to an int\n if (indexObj == null) {\n return -1;\n } else {\n return indexObj;\n }\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/AST/VTableBuilder.cpp\", line = 3711,\n FQN=\"clang::MicrosoftVTableContext::getVBTableIndex\", NM=\"_ZN5clang22MicrosoftVTableContext15getVBTableIndexEPKNS_13CXXRecordDeclES3_\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/VTableBuilder.cpp -nm=_ZN5clang22MicrosoftVTableContext15getVBTableIndexEPKNS_13CXXRecordDeclES3_\")\n //</editor-fold>\n public /*uint*/int getVBTableIndex(/*const*/ CXXRecordDecl /*P*/ Derived, \n /*const*/ CXXRecordDecl /*P*/ VBase) {\n /*const*/ VirtualBaseInfo /*P*/ VBInfo = computeVBTableRelatedInformation(Derived);\n assert Native.$bool(VBInfo.VBTableIndices.count(VBase));\n return VBInfo.VBTableIndices.find$Const(VBase).$arrow().second;\n }", "public int getVersionIndex();", "public void tIndex(IndexShort < O > index) throws Exception {\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n\n int cx = 0;\n\n initIndex(index);\n //search(index, (short) 3, (byte) 3);\n //search(index, (short) 7, (byte) 1);\n //search(index, (short) 12, (byte) 3);\n \n search(index, (short) 1000, (byte) 1);\n\n search(index, (short) 1000, (byte) 3);\n\n search(index, (short) 1000, (byte) 10);\n \n search(index, (short) 1000, (byte) 50);\n \n long i = 0;\n // int realIndex = 0;\n // test special methods that only apply to\n // SynchronizableIndex\n \n\n // now we delete elements from the DB\n logger.info(\"Testing deletes\");\n i = 0;\n long max = index.databaseSize();\n while (i < max) {\n O x = index.getObject(i);\n OperationStatus ex = index.exists(x);\n assertTrue(ex.getStatus() == Status.EXISTS);\n assertTrue(ex.getId() == i);\n ex = index.delete(x);\n assertTrue(\"Status is: \" + ex.getStatus() + \" i: \" + i , ex.getStatus() == Status.OK);\n assertEquals(i, ex.getId());\n ex = index.exists(x); \n assertTrue( \"Exists after delete\" + ex.getStatus() + \" i \" + i, ex.getStatus() == Status.NOT_EXISTS);\n i++;\n }\n index.close();\n Directory.deleteDirectory(dbFolder);\n }", "@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }", "public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}", "@Test(dataProvider = \"data_buildIndex_ok\")\npublic void test_buildIndex(String testDesc, String startPath, List<Integer> expRes) {\n log.info(\"{}... started\", testDesc);\n LocalMusicIndexer lmi = new LocalMusicIndexer(startPath);\n lmi.buildIndex();\n Integer numOfTracks = lmi.getNumOfTracks();\n Integer numOfTracksSelected = lmi.getNumOfTracksSelected();\n TreeMap<Long, HashMap<String, Object>> flatMusicIndex = lmi.getFlatMusicIndex();\n assertEquals(lmi.getMusicIndex().getNumOfArtists(), expRes.get(0));\n assertEquals(flatMusicIndex.size(), (int)expRes.get(1));\n assertEquals(numOfTracks, expRes.get(2));\n assertEquals(numOfTracksSelected, expRes.get(2));\n\n lmi.calcResolvBaseMaps(\"path\");\n\n lmi.getMusicIndex().findEntry(10000000000L);\n Track tr = ((Track)lmi.getMusicIndex().findEntry(10000050110L));\n tr.setSelected(false);\n numOfTracksSelected = lmi.getNumOfTracksSelected();\n assertEquals(numOfTracksSelected, expRes.get(3));\n\n TreeMap<Long, HashMap<String, Object>> flatMusicIndex_new = lmi.getFlatMusicIndex();\n assertEquals(flatMusicIndex_new.size(), (int)expRes.get(4));\n log.info(\"{}... finished\", testDesc);\n}", "public int getIndex(\n )\n {return index;}", "@Test\n public void testSetIndex() {\n System.out.println(\"setIndex\");\n ArrayList<IndexKey> index = null;\n Data instance = null;\n instance.setIndex(index);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public abstract int getIndex();", "public int index();", "boolean isIndexed();", "boolean isIndexed();", "public abstract long getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "@Test\n public void testMultiIndexCreation() {\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(1);\n setCacheInVMs(vm0);\n vm0.invoke(helper.getCacheSerializableRunnableForReplicatedRegionCreation(regionName));\n\n ArrayList<String> names = new ArrayList<>();\n names.add(indexName);\n names.add(rindexName);\n\n ArrayList<String> exps = new ArrayList<>();\n exps.add(indexedExpression);\n exps.add(rindexedExpression);\n\n ArrayList<String> fromClauses = new ArrayList<>();\n fromClauses.add(fromClause);\n fromClauses.add(rfromClause);\n\n vm0.invoke(\n helper.getCacheSerializableRunnableForDefineIndex(regionName, names, exps, fromClauses));\n\n AsyncInvocation<?>[] asyncInvs = new AsyncInvocation[2];\n\n asyncInvs[0] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[1] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n ThreadUtils.join(inv, 30 * 000);\n }\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n if (inv.exceptionOccurred()) {\n Assert.fail(\"Random region operation failed on VM_\" + inv.getId(), inv.getException());\n }\n }\n\n vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n }", "public void onIndexUpdate();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public int getIndex();", "public int getIndex();", "public int getIndex();", "boolean isIndex();", "public abstract void updateIndex();", "@Test\n public void testCreateIndexType() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public V getVertex(int index);", "@Test\n public void testBinarySearch() {\n System.out.println(\"binarySearch\");\n int[] index = {10, 11, 12, 13, 14};\n int key = 12;\n int begin = 0;\n int end = 5;\n int expResult = 2;\n int result = Utils.binarySearch(index, key, begin, end);\n assertEquals(expResult, result);\n }", "public void testScanDataByIndex() {\n LOG.info(\"Entering testScanDataByIndex.\");\n\n Table table = null;\n ResultScanner scanner = null;\n try {\n table = conn.getTable(tableName);\n\n // Create a filter for indexed column.\n Filter filter = new SingleColumnValueFilter(Bytes.toBytes(\"info\"), Bytes.toBytes(\"name\"),\n CompareOp.EQUAL, \"Li Gang\".getBytes());\n Scan scan = new Scan();\n scan.setFilter(filter);\n scanner = table.getScanner(scan);\n LOG.info(\"Scan indexed data.\");\n\n for (Result result : scanner) {\n for (Cell cell : result.rawCells()) {\n LOG.info(Bytes.toString(CellUtil.cloneRow(cell)) + \":\"\n + Bytes.toString(CellUtil.cloneFamily(cell)) + \",\"\n + Bytes.toString(CellUtil.cloneQualifier(cell)) + \",\"\n + Bytes.toString(CellUtil.cloneValue(cell)));\n }\n }\n LOG.info(\"Scan data by index successfully.\");\n } catch (IOException e) {\n LOG.error(\"Scan data by index failed \", e);\n } finally {\n if (scanner != null) {\n // Close the scanner object.\n scanner.close();\n }\n try {\n if (table != null) {\n table.close();\n }\n } catch (IOException e) {\n LOG.error(\"Close table failed \", e);\n }\n }\n\n LOG.info(\"Exiting testScanDataByIndex.\");\n }", "@Ignore \n @Test\n public void testIndexDocument() {\n System.out.println(\"IndexDocument\");\n Client client = null;\n String indexName = \"\";\n String indexTypeName = \"\";\n String docId = \"\";\n Map<String, Object> jsonMap = null;\n long expResult = 0L;\n //long result = ESUtil.indexDocument(client, indexName, indexTypeName, docId, jsonMap);\n //assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "int index();", "StorableIndexInfo getIndexInfo();", "@Test\n public void testIndexCreationThreshold() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/B.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"B.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement found = sm.findByNameAndType(\"B000\", GlobalElement.class);\n assertNotNull(found);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n UndoManager um = new javax.swing.undo.UndoManager();\n AbstractDocumentModel.class.cast(sm).addUndoableEditListener(um);\n //\n sm.startTransaction();\n try {\n Schema schema = sm.getSchema();\n java.util.List<SchemaComponent> gChildren = schema.getChildren();\n int counter = 0;\n for (SchemaComponent child : gChildren) {\n //\n assertTrue(child instanceof GlobalElement);\n GlobalElement gElem = GlobalElement.class.cast(child);\n schema.removeElement(gElem);\n //\n counter++;\n if (counter >= 50) {\n break;\n }\n }\n } finally {\n sm.endTransaction();\n }\n //\n int childrenCount = sm.getSchema().getChildren().size();\n assertEquals(childrenCount, 40);\n assertFalse(testSupport.isSupportIndex());\n //\n //\n um.undo();\n //\n // Initiate index building again\n found = sm.findByNameAndType(\"B000\", GlobalElement.class);\n assertNotNull(found);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexCreationThreshold \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsList() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asList() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public void testIndices() throws StorageFileException, IOException {\n\t\tConversation conv = Conversation.createConversation();\r\n\t\tMessageData msg = MessageData.createMessageData(conv);\r\n\t\r\n\t\t// indexMessageParts\r\n\t\ttry {\r\n\t\t\tmsg.setIndexMessageParts(0x0100000000L);\r\n\t\t\tassertTrue(false);\r\n\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmsg.setIndexMessageParts(-1L);\r\n\t\t\tassertTrue(false);\r\n\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t}\r\n\t\r\n\t\t// indexPrev\r\n\t\ttry {\r\n\t\t\tmsg.setIndexPrev(0x0100000000L);\r\n\t\t\tassertTrue(false);\r\n\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t}\r\n\t\r\n\t\ttry {\r\n\t\t\tmsg.setIndexPrev(-1L);\r\n\t\t\tassertTrue(false);\r\n\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t}\r\n\t\r\n\t\t// indexNext\r\n\t\ttry {\r\n\t\t\tmsg.setIndexNext(0x0100000000L);\r\n\t\t\tassertTrue(false);\r\n\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t}\r\n\t\r\n\t\ttry {\r\n\t\t\tmsg.setIndexNext(-1L);\r\n\t\t\tassertTrue(false);\r\n\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t}\r\n\t}", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n Index entity = TestUtils.getTestIndex();\n IndexResponse result = instance.create(entity);\n assertNotNull(result);\n assertEquals(entity.getDatabaseName(), result.getIndex().getDatabaseName());\n assertEquals(entity.getName(), result.getIndex().getName());\n assertEquals(entity.getTableName(), result.getIndex().getTableName());\n assertEquals(entity.getFields(), result.getIndex().getFields());\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public ATExpression base_indexExpression();", "public int searchIndex(int v) {\n int counter = 1;\n Lista iter = new Lista(this);\n if (iter.x == v) {\n return 0;\n }\n while (iter.next != null) {\n if (iter.next.x == v) {\n return counter;\n }\n iter = iter.next;\n counter += 1;\n }\n if (counter == iter.size() - 1) {\n return -1;\n }\n return counter;\n }", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "Expression getIndexExpr();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public int getIndex() { return this.index; }", "@Override\n public void visit(Index node) {\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "OIterator<V> index(final int index) throws IndexOutOfBoundsException;", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "@Nullable\n public abstract Index getIndex();", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "InstAssignIndex createInstAssignIndex();", "public Object vget(Object index) {\n int i;\n if ((i = ((Number) index).intValue()) < 0)\n throw new NoSuchKeyException(i, size - start);\n if ((i += start) >= size)\n throw new NoSuchKeyException(i - start, size - start);\n return array[i];\n }", "@Test\n public void fromClausesAndIndexedExpressionsMatchExpectedValues()\n throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {\n Index i1 = qs.createIndex(\"tIndex\", IndexType.FUNCTIONAL, \"vals.secId\",\n SEPARATOR + \"portfolio pf, pf.positions.values vals\");\n Index i2 = qs.createIndex(\"dIndex\", IndexType.FUNCTIONAL, \"pf.getCW(pf.ID)\",\n SEPARATOR + \"portfolio pf\");\n Index i3 = qs.createIndex(\"fIndex\", IndexType.FUNCTIONAL, \"sIter\",\n SEPARATOR + \"portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter\");\n Index i4 = qs.createIndex(\"cIndex\", IndexType.FUNCTIONAL,\n \"pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]\", SEPARATOR + \"portfolio pf\");\n Index i5 = qs.createIndex(\"inIndex\", IndexType.FUNCTIONAL, \"kIter.secId\",\n SEPARATOR + \"portfolio['0'].positions.values kIter\");\n Index i6 = qs.createIndex(\"sIndex\", IndexType.FUNCTIONAL, \"pos.secId\",\n SEPARATOR + \"portfolio.values val, val.positions.values pos\");\n Index i7 = qs.createIndex(\"p1Index\", IndexType.PRIMARY_KEY, \"pkid\", SEPARATOR + \"portfolio pf\");\n Index i8 = qs.createIndex(\"p2Index\", IndexType.PRIMARY_KEY, \"pk\", SEPARATOR + \"portfolio pf\");\n if (!i1.getCanonicalizedFromClause()\n .equals(SEPARATOR + \"portfolio index_iter1, index_iter1.positions.values index_iter2\")\n || !i1.getCanonicalizedIndexedExpression().equals(\"index_iter2.secId\")\n || !i1.getFromClause().equals(SEPARATOR + \"portfolio pf, pf.positions.values vals\")\n || !i1.getIndexedExpression().equals(\"vals.secId\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + \"portfolio index_iter1\")\n || !i2.getCanonicalizedIndexedExpression().equals(\"index_iter1.getCW(index_iter1.ID)\")\n || !i2.getFromClause().equals(SEPARATOR + \"portfolio pf\")\n || !i2.getIndexedExpression().equals(\"pf.getCW(pf.ID)\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i3.getCanonicalizedFromClause().equals(\n SEPARATOR\n + \"portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3\")\n || !i3.getCanonicalizedIndexedExpression().equals(\"index_iter3\")\n || !i3.getFromClause()\n .equals(\n SEPARATOR + \"portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter\")\n || !i3.getIndexedExpression().equals(\"sIter\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + \"portfolio index_iter1\")\n || !i4.getCanonicalizedIndexedExpression().equals(\n \"index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]\")\n || !i4.getFromClause().equals(SEPARATOR + \"portfolio pf\") || !i4.getIndexedExpression()\n .equals(\"pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i5.getCanonicalizedFromClause()\n .equals(SEPARATOR + \"portfolio['0'].positions.values index_iter4\")\n || !i5.getCanonicalizedIndexedExpression().equals(\"index_iter4.secId\")\n || !i5.getFromClause().equals(SEPARATOR + \"portfolio['0'].positions.values kIter\")\n || !i5.getIndexedExpression().equals(\"kIter.secId\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i6.getCanonicalizedFromClause()\n .equals(\n SEPARATOR + \"portfolio.values index_iter5, index_iter5.positions.values index_iter6\")\n || !i6.getCanonicalizedIndexedExpression().equals(\"index_iter6.secId\")\n || !i6.getFromClause().equals(SEPARATOR + \"portfolio.values val, val.positions.values pos\")\n || !i6.getIndexedExpression().equals(\"pos.secId\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + \"portfolio index_iter1\")\n || !i7.getCanonicalizedIndexedExpression().equals(\"index_iter1.pkid\")\n || !i7.getFromClause().equals(SEPARATOR + \"portfolio pf\")\n || !i7.getIndexedExpression().equals(\"pkid\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + \"portfolio index_iter1\")\n || !i8.getCanonicalizedIndexedExpression().equals(\"index_iter1.pk\")\n || !i8.getFromClause().equals(SEPARATOR + \"portfolio pf\")\n || !i8.getIndexedExpression().equals(\"pk\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n qs.removeIndex(i1);\n qs.removeIndex(i2);\n qs.removeIndex(i3);\n qs.removeIndex(i4);\n qs.removeIndex(i5);\n qs.removeIndex(i6);\n qs.removeIndex(i7);\n qs.removeIndex(i8);\n Index i9 =\n qs.createIndex(\"p3Index\", IndexType.PRIMARY_KEY, \"getPk\", SEPARATOR + \"portfolio pf\");\n if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + \"portfolio index_iter1\")\n || !i9.getCanonicalizedIndexedExpression().equals(\"index_iter1.pk\")\n || !i9.getFromClause().equals(SEPARATOR + \"portfolio pf\")\n || !i9.getIndexedExpression().equals(\"getPk\")) {\n fail(\"Mismatch found among fromClauses or IndexedExpressions\");\n }\n qs.removeIndex(i9);\n }", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "boolean isNewIndex();", "public void testSelectIndex() {\n showFrame(box);\n for (int i=0;i < MAX_ENTRIES;i += MAX_ENTRIES / 10) {\n selectedIndex = -1;\n tester.actionSelectIndex(box, i);\n assertEquals(\"Wrong index selected\", i, selectedIndex);\n }\n }", "public interface IndexSearch {\n /**\n * Returns the index type.\n * @return type\n */\n IndexType type();\n\n /**\n * Returns the current token.\n * @return token\n */\n byte[] token();\n}", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "@Test\n public void testGetVertexIndex() throws GeoTessException {\n posLinear.set(8, new double[]{0., 0., -1.}, 6300.);\n assertEquals(11, posLinear.getVertexIndex());\n\n // set position to x, which does not coincide with a\n // model vertex.\n posLinear.set(8, x, R);\n assertEquals(-1, posLinear.getVertexIndex());\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@Test\n\tpublic void testIndexData() throws Exception {\n//\t\tJSONObject stamp = new JSONObject();\n//\t\tstamp.put(\"audit_time\", \"2018-09-18 11:41:03\");\n//\t\tstamp.put(\"update_time\", \"2018-09-18 14:09:28\");\n//\t\tMap<String, String> body = new HashMap<>();\n//\t\tbody.put(\"stamp\", stamp.toJSONString());\n//\t\tresult = vliaoIndexService.getAnchors(JsonHelper.toJson(body));\n//\t\tSystem.err.println(JsonHelper.toJson(result));\n\t\t\n//\t\tActionResult result = vliaoIndexService.getAnchors(null);\n//\t\tSystem.err.println(JsonHelper.toJson(result));\n//\t\t\n//\t\tMap<String, String> body = new HashMap<>();\n//\t\tbody.put(\"stamp\", \"2018-09-18 11:41:03\");\n//\t\tresult = vliaoIndexService.getAnchors(JsonHelper.toJson(body));\n//\t\tSystem.err.println(JsonHelper.toJson(result));\n\t\t\n//\t\tActionResult result = vliaoIndexService.getAnchors(null);\n//\t\tSystem.err.println(JsonHelper.toJson(result));\n\t\t\n//\t\tJSONObject stamp = new JSONObject();\n//\t\tstamp.put(\"index\", \"21\");\n//\t\tstamp.put(\"query_time\", \"1537264200840\");\n//\t\tMap<String, String> body = new HashMap<>();\n//\t\tbody.put(\"stamp\", stamp.toJSONString());\n//\t\tActionResult result = vliaoIndexService.getAnchors(JsonHelper.toJson(body));\n//\t\tSystem.err.println(JsonHelper.toJson(result));\n\t\t\n\t\tActionResult result = vliaoIndexService.getAnchors(null);\n\t\tSystem.err.println(JsonHelper.toJson(result));\n\t}", "public int getIndex(){\r\n \treturn index;\r\n }", "@Test\n public void getIndex(){\n\n }", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "private int vertexIndex(T obj){\n for (int i = 0; i < n; i++){\n if (obj.equals(vertices[i])){\n return i;\n }\n }\n return NOT_FOUND;\n }", "public int getIndex()\n/* */ {\n/* 46 */ return this.index;\n/* */ }", "public abstract int indexFor(Object obj);", "ByteArrayIndex createByteArrayIndex();", "private void arrayIndex(MyArrayList myArrayList, Results results, int value) {\r\n int index = myArrayList.indexOf(value);\r\n if(index != -1) { \r\n results.storeNewResult(\"ArrayIndex test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIndex test case: FAILED\");\r\n }\r\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@Test\n public void ruleIndexTest() {\n // TODO: test ruleIndex\n }", "private int findVertIndex(T vertLabel) {\n ArrayList<T> labelRow = matrix.get(0);\n int vertIndex;\n if ((vertIndex = labelRow.indexOf(vertLabel)) == -1) {\n // System.out.println(\"Error: Vertex '\" + vertLabel + \"' does not exist in the matrix\");\n return -1;\n }\n vertIndex += 1; //Add 1 to account for the label cell\n return vertIndex;\n }", "@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }", "public int getIndex() {\n \t\treturn index;\n \t}", "public int getIndex() {\n\t\treturn 0;\n\t}" ]
[ "0.7054453", "0.67075604", "0.63858277", "0.62600815", "0.6218185", "0.6145214", "0.6109045", "0.6060799", "0.5947512", "0.59454566", "0.5829866", "0.5815851", "0.57993317", "0.579061", "0.5781194", "0.5777461", "0.5759036", "0.5759036", "0.5746999", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5736982", "0.5732847", "0.57281446", "0.5722693", "0.5721912", "0.5721912", "0.5721912", "0.5721836", "0.5707157", "0.56863296", "0.5680617", "0.56768936", "0.5644507", "0.5620249", "0.5610366", "0.560441", "0.5589418", "0.5561172", "0.555716", "0.55473024", "0.554317", "0.55394393", "0.5517982", "0.5512411", "0.5504111", "0.5504111", "0.5504111", "0.5504111", "0.5504111", "0.5504111", "0.55035126", "0.5491556", "0.5487842", "0.54862034", "0.5485888", "0.5477274", "0.5476485", "0.546983", "0.54667807", "0.545941", "0.5458308", "0.5455816", "0.54486376", "0.5447348", "0.5441098", "0.54341185", "0.5431926", "0.54309636", "0.5430107", "0.54271364", "0.54212844", "0.5410515", "0.5397725", "0.5395487", "0.5380624", "0.5380624", "0.5380624", "0.53637946", "0.5362433", "0.53585315", "0.53548634", "0.5349727", "0.5344622", "0.5344622", "0.5344622", "0.534375", "0.53382665", "0.5326248", "0.5321497", "0.530937" ]
0.0
-1
Usou Set e new TreeSet (orientado a interface) lista implementando a interface Set e especializando a classe TreeSet
public static void main(String[] args) { Set<String> lista = new TreeSet<>(); lista.add("vermelho"); lista.add("verde"); lista.add("verde"); lista.add("amarelo"); System.out.println(lista); //Result.: mostrou na ordem invertida }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n// SortedSet<Integer> set=new TreeSet<>();\n// set.add(45);\n// set.add(3);\n// set.add(12);\n// System.out.println(set);\n\n SortedSet<User> set=new TreeSet<>();\n set.add(new User(34,\"r\"));\n set.add(new User(4,\"j\"));\n set.add(new User(14,\"x\"));\n System.out.println(set);\n }", "Set createSet();", "public interface Set {\n\n /**\n * Create an empty set.\n *\n * @return the empty set\n */\n static Set createEmpty() {\n return new EmptySet();\n }\n\n /**\n * Checks if the ASet is empty.\n *\n * @return true if the set is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Given an {@code Integer} {@code element} add the element to the set. If {@code element} is\n * already a member of the set, we perform no operation and return back the set intact.\n *\n * @param element the new element to add to the set\n *\n * @return a newly created set that contains {@code element} and the original elements of the set.\n */\n Set add(Integer element);\n\n /**\n * Given an {@code Integer} {@code element} returns {@code true} if the element is already in the\n * set and {@code false} otherwise.\n *\n * @param element the element to check\n *\n * @return true if {@code element} is in the set, false otherwise\n */\n Boolean contains(Integer element);\n\n /**\n * Return the size of the set.\n *\n * @return return the size of the set\n */\n Integer size();\n\n /**\n * Given an element {@code element} remove it from the this list if it exists.\n *\n * @param element the element to remove\n *\n * @return set without {@code element}\n */\n Set remove(Integer element);\n\n\n /**\n * Given a set {@code other} return a new set which is the set union between {@code this} set and\n * {@code other} set.\n *\n * @param other set to perform union\n *\n * @return set union of this and other\n */\n Set union(Set other);\n\n\n /**\n * Returns the set intersection between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform intersection with\n *\n * @return set intersection between {@code this} and {@code otherSet}\n */\n Set intersect(Set otherSet);\n\n\n /**\n * Returns the set difference between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform set difference with\n *\n * @return set difference between {@code this} and {@code otherSet}\n */\n Set difference(Set otherSet);\n\n\n /**\n * Returns true if {@code this} set is a subset of {@code otherSet}.\n *\n * @param otherSet the set to check against\n *\n * @return true if this is a subset of otherSet, false otherwise\n */\n Boolean subset(Set otherSet);\n\n\n}", "public static <T extends Comparable> Set<T> CreateSortedSet() {\n return new TreeSet<>();\n }", "public SortedSet(ISet<E> other) {\n\n }", "public SortedSet() {\n\n }", "public static void main(String[] args) {\n\n Set<Student> set = Sets.newTreeSet();\n Student s3 = new Student(3);\n Student s4 = new Student(4);\n Student s5 = new Student(5);\n Student s1 = new Student(1);\n Student s2 = new Student(2);\n List<Student> list = Lists.newArrayList();\n list.add(s4);\n list.add(s3);\n list.add(s5);\n list.add(s1);\n list.add(s2);\n\n list.sort(new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n return o1.getAge() - o2.getAge() < 0 ? 1 : -1;\n }\n });\n System.out.println(list);\n\n// s1.toString();\n// set.add(s3);\n// set.add(s4);\n// set.add(s5);\n// set.add(s1);\n// set.add(s2);\n// System.out.println(set);\n// for (Student s : set) {\n// System.out.println(s);\n// }\n\n\n }", "public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}", "public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }", "<T extends Comparable> SortedSet<T> sorted(Set<T> in) {\n return new TreeSet<>(in);\n }", "public static void main(String[] args) {\r\n\t\tHashSet h1=new HashSet();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\th1.add(3);\r\n\t\th1.add(7); //Homogeous \r\n\t\th1.add(9);//hetrogeous\r\n\t\th1.add(10);\r\n\t\t\r\n\t\tTreeSet t1=new TreeSet(h1);\r\n\t\tt1.add(100);\r\n\t\tSystem.out.println(t1);\r\n\t}", "Set<X> toSet();", "public static void main(String[] args) {\n\r\n TreeSet<point> ts1 = new TreeSet<>();\r\n ts1.add(new point(1,1));\r\n ts1.add(new point(5, 5));\r\n ts1.add(new point(5, 2));\r\n\r\n System.out.println(ts1);\r\n }", "public static void main(String[] args) {\n\t\tclass Person {\n\t\t\tprivate String nome;\n\n\t\t\tpublic Person(String nome) {\n\t\t\t\tthis.nome = nome;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic String toString() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn nome;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean equals(Object obj) {\n\t\t\t\tSystem.out.println(\"Equals\");\n\t\t\t\tPerson person = (Person) obj;\n\t\t\t\treturn this.nome.equals(person.nome) ? true : false;\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int hashCode() {\n\t\t\t\tSystem.out.println(\"Hashcode!\");\n\t\t\t\treturn nome.charAt(0);\n\t\t\t}\n\t\t}\n\t\tSet<String> setComHashSet = new HashSet<>();\n\t\tsetComHashSet.add(\"Nicholas\");\n\t\tsetComHashSet.add(\"Cabral\");\n\t\tsetComHashSet.add(\"Barbosa\");\n\t\tSystem.out.println(\"I dont care about order! I care about performance to add() \" + setComHashSet);\n\t\tSet<String> setTreeSet = new TreeSet<>(Set.copyOf(setComHashSet));\n\t\tSystem.out.println(\"I care about order, however I dont care about performance to add() \" + setTreeSet);\n\t\tSystem.out.println();\n\t\tSet<Person> setPerson = new HashSet<>();\n\t\tPerson person = new Person(\"Nicholas\");\n\t\tPerson person2 = new Person(\"Nicholas2\");\n\t\tsetPerson.add(person);\n\t\tsetPerson.add(person2);\n\t\tSystem.out.println(setPerson);\n\t\tString[] arr = { \"Nihcolas\" };\n\t\tList<String> lista = Arrays.asList(arr);\n\n\t\tA a = new A();\n\t\tSetCollection b = (SetCollection) a;\n\t\tSystem.out.println(a == b);\n\t}", "public static Set orderedSet(Set set) {\n/* 236 */ return (Set)ListOrderedSet.decorate(set);\n/* */ }", "public TreeSet<PrestamoFila> CargarDatos () {\n this.conexion.ConectarBD();\n \n String consulta = \"SELECT * FROM prestamos ORDER BY idprestamo\";\n this.rst = this.conexion.ConsultaBD(consulta);\n try {\n //Pasamos los datos recogidos de la BD al TreeSet\n while (this.rst.next()){\n PrestamoFila pf = new PrestamoFila(rst.getInt(\"IdPrestamo\"),rst.getInt(\"IdSocio\"),rst.getInt(\"IdLibro\"),rst.getDate(\"FechaInicio\"),rst.getDate(\"FechaFin\")); \n this.tPrestamos.add(pf);\n }\n } catch (SQLException e){\n throw new MisException(\"Error al cargar los datos del Prestamo.\\n\"+e.toString());\n \n }\n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n return this.tPrestamos;\n }", "public static void main(String[] args) {\n\t\tList l1=new ArrayList();\n\t\tl1.add(0, \"Gyan\");\n\t\tl1.add(1, \"Ranjan\");\n\t\tl1.add(2, \"Mahapatra\");\n\t\tSystem.out.println(l1);\n\t\tl1.add(2,\"xyz\");\n\t\tSystem.out.println(l1 + \" \" +l1.get(2));\nint a[]=new int[8];\nfor(int i=0;i<8;i++){\n\ta[i]=i;\n}\n//for(int j:a)\n//\tSystem.out.println(j);\nList l2=new ArrayList();\nl2.add(\"Sonit\");\nl2.add(\"Dora\");\nl2.add(\"Sourav\");\n/*System.out.println(l2);\nl2.remove(1);*/\nSystem.out.println(l2);\nSet s=new HashSet();\ns.add(\"seta\");\ns.add(\"setc\");\ns.add(\"setb\");\nSystem.out.println(s);\nCollections.sort((List) s);\nSystem.out.println(s);\n\nSet s1=new TreeSet(s);\nSystem.out.println(s1.size());\nSystem.out.println(\"Gyan\");\n\t}", "public Set<T> toSet()\r\n\t{\r\n\t\tSet<T> s = new HashSet<T>();\r\n//\t\tSystem.out.println(\"in toSet method\");\r\n//\t\tSystem.out.println(\"thisTable.tostring \" + this.toString());\r\n\t\tIterator<T> thisTableIter = this.iterator();\r\n\t\t\r\n\t\twhile (thisTableIter.hasNext())\r\n\t\t{\r\n\t\t\tT e = thisTableIter.next();\r\n\t\t//\tSystem.out.println(e + \" \");\r\n\t\t\ts.add(e);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public PointSET() {\n //s = new TreeSet<Point2D>(Point2D.X_ORDER);\n }", "public static void main(String[] args) {\n TreeSet<Employee> treeEmp = new TreeSet<>();\n \n for(int i =0; i<100 ; i++){\n treeEmp.add(new Employee(\"Pera\"+i, (int)(Math.random()*100+1)));\n } \n \n \n Iterator<Employee> iteratorEmp = treeEmp.iterator();\n while (iteratorEmp.hasNext()) { \n Employee ite = iteratorEmp.next();\n System.out.println(\"Empployee name: \"+ite.name+\" id: \"+ite.id);\n }\n \n System.out.println(treeEmp.first());\n System.out.println(treeEmp.last());\n \n Employee e = new Employee(\"Perica499\");\n e.id = \"50\";\n treeEmp.add(e);\n Iterator<Employee> headSetIterator = treeEmp.headSet(e).iterator();\n while (headSetIterator.hasNext()) { \n System.out.println(\"object Id \"+headSetIterator.next().id);\n }\n \n System.out.println(\"*****************************\");\n \n TreeSet<Employee> emps = new TreeSet<>(new CustomComparator());\n \n \n }", "public interface Set<E> {\n\t\n\t/**\n\t * Returns true if the element is contained in the set\n\t * @param element\n\t * @return\n\t */\n\tpublic boolean contains(E element);\n\t\n\t/**\n\t * Adds the element to the set if the element is not already in the set\n\t * @param element\n\t */\n\tpublic void put(E element);\n\t\n\t/**\n\t * Returns the size of the set\n\t * @return\n\t */\n\tpublic int size();\n\t\n\t/**\n\t * Returns an iterator over all the elements in the set in an arbitrary order\n\t * @return\n\t */\n\tpublic Iterator<E> iterator();\n}", "public PointSET() {\n pointSet = new TreeSet<>();\n }", "public OrderedSet (String setName) {\n initialize();\n name = setName;\n }", "public static void main(String[] args) {\n Set<BankAccount> set=new TreeSet(new BankAccountTest());\n\tset.add(new BankAccount(128,\"mallika\",2000.0));\n\tset.add(new BankAccount(124,\"sallika1\",21000.0));\n\tset.add(new BankAccount(125,\"nallika2\",20000));\t\n\tfor(BankAccount bank:set){\n\t\tSystem.out.println(bank);\n\t}\n \n\t}", "public Set() {\n\t\tlist = new LinkedList<Object>();\n\t}", "GeneralizationSet createGeneralizationSet();", "public SyncedTreeSet() {\n _treeSet = new TreeSet<T>();\n }", "public interface Set<Type> {\r\n\r\n\t/**\r\n\t * Ensures that this set contains the specified item.\r\n\t * \r\n\t * @param item\r\n\t * - the item whose presence is ensured in this set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if the input item was actually inserted); otherwise, returns\r\n\t * false\r\n\t */\r\n\tpublic boolean add(Type item);\r\n\r\n\t/**\r\n\t * Ensures that this set contains all items in the specified collection.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items whose presence is ensured in this\r\n\t * set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if any item in the input collection was actually inserted);\r\n\t * otherwise, returns false\r\n\t */\r\n\tpublic boolean addAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Removes all items from this set. The set will be empty after this method\r\n\t * call.\r\n\t */\r\n\tpublic void clear();\r\n\r\n\t/**\r\n\t * Determines if there is an item in this set that is equal to the specified\r\n\t * item.\r\n\t * \r\n\t * @param item\r\n\t * - the item sought in this set\r\n\t * @return true if there is an item in this set that is equal to the input\r\n\t * item; otherwise, returns false\r\n\t */\r\n\tpublic boolean contains(Type item);\r\n\r\n\t/**\r\n\t * Determines if for each item in the specified collection, there is an item\r\n\t * in this set that is equal to it.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items sought in this set\r\n\t * @return true if for each item in the specified collection, there is an\r\n\t * item in this set that is equal to it; otherwise, returns false\r\n\t */\r\n\tpublic boolean containsAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Returns true if this set contains no items.\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n\t/**\r\n\t * Returns the number of items in this set.\r\n\t */\r\n\tpublic int size();\r\n}", "@Override\n public Set keySet() {\n OmaLista palautettava = new OmaLista();\n\n for (int i = 0; i < this.values.length; i++) {\n if (this.values[i] != null) {\n for (int z = 0; z < this.values[i].size(); z++) {\n palautettava.add(this.values[i].value(z).getKey());\n }\n }\n }\n\n return palautettava;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\t TreeSet<String> treeset = new TreeSet<String>();\r\n\t\t treeset.add(\"Good\");\r\n\t\t treeset.add(\"For\");\r\n\t\t treeset.add(\"Health\");\r\n\t\t //Add Duplicate Element\r\n\t\t treeset.add(\"Good\");\r\n\t\t System.out.println(\"TreeSet : \");\r\n\t\t for (String temp : treeset) {\r\n\t\t System.out.println(temp);\r\n\t\t }\r\n\t\t }", "public interface TransformsToUnsortedSetTrait extends RichIterableTestCase\n{\n @Override\n default <T> UnsortedSetIterable<T> getExpectedTransformed(T... elements)\n {\n return Sets.immutable.with(elements);\n }\n\n @Override\n default <T> MutableSet<T> newMutableForTransform(T... elements)\n {\n return Sets.mutable.with(elements);\n }\n\n @Override\n default MutableBooleanSet newBooleanForTransform(boolean... elements)\n {\n return new BooleanHashSet(elements);\n }\n\n @Override\n default MutableByteSet newByteForTransform(byte... elements)\n {\n return new ByteHashSet(elements);\n }\n\n @Override\n default MutableCharSet newCharForTransform(char... elements)\n {\n return new CharHashSet(elements);\n }\n\n @Override\n default MutableDoubleSet newDoubleForTransform(double... elements)\n {\n return new DoubleHashSet(elements);\n }\n\n @Override\n default MutableFloatSet newFloatForTransform(float... elements)\n {\n return new FloatHashSet(elements);\n }\n\n @Override\n default MutableIntSet newIntForTransform(int... elements)\n {\n return new IntHashSet(elements);\n }\n\n @Override\n default MutableLongSet newLongForTransform(long... elements)\n {\n return new LongHashSet(elements);\n }\n\n @Override\n default MutableShortSet newShortForTransform(short... elements)\n {\n return new ShortHashSet(elements);\n }\n}", "public static void main(String[] args) {\n Set<Integer> set = new HashSet<>();\n\n\n // elementy w secie nie są poukładane\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(4);\n set.add(5);\n set.add(5);\n set.add(5);\n set.add(null);\n set.add(null);\n System.out.println(set);// elementów: 6\n\n\n\n Set<String> setString = new HashSet<>();\n\n List<Integer> ar = new ArrayList<>();\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "public static void main(String[] args){\n\t\tTreeSet hs=new TreeSet();\n\t\t\n\t\ths.add(\"d\");\n\t\ths.add(\"c\");\n\t\ths.add(\"b\");\n\t\ths.add(\"a\");\n\t\ths.add(\"c\");\n\t\ths.add(\"i\");\n\t\ths.add(\"l\");\n\t\ths.add(new Integer(2));\n\t\ths.add(new Float(2));\n\t\t\n\t\t\t\t\n\t\tSystem.out.println(\"Hashset is \"+hs);\n\t\tSystem.out.println(\"Size of Hashset is \"+ hs.size());\n\t\t\n\t\tSystem.out.println(\"Does hashset contains this 'u' element \" + hs.contains(\"u\"));\t\t\n\t\tSystem.out.println(\"is hashset empty \" + hs.isEmpty());\n\t\tSystem.out.println(\"remove the element \"+hs.remove(\"i\"));\n\t\t\n\t\t\n\t hs.clear();\n\t System.out.println(\"get class \" +hs.getClass());\n\t\t\n\t System.out.println(\"is hashset empty \" +hs.isEmpty());\n\t \n\t \n\t\t\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tTreeSet<String> ts = new TreeSet<String>();\n\t\tts.add(\"D\");\n\t\tts.add(\"B\");\n\t\tts.add(\"E\");\n\t\tts.add(\"A\");\n\t\tts.add(\"C\");\n\t\tts.add(\"B\");\t\t//duplicates are not stored\n\t\tts.add(null);\n\t\tSystem.out.println(\"Elements of TreeSet:\\n\" + ts);\n\t\t\n\t\tSortedSet<String> ts2 = new TreeSet<String>();\t//SortedSet is an interface\n\t\tts2 = ts.subSet(\"B\", \"D\");\n\t\tSystem.out.println(ts2);\n\t\t\n\t\tts2 = ts.subSet(\"B\", false, \"E\", true);\n\t\tSystem.out.println(ts2);\n\t}", "public ListSet() {\n lists = new TernarySearchTree<>();\n }", "public static <T extends Comparable> Set<T> AsSortedSet(@NonNull T... ts) {\n return Create_UnModifiableSet_By_InputElements(ContainerUtil.<T>CreateSortedSet(), ts);\n }", "public static void main(String[] args) \n\t{\n\t\tSortedSet<String> ts = new TreeSet<String>(); \n\n\t\t// Adding elements into the TreeSet \n\t\t// using add() \n\t\tts.add(\"Sravan\"); \n\t\tts.add(\"Ojaswi\"); \n\t\tts.add(\"Bobby\"); \n\t\tts.add(\"Rohith\"); \n\t\tts.add(\"Gnanesh\"); \n\t\tts.add(\"Devi2\"); \n\n\t\t// Adding the duplicate \n\t\t// element \n\t\tts.add(\"Sravan\"); \n\n\t\t// Displaying the TreeSet \n\t\tSystem.out.println(ts); \n\n\t\t// Removing items from TreeSet \n\t\t// using remove() \n\t\tts.remove(\"Ojaswi\"); \n\n\t\t// Iterating over Tree set items \n\t\tSystem.out.println(\"Iterating over set:\"); \n\t\tIterator<String> i = ts.iterator(); \n\t\twhile (i.hasNext()) \n\t\t\tSystem.out.println(i.next()); \n\t}", "public interface ISet<T> {\n\n // Maximum possible size of data structures\n int MAX_SIZE = 100;\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain one of each int from both unionWith and this]\n * @param unionWith ISet to find the union from\n */\n default void union(ISet<T> unionWith) {\n T temp;\n int tsize = unionWith.getSize();\n//For every element in unionWith...\n for (int i = 0; i < tsize; i++) {\n //Store value at first position\n //Remove value from unionWith\n temp = unionWith.removePos(0);\n //If this set does not contain value from unionWith...\n if (!this.contains(temp)) {\n //Add value to this set\n this.add(temp);\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are not in diffWith]\n * @param diffWith ISet to find the difference from\n */\n default void difference(ISet<T> diffWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If diffWith does not contain value from this set...\n if(!diffWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are also found in intWith]\n * @param intWith ISet to find the intersection from\n */\n default void intersect(ISet<T> intWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If intWith does not contain value from this set...\n if(intWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n\n }\n\n\n /**\n * @pre [ISet initialized]\n * @post [ISet contains same elements with a\n * new element - add - placed at the end]\n * @param add T value to be added to ISet\n */\n void add(T add);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and pos >= 0\n * @post [ISet contains same elements as\n * when it was passed, without element at pos] and [T returned]\n * @param pos position in ISet to be removed\n * @return T of position where the element was removed\n */\n T removePos(int pos);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and val != NULL\n * @post [ISet unmodified] and [boolean returned]\n * @param val value to be searched in ISet\n * @return true if ISet contains val, otherwise false\n */\n boolean contains(T val);\n\n /**\n * @pre [ISet initialized with constructor]\n * @post [ISet, size of ISet unmodified] and [int returned]\n * @return int value of the size of the ISet\n */\n int getSize();\n\n}", "public static SortedSet typedSortedSet(SortedSet set, Class type) {\n/* 306 */ return TypedSortedSet.decorate(set, type);\n/* */ }", "<V extends Object> Set<V> getSet(String setName);", "BSet createBSet();", "public static void main(String[] args) {\n ArrayList<Integer> nums = new ArrayList<>();\n nums.addAll( Arrays.asList(100, 2000, 50, 50, 100, 200, 300, 50));\n nums=new ArrayList<>(new TreeSet<>(nums));\n System.out.println(nums);\n\n String str1 = \"babababC\";\n str1 = new TreeSet<>( Arrays.asList(str1.split(\"\")) ).toString();\n System.out.println(str1);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - 2. Write a program that can REMOVE THE DUPLICATES from an ArrayList. DO NOT change the ORDER\n * -> LinkedHashSet -> Remove Duplicates and Keeps the Insertion Order\n */\n ArrayList<Integer> list = new ArrayList<>(Arrays.asList(6,6,6,6,5,5,5,4,4,4,4));\n list=new ArrayList<>(new LinkedHashSet<>(list));\n System.out.println(list);\n\n\n /**\n * - 1. Write a program that can remove the duplicated characters from String and store them into variable\n */\n String str = \"ABABABCDEF\";\n String[] arr = str.split(\"\");\n str = new LinkedHashSet<>(Arrays.asList(arr)).toString().replace(\", \", \"\");\n System.out.println(str);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * -> Does not accept duplicates, and sort the objects\n * -> HashSet accepts null\n * -> HashSet is faster than TreeSet\n */\n HashSet<Integer> numbers = new HashSet<>(Arrays.asList(10,9,10, 9, 8, 7, 8, 7, 6, 5, 6, 1));\n System.out.println(numbers ); // -> [1, 5, 6, 7, 8, 9, 10]\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - ITERATOR: -> is the only way to remove duplicates from collection\n * - removeIf -> removes numbers because it is uses the iterator interface internally. Iterator implicitly\n *\n * - hasNext() method only can go forward cant go backward. it stars from next index\n * - when we use it our loop hasNext() iterates from the next index\n * - iterator(); - hasNext(); - next(); - remove();\n */\n ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n list2.removeIf( p -> p < 4 );\n System.out.println(list2);\n\n\n ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n Iterator<Integer> it =list3.iterator(); // - this method will return iterator\n while( it.hasNext() ){ // - iterator explicitly. While loop only accept boolean\n if( it.next() < 4 ){\n it.remove();\n }\n }\n System.out.println(list3);\n\n\n ArrayList<Integer> list4 = new ArrayList<>(Arrays.asList(1,1,2,3,3,4,4,5,5));\n // - hasNext(); will iterate all the indexes. We do not need extra iterator in the loop\n for(Iterator<Integer> I = list4.iterator(); I.hasNext(); ){\n if( I.next() < 4) {\n I.remove();\n }\n }\n System.out.println(list4);\n\n\n\n LinkedHashSet<String> names = new LinkedHashSet<>();\n names.addAll(Arrays.asList( \"Mehmet\",\"Mohammed\",\"Yucel\",\"Sha\",\"Ozgur\", \"Ahmet\",\"Osmanj\",\"Ozgur\",\"Ozgur\",\"Irina\"));\n System.out.println(names);\n Iterator<String> it3 = names.iterator();\n while( it3.hasNext() ){\n String s = it3.next();\n if(s.contains(\"m\") || s.contains(\"M\")){ // - s.toLowerCase.contains(\"m\")\n it3.remove();\n }\n }\n System.out.println(names);\n\n /*\n ===============================================================\n for(Iterator<String> it3 = names.iterator(); it3.hasNext() ; ){\n String s = it3.next();\n if(s.toLowerCase().contains(\"m\")){\n it3.remove();\n }\n }\n ================================================================\n names.removeIf( s -> s.contains(\"m\") || s.contains(\"M\") );\n ================================================================\n names.removeAll( Arrays.asList( \"Mehmet\", \"Ozgur\", \"Mohammed\" ));\n ================================================================\n names.retainAll( Arrays.asList( \"Yucel\", \"Sha\", \"Ahmet\" ) );\n ================================================================\n boolean result = list.containsAll( Arrays.asList(5, 6, 9, 8, 11 ));\n */\n\n\n\n\n\n\n\n System.out.println(\"=========================================================================================\");\n\n\n\n\n\n }", "public NavigableSet<Groupe> getGroupes();", "public static void main(String[] args) {\n SortedSet<Long> longTreeSet = new TreeSet<>();\n longTreeSet.add(3L);\n longTreeSet.add(3L);\n longTreeSet.add(39L);\n longTreeSet.add(30L);\n longTreeSet.add(30L);\n\n System.out.println(\"longTreeSet = \" + longTreeSet);\n System.out.println(\"longTreeSet.size() = \" + longTreeSet.size());\n System.out.println(\"longTreeSet.first() = \" + longTreeSet.first());\n System.out.println(\"longTreeSet.last() = \" + longTreeSet.last());\n\n longTreeSet.addAll(Arrays.asList(15L, 18L, 15L, 18L));\n System.out.println(\"longTreeSet = \" + longTreeSet);\n\n //longTreeSet.add(null);\n // System.out.println(\"longTreeSet = \" + longTreeSet);\n\n\n System.out.println(\"longTreeSet.subSet(15L, 21L) = \" + longTreeSet.subSet(15L, 30L));\n System.out.println(\"longTreeSet.headSet(18L) = \" + longTreeSet.headSet(18L));\n System.out.println(\"longTreeSet.tailSet(18L) = \" + longTreeSet.tailSet(18L));\n\n SortedSet<Long> tailView = longTreeSet.tailSet(18L);\n System.out.println(\"tailView.remove(30L) = \" + tailView.remove(30L));\n System.out.println(\"longTreeSet = \" + longTreeSet);\n\n\n\n }", "public static void main(String[] args) {\n\n TreeSet<String> set = new TreeSet<String>();\n try {\n set.add(\"hello\");\n set.add(\"world\");\n set.add(\"welcome\");\n set.add(\"all\");\n set.add(\"all\");\n set.add(\"welcome\");\n\n for (String num : set) {\n System.out.println( num);\n\n }\n// set.add(null);\n } catch (NullPointerException e) {\n System.out.println(e);\n System.out.println(\"Set doesn't allow null value and duplicate value\");\n }\n\n }", "public static void main(String[] args) {\r\n\t\tSortedSet<String> ss = new TreeSet<String>();\r\n\t\tss.add(\"geeta\");\r\n\t\tss.add(\"seeta\");\r\n\t\tss.add(\"meeta\");\r\n\t\tss.add(\"neeta\");\r\n\t\tss.add(\"reeta\");\r\n\t\tSystem.out.println(\"SortedSet elements : \"+ ss);\r\n\t\tSystem.out.print(\"Iterating SortedSet elements : \");\r\n\t\tIterator it = ss.iterator();\r\n\t\twhile (it.hasNext()) \r\n\t\t{\r\n System.out.print(it.next() + \" \");\r\n }\r\n System.out.println();\r\n System.out.println(\"Lowest element :\"+ ss.first());\r\n System.out.println(\"Highest element :\"+ ss.last());\r\n System.out.println(\"Lesser than elements : \" +ss.headSet(\"seeta\"));\r\n System.out.println(\"Higher than or equals elements : \"+ ss.tailSet(\"meeta\"));\r\n System.out.println(\"Range elements : \"+ss.subSet(\"neeta\", \"reeta\"));\r\n \r\n\t}", "public static void main(String args[]) {\n\tSystem.out.println(\"--------------------------------------------------------------------\");\r\n\tSystem.out.println(\"Program 2.2: Sorting TreeSet when it has user-defined Objects/values\");\r\n\tTreeSet TS3 = new TreeSet();\r\n\tassign3And4_SubClass_Employee e31 = new assign3And4_SubClass_Employee(9, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e41 = new assign3And4_SubClass_Employee(4, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e51 = new assign3And4_SubClass_Employee(2, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e61 = new assign3And4_SubClass_Employee(2, \"Mamta\", 200);\r\n\tTS3.add(e31);\r\n\tTS3.add(e41);\r\n\tTS3.add(e51);\r\n\tTS3.add(e61);\r\n\tSystem.out.println(\"Sorted TreeSet TS3 is : \"+TS3); // sort then in Asc order + it doesnt allow duplicate values.\r\n\t}", "public static void main(String[] args) {\n\n\n TreeSet<String> t = new TreeSet();\n\n t.add(\"A\");\n t.add(\"B\");\n t.add(\"C\");\n\n TreeSet<String> u = t;\n\n for (String x : t) {\n System.out.println(x);\n u.add(\"\" + new Date());\n }\n\n }", "public static void main( String[] args )\n {\n OrderedSet set = new OrderedSet( true );\n set.add( new Integer( 6 ) );\n set.add( new Integer( 1 ) );\n set.add( new Integer( 4 ) );\n set.add( new Integer( 1 ) );\n System.out.println( set );\n System.out.println();\n\n System.out.println( \"Enumerate the OrderedSet\" );\n Enumeration e = set.elements();\n while ( e.hasMoreElements() )\n System.out.println( e.nextElement() );\n System.out.println();\n\n System.out.println( \"Iterate through the OrderedSet\" );\n for ( OrderedSetIterator i = set.begin(); !i.atEnd(); i.advance() )\n System.out.println( i.get() );\n System.out.println();\n\n System.out.println( \"Show that duplicates can be added.\" );\n set.add( new Integer( 8 ) );\n System.out.println( \"set = \" + set );\n\n set.add( new Integer( 4 ) );\n System.out.println( \"set = \" + set );\n }", "Boolean superset(MultiSet<X> s);", "@Override \n public Set<String> keySet() {\n \n \n // definido um set onde colocar o resultado\n Set<String> r = new HashSet<>();\n \n try {\n \n // abre uma conecção\n conn = Connect.connect();\n \n // abrir um statment com a querie que temos de executar\n PreparedStatement stm = conn.prepareStatement(\"SELECT nome FROM Componente WHERE visivel=TRUE;\");\n \n \n // o resultado colocado em rs\n ResultSet rs = stm.executeQuery();\n \n while (rs.next()) // enquanto existir o next\n r.add(rs.getString(\"nome\")); // adiciona o aluno\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return r;\n }", "public interface OrderedSet<T> {\r\n\r\n\tpublic void put(T key);\r\n\t\r\n\tpublic int rank(T key);\r\n\t\r\n\tpublic boolean contains(T key);\r\n\t\r\n\tpublic T select(int rank);\r\n\t\r\n\tpublic T[] keys();\r\n\t\r\n\tpublic T[] keys(int lo,int hi);\r\n\r\n\tpublic T[] keys(T lo, T hi);\r\n\t\r\n\t//(key-1)find the predecessor\r\n\tpublic T floor(T key);\r\n\t\r\n\t//(key+1)find the successor\r\n\tpublic T ceiling(T key);\r\n}", "public static void main(String[] args) {\n\t\tTreeSet<Integer> numset = new TreeSet<Integer>();//stored in order\n\t\tnumset.add(10);\n\t\tnumset.add(40); //string buffer is not implementing comparable class so it cannot be used in tree set\n\t\tnumset.add(30);\n\t\tnumset.add(20);\n\t\tnumset.add(10);\n\t\tSystem.out.println(numset);\n\t\tSystem.out.println(numset.headSet(40));//gives values lesser than it\n\t\tSystem.out.println(numset.tailSet(10));//gives equal or greater than it\n\t\tSystem.out.println(numset.subSet(10, 30));//gives starting values from starting and value before last element\n\t\tSortedSet<Integer> set2= new TreeSet<Integer>(); //store in sorted set\n\t\t\n\t\tset2=numset.subSet(10, 30);\n\t\tSystem.out.println(\"subset is \"+set2);\n\t\tSystem.out.println(numset.comparator());//returns null if values are already in order\n\t\tSystem.out.println(numset.higher(10));//gives value higher than this\n\t\tSystem.out.println(numset.lower(30));//gives value lower than this\n\t\tSystem.out.println(numset.descendingSet());\n\t\t\n\t\tIterator<Integer> iterator=numset.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\tIterator<Integer> iterator2=numset.descendingIterator();\n\t\twhile(iterator2.hasNext()) {\n\t\t\tSystem.out.println(iterator2.next());\n\t\t}\n\t}", "@Override\n public Set<K> keySet() {\n Set<K> keyset = new TreeSet<>();\n Inorder(root, keyset);\n return keyset;\n }", "public static void main(String[] args) {\n\t\tTreeSet<String> myset=new TreeSet<String>();\r\n\t\t myset.add(\"ardra\");\r\n\t\t myset.add(\"anakha\");\r\n\t\t myset.add(\"anusha\");\r\n\t\t myset.add(\"ananya\");\r\n\t\t \r\n\t\t \r\n\t\t TreeSet<String> myset1=new TreeSet<String>();\r\n\t\t myset1=(TreeSet<String>) myset.clone();\r\n\t\t System.out.println(myset1);\r\n\t\t \r\n\r\n\t}", "private Set<E> toSet(Node<E> n) {\n Set<E> result = new HashSet<>();\n toSet(result, n);\n return result;\n }", "Lista<K> keySet();", "public static void main(String[] args) {\n TreeSet<String> colorsTreeSet = new TreeSet<String>();\n colorsTreeSet.add(\"Red\");\n colorsTreeSet.add(\"White\");\n colorsTreeSet.add(\"Yellow\");\n colorsTreeSet.add(\"Black\");\n colorsTreeSet.add(\"Green\");\n colorsTreeSet.add(\"Pink\");\n\n System.out.println(\"\\n1. Java program to create a new tree set, add some colors (string) and print out the tree set\\n\" + colorsTreeSet);\n\n//2. Write a Java program to iterate through all elements in a tree set.\n System.out.println(\"\\n2. Java program to iterate through all elements in a tree set\");\n for (String element : colorsTreeSet) {\n System.out.print(element + \", \");\n }\n//3. Write a Java program to add all the elements of a specified tree set to another tree set.\n TreeSet<String> colorsTreeSet2 = new TreeSet<String>();\n colorsTreeSet2.addAll(colorsTreeSet);\n System.out.println(\"\\n\\n3. Java program to add all the elements of a specified tree set to another tree set.\\n\" + colorsTreeSet2);\n\n//4. Write a Java program to create a reverse order view of the elements contained in a given tree set.\n Iterator it = colorsTreeSet.descendingIterator();\n System.out.println(\"\\n4. Java program to create a reverse order view of the elements contained in a given tree set.\");\n while (it.hasNext()) {\n System.out.print(it.next() + \", \");\n }\n\n//5. Write a Java program to get the first and last elements in a tree set.\n System.out.println(\"\\n\\n5. Java program to get the first and last elements in a tree set.\");\n Object first_element = colorsTreeSet.first();\n System.out.println(\"The first element is: \" + first_element);\n\n // Find last element of the tree set\n Object last_element = colorsTreeSet.last();\n System.out.println(\"The last element is: \" + last_element);\n\n//6. Write a Java program to clone a tree set list to another tree set.\n TreeSet<String> cloneColors = (TreeSet<String>) colorsTreeSet.clone();\n System.out.println(\"\\nJava program to clone a tree set list to another tree set.\\n\" + cloneColors);\n\n//7. Write a Java program to get the number of elements in a tree set.\n System.out.println(\"\\nJava program to get the number of elements in a tree set.\\n\" + cloneColors.size());\n\n//8. Write a Java program to compare two tree sets.\n System.out.println(\"\\n8. Java program to compare two tree sets.\");\n TreeSet<String> compareColors = new TreeSet<String>();\n for (String element : colorsTreeSet) {\n System.out.println(cloneColors.contains(element) ? \"Yes\" : \"No\");\n }\n\n //9. Write a Java program to find the numbers less than 7 in a tree set.\n System.out.println(\"\\n9. Java program to find the numbers less than 7 in a tree set.\");\n\n TreeSet<Integer> treeSetNum = new TreeSet<Integer>();\n TreeSet<Integer> treeheadset = new TreeSet<Integer>();\n\n // Add numbers in the tree\n treeSetNum.add(1);\n treeSetNum.add(2);\n treeSetNum.add(3);\n treeSetNum.add(5);\n treeSetNum.add(6);\n treeSetNum.add(7);\n treeSetNum.add(8);\n treeSetNum.add(9);\n treeSetNum.add(10);\n\n treeheadset = (TreeSet) treeSetNum.headSet(7);\n\n Iterator iterator;\n iterator = treeheadset.iterator();\n\n while (iterator.hasNext()) {\n System.out.print(iterator.next() + \", \");\n }\n\n//10. Write a Java program to get the element in a tree set which is greater than or equal to the given element.\n System.out.println(\"\\n\\n10. Java program to get the element in a tree set which is greater than or equal to the given element.\");\n int element = 5;\n int i = treeSetNum.ceiling(element);\n\n System.out.println(\"Greater than or equal \" + element + \" is: \" + i);\n\n//11. Write a Java program to get the element in a tree set which is less than or equal to the given element.\n System.out.println(\"\\n11. Java program to get the element in a tree set which is less than or equal to the given element.\");\n int element2 = 6;\n int j = treeSetNum.floor(element2);\n\n System.out.println(\"GLess than or equal to \" + element2 + \" is: \" + j);\n\n//12. Write a Java program to get the element in a tree set which is strictly greater than or equal to the given element.\n System.out.println(\"\\n12. Java program to get the element in a tree set which is strictly greater than or equal to the given element.\");\n int element3 = 4;\n int a = treeSetNum.higher(element3);\n\n System.out.println(\"Strictly greater than \" + element3 + \" is: \" + a);\n\n//13. Write a Java program to get an element in a tree set which is strictly less than the given element.\n System.out.println(\"\\n13. Java program to get an element in a tree set which is strictly less than the given element.\");\n int element4 = 4;\n int b = treeSetNum.lower(element4);\n\n System.out.println(\"Strictly less than \" + element4 + \" is: \" + b);\n\n//14. Write a Java program to retrieve and remove the first element of a tree set.\n System.out.println(\"\\n14. Removes the first element:\\n\" + colorsTreeSet.pollFirst());\n\n//15. Write a Java program to retrieve and remove the last element of a tree set.\n System.out.println(\"\\n15. Removes the last element:\\n\" + colorsTreeSet.pollLast());\n\n//16. Write a Java program to remove a given element from a tree set.\n if (treeSetNum.remove(8)) {\n System.out.println(\"\\n16. Java program to remove a given element from a tree set.\\n\" + treeSetNum);\n } else {\n System.out.println(\"\\n16. Java program to remove a given element from a tree set.\\n\" + \"Element isn't correct\");\n }\n }", "Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);", "@Override \n public Set<String> keySet() {\n \n \n // definido um set onde colocar o resultado\n Set<String> r = new HashSet<>();\n \n try {\n \n // abre uma conecção\n conn = Connect.connect();\n \n // abrir um statment com a querie que temos de executar\n PreparedStatement stm = conn.prepareStatement(\"SELECT nomePacote FROM Pacote WHERE visivel=TRUE;\");\n \n \n // o resultado colocado em rs\n ResultSet rs = stm.executeQuery();\n \n while (rs.next()) // enquanto existir o next\n r.add(rs.getString(\"nomePacote\")); \n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return r;\n }", "MultiSet<X> add(X x);", "public static void main(String[] args) {\n\t\tTreeSet<String> ts = new TreeSet<String>();\n\t\t\n\t\tts.add(\"\");\n\t\t//System.out.println(ts);\n\n\t\tts.add(\"Red\");\n\t\tts.add(\"Green\");\n\t\tts.add(\"Blue\");\n\t\tts.add(\"White\");\n\t\tts.add(\"Orange\");\n\t\tts.add(\"\");\n\n\t\tSystem.out.println(ts);\n\t\tSystem.out.println(ts.size());\n\n\t\t// List<String> li = new ArrayList<String>(ts);\n\n\t\tTreeSet<String> ts1 = new TreeSet<String>();\n\n\t\tts1.add(\"Red\");\n\t\tts1.add(\"Green\");\n\t\tts1.add(\"Blue\");\n\t\tts1.add(\"WWhite\");\n\t\tts1.add(\"OOrange\");\n\n\t\tfor (String tss : ts) {\n\t\t\tSystem.out.println(ts1.contains(tss) ? \"YES\" : \"NO\");\n\t\t}\n\n\t\tTreeSet<Integer> ts2 = new TreeSet<Integer>();\n\n\t\tts2.add(1);\n\t\tts2.add(2);\n\t\tts2.add(3);\n\t\tts2.add(5);\n\t\tts2.add(9);\n\n\t\tIterator<Integer> itr = ts2.headSet(3).iterator();\n\n\t\twhile (itr.hasNext()) {\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\n\t\tSystem.out.println(\"======\");\n\n\t\tIterator<Integer> itr2 = ts2.tailSet(3).iterator();\n\n\t\twhile (itr2.hasNext()) {\n\t\t\tSystem.out.println(itr2.next());\n\t\t}\n\n\t\tSystem.out.println(\"======\");\n\n\t\tSystem.out.println(ts2.ceiling(11));\n\t\tSystem.out.println(ts2.floor(3));\n\n\t\tSystem.out.println(\"======\");\n\n\t\tSystem.out.println(ts2.lower(3));\n\t\tSystem.out.println(ts2.higher(3));\n\t\t\n\t\tSystem.out.println(\"======\");\n\t\t\n\t\tTreeSet t = new TreeSet();\n\t\t\n\t\tt.add(new StringBuffer(\"AA\"));\n\t\tt.add(new StringBuffer(\"BB\"));\n\t\tSystem.out.println(t);\n\t\t\n\n\t\t// ts1.addAll(ts);\n\t\t// System.out.println(ts1);\n\n\t\t/*\n\t\t * System.out.println(\"Treeset to ArrayList: \" + li); Collections.reverse(li);\n\t\t * System.out.println(\"After Reversing: \" + li);\n\t\t */\n\n\t\t/*\n\t\t * Iterator<String> itr = ts.iterator();\n\t\t * \n\t\t * while (itr.hasNext()) { System.out.println(itr.next()); }\n\t\t */\n\t}", "public static SortedSet transformedSortedSet(SortedSet set, Transformer transformer) {\n/* 322 */ return TransformedSortedSet.decorate(set, transformer);\n/* */ }", "public static void main(String[] args) {\n\t\tSet<String> set = new HashSet<String>();\n\t\t\t\n\t\tset.add(\"BMW\");\n\t\tset.add(\"Audi\");\n\t\tset.add(\"Honda\");\n\t\tset.add(\"Honda\");\n\t\t\n\t\tSystem.out.println(\"Hash Set\");\n\t\t\n\t\tfor (String item: set) {\n\t\t\tSystem.out.println(item);\n\t\t}\n\t\t\n\t\t// LinkedHashSet - Maintains the order in which elements are added\n\t\tSet<String> lHSet = new LinkedHashSet<String>();\n\t\tlHSet.add(\"BMW\");\n\t\tlHSet.add(\"Audi\");\n\t\tlHSet.add(\"Honda\");\n\t\tSystem.out.println(\"Linked Set\");\n\t\tfor (String item: lHSet) {\n\t\t\tSystem.out.println(item);\n\t\t}\n\t\t\n\t\t// TreeSet - Maintains the natural order , ie, 1, 2, 3, 4, \n\t\tSet<String> tSet = new TreeSet<String>();\n\t\ttSet.add(\"BMW\");\n\t\ttSet.add(\"Audi\");\n\t\ttSet.add(\"Honda\");\n\t\tSystem.out.println(\"Tree Set\");\n\t\tfor (String item: tSet) {\n\t\t\tSystem.out.println(item);\n\t\t}\n\t\t\n\t\tList<String> list = new ArrayList<String>();\n\t\t\n\t\tlist.add(\"BMW\");\n\t\tlist.add(\"Audi\");\n\t\tlist.add(\"Honda\");\n\t\t\n\t\tSystem.out.println(list);\n\t}", "public interface Set extends TraversableCollection\r\n{\r\n\t\r\n\t/**\r\n\t *\tremove the specified item from the Set\r\n\t *\r\n\t *\treturns true if removal was successful, false otherwise\r\n\t */\r\n\tpublic boolean remove(Object obj);\r\n}", "public static void main(String[] args) {\n\t\t\tList<String> hrLeaders = new ArrayList<>();\n\t\t\thrLeaders.add(\"762 - Barry Bonds\");\n\t\t\thrLeaders.add(\"755 - Hank Aaron\");\n\t\t\thrLeaders.add(\"714 - Babe Ruth\");\n\t\t\thrLeaders.add(\"687 - Alex Rodriquez\");\n\t\t\thrLeaders.add(\"686 - Brandon Davis\");\n\t\t\thrLeaders.add(\"686 - Brandon Davis\");\n\t\t\thrLeaders.add(\"660 - Willie Mays\");\n\t\t\t\n\t\t\tSystem.out.println(\"*****LIST EXAMPLE*****\");\n\t\t\tSystem.out.println(\"Here are the top \" + hrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(hrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\thrLeaders.set(0, \"763 - Mike Trout\");\n\t\t\tSystem.out.println(\"Updated Home Run List \\n\" + hrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\t\t\t\n\t\t\tSystem.out.print(\"Sorted Set after passing into TreeSet: \\n\"); \n\t Set<String> tree_Set1 = new TreeSet<String>(hrLeaders); \n\t System.out.println(tree_Set1);\n\t \n\t System.out.print( \"\\n\\n\" );\t\n\t\t\t\n\t\t\tSystem.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\n//Map EXAMPLE//\t\t\n\t\t\tSystem.out.println(\"*****Map EXAMPLE*****\");\n\t\t\tMap<Integer, String> AhrLeaders = new HashMap<>();\n\t\t\tAhrLeaders.put(762, \"Barry Bonds\");\n\t\t\tAhrLeaders.put(755, \"Hank Aaron\");\n\t\t\tAhrLeaders.put(714, \"Babe Ruth\");\n\t\t\tAhrLeaders.put(687, \"Alex Rodriquez\");\n\t\t\tAhrLeaders.put(686, \"Brandon Davis\");\n\t\t\tAhrLeaders.put(686, \"Brandon Davis\");\n\t\t\tAhrLeaders.put(660, \"Willie Mays\");\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Here are the top \" + AhrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(AhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\t\t\tArrayList<Integer> keyList = new ArrayList<Integer>(AhrLeaders.keySet());\n\t\t ArrayList<String> valueList = new ArrayList<String>(AhrLeaders.values());\n\n\t\t System.out.println(\"Top Homerun Leaders by number of Homeruns ::\"+keyList);\n\t\t System.out.println(\"Top Homerun Leaders by Name ::\"+valueList);\n\t\t\t\n\t\t System.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n//Set EXAMPLE and Treeset//\t\t\n\t\t\tSystem.out.println(\"*****Set EXAMPLE*****\");\n\t\t\tSet<String> BhrLeaders = new HashSet<String>();\n\t\t\tBhrLeaders.add(\"762 - Barry Bonds\");\n\t\t\tBhrLeaders.add(\"755 - Hank Aaron\");\n\t\t\tBhrLeaders.add(\"714 - Babe Ruth\");\n\t\t\tBhrLeaders.add(\"687 - Alex Rodriquez\");\n\t\t\tBhrLeaders.add(\"686 - Brandon Davis\");\n\t\t\tBhrLeaders.add(\"686 - Brandon Davis\");\n\t\t\tBhrLeaders.add(\"660 - Willie Mays\");\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Here are the top \" + BhrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(BhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\n\t\t\tBhrLeaders.add(\"661 - Mike Trout\"); \n\t\t\tSystem.out.println(\"Updated Home Run List: \\n\" + BhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\t\t\tSystem.out.print(\"Sorted Set after passing into TreeSet: \\n\"); \n\t Set<String> tree_Set = new TreeSet<String>(BhrLeaders); \n\t System.out.println(tree_Set);\n\t\t\t\n\t System.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\n//Queue EXAMPLE//\t\t\n\t\t\tSystem.out.println(\"*****QUEUE EXAMPLE*****\");\n\t\t\t\n\t\t\tList<String> listhrLeaders = Arrays.asList(\"Barry Bond - 762\", \"Hank Aaron - 755\", \"Babe Ruth - 714\", \"Alex Rodriequez - 687\", \"Brandon Davis - 686\", \"Brandon Davis - 686\", \"Willie Mays - 660\");\n\t\t\tQueue<String> queueNames = new LinkedList<>(listhrLeaders);\n\t\t\tSystem.out.println(queueNames);\n\t\t\t\n\t\t\tqueueNames.add(\"661 - Mike Trout\");\n\t\t\tqueueNames.add(\"660 - Bryce Harper\");\n\t\t\tSystem.out.println(queueNames);\n\t\t\t\n\t\t\t\t\t\n\t\n\t}", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "public Geneset(){\r\n\t\tthis.geneSetElements=new ArrayList();\r\n\t\r\n\t}", "@Override\n\tpublic ArregloDinamico<K> keySet() {\n\t\tArregloDinamico<K> respuesta = new ArregloDinamico<K>(N);\n\t\tfor(int i = 0; i<M ; i++)\n\t\t{\n\t\t\tArregloDinamico<NodoTabla<K,V>> temporal = map.darElemento(i).getAll();\n\t\t\tfor(int j=0 ; j < temporal.size() ; j++)\n\t\t\t{\n\t\t\t\tNodoTabla<K,V> elemento = temporal.darElemento(j);\n\t\t\t\tif(elemento != null && elemento.darLlave() != null)\n\t\t\t\t\trespuesta.addLast(elemento.darLlave());\t\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}", "SelectSubSet createSelectSubSet();", "interface MultiSet<X> {\n // Add x to this multiset\n MultiSet<X> add(X x);\n\n // Apply f to every element of this multiset, collect results as a multiset\n <R> MultiSet<R> map(Function<X, R> f);\n\n // Count the number of elements in this multiset\n Integer count();\n\n // Is this multiset the same as the given multiset?\n Boolean same(MultiSet<X> s);\n\n // Does this multiset contain all of the elements of the given multiset?\n Boolean superset(MultiSet<X> s);\n\n // Does the given multiset contain all of the elements of given multiset?\n Boolean subset(MultiSet<X> s);\n\n // Does this mutliset contain the given element?\n Boolean contains(X x);\n\n // Does there exist an element that satisfies p in this multiset?\n Boolean exists(Predicate<X> p);\n\n // Do all elements satisfy p in this multiset?\n Boolean forAll(Predicate<X> p);\n\n // Convert this multiset to a list of elements (order is unspecified)\n Listof<X> toList();\n\n // Produce an element of this multiset (if one exists)\n Optional<X> elem();\n\n // Choose an element from this (if one exists) and\n // produce the element and rest of the multiset\n Optional<Pairof<X, MultiSet<X>>> choose();\n\n // Convert this multiset into a set\n Set<X> toSet();\n}", "@DISPID(1610940447) //= 0x6005001f. The runtime will prefer the VTID if present\n @VTID(53)\n OrderedGeometricalSets orderedGeometricalSets();", "public Set<E> Setcall(int opcion) {\n\t\tswitch(opcion) {\n\t\tcase 1:\n\t\t\treturn new HashSet<E>();\n\t\tcase 2:\n\t\t\treturn new TreeSet<E>();\n\t\tcase 3:\n\t\t\treturn new LinkedHashSet<E>();\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\t \n\t\tTreeSet<String> obj = new TreeSet<String>();\n\t\t\n\t\t\n\t\tobj.add(\"ABC\");\n\t\tobj.add(\"String\");\n\t\tobj.add(\"Test\");\n\t\tobj.add(\"Pen\");\n\t\tobj.add(\"Ink\");\n\t\tobj.add(\"Jack\");\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tTreeSet<Integer> obj1 = new TreeSet<Integer>();\n\t\t\n\t\tobj1.add(88);\n\t\tobj1.add(45);\n\t\tobj1.add(7);\n\t\tobj1.add(3);\n\t\tobj1.add(222);\n\t\t\n\t\tSystem.out.println(obj1);\n\t\t\n\t\t\n\n\t}", "public MyTreeSet()\r\n {\r\n root = null;\r\n }", "public PointSET() {\n mPoints = new TreeSet<Point2D>();\n }", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\tSet<Entry<K, V>> set = new HashSet<Entry<K, V>>();\n\t\tIterator it1 = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it1.hasNext()) {\n\t\t\tit1.next();\n\t\t\tIterator it2 = tabla.get(i).keySet().iterator();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tK clave = tabla.get(i).keySet().get(j);\n\t\t\t\tV valor = tabla.get(i).valueSet().get(j);\n\t\t\t\tEntrada<K, V> entry = new Entrada<K, V>(clave, valor);\n\t\t\t\tset.add(entry);\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn set;\n\t}", "Collection<Tree<V, E>> getTrees();", "public static Set<Integer> sorteia ( int quantidadeDeElementosASortear, int limiteInferior, int limiteSuperior){\n\t\t List<Integer> elementos = new ArrayList<Integer>(limiteSuperior - limiteInferior + 1);\n\t\t for (int i = limiteInferior; i <= limiteSuperior; i++){\n\t\t elementos.add(Integer.valueOf(i));\n\t\t }\n\t\t \n\t\t // altera a ordem aleatóriamente\n\t\t Collections.shuffle (elementos) ;\n\t\t \n\t\t // sorteia o numero de elementos necessários\n\t\t \n\t\t Set<Integer> resultado = new TreeSet<Integer>(elementos.subList(0,quantidadeDeElementosASortear));\n\t\t \n\t\t return resultado;\n\t\t \n\t\t}", "@Test\r\n public void addToStringSet() throws Exception {\r\n TreeSet<String> s = new TreeSet<>();\r\n assertTrue(s.add(\"kek\"));\r\n assertTrue(s.contains(\"kek\"));\r\n }", "protected /*@ non_null @*/ JMLObjectSet<E> fast_insert(E elem) {\n return new JMLObjectSet<E>( // cons() clones if necessary\n JMLListObjectNode.cons(elem, the_list),\n size+1);\n }", "public static void main(String[] args) {\n SortedSet<String> fruits = new TreeSet<>(Comparator.reverseOrder());\n\n /*\n The above TreeSet with the custom Comparator is the concise form of the following:\n SortedSet<String> fruits = new TreeSet<>(new Comparator<String>() {\n @Override\n public int compare(String s1, String s2) {\n return s2.compareTo(s1);\n }\n });\n */\n\n // Adding new elements to a TreeSet\n fruits.add(\"Banana\");\n fruits.add(\"Apple\");\n fruits.add(\"Pineapple\");\n fruits.add(\"Orange\");\n\n System.out.println(\"Fruits Set : \" + fruits);\n\n System.out.println(fruits.tailSet(\"Banana\"));\n System.out.println(fruits.subSet(\"Orange\", \"Banana\"));\n // creating a TreeSet\n TreeSet<Integer> treeadd = new TreeSet<>();\n\n // adding in the tree set\n treeadd.add(12);\n treeadd.add(11);\n treeadd.add(16);\n treeadd.add(15);\n\n // getting ceiling value for 13\n System.out.println(\"Ceiling value for 13: \" + treeadd.ceiling(13));//15\n System.out.println(\"Flooring value for 13: \" + treeadd.floor(13));//12\n }", "@Test\r\n public void descendingSet() throws Exception {\r\n TreeSet<Integer> kek = new TreeSet<>();\r\n kek.addAll(sInt);\r\n TreeSet<Integer> check = (TreeSet<Integer>) kek.descendingSet();\r\n check.add(43);\r\n assertTrue(check.contains(43));\r\n assertTrue(kek.contains(43));\r\n assertTrue(kek.remove(43));\r\n assertFalse(check.contains(43));\r\n assertFalse(kek.contains(43));\r\n }", "@Test \r\n\t\tpublic void testinsertAll() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(list1);\r\n\t\t\t// create set = to unique values in list \r\n\t\t\ttestingSet2 = new IntegerSet(unique); \r\n\t\t\t// 2 set should be equal \r\n\t\t\t// assertEquals for these parameters is a deprecated method \r\n\t\t\tassertArrayEquals(testingSet.toArray(), testingSet2.toArray()); \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t}", "@Override\n public Set<Map.Entry<String,Componente>> entrySet() {\n \n //resultado\n Set<Map.Entry<String,Componente>> r = new HashSet<>();\n \n \n Componente c;\n \n try {\n \n conn = Connect.connect();// abrir uma conecção\n \n // querie que obtem os dados para poder\n PreparedStatement stm = conn.prepareStatement(\"SELECT nome, tipo, designacao, preco, stock FROM Componente WHERE visivel=TRUE;\");\n \n // agora executa a querie\n ResultSet rs = stm.executeQuery();\n \n //percorrer o resultado\n while (rs.next()) {\n c = new Componente(rs.getString(\"nome\"),rs.getString(\"tipo\"),rs.getString(\"designacao\"),rs.getDouble(\"preco\"),rs.getInt(\"stock\"));\n \n /*\n AGORA FALTA OS METUDOS PARA PREENCHER A LISTA DAS CONFIGURAÇÕES\n \n Agora temos de ter \n */\n \n this.adicionarIncompativeis(c);\n this.adicionarObrigatorias(c);\n\n \n r.add(new AbstractMap.SimpleEntry(c.getNome(),c));\n }\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn); // fechar a connecção\n }\n \n return r;\n }", "public IdentificationSet() {\n map = new HashMap<>();\n init();\n }", "public SortedSet<Date> getSelection()\n/* */ {\n/* 179 */ return new TreeSet(this.selectedDates);\n/* */ }", "public NavigableSet<Groupe> getGroupes(Utilisateur utilisateur);", "public static WordSet generateSet(int tipo)\n\t{\n\t if (tipo == 1)\n\t\t return new SimpleSet();\n\telse\n {\n if (tipo == 2 )\n {\n return new RedBlackTreeSet();\n }\n if (tipo == 3)\n {\n return new SplayTreeSet(); \n }\n if (tipo == 4)\n {\n return new HashMapSet ();\n }\n \n if (tipo ==5)\n {\n return new TreeMapSet();\n }\n \n }\t\t\n return null;\t\t\n\t}", "@Override\n public Set<Map.Entry<String,Pacote>> entrySet() {\n \n //resultado\n Set<Map.Entry<String,Pacote>> r = new HashSet<>();\n \n \n Pacote p;\n \n try {\n \n conn = Connect.connect();// abrir uma conecção\n \n // querie que obtem os dados para poder\n PreparedStatement stm = conn.prepareStatement(\"SELECT nomePacote, preco FROM Pacote WHERE visivel=TRUE;\");\n \n // agora executa a querie\n ResultSet rs = stm.executeQuery();\n \n //percorrer o resultado\n while (rs.next()) {\n p = new Pacote(rs.getString(\"nomePacote\"),rs.getDouble(\"preco\"));\n \n \n /*\n AGORA FALTA OS METUDOS PARA PREENCHER A LISTA DAS CONFIGURAÇÕES\n */\n \n this.addComponentes(p);\n \n \n \n r.add(new AbstractMap.SimpleEntry(p.getNome(),p));\n }\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn); // fechar a connecção\n }\n return r;\n }", "@Override\n\tpublic Set<K> keySet() {\n\t\tArrayList<K> claves = new ArrayList<K>();\n\t\tIterator it = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tIterator it2 = tabla.get(i).keySet().iterator();\n\t\t\tit.next();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tclaves.add(tabla.get(i).keySet().get(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn new HashSet<K>(claves);\n\t}", "public SetSet() {\n\t}", "public MyHashSet() {\n s = new ArrayList<>();\n }", "public interface ListSettable<T> {\n\n void setData(List<T> data);\n}", "public static void main(String[] args) {\n/*\n * Implementações\n * Set notas = new HashSet(); --> antes do Java 5\n * HashSet<Double> notas = new HashSet<>();\n * Set<Double> notas = new HashSet<>(); //--> Generics (jdk5) - Diamond Operator(jdk7)\n * \n */\n\t\t//--> Set não aceita elementos duplicados \n//\t\tSet<Double> notas = Set.of(7d, 8.5, 9.3, 5d, 7d, 0d, 3.6); \t\t\n//\t\tnotas.add(1d);\n//\t\tnotas.add(1d);\n//\t\tSystem.out.println(notas);\n\t\t\n\t\t\tSystem.out.println(\"Crie um conjunto e adicione as notas:\");\n\t\t\t//Elementos serão impressos em ordem aleatória\n\t\t\t//Elementos duplicados não serão impressos\n\t\t\tSet<Double> notas = new HashSet<>(Arrays.asList(7d, 8.5, 9.3, 5d, 7d, 0d, 3.6));\n\t\t\tSystem.out.println(notas.toString());\n\t\t\t\n\t\t\t//indexOf --> Set não trabalha com indice, não é possível fazer a pesquisa\n//\t\t\tSystem.out.println(\"Exiba a posição da nota 5.0: \" + notas.indexOf(5.0));\n\n\t\t\t\t// não se trabalha com indice(posição) no Set\n//\t\t\t\tSystem.out.println(\"Adicione na lista a nota 8.0 na posição 4: \");\n\n\t\t\t\t// set --> não há como fazer atualizacao usando Set\n//\t\t\t\tSystem.out.println(\"Substitua a nota 5.0 pela nota 6.0:\");\n//\t\t\t\tnotas.set(notas.indexOf(5.0), 6.0);\n//\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t// contains --> retorna boolean (true or false) se determinado elemento existe\n\t\t\t\t// na lista\n\t\t\t\tSystem.out.println(\"Confira se a nota 5.0 está na lista: \" + notas.contains(5.0));\n\n\t\t\t\t// get --> não consegue executar o método em Set apenas em List\n//\t\t\t\tSystem.out.println(\"Exiba a terceira nota: \" + notas.get(2));\n//\t\t\t\tSystem.out.println(notas.toString());\n\t\t\t\t\n\t\t\t\t// Collections.min/max --> não existem métodos nativos em Set para\n\t\t\t\t// comparacao de valores minimos e maximos\n\t\t\t\t// porém sendo Set uma Collection\n\t\t\t\t// pode-se utilizar metodos de Collections na implementacao\n\t\t\t\tSystem.out.println(\"Exiba a menor nota: \" + Collections.min(notas));\n\t\t\t\t// Collections.max\n\t\t\t\tSystem.out.println(\"Exiba a maior nota: \" + Collections.max(notas));\n\t\t\t\t\n\t\t\t\t// Soma de valores\n\t\t\t\tIterator<Double> iterator = notas.iterator();\n\t\t\t\tDouble soma = 0d;\n\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\tDouble next = iterator.next();\n\t\t\t\t\tsoma += next;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Exiba a soma dos valores: \" + soma);\n\n\t\t\t\t// Media dos valores\n\t\t\t\tSystem.out.println(\"Exiba a média dos valores: \" + (soma / notas.size()));\n\n\t\t\t\t// remove --> pode ser usado para remocao pelo elemento ou indice\n\t\t\t\tSystem.out.println(\"Remova a nota 0.0\");\n\t\t\t\tnotas.remove(0.0); // remocao do elemento 0.0 ou 0d\n\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t// remove na posição --> não pode ser usado pois Set não é indexado\n//\t\t\t\tSystem.out.println(\"Remova a nota na posição 0\");\n//\t\t\t\tnotas.remove(0);\n//\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t// Remocao de uma colecao de elementos\n\t\t\t\tIterator<Double> iterator1 = notas.iterator();\n\t\t\t\twhile (iterator1.hasNext()) {\n\t\t\t\t\tDouble next = iterator1.next();\n\t\t\t\t\tif (next < 7)\n\t\t\t\t\t\titerator1.remove();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t//Implementando o conjunto com LinkedHasSet\n\t\t\t\t//Exibir os elementos na ordem em que foram inseridos\n\t\t\t\tSystem.out.println(\"Exiba todas as notas na ordem em que foram inseridos:\");\n\t\t\t\tSet<Double> notas2 = new LinkedHashSet<>();\n\t\t\t\tnotas2.add(7.0);\n\t\t\t\tnotas2.add(8.5);\n\t\t\t\tnotas2.add(9.3);\n\t\t\t\tnotas2.add(5.0);\n\t\t\t\tnotas2.add(7.0);\n\t\t\t\tnotas2.add(0.0);\n\t\t\t\tnotas2.add(3.6);\n\t\t\t\t\n\t\t\t\tSystem.out.println(notas2);\n\n\t\t\t\t//Implementando o conjunto com TreeSet\n\t\t\t\t//Exibir os elementos na ordem crescente\n\t\t\t\tSystem.out.println(\"Exiba todas as notas na ordem crescente:\");\n\t\t\t\tSet<Double> notas3 = new TreeSet<>(notas2);\n\t\t\t\tSystem.out.println(notas3);\n\t\t\t\t\n\t\t\t\t// clear --> apagar um conjunto\t\t\n\t\t\t\tSystem.out.println(\"Apague todo o conjunto\"); \n\t\t\t\tnotas.clear();\n\t\t\t\tSystem.out.println(notas);\n\t\t\t\t\n\t\t\t\t// isEmpty --> retorna boolean (true or false) para validacao se a lista\n\t\t\t\t// encontra-se vazia ou nao\n\t\t\t\tSystem.out.println(\"Confira se o conjunto está vazio notas1: \" + notas.isEmpty());\n\t\t\t\tSystem.out.println(\"Confira se o conjunto está vazio notas2: \" + notas2.isEmpty());\n\t\t\t\tSystem.out.println(\"Confira se o conjunto está vazio: notas3\" + notas3.isEmpty());\n\t\t\t}", "@Test\r\n public void addAllFromSet() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n s.addAll(sInt);\r\n assertTrue(s.contains(1));\r\n assertTrue(s.contains(2));\r\n assertTrue(s.contains(3));\r\n assertTrue(s.contains(4));\r\n assertTrue(s.contains(5));\r\n }", "public NavigableSet<Utilisateur> getUtilisateurs();", "public Map<K, Set<V>> coreGetAllSupersetsOf(Collection<?> set, int mode) {\n // Skip elements in the collection having an incorrect type, as we are looking for subsets which simply\n // cannot contain the conflicting items\n Set<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n List<SetTrieNode> frontier = new ArrayList<>();\n frontier.add(superRootNode);\n\n // For every value, extend the frontier with the successor nodes for that value.\n V from = null;\n V upto = null;\n\n // Use a flag for null safety so we do not rely on the comparator to treat null as the least element\n boolean isLeastFrom = true;\n while(it.hasNext()) {\n from = upto;\n upto = it.next();\n\n List<SetTrieNode> nextNodes = new ArrayList<>();\n\n // Based on the frontier, we need to keep scanning nodes whose values is in the range [from, upto]\n // until we find the nodes whose values equals upto\n // Only these nodes then constitute the next frontier\n Collection<SetTrieNode> currentScanNodes = frontier;\n do {\n Collection<SetTrieNode> nextScanNodes = new ArrayList<>();\n for(SetTrieNode currentNode : currentScanNodes) {\n if(currentNode.nextValueToChild != null) {\n NavigableMap<V, SetTrieNode> candidateNodes = isLeastFrom\n ? currentNode.nextValueToChild.headMap(upto, true)\n : currentNode.nextValueToChild.subMap(from, true, upto, true);\n\n for(SetTrieNode candidateNode : candidateNodes.values()) {\n if(Objects.equals(candidateNode.value, upto)) {\n nextNodes.add(candidateNode);\n } else {\n nextScanNodes.add(candidateNode);\n }\n }\n }\n }\n currentScanNodes = nextScanNodes;\n } while(!currentScanNodes.isEmpty());\n\n frontier = nextNodes;\n\n isLeastFrom = false;\n }\n\n Map<K, Set<V>> result = new HashMap<>();\n\n // Copy all data entries associated with the frontier to the result\n Stream<SetTrie<K, V>.SetTrieNode> stream = frontier.stream();\n\n if(mode != 0) {\n stream = stream.flatMap(node -> reachableNodesAcyclic(\n node,\n x -> (x.nextValueToChild != null ? x.nextValueToChild.values() : Collections.<SetTrieNode>emptySet()).stream()));\n }\n\n stream.forEach(currentNode -> {\n if(currentNode.keyToSet != null) {\n for(Entry<K, NavigableSet<V>> e : currentNode.keyToSet.entrySet()) {\n result.put(e.getKey(), e.getValue());\n }\n }\n });\n\n return result;\n }", "public interface EntityTable<T extends Entity> extends Set<T>, Serializable {\n\n\t/**\n\t * Get all Entities stored in this table at a specified location. Note that the members of this Collection\n\t * may change over time. This method makes two guarantees: that at the time of being called, all members of\n\t * this Set with the specified Location will be present in the Collection; and that all future members of the\n\t * Collection will also have that Location.\n\t *\n\t * @param loc the Location to find Entities from\n\t * @return a Collection view of the entities with Location loc\n\t */\n\tSet<T> get(Location loc);\n\n\tstatic <T extends Entity> EntityTable<T> unmodifiable(EntityTable<T> et) {\n\t\treturn new UnmodifiableEntityTable<>(et);\n\t}\n\n\t/**\n\t * Basic wrapper class to prevent external modification\n\t */\n\tclass UnmodifiableEntityTable<E extends Entity> implements EntityTable<E> {\n\n\t\tprivate final EntityTable<E> parent;\n\n\t\tpublic UnmodifiableEntityTable(EntityTable<E> parent) {\n\t\t\tthis.parent = parent;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean add(E e) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic Iterator iterator() {\n\t\t\treturn parent.iterator();\n\t\t}\n\n\t\t@Override\n\t\tpublic int size() {\n\t\t\treturn parent.size();\n\t\t}\n\n\t\t@Override\n\t\tpublic Set<E> get(Location loc) {\n\t\t\tSet<E> out = parent.get(loc);\n\t\t\t//System.out.println(out);\n\t\t\treturn out;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn parent.isEmpty();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn parent.contains(o);\n\t\t}\n\n\t\t@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn parent.toArray();\n\t\t}\n\n\t\t@Override\n\t\tpublic Object[] toArray(Object[] a) {\n\t\t\treturn parent.toArray(a);\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean remove(Object o) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean containsAll(Collection c) {\n\t\t\treturn parent.containsAll(c);\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean addAll(Collection c) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean retainAll(Collection c) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean removeAll(Collection c) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic void clear() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\t}\n}", "@Override\n\tpublic ArregloDinamico<V> valueSet() {\n\t\tArregloDinamico<V> respuesta = new ArregloDinamico<V>(N);\n\t\tfor(int i = 0; i<M ; i++)\n\t\t{\n\t\t\tArregloDinamico<NodoTabla<K,V>> temporal = map.darElemento(i).getAll();\n\t\t\tfor(int j=0 ; j < temporal.size() ; j++)\n\t\t\t{\n\t\t\t\tNodoTabla<K,V> elemento = temporal.darElemento(j);\n\t\t\t\tif(elemento != null && elemento.darLlave() != null)\n\t\t\t\t\trespuesta.addLast(elemento.darValor());\t\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}" ]
[ "0.68232846", "0.6798413", "0.67733544", "0.6718781", "0.66090244", "0.65723443", "0.6554381", "0.6494207", "0.648755", "0.6474849", "0.64515996", "0.62830377", "0.62654865", "0.6258997", "0.6235848", "0.6222683", "0.621415", "0.620799", "0.6173812", "0.6171552", "0.6165244", "0.61622345", "0.6159885", "0.61594653", "0.6149408", "0.61479765", "0.6142343", "0.6114124", "0.6055166", "0.60441816", "0.6020309", "0.5968454", "0.5967486", "0.5963582", "0.5933112", "0.59134936", "0.59080493", "0.59067893", "0.5904845", "0.589816", "0.58711684", "0.5870289", "0.5858101", "0.5848746", "0.58406734", "0.5829666", "0.5821785", "0.58153796", "0.58125716", "0.58043706", "0.57972693", "0.57960486", "0.5780263", "0.5772999", "0.5770371", "0.5767892", "0.5767685", "0.5767136", "0.57660896", "0.57617456", "0.57567006", "0.5744029", "0.57373977", "0.57347566", "0.57315314", "0.57196856", "0.5716722", "0.5715404", "0.5712275", "0.5698863", "0.5694589", "0.56847125", "0.568184", "0.5678311", "0.56593037", "0.5655214", "0.5655183", "0.5642461", "0.56390107", "0.5637435", "0.5633784", "0.56252", "0.56181866", "0.56113344", "0.56069446", "0.5598343", "0.55945593", "0.55927473", "0.5587684", "0.5585787", "0.5583733", "0.5577057", "0.55755126", "0.5565976", "0.5558214", "0.55437887", "0.5542271", "0.5537405", "0.5534166", "0.5533367", "0.55289143" ]
0.0
-1
Overwrite this method for custom highlighters
public void paint(final Graphics2D g, final int x, final int y, final int width, final int height) { if (this.getBorderColor() != null) { g.setColor(this.getBorderColor()); g.drawRect(0, y, width, height); } if (this.getContentColor() != null) { g.setColor(this.getContentColor()); g.fillRect(0, y, width, height); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DefaultHighlighter() {\n setDrawsLayeredHighlights(true);\n }", "public Color getHighlight();", "public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}", "protected Highlighter createHighlighter() {\n return new BasicHighlighter();\n }", "public boolean getHighlight();", "@Override\n public void removeHighlight()\n {\n }", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "@Override\n\tpublic void highlight(ImageType origin) {\n\t\t\n\t}", "public Color getHighlightColor() {\n return highlightColor;\n }", "public void setHighlight(boolean high);", "public Highlighter.Highlight[] getHighlights()\n/* */ {\n/* 86 */ return null;\n/* */ }", "@Override\r\n\tpublic Color getHighlightColor(Object rel) {\n\t\treturn DARK_RED;\r\n\t}", "public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "public void removeAllHighlights() {}", "@Override\r\n\tpublic Image getHighlightImage() {\n\t\treturn null;\r\n\t}", "void setAddHighlightListener(AddHighlightListener listener);", "@Override\r\n public void elementHighlighted(Object source, int... data) {\n }", "B highlightExpression(String highlightExpression);", "private void initHighlightLines()\r\n\t{\t\t\r\n\t\tfofHighlightRect = lang.newRect(new Offset(-2, -2, \"sourceCode\", AnimalScript.DIRECTION_NW), new Offset(2, 13*21, \"sourceCode\", AnimalScript.DIRECTION_NE), \"fofHighlightRect\", null, fofSourceCodeHighlightRect);\r\n\t\taddAdjHighlightRect = lang.newRect(new Offset(0, 5, \"fofHighlightRect\", AnimalScript.DIRECTION_SW), new Offset(2, 2, \"sourceCode\", AnimalScript.DIRECTION_SE), \"addAdjHighlightRect\", null, addAdjSourceCodeHighlightRect);\r\n\t\t\r\n\t\tfofHighlightRect.hide();\r\n\t\taddAdjHighlightRect.hide();\r\n\t}", "public void setHighlight() {\n _highlight = HighlightMode.NORMAL;\n \n _input.setHighlightIntern();\n _output.setHighlightIntern();\n \n _isHighlighted = true;\n \n }", "public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p)\n/* */ throws BadLocationException\n/* */ {\n/* 64 */ return new Object();\n/* */ }", "String highlightTerm(String term);", "public Paint getPaintHighlight() {\n return mHighlightPaint;\n }", "public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}", "public void changeHighlight(Object tag, int p0, int p1)\n/* */ throws BadLocationException\n/* */ {}", "default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted', 'true')\", element());\n }", "private void performHighlight() {\n final String wordToHighlight;\n if (autoHighlight && !editor.getSelectionModel().hasSelection()) {\n int currentOffset = editor.getCaretModel().getOffset();\n wordToHighlight = BWACUtils.extractWordFrom(editor.getDocument().getText(), currentOffset);\n } else {\n wordToHighlight = null;\n }\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n buildHighlighters(wordToHighlight);\n }\n });\n }", "private IRenderingElement generateHighlightElement( IAtom atom ) {\n return null;\n }", "public void removeHighlight() {\n if (highlightWord == null) {\r\n return;\r\n }\r\n \r\n for (int i = 0; i < highlightWord.length(); i++) {\r\n if (hightlightDir == Ranker.RIGHT) {\r\n cells[highlightX][highlightY + i].highlight((char) 0);\r\n } else {\r\n cells[highlightX + i][highlightY].highlight((char) 0);\r\n }\r\n }\r\n repaint();\r\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "public void setHighlightColor(Color c) {\n this.highlightColor = c;\n }", "public String getHighlights() {\n return this.highlights;\n }", "public boolean isHighlight() {\r\n\t\treturn _highlight;\r\n\t}", "@Override\n\tprotected void highlightText(int start, int length) {\n\n\t\tsuper.highlightText(start, length);\n\n\t\ttry {\n\t\t\tint end = this.getLength();\n\n\t\t\tString content = this.getText(0, end);\n\n\t\t\t// TODO :: actually use the start and length passed in as arguments!\n\t\t\t// (currently, they are just being ignored...)\n\t\t\tstart = 0;\n\t\t\tend -= 1;\n\n\t\t\tchar lastDelimiter = ' ';\n\n\t\t\twhile (start <= end) {\n\n\t\t\t\t// while we have a delimiter...\n\t\t\t\tchar curChar = content.charAt(start);\n\t\t\t\twhile (isDelimiter(curChar)) {\n\n\t\t\t\t\tlastDelimiter = curChar;\n\n\t\t\t\t\t// ... check for the start of an object\n\t\t\t\t\tif (curChar == '{') {\n\t\t\t\t\t\tstart = highlightObject(content, start, end);\n\n\t\t\t\t\t// ... check for a comment (which starts with a delimiter)\n\t\t\t\t\t} else if (isCommentStart(content, start, end)) {\n\t\t\t\t\t\tstart = highlightComment(content, start, end);\n\n\t\t\t\t\t// ... and check for a quoted string\n\t\t\t\t\t} else if (isStringDelimiter(content.charAt(start))) {\n\n\t\t\t\t\t\t// then let's get that string!\n\t\t\t\t\t\tboolean singleForMultiline = false;\n\t\t\t\t\t\tboolean threeForMultiline = false;\n\t\t\t\t\t\tstart = highlightString(content, start, end, singleForMultiline, threeForMultiline);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// please highlight the delimiter in the process ;)\n\t\t\t\t\t\tif (!Character.isWhitespace(curChar)) {\n\t\t\t\t\t\t\tthis.setCharacterAttributes(start, 1, attrReservedChar, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (start < end) {\n\n\t\t\t\t\t\t// jump forward and try again!\n\t\t\t\t\t\tstart++;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurChar = content.charAt(start);\n\t\t\t\t}\n\n\t\t\t\t// or any other token instead?\n\t\t\t\tstart = highlightOther(content, start, end, lastDelimiter);\n\t\t\t}\n\n\t\t} catch (BadLocationException e) {\n\t\t\t// oops!\n\t\t}\n\t}", "@Override\n public Color getHighlightedColor() { return getLine().getMapColor(); }", "BalloonAttributes getHighlightAttributes();", "public JAnnotationCheckBox(){\n super();\n this.setOpaque(true);\n /*//this.setVerticalTextPosition(0);\n selectionBorderColor = UIManager.getColor(\"Tree.selectionBorderColor\");\n selectionForeground = UIManager.getColor(\"Tree.selectionForeground\");\n selectionBackground = UIManager.getColor(\"Tree.selectionBackground\");\n textForeground = UIManager.getColor(\"Tree.textForeground\");\n textBackground = UIManager.getColor(\"Tree.textBackground\");\n\n if (isHighlighted){\n\n this.setForeground(selectionForeground);\n this.setBackground(selectionBackground);\n } else {\n this.setForeground(textForeground);\n this.setBackground(textBackground);\n }*/\n\n }", "public void addHighlighter(Highlighter hl) {\r\n addHighlighter(hl, false);\r\n }", "public final InputMethodHighlight getHighlight() {\n return highlight;\n }", "public float getHighlightLineWidth() { return this.mHighlightLineWidth; }", "public HighlightMode getHighlightMode() {\n return highlightMode;\n }", "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }", "abstract void nameHighlight(Spannable name, String matchStr, int color,\r\n int text_color);", "public void run(){\n // If there is not word to recognized or the word is empty then do not recognize it\n if(word == null || word.trim().isEmpty()){\n return;\n }\n\n // Set up the highlighter\n DefaultHighlighter.DefaultHighlightPainter highLighter = FileUtils.getInstance().getHighlighter();\n\n // Highlight words at the exact position\n try{\n textPane.getHighlighter().addHighlight(startPosition, endPosition, highLighter);\n }catch(Exception e){\n e.printStackTrace();\n }\n }", "public OperationHighlight(Coloring coloring, int start, int end) {\n this.coloring = coloring;\n this.start = start;\n this.end = end;\n }", "void highlightNextWord() {\n\t\tif(findIndex < finder.size()) {\n\t\t\ttextEditor.getHighlighter().removeAllHighlights();\n\t\t\ttry {\n\t\t\t\thighlighter.addHighlight(finder.get(findIndex).p1, \n\t\t\t\t\t\tfinder.get(findIndex).p2-1, painter);\n\t\t\t} catch (BadLocationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfindIndex++;\n\t\t}\n\t\telse {\n\t\t\tfindIndex = 0;\n\t\t}\n\t}", "private void highlightText(int start) {\n editor.setCaretPosition(editor.getText().length());\n editor.moveCaretPosition(start);\n }", "private void highlightString(TextView textView, String input) {\n SpannableString spannableString = new SpannableString(textView.getText());\n//Get the previous spans and remove them\n BackgroundColorSpan[] backgroundSpans = spannableString.getSpans(0, spannableString.length(), BackgroundColorSpan.class);\n\n for (BackgroundColorSpan span : backgroundSpans) {\n spannableString.removeSpan(span);\n }\n\n//Search for all occurrences of the keyword in the string\n int indexOfKeyword = spannableString.toString().indexOf(input);\n\n while (indexOfKeyword > 0) {\n //Create a background color span on the keyword\n spannableString.setSpan(new BackgroundColorSpan(Color.YELLOW), indexOfKeyword, indexOfKeyword + input.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //Get the next index of the keyword\n indexOfKeyword = spannableString.toString().indexOf(input, indexOfKeyword + input.length());\n }\n\n//Set the final text on TextView\n textView.setText(spannableString);\n }", "public void highlight(boolean highlighted) {\n\n if (highlighted) {\n objCanvas.setCursor(Cursor.HAND);\n if (curObjLabel != null) {\n curObjLabel.setStroke(Color.KHAKI);\n curObjLabel.setHighlighted(highlighted);\n oldStroke = curObjLabel.initStroke();\n }\n\n //make sure do de hightlight the previous label if over bound\n if (preObjLabel != null) {\n preObjLabel.setStroke(preObjLabel.initStroke());\n preObjLabel.setHighlighted(false);\n preObjLabel.getTreeItem().setExpanded(false);\n }\n } else {\n objCanvas.setCursor(Cursor.DEFAULT);\n if (curObjLabel != null) {\n curObjLabel.setStroke(oldStroke);\n curObjLabel.setHighlighted(highlighted);\n }\n\n //make sure to de hightlight the previous label\n if (preObjLabel != null) {\n preObjLabel.setStroke(preObjLabel.initStroke());\n preObjLabel.setHighlighted(highlighted);\n }\n }\n }", "public void removeHighlight(Object tag) {}", "public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }", "public void setDrawHighlightIndicators(boolean enabled) {\n/* 51 */ setDrawVerticalHighlightIndicator(enabled);\n/* 52 */ setDrawHorizontalHighlightIndicator(enabled);\n/* */ }", "public void highlightTile() {\n\t\tclearHighlightTile();\n\t\trectangle.setStrokeType(StrokeType.INSIDE);\n\t\trectangle.setStrokeWidth(2.0);\n\t\trectangle.setStroke(Color.RED);\n\t}", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n public void provideHighlightingFor(XtextResource resource, IHighlightedPositionAcceptor acceptor) {\n if (pojoResolverFactory != null && pojoResolverFactory.getPojoResolver() == null)\n pojoResolverFactory.setPojoResolver(pojoResolver);\n\n if (resource == null)\n return;\n\n super.provideHighlightingFor(resource, acceptor);\n }", "protected void whatColorOfArrows()\n\t{\n\t}", "public void highlight(){\n myRectangle.setFill(HIGHLIGHT);\n }", "public void paint(final Graphics g) {\n Rectangle r = TextUtils.getEditorRect(component);\n for (int i = 0; i < highlights.size(); i++) {\n HighlightImpl hElem = highlights.getElem(i);\n int start = hElem.getStartOffset();\n int end = hElem.getEndOffset();\n if (hElem.needSimplePaint()) {\n hElem.getPainter().paint(g, start, end, r, component);\n }\n }\n }", "public void setLineHighlightEnabled(boolean highlight) {\n }", "public interface OnHighlightListener {\n\n /**\n * This method will be invoked when a highlight is created, deleted or modified.\n *\n * @param highlight meta-data for created highlight {@link HighlightImpl}.\n * @param type type of event e.g new,edit or delete {@link com.folioreader.model.HighlightImpl.HighLightAction}.\n */\n void onHighlight(HighLight highlight, HighLight.HighLightAction type);\n}", "public void setHighlight(TileStatus highlight){\r\n highLight = highlight;\r\n }", "void setHighlightAttributes(BalloonAttributes attrs);", "@Override\r\n\tpublic Color getBorderHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Color getNodeHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "public void setHighlightLineWidth(float width) { this.mHighlightLineWidth = Utils.convertDpToPixel(width); }", "private static Highlighter getHighlighter(Spannable name){\r\n Highlighter highlighter = null;\r\n int nameStyle = guessFullNameStyle(name.toString());\r\n if (nameStyle == FullNameStyle.KOREAN) {\r\n if(DBG) log(\"it's Korean name.\");\r\n highlighter = KoreanHighlighter.getInstance();\r\n } else if ((nameStyle == FullNameStyle.CHINESE) || (nameStyle == FullNameStyle.CJK)){\r\n if(DBG) log(\"it's Chinese name.\");\r\n highlighter = ChineseHighlighter.getInstance();\r\n } else if (nameStyle == FullNameStyle.WESTERN) {\r\n if(DBG) log(\"it's Western name.\");\r\n highlighter = EnglishHighlighter.getInstance();\r\n } else {\r\n if(DBG) log(\"Not recognized name style, default use Western highlight.\");\r\n highlighter = EnglishHighlighter.getInstance();\r\n }\r\n return highlighter;\r\n }", "private void highlight(final CellView cellView) {\r\n if (cellView != null) {\r\n highlight.setBounds(getHighlightBounds(cellView));\r\n if (highlight.getParent() == null) {\r\n GraphComponent.this.add(highlight);\r\n highlight.setVisible(true);\r\n }\r\n } else {\r\n if (highlight.getParent() != null) {\r\n highlight.setVisible(false);\r\n highlight.getParent().remove(highlight);\r\n }\r\n }\r\n }", "public static void printHighlighted(String text) {\n System.out.println(\"*** \" + text + \" ***\");\n }", "public void setHighlight(boolean highlight) {\r\n\t\tthis._highlight = highlight;\r\n\t}", "@Override\n\tpublic void highlight(boolean highlight) {\n\t\tif (JGraphRendering.erroneousStyle.updateStyle(visualization, highlight))\n\t\t\tgetObservable().notify(new MarkChangedEvent<Cell>(this));\n\n\t}", "private void initCodeStyling() {\n\t\tboolean codeStyling = Boolean.valueOf(preferences.getProperty(\"codeStyling.enable\")).booleanValue();\n\t\tHashMap<String, Color> colorsMap = new HashMap<String, Color>();\n\t\tVector<String> keywords = null;\n\n\t\t// perform this only if code styling syntax coloring is enabled\n\t\tif (codeStyling) {\n\t\t\tint r = 0, g = 0, b = 0;\n\n\t\t\t// load colors from preferences file and store them in the\n\t\t\t// colors map\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"normal.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"normal.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"normal.color.b\"));\n\t\t\tcolorsMap.put(\"normalColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"numbers.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"numbers.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"numbers.color.b\"));\n\t\t\tcolorsMap.put(\"numbersColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"string.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"string.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"string.color.b\"));\n\t\t\tcolorsMap.put(\"stringColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"keywords.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"keywords.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"keywords.color.b\"));\n\t\t\tcolorsMap.put(\"keywordsColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"comments.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"comments.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"comments.color.b\"));\n\t\t\tcolorsMap.put(\"commentsColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"braceMatching.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"braceMatching.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"braceMatching.color.b\"));\n\t\t\tcolorsMap.put(\"braceMatchingColor\", new Color(r, g, b));\n\n\t\t\t// keywords are specified in the preferences file as comma\n\t\t\t// separated, so after getting them from the preferences file\n\t\t\t// the property is tokenized and added to a keywords vector\n\t\t\tkeywords = new Vector<String>();\n\t\t\tStringTokenizer tokenizer = new StringTokenizer(preferences.getProperty(\"keywords\"), \";\");\n\t\t\twhile (tokenizer.hasMoreTokens())\n\t\t\t\tkeywords.addElement(tokenizer.nextToken());\n\n\t\t\tcodeDocument = new CodeDocument(codeStyling, colorsMap, keywords);\n\t\t\ttextPane.setDocument(codeDocument);\n\t\t}\n\t}", "boolean isHighlighted();", "public ShapeAttributes getHighlightAttributes()\n {\n return highlightAttrs;\n }", "public abstract Rect getRectForNodeHighlight();", "public synchronized void highlight(Parent pane) {\n if (this.parent != null && !boxes.isEmpty()) {\n clear();\n }\n\n this.parent = pane;\n\n ArrayList<Rectangle> allRectangles = new ArrayList<>(processAllTextNodes(pane));\n\n allRectangles.addAll(processCodeAreas(parent));\n\n JFXUtilities.runInFXAndWait(()-> getParentChildren(pane).addAll(allRectangles));\n }", "public abstract void setCurForeground(Color colr);", "private void setHighlightedFieldValue(T bean, String solrField, String hlValue) {\n try {\n if (List.class\n .isAssignableFrom(PropertyUtils.getPropertyType(bean, solrField2javaPropertiesMap.get(solrField)))) {\n List<String> listProperty =\n (List<String>) PropertyUtils.getProperty(bean, solrField2javaPropertiesMap.get(solrField));\n // Cleans the hl markers\n String hlCleanValue = cleanHighlightingMarks(hlValue);\n // Position of the value\n int hlValueIndex = listProperty.indexOf(hlCleanValue);\n if (hlValueIndex != -1) { // replace the value with the highlighted value\n listProperty.remove(hlValueIndex);\n listProperty.add(hlValueIndex, hlValue);\n }\n\n } else if (HighlightableList.class\n .isAssignableFrom(PropertyUtils.getPropertyType(bean, solrField2javaPropertiesMap.get(solrField)))) {\n HighlightableList property =\n (HighlightableList) PropertyUtils.getProperty(bean, solrField2javaPropertiesMap.get(solrField));\n // Cleans the hl markers\n String hlCleanValue = cleanHighlightingMarks(hlValue);\n // Position of the value\n List<String> values = property.getValues();\n int hlValueIndex = values.indexOf(hlCleanValue);\n if (hlValueIndex != -1) { // replace the value with the highlighted value\n property.replaceValue(hlValueIndex, hlValue);\n }\n\n } else {\n String propertyName = solrField2javaPropertiesMap.get(solrField);\n if (PropertyUtils.getPropertyDescriptor(bean, propertyName).getPropertyType().isAssignableFrom(String.class)) {\n BeanUtils.setProperty(bean, propertyName, hlValue);\n }\n }\n } catch (IllegalAccessException e) {\n LOG.error(\"Error accessing field for setting highlighted value\", e);\n throw new SearchException(e);\n } catch (InvocationTargetException e) {\n LOG.error(\"Error setting highlighted value\", e);\n throw new SearchException(e);\n } catch (NoSuchMethodException e) {\n LOG.error(\"Error invoking method to set highlighted value\", e);\n throw new SearchException(e);\n }\n }", "public static void highlight(Spannable name, String matchStr, boolean isNumber,\r\n int matchOffset,int color, int text_color) {\r\n if(isNumber) {\r\n numHighlight(name, matchStr, matchOffset, color, text_color);\r\n } else {\r\n getHighlighter(name).nameHighlight(name, matchStr, color, text_color);\r\n }\r\n }", "private PrinterLabel highlightMatch(PrinterLabel label, Printer printer) {\n\t\t/* Matches array Index Reference:\n\t\t * \n\t\t * 0 = Tension\n\t\t * 1 = Compression\n\t\t * 2 = Impact\n\t\t * 3 = vendor\n\t\t * 4 = Range of Mats.\n\t\t * 5 = Tolerance\n\t\t * 6 = Finish\n\t\t */\n\t\tif(printer.getMatches()[0] > 0)\n\t\t{\n\t\t\tlabel.getTension().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[1] > 0)\n\t\t{\n\t\t\tlabel.getCompression().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[2] > 0)\n\t\t{\n\t\t\tlabel.getImpact().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[3] > 0)\n\t\t{\n\t\t\tlabel.getVendor().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[4] > 0)\n\t\t{\n\t\t\tlabel.getMaterials().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[5] > 0)\n\t\t{\n\t\t\tlabel.getTolerance().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[6] > 0)\n\t\t{\n\t\t\tlabel.getFinish().setForeground(highlight);\n\t\t}\n\t\treturn label;\n\t}", "private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }", "private Texture createInventoryHighlight() {\n Pixmap highlightPixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n highlightPixmap.setColor(1, 1, 0, 0.5f);\n highlightPixmap.fill();\n Texture highlight = new Texture(highlightPixmap);\n highlightPixmap.dispose();\n return highlight;\n }", "protected void doToggleTextBackgrounds() {\r\n\t\trenderer.textBackgrounds = ui.viewTextBackgrounds.isSelected();\r\n\t\trenderer.repaint();\r\n\t}", "HighlightImpl(final Position start, final Position end,\n final HighlightPainter pnt) {\n startPosition = start;\n endPosition = end;\n painter = pnt;\n instanceLayerPainter = (pnt instanceof LayerPainter);\n drawsLayered = getDrawsLayeredHighlights();\n }", "void setHighlightPredicate(Predicate<EventNodeBase<?>> highlightPredicate) {\n this.highlightPredicate.set(highlightPredicate);\n }", "Picture highlightComponentImage() throws Exception;", "public void highlight(Graphics g) {\n\t\tg.setColor(Color.CYAN);\n\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t}", "public TileStatus getHighlight(){\r\n return highLight;\r\n }", "private void highlightNode(Node node) {\r\n // jetzigen Knoten hervorheben\r\n colorNode(node, nodeHighlightColor);\r\n // Elternknoten wieder normal faerben\r\n if (node.getParent() != null) {\r\n colorNode(node.getParent(), nodeColor);\r\n\r\n }\r\n }", "@Override\n public void highlightPattern(Optional<Pattern> newPattern) {\n update();\n }", "@Override\n public void selected ( final ExampleData document, final PaneData<ExampleData> pane, final int index )\n {\n styleViewer.setText ( document.getExample ().getStyleCode ( StyleManager.getSkin () ) );\n styleViewer.setCaretPosition ( 0 );\n }", "private static String cleanHighlightingMarks(final String hlText) {\n String hlLiteral = hlText;\n int indexPre = hlLiteral.indexOf(HL_PRE);\n while (indexPre > -1) {\n int indexPost = hlLiteral.indexOf(HL_POST, indexPre + HL_PRE.length());\n if (indexPost > -1) {\n String post = hlLiteral.substring(indexPost + HL_POST.length());\n String pre = hlLiteral.substring(0, indexPost);\n Matcher preMatcher = HL_PRE_REGEX.matcher(pre);\n pre = preMatcher.replaceFirst(\"\");\n hlLiteral = pre + post;\n }\n indexPre = hlLiteral.indexOf(HL_PRE);\n }\n return hlLiteral;\n }", "private void setHighlightedFields(SearchResponse<T, P> response, final QueryResponse solrResponse) {\n if ((hlFieldPropertyPropertiesMap != null) && (solrResponse.getHighlighting() != null) && !solrResponse\n .getHighlighting().isEmpty()) {\n for (String docId : solrResponse.getHighlighting().keySet()) {\n setHighlightedFieldValues(response, solrResponse, docId);\n }\n }\n }", "public AcideDebugPanelHighLighter() {\r\n\t\tsetLines(new HashMap<String, ArrayList<Integer>>());\r\n\t\tsetHighLights(new ArrayList<Object>());\r\n\t\tsetAssertedFacs(new HashSet<String>());\r\n\t\t_highlight = true;\r\n\t}" ]
[ "0.7252889", "0.71972424", "0.7173242", "0.69743425", "0.6800314", "0.6661289", "0.66480017", "0.6607836", "0.6573502", "0.65224", "0.64751905", "0.64167434", "0.6402875", "0.6375174", "0.6322838", "0.62862784", "0.62633145", "0.6240488", "0.6231037", "0.62253565", "0.6221171", "0.62164545", "0.6208639", "0.6138153", "0.60760677", "0.60417914", "0.60355186", "0.5981103", "0.5980258", "0.59565866", "0.59491086", "0.59491086", "0.59491086", "0.59491086", "0.59484404", "0.59383786", "0.59301186", "0.59219253", "0.5919453", "0.586609", "0.58442193", "0.5841849", "0.5840465", "0.583031", "0.5815851", "0.5797035", "0.5747006", "0.574459", "0.5725739", "0.57209206", "0.5697712", "0.5693262", "0.5692041", "0.56786054", "0.5668181", "0.5664177", "0.56623125", "0.5655165", "0.5653829", "0.5653829", "0.5653829", "0.5653829", "0.56359583", "0.5635053", "0.56292164", "0.5625777", "0.5620066", "0.5615499", "0.5607284", "0.55970323", "0.55831206", "0.5558558", "0.55480164", "0.5537807", "0.5536469", "0.5533057", "0.55220574", "0.5519471", "0.5512526", "0.5486995", "0.54850864", "0.5449978", "0.5435331", "0.5419133", "0.5417041", "0.54031", "0.53806394", "0.53740716", "0.5368705", "0.53643304", "0.5360441", "0.5346353", "0.53392714", "0.5336615", "0.5335619", "0.5333359", "0.5316645", "0.5314096", "0.53097886", "0.53060967", "0.5305293" ]
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168" ]
0.0
-1
TODO Autogenerated method stub
public Emp selectEmp(int empno) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public List<Integer> getAllEmpno() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void insertEmp(Emp emp) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public List<Emp> getAllEmps() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void updateEmp(Emp emp) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void deleteEmp(int empno) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This is the Room constructor.
Room(int y, int x){ this.area = new String[y][x]; this.position = new int[y][x]; this.Garret = new int[y][x]; this.Ari = new int[y][x]; this.Items = new Item[y][x]; this.Door = new int[y][x]; this.Stairs = new int[y][x]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Room() {\n\n\t}", "public Room() {\n }", "public Room() {\n this(\"room\", null);\n }", "public MyRoom() {\r\n }", "public Room() {\n this(DEFAULT_DESC, DEFAULT_SHORT_DESC);\n }", "public Room() {\r\n\t\troomObjects = new ArrayList<GameObject>();\r\n\t\troom_listener = new RoomListener();\r\n\t\tlisteners = new ListenerContainer(room_listener);\r\n\t}", "public Room() {\n\t\twall=\"\";\n\t\tfloor=\"\";\n\t\twindows=0;\n\t}", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "public Room(int roomNumber) \n\t{\n\t\tthis.roomNumber=roomNumber;\n\t}", "public Room(String alias) {\n this(alias, ROOM);\n }", "ItcRoom()\r\n\t {\t }", "public Room(String description) \n {\n exits = new HashMap<>();\n objects = new HashMap<>();\n this.description = description;\n this.requiredOutfit = null;\n this.locked = false;\n }", "public Room(String description) \n {\n this.description = description;\n items = new ArrayList<>();\n exits = new HashMap<>();\n }", "public Room(String name, String description)\n {\n this.name = name;\n this.description = description;\n }", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }", "public Room(){\n\t\tt.start();\n\t\taddKeyListener(this);\n\t\tsetFocusable(true);\n\t\tsetFocusTraversalKeysEnabled(false); //used to disable shift and tab\n\t}", "public RoomType (Long uniqueId) {\n\t\tsuper(uniqueId);\n\t}", "public Room () {\n humidity = null;\n temperature = null;\n illumination = null;\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game()\n {\n createRooms();\n parser= new Parser();\n }", "public Room(String description) \n {\n this.description = description;\n exits = new HashMap<>();\n }", "public BossRoom() {\n\t\ttiles = new WorldTiles(width, height, width);\n\t\tbackground = new Sprite(SpriteList.BOSS_ROOM_BACKGROUND);\n\t}", "public SingleRoom(Hotel hotel, String nomor_kamar)\n {\n // initialise instance variables\n super(hotel,nomor_kamar);\n\n }", "public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }", "@Override\n public Room makeRoom() {\n return new MagicRoom();\n }", "public Classroom() {\n\t}", "public Room(String name, String shortDescription, String longDescription) {\n\t\tsuper(name, shortDescription, longDescription);\n\t}", "public MyRoom(String name, String building, int size) {\r\n this.name = name;\r\n this.building = building;\r\n this.size = size;\r\n }", "public MyRoom(int id, String name, String building, int size) {\r\n this.id = id;\r\n this.name = name;\r\n this.building = building;\r\n this.size = size;\r\n }", "private Room (String roomName,boolean isHealingPot, boolean isPit,boolean isEntrance, boolean isExit, boolean isPillar, Monster monster, int numMons, boolean isVisionPot){\n this.roomName = roomName;\n this.isHealingPot = isHealingPot;\n this.isPit = isPit;\n this.isEntrance = isEntrance;\n this.isExit = isExit;\n this.isPillar = isPillar;\n\n this.monster = monster;\n this.numMons = numMons;\n this.isVisionPot = isVisionPot;\n }", "private Room (String roomName, boolean isHealingPot, boolean isPit,boolean isEntrance, boolean isExit, boolean isPillar, int numMons, boolean isVisionPot) {\n \t this.roomName = roomName;\n this.isHealingPot = isHealingPot;\n this.isPit = isPit;\n this.isEntrance = isEntrance;\n this.isExit = isExit;\n this.isPillar = isPillar;\n this.numMons = numMons;\n this.isVisionPot = isVisionPot;\n }", "public Room (String number, int seatingCapacity, String roomT){\r\n this.number = number;\r\n this.seatingCapacity = seatingCapacity;\r\n this.roomType= roomT;\r\n }", "public Room(int roomNum, int capacity) {\n this.id = UUID.randomUUID().toString();\n this.roomNum = roomNum;\n this.capacity = capacity;\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "public Floor() {\r\n\t\tRoom[][] rooms = new Room[Constants.WIDTH][Constants.LENGTH];\r\n\t\tfor (int i = 0; i < Constants.WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < Constants.LENGTH; j++) {\r\n\t\t\t\trooms[i][j] = GenerationUtilities.randomRoom(i, j);\r\n\t\t\t\trooms[i][j].setFloor(this);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.rooms = rooms;\r\n\t\tthis.length = rooms.length;\r\n\t\tthis.width = rooms[0].length;\r\n\t\tGenerationUtilities.placeRandomItems(this);\r\n\t\tenemies = new ArrayList<>();\r\n\t}", "public Question(RoomType room){\n location = new Card(room.toString());\n murderer = null;\n weapon = null;\n }", "public Player()\n {\n inventory = new ArrayList<Item>();\n currentRoom=0;\n }", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "public Room(int id, String name, int capacity) {\n \t\tpcs = new PropertyChangeSupport(this);\n \t\tthis.id = id;\n \t\tthis.name = name;\n \t\tthis.capacity = capacity;\n \t}", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "public Room() {\n roomDisplayArray = new String[roomHeight][roomWidth];\n }", "public Room(int row, int column){\n this.setPositionRow(row);\n this.setPositionColumn(column);\n this.setHasVacuum(false);\n this.setDirty(false);\n this.setVisited(false);\n }", "public Room createRoom(Room room);", "public Room (Float temperature, Float humidity, Float illumination) {\n this.temperature = temperature;\n this.humidity = humidity;\n this.illumination = illumination;\n }", "public Room(String roomText, boolean isEmpty){\n this.roomText = roomText;\n this.enemies = new ArrayList();\n this.obstacles = new ArrayList();\n this.isEmpty = isEmpty;\n this.containsDamsel = false;\n this.criticalPath = false;\n this.hasText = true;\n }", "public Player(Room room)\n {\n Inventory = new HashMap<String, Items>();\n currentRoom = room; //Starting Room Number 1\n itemsHeld = 0; //Start with no items being held\n itemLimit = 2; // can only hold 2 items until a backpack\n Inventory = new HashMap<String, Items>();\n \n roomHistory = new Stack<Room>();\n \n haveBackpack = false; //no backpack at start\n usingFlashlight = false;\n }", "public Room(String color) {\n\t\tthis.wall = color;\n\t\tthis.floor =\"\";\n\t\tthis.windows=0;\n\t}", "public ClassRoom (String course, String teacher)\r\n {\r\n this.course = course;\r\n this.teacher = teacher;\r\n }", "public QuestHouse() {\n\t\t\n\t\tinitialRoom = null;\n\t\tnumberOfRooms = 0;\n\t}", "public Room(String roomName, String description, Objects secretObject)\n {\n this.roomName = roomName;\n this.description = description;\n if(secretObject != null) {\n this.secretObject = new Objects(secretObject.getItemName(), secretObject.getItemWeight());\n }\n exits = new HashMap<>();\n items = new HashMap<>();\n characters = new HashMap<>();\n }", "public EventRoomBuilder(int capacity){\r\n itemFactory = new ItemFactory();\r\n newRoom = new EventRoom(capacity);\r\n eventRoomItems = new EventRoomItems();\r\n }", "Classroom() {}", "public Room(String name, String password) {\r\n this.name = name;\r\n this.password = password;\r\n capacity = DEFAULT_CAPACITY;\r\n\r\n teamBlue = new Team(TeamColour.BLUE);\r\n teamRed = new Team(TeamColour.RED);\r\n }", "public RoomStatusFragment()\n {\n }", "Room(RenderWindow window, KeyboardHandler kh, Level level) {\n this.window = window;\n this.kh = kh;\n this.level = level;\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private Room(Integer id, String name, boolean objectOnly)\n {\n super();\n this.setId(id);\n this.name = name;\n if(objectOnly) return;\n }", "public Room(String roomName, int rows, int columns, int numOfFires) {\n super(roomName);\n this.rows = rows + 1;\n this.columns = columns + 1;\n this.numOfFires = numOfFires; // TODO: Find way to handle this dynamically?\n this.flammableItemCount = 0;\n this.itemsOnFire = 0;\n fireLocations = new Point[numOfFires]; // TODO: Work with above, handle dynamically?\n roomPoints = new Point[this.rows][this.columns];\n fillRoomWithAir();\n }", "public Room(roomContents content) {\n contents.add(content);\n\n }", "public Floor(){\n populateRooms();\n level = new Room[5][5];\n }", "public Door()\n {\n // initialize instance variables\n this.id = 0;\n this.room = new Room();\n this.isLocked = false;\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public Player(Room currentRoom)\n {\n // initialise instance variables\n this.currentRoom = currentRoom;\n moveRooms = new Stack<>();\n inventory = new ArrayList<>();\n maxWeight = 5;\n inventoryWeight = 0;\n }", "public Room(int noOfWindows) {\n\t\tthis.windows = noOfWindows;\n\t\tthis.floor=\"\";\n\t\tthis.wall=\"\";\n\t}", "public Mumie(Room room, Player p) {\r\n\t\tsuper(room, p);\r\n\t\tattackDamage = (-10);\r\n\t\tattackRange = 10;\r\n\t\tsenseRange = 70;\r\n\t\tspeed = 0.005f;\r\n\t\tcurrentRoom = room;\r\n\t\tplayer = p;\r\n\t\tmonsterSpecificCooldown = 1000;\r\n\t\tmonsterSpecificValue = 750;\r\n\t}", "public Room(String name, int capacity) {\r\n\t\tthis.name = name;\r\n\t\tthis.capacity = capacity;\r\n\t}", "public Player(Room startRoom, World world, int health) {\r\t\tsuper(world, \"Player\", \"You are looking good today!\");\r\t\tcurrentRoom = startRoom;\r\t\thealth = 0;\r\t}", "public Room(@NonNull String description,@NonNull String shortDescription) {\n this.roomWasVisited = false;\n this.description = description;\n this.shortDescription = shortDescription;\n this.items = new ArrayList<>();\n this.adjacentRooms = new EnumMap<>(Action.class);\n this.transitionMessages = new EnumMap<>(Action.class);\n this.transitionDelay = 0;\n }", "public Room(int id, int size, String name) {\n\t\tsetID(id);\n\t\tsetSize(size);\n\t\tsetName(name);\n\t}", "Room getRoom();", "Room getRoom();", "public Player(Room room)\n {\n // initialise instance variables\n anteriorRoom = new Stack<Room>();\n currentRoom = room; \n }", "RoomstlogBean()\n {\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public ViewRoom(Room r) {\n initComponents();\n this.room = r;\n this.workoutNum = 0;\n updateRoom();\n \n }", "public StockRoom()\n\t{\n\t\tstorage = new HashMap<String, Object>();\n\t}", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "@Override\n\tpublic Room MakeRoom(int num) {\n\t\treturn new RedRoom(num);\n\t}", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public Room getRoom()\r\n {\r\n return room;\r\n }", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public RobotWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n prepare();\n }", "public Cell()\n\t{\n\t}", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "@Override\n\tpublic void onRoomCreated(RoomData arg0) {\n\t\t\n\t}", "public World(int width, int height, int maxRoomSize) {\r\n this.width = width;\r\n this.height = height;\r\n this.rooms = new ArrayList<>();\r\n this.characters = new ArrayList<>();\r\n this.bsp = new BSPTree(width, height, 24, maxRoomSize, 8);\r\n this.turn = 1;\r\n this.player = null;\r\n }", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "RoomInfo room(String name);", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "public Chat(){ }", "public Grid() {\n }", "public Rectangle () {\n\t\t\n\t}", "public static RoomDTO newRoomDTO() {\n return new RoomDTO();\n }", "public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}", "public Chat() {\n }", "public Game() {\n\n\t}", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }" ]
[ "0.8984437", "0.8936094", "0.87555784", "0.85383815", "0.8461346", "0.80992866", "0.7775075", "0.7673761", "0.7627828", "0.7587492", "0.7554859", "0.75413716", "0.74590516", "0.7454857", "0.74528766", "0.7427198", "0.7393696", "0.73534536", "0.7318702", "0.73119533", "0.73119533", "0.72587633", "0.7247667", "0.72162825", "0.72125655", "0.7143418", "0.71292835", "0.7102854", "0.70775914", "0.7058283", "0.7042259", "0.7009304", "0.7004573", "0.70005375", "0.69642925", "0.6960431", "0.695299", "0.69290936", "0.69246185", "0.6918575", "0.6907777", "0.6873892", "0.6864442", "0.68620706", "0.6857081", "0.6807502", "0.67925954", "0.6784897", "0.6707569", "0.6707102", "0.6706274", "0.668156", "0.66782045", "0.6668323", "0.6666123", "0.6650279", "0.66499496", "0.6639647", "0.6624413", "0.6602071", "0.6598605", "0.65930825", "0.659062", "0.6589636", "0.6553665", "0.6537504", "0.65305465", "0.6502823", "0.64521", "0.6451833", "0.64508784", "0.64508784", "0.64476603", "0.64458543", "0.6437427", "0.63883245", "0.6361405", "0.63407195", "0.63206595", "0.63149506", "0.6298952", "0.6270468", "0.6267572", "0.6243433", "0.6231046", "0.6229963", "0.62085027", "0.6187177", "0.6183696", "0.61801213", "0.6174302", "0.6170577", "0.6168208", "0.61567634", "0.6156606", "0.61461586", "0.61437446", "0.61417156", "0.61187094", "0.6117397" ]
0.65018904
68
end of room constructor A method that checks if the player is in the current room.
public boolean isHere(){ for(int i = 0; i < this.position.length ; i++){//loop that iterates through the array to see 1 for(int p = 0; p < this.position.length ; p++){ if(this.position[i][p] == 1){ return true;//if the position is 1 it sends a true } } } return false;//if not it's false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPlayerInRoom() {\n return !(roomPlayer == null);\n }", "boolean getCurrentRoom() {\n return currentRoom;\n }", "public boolean isRoom(){\n\t\treturn (cellType == CellType.ROOM);\n\t}", "public boolean getIsCurrentRoom()\n {\n return isCurrentRoom;\n }", "private boolean isRoom(Position p) {\n return !(board[p.x][p.y] instanceof Room);\n }", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "void opponentInRoom();", "public Room getCurrentRoom() {\n return playerRoom;\n }", "public Room getRoomIn() {\n\t\treturn roomIn;\n\t}", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "boolean shouldStartGame(Room room) {\n int connectedPlayers = 0;\n for (Participant p : room.getParticipants()) {\n if (p.isConnectedToRoom()) ++connectedPlayers;\n }\n return connectedPlayers >= MIN_PLAYERS;\n }", "public MyRoom() {\r\n }", "public boolean hasRoom() {\n return fieldSetFlags()[3];\n }", "public boolean roomIsEmpty(){\n return this.isEmpty;\n }", "private boolean checkRoomValid(String room) {\n\treturn true;\r\n}", "public boolean isFinalRoom(){\n System.out.println(\"------------------------------------------ ->\"+((EnemyRoom) room).getType());\n return ((EnemyRoom) room).getType().equals(\"Boss\");\n }", "public Room(String roomText, boolean isEmpty){\n this.roomText = roomText;\n this.enemies = new ArrayList();\n this.obstacles = new ArrayList();\n this.isEmpty = isEmpty;\n this.containsDamsel = false;\n this.criticalPath = false;\n this.hasText = true;\n }", "ItcRoom()\r\n\t {\t }", "public Room() {\n\n\t}", "public Room() {\n }", "public Player(Room currentRoom)\n {\n // initialise instance variables\n this.currentRoom = currentRoom;\n moveRooms = new Stack<>();\n inventory = new ArrayList<>();\n maxWeight = 5;\n inventoryWeight = 0;\n }", "public Player(Room room)\n {\n // initialise instance variables\n anteriorRoom = new Stack<Room>();\n currentRoom = room; \n }", "public Room getCurrentRoom() {\r\t\treturn currentRoom;\r\t}", "public void startGame(Room room);", "Room getRoom();", "Room getRoom();", "public Room getCurrentRoom() {\r\n return player.getCurrentRoom();\r\n }", "boolean hasChatRoom();", "private Room (String roomName,boolean isHealingPot, boolean isPit,boolean isEntrance, boolean isExit, boolean isPillar, Monster monster, int numMons, boolean isVisionPot){\n this.roomName = roomName;\n this.isHealingPot = isHealingPot;\n this.isPit = isPit;\n this.isEntrance = isEntrance;\n this.isExit = isExit;\n this.isPillar = isPillar;\n\n this.monster = monster;\n this.numMons = numMons;\n this.isVisionPot = isVisionPot;\n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "public Room getCurrentRoom()\n {\n return currentRoom;\n }", "static void enter(Player player, Room room) {\n if (player.moveTo(room)) {\n System.out.println(\"You just entered \" + player.getLocation());\n }\n else {\n System.out.println(\"That way appears to be blocked.\");\n }\n }", "public Room getRoom()\n {\n return currentRoom;\n }", "private Room (String roomName, boolean isHealingPot, boolean isPit,boolean isEntrance, boolean isExit, boolean isPillar, int numMons, boolean isVisionPot) {\n \t this.roomName = roomName;\n this.isHealingPot = isHealingPot;\n this.isPit = isPit;\n this.isEntrance = isEntrance;\n this.isExit = isExit;\n this.isPillar = isPillar;\n this.numMons = numMons;\n this.isVisionPot = isVisionPot;\n }", "public abstract void enterRoom();", "public boolean isRoomEvent() {\n return roomEvent;\n }", "@Test\n\tpublic void insideRoomTests() {\n\t\t//Tests middle of room\n\t\tSet<BoardCell> testList = board.getAdjList(3, 11);\n\t\tassertEquals(0, testList.size());\n\t\t//Tests a room space that is next to a walkway space\n\t\ttestList = board.getAdjList(16, 10);\n\t\tassertEquals(0, testList.size());\n\n\t}", "boolean isInRoom(String username)\n {\n for (ClientHandle participant : participants) {\n if (participant.getUsername().equals(username))\n {\n return true;\n }\n }\n return false;\n }", "public Room() {\r\n\t\troomObjects = new ArrayList<GameObject>();\r\n\t\troom_listener = new RoomListener();\r\n\t\tlisteners = new ListenerContainer(room_listener);\r\n\t}", "public Player()\n {\n inventory = new ArrayList<Item>();\n currentRoom=0;\n }", "public Room getRoom() {\n return currentRoom;\n }", "public Room getCurrentRoom() {\n return currentRoom;\n }", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "@Override\n public boolean isAvailable() {\n return room.isAvailable();\n }", "public Player(Room room)\n {\n Inventory = new HashMap<String, Items>();\n currentRoom = room; //Starting Room Number 1\n itemsHeld = 0; //Start with no items being held\n itemLimit = 2; // can only hold 2 items until a backpack\n Inventory = new HashMap<String, Items>();\n \n roomHistory = new Stack<Room>();\n \n haveBackpack = false; //no backpack at start\n usingFlashlight = false;\n }", "public void setRoomIn(Room roomIn) {\n\t\tthis.roomIn = roomIn;\n\t}", "public boolean liesInRoom(Room r) {\n if ((this.getX() > r.getLeftCorner().getX() + 1 &&\n (this.getX() < (r.getLeftCorner().getX() - 1) + r.getWidth()))) {\n return (this.getY() > r.getLeftCorner().getY() + 1) &&\n (this.getY() < (r.getLeftCorner().getY() - 1) + r.getHeight());\n }\n return false;\n }", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "public boolean inArena(Player p)\n {\n return arenaPlayers.contains(p);\n }", "public Room currentRoom() {\n\t\treturn currentRoom;\n\t}", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Room() {\n this(\"room\", null);\n }", "public Room() {\n\t\twall=\"\";\n\t\tfloor=\"\";\n\t\twindows=0;\n\t}", "public Game()\n {\n createRooms();\n parser= new Parser();\n }", "public Room(){\n\t\tt.start();\n\t\taddKeyListener(this);\n\t\tsetFocusable(true);\n\t\tsetFocusTraversalKeysEnabled(false); //used to disable shift and tab\n\t}", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public Player(Room startRoom, World world, int health) {\r\t\tsuper(world, \"Player\", \"You are looking good today!\");\r\t\tcurrentRoom = startRoom;\r\t\thealth = 0;\r\t}", "public boolean isRoomCenter() {\n\t\treturn roomCenter; \n\t}", "public String checkRoom() {\n\t\tString roomInput = \"\";\n\t\ttry {\n\t\t\tdo {\n\t\t\t\troomInput = (String) JOptionPane.showInputDialog(null, TextResources.enterRoom, \"Room Number\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, roomIcon, null, \"\");\n\t\t\t\tif (roomInput == null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} while (roomInput.equals(\"\") || !findUserRoomNumber(roomInput));\n\t\t} catch (NumberFormatException ex) {\n\t\t\tJOptionPane.showMessageDialog(null, TextResources.wrongInput);\n\t\t\treturn null;\n\t\t}\n\t\treturn roomInput;\n\t}", "static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public boolean isPlayer() {\n return player != null;\n }", "public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public Room getStartRoom(){\n return startRoom;\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "private void enterRoom(Room newRoomEntered)\n {\n \n player.setCurrentRoom(newRoomEntered);\n if(player.getCurrentRoom().isDark()){//check to see if room is dark\n System.out.println(\"The room is pitchblack and you are unable to see anything\");\n System.out.println();\n } else {\n System.out.println(player.getCurrentRoom().printLocationInfo());\n System.out.println();\n }\n }", "public WallCollision(Room room, Entity player) {\n this.room = room;\n this.player = (NinjaEntity) player;\n }", "public void setRoom(Room room) {\n currentRoom = room;\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public Room getCurrentRoom(){\n\treturn rooms[gx][gy];\n }", "public abstract boolean isPlayer();", "public Room getCurrentRoom ( )\r\n\t{\r\n\t\tif ( currentRow < 0 || currentCol < 0 || \r\n\t\t\t\tcurrentRow >= size || currentCol >= size )\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn maze[currentRow][currentCol];\r\n\t}", "public boolean inRegion(Location loc)\n {\n if (!loc.getWorld().getName().equals(world.getName()) || !setup)\n return false;\n \n int x = loc.getBlockX();\n int y = loc.getBlockY();\n int z = loc.getBlockZ();\n \n // Check the lobby first.\n if (lobbySetup)\n {\n if ((x >= l1.getBlockX() && x <= l2.getBlockX()) && \n (z >= l1.getBlockZ() && z <= l2.getBlockZ()) && \n (y >= l1.getBlockY() && y <= l2.getBlockY()))\n return true;\n }\n \n // Returns false if the location is outside of the region.\n return ((x >= p1.getBlockX() && x <= p2.getBlockX()) && \n (z >= p1.getBlockZ() && z <= p2.getBlockZ()) && \n (y >= p1.getBlockY() && y <= p2.getBlockY()));\n }", "public Room getRoom()\r\n {\r\n return room;\r\n }", "public boolean isRoomidInitialized() {\n return roomid_is_initialized; \n }", "public Room room() {\r\n\t\treturn this.room;\r\n\t}", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public isWithin() {\n\t\tsuper();\n\t}", "public boolean lastRoomsIsEmpty(){return this.aLastRooms.empty();}", "public boolean isReservationroomidInitialized() {\n return reservationroomid_is_initialized; \n }", "public Room(int roomNumber) \n\t{\n\t\tthis.roomNumber=roomNumber;\n\t}", "public Room getCurrentRoom() {\n if(!currentRooms.isEmpty()) {\n return currentRooms.get(0);\n }\n return null;\n }", "public BossRoom() {\n\t\ttiles = new WorldTiles(width, height, width);\n\t\tbackground = new Sprite(SpriteList.BOSS_ROOM_BACKGROUND);\n\t}", "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "public Room getRoom(){\n\t\treturn this.room;\n\t}", "public int getRoom()\n\t{\t\n\t\treturn iCurrentRoom;\n\t\t\n\t}", "public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }", "public void setCurrentRoom(Room newRoom) {\n playerRoom = newRoom;\n }", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "public boolean verifyRoom() throws NotEnoughDoorsException {\n if (getDoors().get(\"N\") == null && getDoors().get(\"W\") == null\n && getDoors().get(\"S\") == null && getDoors().get(\"E\") == null) {\n throw new NotEnoughDoorsException();\n }\n\n for (String key: getDoors().keySet()) {\n Door doorHolder = getDoors().get(key);\n if (doorHolder != null) {\n if (doorHolder.getConnectedRooms().size() < 2 || doorHolder.getOtherRoom(this) == null) {\n return false;\n }\n }\n }\n\n for (Item singleItem: roomItems) {\n int itemX = (int) singleItem.getXyLocation().getX();\n int itemY = (int) singleItem.getXyLocation().getY();\n if (itemX >= getWidth() - 1 || itemX <= 0) {\n return false;\n }\n if (itemY >= getHeight() - 1 || itemY <= 0) {\n return false;\n }\n }\n\n if (isPlayerInRoom()) {\n int playerX = (int) getPlayer().getXyLocation().getX();\n int playerY = (int) getPlayer().getXyLocation().getY();\n if (playerX >= getWidth() - 1 || playerX <= 0) {\n return false;\n }\n if (playerY >= getHeight() - 1 || playerY <= 0) {\n return false;\n }\n }\n\n return true;\n }", "public static boolean CheckRoomIsAvailable(Room room, long Start, long end) {\n\t\tboolean[] DIO = room.getDateIsOccupied();\n\t\tfor (int i = (int) Start; i < end; i++)\n\t\t\tif (DIO[i] == true) \n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean isInGame() {\n return this.hasStarted;\n }", "boolean playerExists() {\n return this.game.h != null;\n }", "public void setPlayersInRoom(List<Player> playersInRoom) {\n\t\tthis.playersInRoom = playersInRoom;\n\t}", "private boolean processInput() {\r\n\r\n\t\tif (keys.get(Keys.ROOM_ONE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getRooms().size >= 1) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(0))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.ROOM_TWO)) {\r\n\t\t\t// If there are two defined room\r\n\t\t\tif (world.getRooms().size >= 2) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(1))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.ROOM_THREE)) {\r\n\t\t\t// If there are two defined room\r\n\t\t\tif (world.getRooms().size >= 3) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(2))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (keys.get(Keys.TRAP_ONE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 1) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(0);\r\n\t\t\t\t\ttrapOneReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.TRAP_TWO)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 2) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(1);\r\n\t\t\t\t\ttrapTwoReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.TRAP_THREE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 3) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(2);\r\n\t\t\t\t\ttrapThreeReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (keys.get(Keys.TRAP_FINAL)) {\r\n\t\t\tworld.getPlayer().setState(Player.State.DEAD);\r\n\t\t\tworld.getPlayer().setDeathType(Player.DeathType.BLOODY);\r\n\t\t\t\r\n\t\t\ttrapFinalReleased();\r\n\t\t}\r\n\t\t\r\n\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\tTrap trap = world.getCurrentRoom().getCurrentTrap();\r\n\t\t\tif (keys.get(Keys.TRAP_TOGGLE)) {\r\n\t\t\t\t// Trap activation and deactivation\r\n\t\t\t\tif (!trap.isActive()) {\r\n\t\t\t\t\ttrap.activate();\r\n\t\t\t\t\ttrapToggleReleased(); // To limit input triggering\r\n\t\t\t\t} else if (trap.isActive()) {\r\n\t\t\t\t\ttrap.deactivate();\r\n\t\t\t\t\ttrapToggleReleased(); // To limit input triggering\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (keys.get(Keys.TRAP_INCREASE)) {\r\n\t\t\t\tif (trap.isActive()) {\r\n\t\t\t\t\tif (trap instanceof FloodTrap) {\r\n\t\t\t\t\t\t((FloodTrap) trap).increaseWaterLevel();\r\n\t\t\t\t\t} else if (trap instanceof BloodTrap) {\r\n\t\t\t\t\t\t((BloodTrap) trap).increaseBloodLevel();\r\n\t\t\t\t\t} else if (trap instanceof GasTrap) {\r\n\t\t\t\t\t\t((GasTrap) trap).increaseGasLevel();\r\n\t\t\t\t\t} else if (trap instanceof FreezeTrap) {\r\n\t\t\t\t\t\t((FreezeTrap) trap).increaseFreezeLevel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (trap instanceof ElectroTrap) {\r\n\t\t\t\t\t((ElectroTrap) trap).increase();\r\n\t\t\t\t} else if (trap instanceof SpikeTrap) {\r\n\t\t\t\t\t((SpikeTrap) trap).increase();\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttrapIncreaseReleased();\r\n\t\t\t} else if (keys.get(Keys.TRAP_DECREASE)) {\r\n\t\t\t\tif (trap.isActive()) {\r\n\t\t\t\t\tif (trap instanceof FloodTrap) {\r\n\t\t\t\t\t\t((FloodTrap) trap).decreaseWaterLevel();\r\n\t\t\t\t\t} else if (trap instanceof BloodTrap) {\r\n\t\t\t\t\t\t((BloodTrap) trap).decreaseBloodLevel();\r\n\t\t\t\t\t} else if (trap instanceof GasTrap) {\r\n\t\t\t\t\t\t((GasTrap) trap).decreaseGasLevel();\r\n\t\t\t\t\t} else if (trap instanceof FreezeTrap) {\r\n\t\t\t\t\t\t((FreezeTrap) trap).decreaseFreezeLevel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (trap instanceof ElectroTrap) {\r\n\t\t\t\t\t((ElectroTrap) trap).decrease();\r\n\t\t\t\t} else if (trap instanceof SpikeTrap) {\r\n\t\t\t\t\t((SpikeTrap) trap).decrease();\r\n\t\t\t\t}\r\n\t\t\t\ttrapDecreaseReleased();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}" ]
[ "0.7595766", "0.6854313", "0.6831292", "0.651341", "0.63947016", "0.6275015", "0.6268061", "0.6208945", "0.6202634", "0.6200917", "0.61696523", "0.61688954", "0.61669344", "0.61666125", "0.6161038", "0.6133461", "0.6117457", "0.6107821", "0.6025498", "0.6006283", "0.59974307", "0.5993015", "0.5988694", "0.5988657", "0.5987172", "0.59803665", "0.59803665", "0.5973904", "0.59698236", "0.59475374", "0.59456354", "0.59432405", "0.59407634", "0.5928538", "0.5927651", "0.59095705", "0.5880792", "0.58765846", "0.58692515", "0.5865982", "0.585904", "0.5857557", "0.5836599", "0.5834701", "0.5833781", "0.58298784", "0.5818136", "0.58145946", "0.58095443", "0.57932264", "0.57917017", "0.5781643", "0.5781643", "0.5773601", "0.57730997", "0.57552737", "0.57446575", "0.57385147", "0.57112056", "0.5693211", "0.56914985", "0.567731", "0.56652606", "0.5656587", "0.56407076", "0.56026477", "0.5600346", "0.5584737", "0.55812114", "0.55782634", "0.5559415", "0.55546933", "0.554813", "0.5535522", "0.55310744", "0.55245584", "0.5518417", "0.55173194", "0.55131793", "0.5508225", "0.55001664", "0.54948354", "0.549384", "0.5492238", "0.54717034", "0.5465759", "0.54519826", "0.54502994", "0.543058", "0.5426603", "0.54232997", "0.5421667", "0.54212886", "0.5412452", "0.54100335", "0.54040354", "0.53934366", "0.5373408", "0.5372894", "0.5370764", "0.53663194" ]
0.0
-1
end of is here method This method is to teleport the player to the other room, where the other door is.
public void teleportTo(int y, int x){ this.position[y][x] = 1;//makes the position here, used for other object room }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean teleport(Player p1, Player p2, boolean change);", "public boolean teleport(Entity destination) {\n/* 571 */ return teleport(destination.getLocation());\n/* */ }", "public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }", "public Player getToTeleportTo(){\n\t\treturn toTeleportTo;\n\t}", "public void sendTeleport(final Player player) {\r\n player.lock();\r\n World.submit(new Pulse(1) {\r\n\r\n int delay = 0;\r\n\r\n @Override\r\n public boolean pulse() {\r\n if (delay == 0) {\r\n player.getActionSender().sendMessage(\"You've been spotted by an elemental and teleported out of its garden.\");\r\n player.graphics(new Graphics(110, 100));\r\n player.getInterfaceState().openComponent(8677);\r\n PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));\r\n face(player);\r\n } else if (delay == 6) {\r\n player.getProperties().setTeleportLocation(Location.create(getRespawnLocation()));\r\n PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 0));\r\n player.getInterfaceState().close();\r\n face(null);\r\n player.unlock();\r\n return true;\r\n }\r\n delay++;\r\n return false;\r\n }\r\n });\r\n }", "public void teleportToAlien() {\n\t\tAlien a;\n\t\tSpaceship sp;\n\t\tif(roamingAliens > 0){\n\t\t\tsp = getTheSpaceship();\n\t\t\ta = getRandomAlien();\n\t\t\tsp.setLocation(a.getLocation());\n\t\t\tSystem.out.println(\"You've teleported to an alien\");\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Error: There were no aliens to jump to.\");\n\t}", "public static void teleportAway(ClientContext ctx) {\n Item sceptre = ctx.inventory.select().id(Items.SKULL_SCEPTRE_I_21276).poll();\n\n if (sceptre.valid()) {\n sceptre.interact(\"Invoke\", sceptre.name());\n sleep(3000);\n } else {\n // Teletab\n Item tab = ctx.inventory.select().select(new Filter<Item>() {\n @Override\n public boolean accept(Item item) {\n return item.name().toLowerCase().contains(\"teleport\");\n }\n }).poll();\n\n if (tab.valid()) {\n tab.click();\n } else {\n // Glory Teleport\n ctx.game.tab(Game.Tab.EQUIPMENT);\n Item ammy = ctx.equipment.itemAt(Equipment.Slot.NECK);\n if (ammy.name().toLowerCase().contains(\"glory\")) {\n ammy.interact(\"Edgeville\");\n sleep(4000);\n }\n }\n }\n }", "private static void goThroughPassage(Player player) {\n int x = player.getAbsX();\n player.getMovement().teleport(x == 2970 ? x + 4 : 2970, 4384, player.getHeight());\n }", "public static void teleport(ServerPlayer player, ServerLevel world, BlockPos targetPos) {\n player.teleportTo(world, targetPos.getX() + 0.5, targetPos.getY() + 0.1, targetPos.getZ() + 0.5, player.yRotO, player.xRotO);\n }", "private void teleport(Player player, ClanPlayerImpl clanPlayer, Location<World> teleportLocation) {\n player.setLocation(teleportLocation);\n clanPlayer.setLastClanHomeTeleport(new LastClanHomeTeleport());\n }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "public static void teleportPlayer(final Player player,\n \t\t\tfinal Location toLocation) {\n \t\tfinal Object networkManager = getNetServerHandler(getHandle(player));\n \t\ttry {\n \t\t\tnetworkManager.getClass().getMethod(\"teleport\", Location.class)\n \t\t\t\t\t.invoke(networkManager, toLocation);\n \t\t} catch (final Exception e) {\n \t\t\tthrow new RuntimeException(\"Can't teleport the player \" + player\n \t\t\t\t\t+ \" to \" + toLocation, e);\n \t\t}\n \t}", "public void teleportation(Vector2 posTp) {\n int distance = (int) Math.sqrt(Math.pow(posTp.x - position.x, 2) + Math.pow(posTp.y - position.y, 2));\n int coef = 50;\n if (wallet.getMoney() >= coef*distance) {\n position.set(posTp);\n position.x += WIDTH/2;\n resetMiner();\n wallet.withdraw(coef * distance);\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n \n \n \n String direction = command.getSecondWord();\n Room nextRoom = currentRoom.getExit(direction); \n \n if (nextRoom == null) \n {\n System.out.println(\"There is no door!\");\n }\n else \n {\n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n printInfo();\n }\n \n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) \n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n //remove energy from the player everytime he switches rooms\n p.energy -= 10;\n System.out.println(\"Energy: \" + p.energy);\n \n \n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n \n }\n }", "@EventHandler\n\tpublic void onTravelToNether(PlayerPortalEvent e) {\n\t\tPlayerTR trPlayer = TaskRun.getPlayer(e.getPlayer());\n\t\tif (e.getTo().getWorld().getEnvironment() == Environment.NETHER) {\n\t\t\ttrPlayer.completeTask(1);\n\t\t}\n\t}", "private void goDirection(Command command) {\n String direction = command.getFirstParameter();\n Room nextRoom = currentRoom.nextRoom(direction);\n\n // try to leave current room\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n } else {\n currentRoom = nextRoom;\n }\n }", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public boolean teleport ( Entity destination ) {\n\t\treturn invokeSafe ( \"teleport\" , destination );\n\t}", "void opponentInRoom();", "public static void teleport(LivingEntity ent, Location to) {\n\t\tteleport(ent, to, true, true);\n\t}", "public static void sendTo(Player player, OwnedWarp warp) {\n if(warp == null)\n return;\n try {\n Points.teleportTo(player, warp.getTarget(), warp.getName());\n } catch (InvalidDestinationException ex) {\n player.sendMessage(ex.getMessage());\n Stdout.println(ex.getMessage(), Level.ERROR);\n }\n }", "public void teleport(boolean penalty) { \n\t\tPublisher teleport_h = new Publisher(\"/ariac_human/go_home\", \"std_msgs/Bool\", bridge);\n\t\tif(penalty)\t\n\t\t\tteleport_h.publish(new Bool(true));\t\n\t\telse\n\t\t\tteleport_h.publish(new Bool(false));\t\n\n\t\t// Reset \"smart\" orientation variables\n\t\tlastHumanState_MsgT = System.currentTimeMillis();\n\t\tlastUnsafeD_MsgT = System.currentTimeMillis();\n\t\tpreviousDistance = 50.0;\n\t\tisAproximating = false;\n\t}", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n anteriorRoom.push(currentRoom);\n currentRoom = nextRoom;\n printLocationInfo();\n }\n }", "public Player getTeleporter(){\n\t\treturn teleporter;\n\t}", "static void enter(Player player, Room room) {\n if (player.moveTo(room)) {\n System.out.println(\"You just entered \" + player.getLocation());\n }\n else {\n System.out.println(\"That way appears to be blocked.\");\n }\n }", "@EventHandler(priority = EventPriority.LOWEST)\n\tpublic void onPlayerTeleport(PlayerTeleportEvent event)\n\t{\n\t Player player = event.getPlayer();\n\t\tPlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t\n\t\t//FEATURE: prevent players from using ender pearls to gain access to secured claims\n\t\tTeleportCause cause = event.getCause();\n\t\tif(cause == TeleportCause.CHORUS_FRUIT || (cause == TeleportCause.ENDER_PEARL && instance.config_claims_enderPearlsRequireAccessTrust))\n\t\t{\n\t\t\tClaim toClaim = this.dataStore.getClaimAt(event.getTo(), false, playerData.lastClaim);\n\t\t\tif(toClaim != null)\n\t\t\t{\n\t\t\t\tplayerData.lastClaim = toClaim;\n\t\t\t\tString noAccessReason = toClaim.allowAccess(player);\n\t\t\t\tif(noAccessReason != null)\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noAccessReason);\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\tif(cause == TeleportCause.ENDER_PEARL)\n\t\t\t\t\t player.getInventory().addItem(new ItemStack(Material.ENDER_PEARL));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n Logger.Log(\"Where are you trying to go?\");\n return;\n }\n\n String direction = command.getSecondWord(); \n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n Logger.Log(\"You walk repeatedly into a wall... Please try another direction\");\n }\n // If the portal is entered, call the random room method\n else {\n if (nextRoom.RoomID == 17){\n //System.out.println(\"????????\"); //An unusable string which may be implemented later\n Logger.Log(\"~*~*~PoRtAl~*~*~\");\n nextRoom = getRandomRoom();\n }\n \n currentRoom = nextRoom;\n Logger.Log(currentRoom.getShortDescription());\n } \n }", "static void goRoom(Command command) throws InterruptedException {\n if (currentRoom == airport) {\n lockRoom(command);\n }\n if (!command.hasSecondWord()) {\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n Room nextRoom = currentRoom.getExit(direction);\n player.setCurrentRoom(nextRoom);\n /* loop that when next room is equel to null it print a message that says \"there is no door\" \n but if nextRoom is not equel null set currentRoom to nextRoom and print the description of the new room*/\n if (nextRoom == null) {\n System.out.println(\"There is no path!\");\n } else {\n currentRoom = nextRoom;\n System.out.println(player.getCurrentRoom().getLongDescription());\n\n }\n\n forceDialog();\n }", "public boolean teleport ( Entity destination , PlayerTeleportEvent.TeleportCause cause ) {\n\t\treturn invokeSafe ( \"teleport\" , destination , cause );\n\t}", "public void teleportToAstronaut() {\n\t\tAstronaut a;\n\t\tSpaceship sp;\n\t\tif(roamingAstronauts > 0) {\n\t\t\tsp = getTheSpaceship();\n\t\t\ta = getRandomAstronaut();\n\t\t\tsp.setLocation(a.getLocation());\n\t\t\tSystem.out.println(\"You've teleported to an astronaut. \\n Hope you didn't hit them.\");\n\t\t}\n\t\telse \n\t\t\tSystem.out.println(\"Error: Ther were no astronauts to jump to.\");\n\t}", "private void menu2() {\r\n\t\tSystem.out.println(\" ---------WHICH ROOM?---------\");\r\n\t\tSystem.out.println(\"1) Move to North room.\");\r\n\t\tSystem.out.println(\"2) Move to East room.\");\r\n\t\tSystem.out.println(\"3) Move to South room.\");\r\n\t\tSystem.out.println(\"4) Move to West room.\");\r\n\t}", "protected void enterWaitRoom(ArenaPlayer p){\n \t\tfinal String name = p.getName();\n \t\tinsideArena.add(name);\n \t\tinsideWaitRoom.add(name);\n \t\t/// Store the point at which they entered the waitroom\n \t\tif (!oldlocs.containsKey(name)) /// First teleportIn is the location we want\n \t\t\toldlocs.put(name, p.getLocation());\n \t\tBTInterface.stopTracking(p);\n \t\tTeam t = getTeam(p);\n \t\tPerformTransition.transition(this, MatchState.ONENTERWAITROOM, p, t, false);\n \t\tarenaInterface.onEnterWaitRoom(p,t);\t\n \t}", "public void setMove2(char playerTwo, int location) {\n\t\t\n\t}", "public static void teleportPlayer(GamePlayer player, List<Location> spawnpoint) {\r\n\t\tRandom rand = new Random();\r\n\t\tLocation spawn = spawnpoint.get(rand.nextInt(spawnpoint.size()));\r\n\t\t\r\n\t\tplayer.getPlayer().setSaturation(100000);\r\n\t\tplayer.getPlayer().setHealth(20);\r\n\t\tplayer.getPlayer().teleport(spawn);\r\n\t\tgiveStuff(player);\r\n\t}", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}", "public boolean teleportTo(Projectile p, Level l) {\r\n\t\tRectangle landingZone = new Rectangle(p.x+(p.width/2)-(width/2),p.y+(p.height/2)-(height/2),width,height);\r\n\t\tRectangle[] walls = l.getWalls();\r\n\t\tRectangle[] enemies = l.getAliveEnemies();\r\n\t\tboolean enoughRoom = true;\r\n\t\tfor(int i=0; i<walls.length;i++){\r\n\t\t\tif(landingZone.intersects(walls[i])){\r\n\t\t\t\tenoughRoom = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i=0; i<enemies.length;i++){\r\n\t\t\tif(landingZone.intersects(enemies[i])){\r\n\t\t\t\tenoughRoom = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(landingZone.x < 0 || landingZone.x > 600-landingZone.width || landingZone.y < l.getHudLength() \r\n\t\t\t\t|| landingZone.y > 400 + l.getHudLength() - landingZone.height){\r\n\t\t\tenoughRoom = false;\r\n\t\t}\r\n\t\tif(enoughRoom){\r\n\t\t\tsetLocation(landingZone.x, landingZone.y);\r\n\t\t\tinTeleportCooldown = true;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public boolean teleport(Location location) {\n/* 508 */ return teleport(location, PlayerTeleportEvent.TeleportCause.PLUGIN);\n/* */ }", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\\n\");\n }\n else {\n moveRooms.push(currentRoom);\n currentRoom = nextRoom;\n look();\n }\n }", "private void goRoom(Command command)//Method was given\n {\n if(!command.hasSecondWord())\n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n String direction = command.getSecondWord();\n if (direction.equals(\"back\"))\n {\n roomTemp = currentRoom;\n currentRoom = previousRoom;\n previousRoom = roomTemp;\n //roomTemp = null;\n System.out.println(currentRoom.longDescription());\n }\n else\n {\n // Try to leave current room.\n \n if (currentRoom.nextRoom(direction) == null)\n System.out.println(\"There is no door!\");\n else \n {\n Room nextRoom = currentRoom.nextRoom(direction);\n if (nextRoom.getLocked())\n {\n System.out.println(\"The door is locked!\");\n }\n else\n { \n previousRoom = currentRoom;\n currentRoom = nextRoom;\n System.out.println(currentRoom.longDescription());\n }\n }\n }\n }", "default void interactWith(Teleporter tp) {\n\t}", "@Override\n\tpublic void onWalkRight(PlatformPlayer player) {\n\t\t\n\t}", "public void callOnTeleport() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tc.getInstance().summoned.killerId = 0;\n\t\t\tc.getInstance().summoned.underAttackBy = 0;\n\t\t\tc.getInstance().summoned.npcTeleport(0, 0, 0);\n\t\t\tc.getInstance().summoned.updateRequired = true;\n\t\t\tc.getInstance().summoned = Server.npcHandler.summonNPC(c, summonedFamiliar.npcId, c.getX(),\n\t\t\t\t\tc.getY() + (summonedFamiliar.large ? 2 : 1), c.heightLevel, 0, c.getInstance().summoned.HP, 1, 1,\n\t\t\t\t\t1);\n\t\t\tcallFamiliar();\n\t\t} else {\n\t\t\tc.getPA().sendSummOrbDetails(false, \"\");\n\t\t}\n\t}", "static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n System.out.println(\"That way is blocked!\");\n }\n else {\n lastRoom = currentRoom;\n multiLastRooms.push (lastRoom);\n currentRoom = nextRoom;\n timer = timer + 1;\n System.out.println(currentRoom.getLongDescription());\n }\n }", "public void sendTeleportPacket(int entityId, Vector destination, byte yaw, byte pitch) {\n Object packet = ReflectUtils.newInstance(\"PacketPlayOutEntityTeleport\");\n ReflectUtils.setField(packet, \"a\", entityId);\n\n // Set the teleport location to the position of the entity on the player's side of the portal\n ReflectUtils.setField(packet, \"b\", destination.getX());\n ReflectUtils.setField(packet, \"c\", destination.getY());\n ReflectUtils.setField(packet, \"d\", destination.getZ());\n ReflectUtils.setField(packet, \"e\", yaw);\n ReflectUtils.setField(packet, \"f\", pitch);\n\n sendPacket(packet);\n }", "public TicTacToe(Client player1, Client player2) {\n\t\tthis.player1 = player1;\n\t\tthis.player2 = player2;\n\t\tturn = player1;\n\t}", "protected void movePlayerToCell(Cell target)\n {\n theEngine.movePlayer(\n target.getX() - getThePlayer().getLocation().getX(),\n target.getY() - getThePlayer().getLocation().getY());\n }", "public void moveAgentTo(Agent ag, int door) throws InterruptedException {\n ProcessData data = (ProcessData) agents.get(ag);\n Vertex vertexFrom, vertexTo;\n Message msg;\n MessagePacket msgPacket;\n \n \n if( door < 0 || door >= getArity(ag))\n throw new IllegalArgumentException(\"This door doesn't exist !\");\n\n vertexFrom = data.vertex;\n vertexTo = vertexFrom.neighbour(door);\n\n msg = new StringMessage(ag.toString());\n msgPacket = new MessagePacket(vertexFrom.identity(), door, \n vertexTo.identity(), msg);\n\t\n\tpushMessageSendingEvent(msgPacket,ag);\n\t\n\n\tdata.vertex = vertexTo;\n\tdata.lastVertexSeen = vertexFrom;\n\n stats.add(new MoveStat(ag.getClass()));\n }", "public Room getDestination() {\n return toRoom;\n }", "public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }", "public void doneBy(Player p) {\n\t\tp.currentRoom().discovered();\n\t\tSystem.out.println(p.description());\n\t\tSystem.out.println(\"\\n\"+Translator.translate(\"LookRoom\")+\" :\");\n\t\tPrintLookable.printList(Translator.translate(\"Monsters\"), p.currentRoom().getCharacters());\n\t\tPrintLookable.printList(Translator.translate(\"Items\"), p.currentRoom().getItems());\n\t\tPrintLookable.printList(Translator.translate(\"Dead\"), p.currentRoom().getDeads());\n\t\tList<Direction> directions = new ArrayList<Direction>(p.currentRoom().getPossibleDirections());\n\t\tPrintLookable.printList(Translator.translate(\"Directions\"), directions);\n\t}", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "private void pointTowardsPlayer(Direction dir, Position playerPos, Position enemyPos)\n {\n dir.x = playerPos.x - enemyPos.x;\n dir.y = playerPos.y - enemyPos.y;\n\n // Normalize direction vector\n double length = Math.sqrt(dir.x * dir.x + dir.y * dir.y);\n dir.x /= length;\n dir.y /= length;\n }", "@Override\n public void execute() {\n vars.setState(\"Teleporting...\");\n Methods.teleToFlameKing();\n }", "public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}", "@FXML\n public void addTeleporter() {\n if (!World.getInstance().worldContainsTeleporterIn()) {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingTeleporterIn(0, 0));\n }\n if (!World.getInstance().worldContainsTeleporterOut()) {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingTeleporterOut(0, 0));\n \t\n }\n\n }", "public static void slayerRingTeleport(ClientContext ctx, int destinationSelection) {\n int[] slayerRings = new int[]{Items.SLAYER_RING_8_11866, Items.SLAYER_RING_7_11867, Items.SLAYER_RING_6_11868, Items.SLAYER_RING_5_11869, Items.SLAYER_RING_4_11870, Items.SLAYER_RING_3_11871, Items.SLAYER_RING_2_11872, Items.SLAYER_RING_1_11873};\n\n Item i = ctx.inventory.select().id(slayerRings).first().poll();\n\n if (i.valid()) {\n i.interact(\"Rub\", i.name());\n\n // Wait for prompt\n Condition.wait(new Callable<Boolean>() {\n @Override\n public Boolean call() throws Exception {\n return ctx.widgets.component(219, 1, 1).visible();\n }\n }, 100, 20);\n\n // Click teleport\n ctx.widgets.component(219, 1, 1).click();\n sleep();\n\n // Wait for destination selection\n Condition.wait(new Callable<Boolean>() {\n @Override\n public Boolean call() throws Exception {\n return ctx.widgets.component(219, 1, 1).visible();\n }\n }, 100, 20);\n\n // Select Destination\n ctx.widgets.component(219, 1, destinationSelection).click();\n }\n }", "public void setPlayerPosition(Player player) {\n if (player.getPositionX() < 0 && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //left exit to right entry\n player.position.x = screenWidth - wallSize - player.getRadius();\n player.position.y = player.getPositionY();\n } else if ((player.getPositionX() > screenWidth / 2 - doorSize && player.getPositionX() < screenWidth / 2 + doorSize) && player.getPositionY() < 0) {\n //top exit to bottom entry\n player.position.x = player.getPositionX();\n player.position.y = screenHeight - wallSize - player.getRadius();\n } else if (player.getPositionX() > screenWidth && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //right exit to left entry\n player.position.x = wallSize + player.getRadius();\n player.position.y = player.getPositionY();\n } else {\n //bottom exit to top entry\n player.position.x = player.getPositionX();\n player.position.y = wallSize + player.getRadius();\n }\n }", "@Override\n\tpublic void onTurnRight(PlatformPlayer player) {\n\t\t\n\t}", "protected void moveTowards()\r\n {\r\n if(planet != null)\r\n turnTowards(planet.getX(), planet.getY());\r\n\r\n //If the invader touches a planet, it will go into the planet\r\n TargetPlanet t = (TargetPlanet)getOneIntersectingObject (TargetPlanet.class);\r\n //if t exists and looking for nearest planet OR looking for unconquered planet and reached it or no set planet\r\n if (t != null && ((findNearestPlanet || (!findNearestPlanet && t.equals(planet))) || planet == null))\r\n {\r\n t.hitByFighter(isHuman); //planet's stats will change\r\n removeMe = true;\r\n }\r\n }", "private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = null;\n \n for(Exit e : currentRoom.getListExits()) {\n String key = e.getDirection();\n Room exit = e.getRoom();\n \n if(direction.equals(key)){\n nextRoom = exit;\n break;\n }\n }\n \n if (nextRoom == null) {\n \n }\n else {\n currentRoom = nextRoom;\n printExits ();\n }\n }", "public void act() \n {\n \n move(1);\n \n Player2 player2 = new Player2();\n myWorld2 world = (myWorld2)getWorld();\n \n \n checkForDeath();\n }", "public static boolean safeTeleport(Player toBeTeleported, Location toTeleport, boolean isFlying, boolean registerBackLocation, boolean... ignoreCooldown) throws CommandException {\n //Get SlapPlayer\n// SlapPlayer sp = PlayerControl.getPlayer(toBeTeleported);\n//\n// if ((ignoreCooldown.length > 0 && !ignoreCooldown[0]) || ignoreCooldown.length == 0) {\n// if (!sp.getTeleporter().canTeleport()) { //Check if able to teleport if cooldown\n// if (!Util.testPermission(toBeTeleported, \"tp.cooldownoverride\")) {\n// throw new CommandException(\"You'll need to wait a bit before teleporting agian!\");\n// }\n// }\n// }\n\n\n Location teleportTo = null;\n boolean tpUnder = false;\n\n Location fromLocation = toBeTeleported.getLocation();\n\n if (isFlying && !toBeTeleported.isFlying()) { //Target is flying while the player is not flying -> Find first block under target\n tpUnder = true;\n boolean creative = (toBeTeleported.getGameMode() == GameMode.CREATIVE); //Check if in creative\n for (Location loc = toTeleport; loc.getBlockY() > 0; loc.add(0, -1, 0)) { //Loop thru all blocks under target's location\n Material m = loc.getBlock().getType();\n if (m == Material.AIR) continue; //Looking for first solid\n if (m == Material.LAVA && !creative) { //If teleporting into lava && not in creative\n throw new CommandException(\"You would be teleported into Lava!\");\n }\n teleportTo = loc.add(0, 1, 0); //Set loc + 1 block above\n break;\n }\n } else { //Not flying\n teleportTo = toTeleport;\n }\n\n if (teleportTo == null) { //Check if location found\n throw new CommandException(\"Cannot teleport! Player above void!\");\n }\n\n toBeTeleported.teleport(teleportTo); //Teleport\n toBeTeleported.setVelocity(new Vector(0, 0, 0)); //Reset velocity\n\n// if (registerBackLocation) { //If registering back location\n// sp.getTeleporter().setBackLocation(fromLocation); //Set back location\n// }\n\n //Register teleport\n// sp.getTeleporter().teleported();\n\n return tpUnder;\n }", "static void forwardL(Room one, Room two, WorldFrame world) {\n //built horizontal hallway part\n Random ran = world.rand();\n\n int yH = RandomUtils.uniform(ran, two.getY(), two.tEdge() + 1);\n int xH = RandomUtils.uniform(ran, one.getX(), one.rEdge() + 1);\n int lH = two.getX() - xH;\n\n if (lH > 0) {\n world.hallwaysSet().add(new Hallway(xH, yH, Direction.RIGHT, lH, world));\n }\n // built vertical part first\n\n\n int lV = one.getY() - yH;\n\n\n if (lV > 0) {\n world.hallwaysSet().add(new Hallway(xH, yH, Direction.UP, lV, world));\n }\n }", "public boolean movePlayer(Player p, Direction d) {\n\n\t\tLocation playerLoc = p.getLocation();\n\t\tTile playerTil = p.getTile();\n\t\tPosition playerPos = playerTil.getPos();\n\n\t\tTile newTile = null;\n\n\t\tswitch (d) {\n\n\t\tcase NORTH:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.NORTH);\n\t\t\tp.setFacing(Direction.NORTH);\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.EAST);\n\t\t\tp.setFacing(Direction.EAST);\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.WEST);\n\t\t\tp.setFacing(Direction.WEST);\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.SOUTH);\n\t\t\tp.setFacing(Direction.SOUTH);\n\t\t\tbreak;\n\t\t}\n\n\t\tif (newTile != null) {\n\t\t\tif (newTile.getGameObject() == null) {\n\t\t\t\tif (newTile instanceof WaterTile) {\n\t\t\t\t\tif (!p.getHasFloatingDevice()) {\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"It's deep blue and cold as ice, perhaps you require something to float on\", p);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (newTile instanceof DoorOutTile) {\n\t\t\t\t\tDoorOutTile dot = (DoorOutTile) newTile;\n\n\t\t\t\t\tif (board.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos())\n\t\t\t\t\t\t\t.getGameObject() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tplayerTil.setGameObject(null);\n\n\t\t\t\t\tp.setLocation(dot.getOutLocationID());\n\t\t\t\t\tp.setTile(board.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos()));\n\n\t\t\t\t\tboard.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos()).setGameObject(p);\n\t\t\t\t\tp.setFacing(Direction.SOUTH);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tplayerTil.setGameObject(null);\n\t\t\t\tnewTile.setGameObject(p);\n\t\t\t\tp.setTile(newTile);\n\t\t\t\tp.setLocation(board.getLocationById(newTile.getLocationID()));\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\ttriggerInteraction(p, newTile);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }", "private void handleTeleport(GameGUI gui) {\r\n\t\tif (gui.isTeleportPressed()) {\r\n\t\t\tteleport();\r\n\t\t}\r\n\t}", "public static void tpr(String world, Player player) {\n String msg = MessageManager.getMessageYml().getString(\"Tpr.Teleporting\");\n player.sendMessage(MessageManager.getPrefix() + ChatColor.translateAlternateColorCodes('&', msg));\n Location originalLocation = player.getLocation();\n Random random = new Random();\n Location teleportLocation;\n int maxDistance = Main.plugin.getConfig().getInt(\"TPR.Max\");\n World w = Bukkit.getServer().getWorld(world);\n int x = random.nextInt(maxDistance) + 1;\n int y = 150;\n int z = random.nextInt(maxDistance) + 1;\n boolean isOnLand = false;\n teleportLocation = new Location(w, x, y, z);\n while (!isOnLand) {\n teleportLocation = new Location(w, x, y, z);\n if (teleportLocation.getBlock().getType() != Material.AIR) {\n isOnLand = true;\n } else {\n y--;\n }\n }\n player.teleport(new Location(w, teleportLocation.getX(), teleportLocation.getY() + 1.0D, teleportLocation.getZ()));\n if (Main.plugin.getConfig().getString(\"NOTIFICATIONS.Tpr\").equalsIgnoreCase(\"True\")) {\n int dis = (int) teleportLocation.distance(originalLocation);\n String dist = String.valueOf(dis);\n String original = (MessageManager.getMessageYml().getString(\"Tpr.Distance\").replaceAll(\"%distance%\", dist));\n String distance = (ChatColor.translateAlternateColorCodes('&', original));\n player.sendMessage(MessageManager.getPrefix() + distance);\n }\n }", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "@Override\n public Location getLocation() {\n if (type == TeleportType.TPA) {\n return target.getPlayerReference(Player.class).getLocation();\n } else if (type == TeleportType.TPHERE) {\n return toTeleport.getPlayerReference(Player.class).getLocation();\n }\n\n return null;\n }", "private void switchPlayer(Player opponentPlayer, Match match) {\r\n if(opponentPlayer.getPlayerId().equals(match.getPlayer1().getPlayerId())){\r\n setCurrentPlayer(match, 1);\r\n } else if (opponentPlayer.getPlayerId().equals(match.getPlayer2().getPlayerId())){\r\n setCurrentPlayer(match, 2);\r\n } else {\r\n LOGGER.error(\"Player not found\");\r\n }\r\n }", "void scheduleNextDestination(Passenger passenger, Floor currentFloor);", "private void goAcrossWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move();\n\t\tthis.turnRight();\n\t}", "private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = playerManager.getPlayer(2);\n else\n player = new Player(\"No Player exists\");\n\n updateLiveComment(\"Turn : \" + player.getName());\n }", "public void doAction(SpaceWars game) {\n SpaceShip closestShip = game.getClosestShipTo(this);\n double distFromClosest = POSITION.distanceFrom(closestShip.getPhysics());\n double angleFromClosest = POSITION.angleTo(closestShip.getPhysics());\n if (distFromClosest < 0.25 && Math.abs(angleFromClosest) < 0.23) {\n teleport();\n }\n moveFromEnemy(angleFromClosest);\n CUR_ENERGY = updateEnergy(CUR_ENERGY);\n }", "void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }", "private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 2: travelTo(Location.X3); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 3: case 4: travelTo(Location.AttackBase);*/\n\t\t\t\tcase 1: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 2: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 3: //travelTo(Location.X2);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\tcase 4: //travelTo(Location.X1);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (role == Role.Defender) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) {\n\t\t\t\t\tcase 1: //travelTo(Location.X4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 2: //travelTo(Location.X3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 3: travelTo(Location.DefWay3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 4: travelTo(Location.DefWay4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\telse if (destination == Location.BallPlatform)\n\t\t\tnavigator.travelTo(ballPlatform[0], ballPlatform[1]);\n\t\t\t\n\t\telse if (destination == Location.ShootingRegion)\n\t\t\tnavigator.travelTo(CENTER, 7 * 30.0); // we have to account for the case when there is an obstacle in the destination\n\t\t\t// also need to find a way of determining the y coordinate\n\n\t\telse if (destination == Location.AttackBase)\n\t\t\tnavigator.travelTo(ATTACK_BASE[0], ATTACK_BASE[1]); \n\t\t\n\t\telse if (destination == Location.DefenseBase)\n\t\t\tnavigator.travelTo(DEFENSE_BASE[0], DEFENSE_BASE[1]);\n\t\t\n\t\telse if (destination == Location.X1) \n\t\t\tnavigator.travelTo(X[0][0] * 30.0, X[0][1] * 30.0);\n\n\t\telse if (destination == Location.X2)\n\t\t\tnavigator.travelTo(X[1][0] * 30.0, X[1][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.X3) \n\t\t\tnavigator.travelTo(X[2][0] * 30.0, X[2][1] * 30.0);\n\n\t\telse if (destination == Location.X4)\n\t\t\tnavigator.travelTo(X[3][0] * 30.0, X[3][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.DefWay3)\n\t\t\tnavigator.travelTo(240, 240);\n\t\t\n\t\telse if (destination == Location.DefWay4)\n\t\t\tnavigator.travelTo(60, 240);\n\n\t\t\n\t\t// return from method only after navigation is complete\n\t\twhile (navigator.isNavigating())\n\t\t{\n\t\t\tSystem.out.println(\"destX: \" + navigator.destDistance[0] + \"destY: \" + navigator.destDistance[1]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}", "public boolean teleport ( Location location , PlayerTeleportEvent.TeleportCause cause ) {\n\t\treturn invokeSafe ( \"teleport\" , location , cause );\n\t}", "public void nextTurn() {\n\t\tusedPocket = false;\n\t\ttookFromPot = false;\n\t\tcurrentTurn++;\n\t\tcurrentTurn = currentTurn%2;\n\t\tif(currentTurn == 0) {\n\t\t\tcurrentPlayer = player1;\n\t\t\topponentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player2;\n\t\t\topponentPlayer = player1;\n\t\t}\n\t}", "public static void Transfer(JailPrisoner prisoner, Player player)\r\n \t{\r\n \t\tif (prisoner.getTransferDestination() == \"find nearest\") prisoner.setTransferDestination(JailZoneManager.findNearestJail(player.getLocation(), prisoner.getJail().getName()).getName());\r\n \t\t\r\n \t\tif (prisoner.getCell() != null)\r\n \t\t{\r\n \t\t\tInventory inventory = player.getInventory();\r\n \t\t\tJailCell cell = prisoner.getCell();\r\n \t\t\tcell.setPlayerName(\"\");\r\n \t\t\tfor (Sign sign : cell.getSigns())\r\n \t\t\t{\r\n \t\t\t\tsign.setLine(0, \"\");\r\n \t\t\t\tsign.setLine(1, \"\");\r\n \t\t\t\tsign.setLine(2, \"\");\r\n \t\t\t\tsign.setLine(3, \"\");\r\n \t\t\t\tsign.update();\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (cell.getChest() != null) \r\n \t\t\t{\r\n \t\t\t\tfor (ItemStack i: cell.getChest().getInventory().getContents())\r\n \t\t\t\t{\r\n \t\t\t\t\tif (i == null || i.getType() == Material.AIR) continue;\r\n \t\t\t\t\tinventory.addItem(i);\r\n \t\t\t\t}\r\n \t\t\t\tcell.getChest().getInventory().clear();\r\n \t\t\t}\r\n \t\t\tif (cell.getSecondChest() != null) \r\n \t\t\t{\r\n \t\t\t\tfor (ItemStack i: cell.getSecondChest().getInventory().getContents())\r\n \t\t\t\t{\r\n \t\t\t\t\tif (i == null || i.getType() == Material.AIR) continue;\r\n \t\t\t\t\tinventory.addItem(i);\r\n \t\t\t\t}\r\n \t\t\t\tcell.getSecondChest().getInventory().clear();\r\n \t\t\t}\r\n \t\t\tprisoner.setCell(null);\r\n \t\t}\r\n \t\t\t\t\t\t\r\n \t\tprisoner.SetBeingReleased(true);\r\n \t\t\r\n \t\tString targetJail = prisoner.getTransferDestination();\r\n \t\tif (targetJail.contains(\":\"))\r\n \t\t{\r\n \t\t\tprisoner.setRequestedCell(targetJail.split(\":\")[1]);\r\n \t\t\ttargetJail = targetJail.split(\":\")[0];\t\t\t\r\n \t\t}\r\n \t\t\r\n \t\tJailZone jail = Jail.zones.get(targetJail);\r\n \t\tprisoner.setJail(jail);\r\n \t\tprisoner.setTransferDestination(\"\");\r\n \t\tprisoner.setOfflinePending(false);\r\n \t\tUtil.Message(jail.getSettings().getString(Setting.MessageTransfer), player);\r\n \t\tJail.prisoners.put(prisoner.getName(),prisoner);\r\n \r\n \t\tJailCell cell = jail.getRequestedCell(prisoner);\r\n \t\tif (cell == null || (cell.getPlayerName() != null && !cell.getPlayerName().equals(\"\") && !cell.getPlayerName().equals(prisoner.getName()))) \r\n \t\t{\r\n \t\t\tcell = null;\r\n \t\t\tcell = jail.getEmptyCell();\r\n \t\t}\r\n \t\tif (cell != null)\r\n \t\t{\r\n \t\t\tcell.setPlayerName(player.getName());\r\n \t\t\tprisoner.setCell(cell);\r\n \t\t\tplayer.teleport(prisoner.getTeleportLocation());\r\n \t\t\tprisoner.updateSign();\r\n \t\t\tif (jail.getSettings().getBoolean(Setting.StoreInventory) && cell.getChest() != null)\r\n \t\t\t{\r\n \t\t\t\tChest chest = cell.getChest();\r\n \t\t\t\tchest.getInventory().clear();\r\n \t\t\t\tfor (int i = 0;i<40;i++)\r\n \t\t\t\t{\r\n \t\t\t\t\tif (chest.getInventory().getSize() <= Util.getNumberOfOccupiedItemSlots(chest.getInventory().getContents())) break;\r\n \t\t\t\t\tif (player.getInventory().getItem(i) == null || player.getInventory().getItem(i).getType() == Material.AIR) continue;\r\n \t\t\t\t\tchest.getInventory().addItem(player.getInventory().getItem(i));\r\n \t\t\t\t\tplayer.getInventory().clear(i);\r\n \t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\tif (cell.getSecondChest() != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tchest = cell.getSecondChest();\r\n \t\t\t\t\tchest.getInventory().clear();\r\n \t\t\t\t\tfor (int i = 0;i<40;i++)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tif (chest.getInventory().getSize() <= Util.getNumberOfOccupiedItemSlots(chest.getInventory().getContents())) break;\r\n \t\t\t\t\t\tif (player.getInventory().getItem(i) == null || player.getInventory().getItem(i).getType() == Material.AIR) continue;\r\n \t\t\t\t\t\tchest.getInventory().addItem(player.getInventory().getItem(i));\r\n \t\t\t\t\t\tplayer.getInventory().clear(i);\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tcell.update();\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tplayer.teleport(prisoner.getTeleportLocation());\r\n \t\t}\r\n \t\t\r\n \t\tif (jail.getSettings().getBoolean(Setting.StoreInventory)) \r\n \t\t{\r\n \t\t\tprisoner.storeInventory(player.getInventory());\r\n \t\t\tplayer.getInventory().clear();\r\n \t\t}\r\n \t\t\r\n \t\tprisoner.SetBeingReleased(false);\r\n \t\tInputOutput.UpdatePrisoner(prisoner);\r\n \t}", "public Player getOtherPlayer() {\n if (getCurrentPlayer().getNumber() == 1) {\n return joueur2;\n } else {\n return joueur1;\n }\n }", "@Override\n public void run() {\n if (pendingTeleports.containsKey(sender.getName())) {\n pendingTeleports.remove(sender.getName(),originalSender);\n if (senderPlayer.dimension != teleportee.dimension) {\n TeleportHelper.transferPlayerToDimension(teleportee,senderPlayer.dimension,server.getPlayerList());\n }\n teleportee.setPositionAndUpdate(senderPlayer.posX,senderPlayer.posY,senderPlayer.posZ);\n sender.addChatMessage(new TextComponentString(TextFormatting.GREEN+\"Teleport successful.\"));\n teleportee.addChatMessage(new TextComponentString(TextFormatting.GREEN+\"Teleport successful.\"));\n } //if not, the teleportee moved\n }", "@Override\n public void walkOn(Player player) {\n player.getOwner().getLobby().getGame().movementStack.add(new ForceMovement(getDirection(), 1, player, true, true));\n\n\n }", "@Override\n\tpublic void goForward() {\n\t\t// check side and move the according room and side\n\t\tif (side.equals(\"hRight\")) {\n\t\t\tthis.side = \"bFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"hFront\")) {\n\t\t\tthis.side = \"mFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"bLeft\")) {\n\t\t\tthis.side = \"rLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(4);\n\n\t\t} else if (side.equals(\"rBack\")) {\n\t\t\tthis.side = \"bBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"bBack\")) {\n\t\t\tthis.side = \"hLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else if (side.equals(\"kBack\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"lLeft\")) {\n\t\t\tthis.side = \"kRight\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(6);\n\n\t\t} else if (side.equals(\"lBack\")) {\n\t\t\tthis.side = \"mBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"mFront\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"mBack\")) {\n\t\t\tthis.side = \"hBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else {\n\t\t\trandomRoom();\n\t\t\tSystem.out.println(\"Entered Wormhole!\");\n\t\t\tSystem.out.println(\"Location was chosen at random\");\n\t\t\tSystem.out.println(\"New location is: \" + room + \" room and \" + side.substring(1) + \" side\");\n\n\t\t}\n\t}", "@Override\r\n\tpublic boolean canTeleport() {\n\t\treturn false;\r\n\t}", "public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "public Point performTeleport(String name, Point oldPos, boolean safeTeleport) {\n\t\tPoint newPos \t= new Point();\n\t\tif(safeTeleport)\n\t\t\tnewPos = getSafeTeleportPosition();\n\t\telse\n\t\t\tnewPos = getUnsafeTeleportPosition();\n\t\t\n\t\tmovePlayer(name, oldPos, newPos, true);\n\t\treturn newPos;\n\t}", "private void moveShipRight()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit right\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n int temp1 = (currentPos + 1) % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth + 1);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + 1);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit right\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n int temp1 = (currentPos + 1) % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth + 1);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + 1);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "private static void returnDoMove(String playerName, int kord1,int kord2,HttpServletResponse response, String url) throws IOException {\n GameOptions game = GamesSingleton.games.get(url);\n game.MakeStep(playerName,kord1,kord2);\n response.sendRedirect(url);\n\n }", "public void preparePlayer2()\n {\n Player2 p2 = new Player2();\n addObject(p2, 878, 600);\n }", "public static void teleport(LivingEntity ent, Location to, boolean saveYaw, boolean savePitch) {\n\t\tLocation tp = to.clone();\n\t\tif(saveYaw) tp.setYaw(ent.getLocation().getYaw());\n\t\tif(savePitch) tp.setPitch(ent.getLocation().getPitch());\n\t\tent.teleport(tp);\n\t}" ]
[ "0.6949772", "0.6630154", "0.6416806", "0.63808763", "0.6265174", "0.6133966", "0.61049455", "0.60976636", "0.609623", "0.6079113", "0.603811", "0.599132", "0.5984435", "0.5971332", "0.59371334", "0.59205353", "0.5881921", "0.5869628", "0.58485955", "0.5831749", "0.58300716", "0.5819514", "0.5818481", "0.5816697", "0.5794792", "0.57707614", "0.5758788", "0.57582724", "0.5750748", "0.57496303", "0.5741378", "0.57404447", "0.57370377", "0.57240933", "0.5718801", "0.56742084", "0.56633896", "0.562733", "0.5622711", "0.5600319", "0.559724", "0.559565", "0.5593429", "0.55766314", "0.5560688", "0.5559323", "0.55574495", "0.55561256", "0.5533656", "0.5533461", "0.5524187", "0.55228895", "0.55118763", "0.550066", "0.54974157", "0.5467055", "0.54631925", "0.5462258", "0.54617774", "0.5457933", "0.54539603", "0.5450811", "0.5447317", "0.54400915", "0.5431977", "0.5424552", "0.54208136", "0.54098904", "0.54083604", "0.54071194", "0.5406542", "0.540097", "0.53871024", "0.5378619", "0.5371277", "0.53676474", "0.5357371", "0.5357179", "0.5355935", "0.5352961", "0.53517133", "0.5349501", "0.5344762", "0.53429437", "0.5332582", "0.53204083", "0.53197587", "0.5306432", "0.529857", "0.52968645", "0.5296292", "0.5285698", "0.52809846", "0.5268418", "0.52648187", "0.52537453", "0.5252544", "0.5249858", "0.5244378", "0.5244114" ]
0.61011595
7
end of teleportTo method This method is to make the position of the player in the past room gone.
public void ghost(){ for(int i = 0; i < this.position.length ; i++){//itterates through array for(int p = 0; p < this.position.length ; p++){ this.position[i][p] = 0;//makes the positions for the array 0, player not here } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void takeOut(final StandardPlayer p) {\n if (p == firstPlayerOnPos[p.getPosR()][p.getPosC()]) {\n firstPlayerOnPos[p.getPosR()][p.getPosC()]\n = secondPlayerOnPos[p.getPosR()][p.getPosC()];\n }\n secondPlayerOnPos[p.getPosR()][p.getPosC()] = null;\n deadPlayers[p.getPosR()][p.getPosC()].add(p);\n }", "public static void teleportAway(ClientContext ctx) {\n Item sceptre = ctx.inventory.select().id(Items.SKULL_SCEPTRE_I_21276).poll();\n\n if (sceptre.valid()) {\n sceptre.interact(\"Invoke\", sceptre.name());\n sleep(3000);\n } else {\n // Teletab\n Item tab = ctx.inventory.select().select(new Filter<Item>() {\n @Override\n public boolean accept(Item item) {\n return item.name().toLowerCase().contains(\"teleport\");\n }\n }).poll();\n\n if (tab.valid()) {\n tab.click();\n } else {\n // Glory Teleport\n ctx.game.tab(Game.Tab.EQUIPMENT);\n Item ammy = ctx.equipment.itemAt(Equipment.Slot.NECK);\n if (ammy.name().toLowerCase().contains(\"glory\")) {\n ammy.interact(\"Edgeville\");\n sleep(4000);\n }\n }\n }\n }", "public void stopMoving()\n {\n mouthPosition = 0;\n }", "public void endTurn(MapPanel caller) {\n\t\tlog.log(\"Ending turn for \" + toMove);\n\t\ts.unexamine(caller);\n\t\ttoMove = Alignment.opposing(toMove);\n\t\tif(toMove == Alignment.FRIENDLY)\n\t\t\tcaller.setGameStatus(GameState.PLAYER_MOVING);\n\t\telse\n\t\t\tcaller.setGameStatus(GameState.ENEMY_TURN);\n\t\tstartTurn(caller);\n\t}", "public boolean teleport(Entity destination) {\n/* 571 */ return teleport(destination.getLocation());\n/* */ }", "boolean teleport(Player p1, Player p2, boolean change);", "public static boolean safeTeleport(Player toBeTeleported, Location toTeleport, boolean isFlying, boolean registerBackLocation, boolean... ignoreCooldown) throws CommandException {\n //Get SlapPlayer\n// SlapPlayer sp = PlayerControl.getPlayer(toBeTeleported);\n//\n// if ((ignoreCooldown.length > 0 && !ignoreCooldown[0]) || ignoreCooldown.length == 0) {\n// if (!sp.getTeleporter().canTeleport()) { //Check if able to teleport if cooldown\n// if (!Util.testPermission(toBeTeleported, \"tp.cooldownoverride\")) {\n// throw new CommandException(\"You'll need to wait a bit before teleporting agian!\");\n// }\n// }\n// }\n\n\n Location teleportTo = null;\n boolean tpUnder = false;\n\n Location fromLocation = toBeTeleported.getLocation();\n\n if (isFlying && !toBeTeleported.isFlying()) { //Target is flying while the player is not flying -> Find first block under target\n tpUnder = true;\n boolean creative = (toBeTeleported.getGameMode() == GameMode.CREATIVE); //Check if in creative\n for (Location loc = toTeleport; loc.getBlockY() > 0; loc.add(0, -1, 0)) { //Loop thru all blocks under target's location\n Material m = loc.getBlock().getType();\n if (m == Material.AIR) continue; //Looking for first solid\n if (m == Material.LAVA && !creative) { //If teleporting into lava && not in creative\n throw new CommandException(\"You would be teleported into Lava!\");\n }\n teleportTo = loc.add(0, 1, 0); //Set loc + 1 block above\n break;\n }\n } else { //Not flying\n teleportTo = toTeleport;\n }\n\n if (teleportTo == null) { //Check if location found\n throw new CommandException(\"Cannot teleport! Player above void!\");\n }\n\n toBeTeleported.teleport(teleportTo); //Teleport\n toBeTeleported.setVelocity(new Vector(0, 0, 0)); //Reset velocity\n\n// if (registerBackLocation) { //If registering back location\n// sp.getTeleporter().setBackLocation(fromLocation); //Set back location\n// }\n\n //Register teleport\n// sp.getTeleporter().teleported();\n\n return tpUnder;\n }", "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "public TPDestination rewind() {\r\n if (stack.isEmpty()) { return null; }\r\n TPDestination tp = stack.remove(0);\r\n plugin.getServer().getPlayer(name).teleport(tp.getLocation());\r\n sendLocalizedString(\"teleport.tpback\", getName());\r\n return tp;\r\n }", "private void goAway() {\n CollaborationConnection connection = CollaborationConnection\n .getConnection();\n Presence presence = connection.getPresence();\n if (presence.getMode().equals(Mode.available)) {\n previousPresence = presence;\n Presence newPresence = new Presence(presence.getType(),\n presence.getStatus(), presence.getPriority(), Mode.away);\n Tools.copyProperties(presence, newPresence);\n timerSetAway = sendPresence(connection, newPresence);\n }\n }", "private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }", "public Room back()\n {\n\n //Checks if the has player visited a room, excludes the starting room.\n if(!(visits.isEmpty())){\n\n // If the room currently in, is in the stack then remove it.\n if(currentRoom == visits.peek() && visits.size() !=1){\n visits.pop();\n currentRoom = visits.pop(); // Sets the player to move to the previous room.\n }\n else {\n currentRoom = visits.pop();\n }\n setUserLocation(currentRoom); // Sets the location of the player.\n moves++;\n printStatus(); // Displays the \n }\n else {\n System.out.println();\n System.out.println(\"Please choose a different command.\\nYou have travelled back to the start.\");\n }\n System.out.println();\n return currentRoom;\n }", "private static void goThroughPassage(Player player) {\n int x = player.getAbsX();\n player.getMovement().teleport(x == 2970 ? x + 4 : 2970, 4384, player.getHeight());\n }", "public void respawnPlayer() {\n \tboard.swapTile(board.getTile(player.getPos()), board.getTile(new Point(8,0)));\n player.setPlayerPos(new Point(8,0));\n resetAmmo();\n }", "@Override\n public void run() {\n BlockPos cachePosition = teleportee.getPosition();\n while (cachePosition.equals(teleportee.getPosition()) || pendingTeleports.containsKey(originalSender)) {/*block execution until move or teleport*/}\n if (pendingTeleports.containsKey(originalSender)) { //has not teleported\n pendingTeleports.remove(sender.getName(), originalSender);\n sender.addChatMessage(new TextComponentString(TextFormatting.RED + \"Teleport canceled.\"));\n teleportee.addChatMessage(new TextComponentString(TextFormatting.RED + \"Teleport canceled.\"));\n }\n }", "public void laserMoveUp()\r\n\t{\r\n\r\n\t\tif (y > 0)\r\n\t\t\ty -= 20;\r\n\r\n\t\telse\r\n\t\t\tdestroyed = true;\r\n\r\n\t}", "public void teleportation(Vector2 posTp) {\n int distance = (int) Math.sqrt(Math.pow(posTp.x - position.x, 2) + Math.pow(posTp.y - position.y, 2));\n int coef = 50;\n if (wallet.getMoney() >= coef*distance) {\n position.set(posTp);\n position.x += WIDTH/2;\n resetMiner();\n wallet.withdraw(coef * distance);\n }\n }", "public void liftOff() {\n\t\tL.trace(\"liftOff\");\n\t\tif (canFly()) {\n\t\t\tjump();\n\t\t}\n\t}", "void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "private void resendPosition(Player player) {\r\n\t\tPacketContainer positionPacket = protocolManager.createPacket(PacketType.Play.Server.POSITION);\r\n\t\tLocation location = player.getLocation();\r\n\r\n\t\tpositionPacket.getDoubles().write(0, location.getX());\r\n\t\tpositionPacket.getDoubles().write(1, location.getY());\r\n\t\tpositionPacket.getDoubles().write(2, location.getZ());\r\n\t\tpositionPacket.getFloat().write(0, 0f); // No change in yaw\r\n\t\tpositionPacket.getFloat().write(1, 0f); // No change in pitch\r\n\t\tgetFlagsModifier(positionPacket).write(0, EnumSet.of(PlayerTeleportFlag.X_ROT, PlayerTeleportFlag.Y_ROT)); // Mark pitch and yaw as relative\r\n\r\n\t\tPacketContainer velocityPacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_VELOCITY);\r\n\t\tvelocityPacket.getIntegers().write(0, player.getEntityId());\r\n\t\tvelocityPacket.getIntegers().write(1, 0).write(2, 0).write(3, 0); // Set velocity to 0,0,0\r\n\r\n\t\ttry {\r\n\t\t\tprotocolManager.sendServerPacket(player, positionPacket);\r\n\t\t\tprotocolManager.sendServerPacket(player, velocityPacket);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(\"Failed to send position and velocity packets\", e);\r\n\t\t}\r\n\t}", "private void playerMoveDown()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() + 1);\n if (this.getCurrentY() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "@Override\n public PlayerMove move() {\n\n return null;\n }", "private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}", "private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "public void moveOut(){\n int index=Planet.findPlanet(currPlanet.getName(),planets);\n if(index==planets.size()-1){\n ////If the spaceship is already at the last planet(planets.size()-1) in the planet list\n System.out.println(\"The spaceship \"+this.name+\" couldn't move out. No planet is farther out\");\n }else{\n ////move farther out of the solar system means the index+1 in the ArrayList of planets\n Planet moveToPlanet=planets.get(index+1);\n moveTo(moveToPlanet.getName());\n }\n }", "private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }", "public void back()\n {\n if(!moveRooms.empty()){\n currentRoom = moveRooms.pop();\n look();\n } \n }", "public void giveUp() {\n if (!finished)\n player.kill();\n }", "protected void goAway() {\n\t\tthis.setVisible(false);\n\t\tthis.setBounds(-800, -800, mWidth, mHeight);\n\t}", "void positionCleared();", "private void suspend()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n {\n kill();\n return;\n }\n\n addAdditionalEffects();\n\n // suspend them in the air\n originalLocation = target.getLocation();\n Location newLoc = target.getEyeLocation();\n Location suspendLoc = new Location(newLoc.getWorld(), newLoc.getX(), newLoc.getY(), newLoc.getZ(), originalLocation.getYaw(), 45);\n target.teleport(suspendLoc);\n\n suspended = true;\n }", "@Override\n\tpublic void returnHome()\n\t{\n\t\tif(_returnHome && !isInsideRadius(getSpawn().getLocx(), getSpawn().getLocy(), 150, false))\n\t\t{\n\t\t\tclearAggroList();\n\t\t\tgetAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLoc());\n\t\t}\n\t}", "public void bringBack(Fighter f1)\r\n {\r\n if(f1.getPos()[0] + f1.getSize() > 950) //if they are to the right of the screen\r\n {\r\n f1.setPos(950 - f1.getSize(),f1.getPos()[1]); //move them back onto the screen\r\n f1.setMvmtVel(0,f1.getMvmtVel()[1]); //remove horizontal momentum\r\n f1.setKnockBackVel(0,f1.getKnockBackVel()[1]); //remove horizontal knockback\r\n \r\n }\r\n if(f1.getPos()[0] < 0) //if they are to the left of the screen\r\n {\r\n f1.setPos(0,f1.getPos()[1]); //move them back onto the screen\r\n f1.setMvmtVel(0,f1.getMvmtVel()[1]); //remove horizontal momentum\r\n f1.setKnockBackVel(0,f1.getKnockBackVel()[1]); //remove horizontal knockback\r\n \r\n }\r\n }", "public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }", "@Override\n public void clearLocation() {\n for (Creature creature : getCreatures().values()) {\n if (isEnemy(creature)) {\n if (creature instanceof Kisk) {\n Kisk kisk = (Kisk) creature;\n kisk.getController().die();\n }\n }\n }\n\n for (Player player : getPlayers().values())\n if (isEnemy(player))\n TeleportService2.moveToBindLocation(player, true);\n }", "public void teleportTo(int y, int x){\n\t\tthis.position[y][x] = 1;//makes the position here, used for other object room\n\t}", "public void endTurn(){\n game.setNextActivePlayer();\n myTurn = false;\n\n stb.updateData(\"playerManager\", game.getPlayerManager());\n stb.updateData(\"aktivePlayer\", game.getPlayerManager().getAktivePlayer());\n stb.updateData(\"roomList\", game.getRoomManager().getRoomList());\n\n getIntent().putExtra(\"GAME\",game);\n getIntent().putExtra(\"myTurn\", false);\n finish();\n if(!game.getPlayerManager().getPlayerList().get(whoAmI).isDead())\n startActivity(getIntent());\n else\n fcm.unbindListeners();\n }", "public static void teleport(LivingEntity ent, Location to) {\n\t\tteleport(ent, to, true, true);\n\t}", "public void toEndingTurn() {\n }", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public Builder clearPlayerLng() {\n \n playerLng_ = 0D;\n onChanged();\n return this;\n }", "public void endOfTurn();", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }", "void removeRobot(Position pos);", "public void gerak() \n {\n setLocation(getX(),getY()-5);\n if(getY()<20){\n getWorld().removeObject(this);\n }else\n cek_kena();\n \n }", "public abstract void turnToDead(int x, int y);", "public void exit(Player player) {\r\n\t\tsetInBattle(false);\r\n\t\tplayer.setTeleport(false);\r\n\t\tplayer.setRemovedPrayers(false);\r\n\t\tplayer.setLocation(new Location(3207,3216,0));\r\n\t\tplayer.hints().removeAll();\r\n\t\tplayer.reset();\r\n\t\tRegionBuilder.destroyMap(regionChucks[0], regionChucks[1], 8, 8);\r\n\t}", "@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public void moveEveryoneExcept(Player player) throws IOException, InterruptedException { }", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "public void unapplyMove()\r\n\t{\r\n\t\tif (appliedMoves == null || appliedMoves.isEmpty()) return;\r\n\t\t\r\n\t\tdecrementPositionCount();\r\n\t\t\r\n\t\tboolean lastMoveRochade = isLastMoveRochade(); //Check before any changes to the board are made\r\n\t\tboolean isLastMoveEnPassentCapture = !lastMoveRochade && isLastMoveEnPassentCapture();\r\n\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMoveRochade)\r\n\t\t{\r\n\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\tlastMove.to.piece = lastMove.capture;\r\n\t\t\t\r\n\t\t\tField kingFieldTo = lastMove.to;\r\n\t\t\tif (kingFieldTo.coordinate.x == 6)\r\n\t\t\t{\r\n\t\t\t\tField rookRochadeField = fields[5][kingFieldTo.coordinate.y];\r\n\t\t\t\tField rookBeforeRochadeField = fields[7][kingFieldTo.coordinate.y];\r\n\t\t\t\trookBeforeRochadeField.piece = rookRochadeField.piece;\r\n\t\t\t\trookRochadeField.piece = null;\r\n\t\t\t}\r\n\t\t\telse if (kingFieldTo.coordinate.x == 2)\r\n\t\t\t{\r\n\t\t\t\tField rookRochadeField = fields[3][kingFieldTo.coordinate.y];\r\n\t\t\t\tField rookBeforeRochadeField = fields[0][kingFieldTo.coordinate.y];\r\n\t\t\t\trookBeforeRochadeField.piece = rookRochadeField.piece;\r\n\t\t\t\trookRochadeField.piece = null;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if (isLastMoveEnPassentCapture)\r\n\t\t{\r\n\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\tlastMove.to.piece = null;\r\n\t\t\t\r\n\t\t\tMove beforeLastMove = appliedMoves.get(appliedMoves.size() - 2);\r\n\t\t\tbeforeLastMove.to.piece = lastMove.capture;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (lastMove.promotion != null)\r\n\t\t\t{\r\n\t\t\t\tlastMove.from.piece = new Pawn(lastMove.color);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlastMove.to.piece = lastMove.capture;\r\n\t\t}\r\n\t\t\r\n\t\tappliedMoves.remove(appliedMoves.size() - 1);\r\n\t}", "@Override\n\tpublic void returnHome()\n\t{\n\t\tif (!isInsideRadius(getSpawn(), 200, false, false))\n\t\t{\n\t\t\tif (Config.DEBUG)\n\t\t\t{\n\t\t\t\tLOG.debug(\"{} moving home\", getObjectId());\n\t\t\t}\n\t\t\tsetisReturningToSpawnPoint(true);\n\t\t\tclearAggroList();\n\t\t\t\n\t\t\tif (hasAI())\n\t\t\t{\n\t\t\t\tgetAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, getSpawn().getLocation());\n\t\t\t}\n\t\t}\n\t}", "@Override\n \tpublic boolean leave(ArenaPlayer p) {\n \t\treturn true;\n \t}", "@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}", "private void endFreeze(Player player) {\r\n\t\tFrozenPlayerInfo info = frozenPlayers.remove(player.getUniqueId());\r\n\r\n\t\t// Again, two packets are sent, though we do not modify them this time.\r\n\t\tplayer.setAllowFlight(info.allowFlight);\r\n\t\tplayer.setFlying(info.isFlying);\r\n\t}", "void killPlayerByMonsterMove()\n {\n moveMonsterToCell(getPlayerCell());\n }", "public void resetPlayerPosition() {\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\t}", "public void stop(Player p) {\n\t\tp.setTransformed(false);\n\t\tp.getPackets().sendGameMessage(\"You have transformed back to a human.\");\n\t\tp.getAppearence().asNPC(-1);\n\t\tp.getAppearence().getAppearanceBlock();\n\t}", "public Player getToTeleportTo(){\n\t\treturn toTeleportTo;\n\t}", "public void removePlayer(Player outPlayer) {\n\t\tgetPlayersInRoom().remove(outPlayer);\n\n\t}", "public void backRoom(Command command)\n {\n if(command.hasSecondWord()){\n System.out.println(\"Quit what?\");\n }\n else{\n if(anteriorRoom.isEmpty()){\n System.out.println(\"Lo siento tienes que moverte para volver atras\");\n }\n\n else{currentRoom = anteriorRoom.pop();\n printLocationInfo();\n System.out.println();\n } \n }\n }", "void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }", "public void move(long timePassed) {\n\t\tif (x < -100) {\r\n\t\t\tthis.destroy();\r\n\t\t}\r\n\r\n\t\tsuper.move(timePassed);\r\n\t}", "public void endTurn() {\n\t\tturnEnd = false;\n\t\tmadeMove = false;\n\t\tcurrentPlayer.resetUndos();\n\t\tif (currentPlayer == player1) {\n\t\t\tcurrentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player1;\n\t\t}\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "public void stopMovement() {\r\n this.canMove = false;\r\n }", "public void dropExperience(Location loc) {\n if (_experience > 0) {\n ExperienceOrb orb = loc.getWorld().spawn(loc, ExperienceOrb.class);\n orb.setExperience(_experience);\n }\n }", "public void erasePlayer(Player player) {\n if(player.equals(occupant)) {\n // System.out.println(\"killedToo\");\n revertBlock(player);\n getAdjacent(GameEngine.UP).erasePlayer(player);\n getAdjacent(GameEngine.DOWN).erasePlayer(player);\n getAdjacent(GameEngine.LEFT).erasePlayer(player);\n getAdjacent(GameEngine.RIGHT).erasePlayer(player);\n }\n }", "private void teleport(Player player, ClanPlayerImpl clanPlayer, Location<World> teleportLocation) {\n player.setLocation(teleportLocation);\n clanPlayer.setLastClanHomeTeleport(new LastClanHomeTeleport());\n }", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "protected void end() {\n\t\tRobot.elevator.setCurrentPosition(newPosition);\n\t}", "public void runAway(int x, int y) {\n\t\tif(getX() >= x) {\n\t\t\tif(getY() < y) {\n\t\t\t\tgo2position(x+20, y-20);\n\t\t\t}else {\n\t\t\t\tgo2position(x+20, y+20);\n\t\t\t}\n\t\t}\n\t\tif(getX() < x) {\n\t\t\tif(getY() < y) {\n\t\t\t\tgo2position(x-20, y-20);\n\t\t\t}else {\n\t\t\t\tgo2position(x-20, y+20);\n\t\t\t}\n\t\t}\n\t}", "private void clearOpponentPosition() {\n\t\tfor (TextView txtView : this.computerPlayerTxtViews) {\n\t\t\ttxtView.setText(\"\");\n\t\t}\n\t}", "@Override\n\tpublic void onStopWalkRight(PlatformPlayer player) {\n\t\t\n\t}", "public void teleport(Room target)\r\n {\r\n for (int i=0; i<items.size(); i++)\r\n {\r\n if (items.get(i).getType()==Consume.SCROLL)\r\n items.remove(i);\r\n }\r\n \r\n changeRoom(target);\r\n System.out.println();\r\n System.out.println(room.longDescription());\r\n }", "@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}", "public static void teleportPlayer(final Player player,\n \t\t\tfinal Location toLocation) {\n \t\tfinal Object networkManager = getNetServerHandler(getHandle(player));\n \t\ttry {\n \t\t\tnetworkManager.getClass().getMethod(\"teleport\", Location.class)\n \t\t\t\t\t.invoke(networkManager, toLocation);\n \t\t} catch (final Exception e) {\n \t\t\tthrow new RuntimeException(\"Can't teleport the player \" + player\n \t\t\t\t\t+ \" to \" + toLocation, e);\n \t\t}\n \t}", "public void destroyed() {\n\t\twidth = SIZE_INC * width;\n\t\t// make the end points at the new location\n\t\tthis.makeEndPoints(width, (0 - (xSpeed * width)),\n\t\t\t\t(0 - (ySpeed * width)));\n\n\t}", "public void unfreezePlayer(Player player) {\r\n\t\tif (isFrozen(player)) {\r\n\t\t\tendFreeze(player);\r\n\t\t}\r\n\t}", "public void respawn(Vector2 spawnPos){\n position.x = spawnPos.x;\n position.y = spawnPos.y;\n }", "@Override\n\tpublic MoveState transitionAway() {\n\t\treturn this;\n\n\t}", "@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }", "@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n if (pendingTeleports.containsKey(sender.getName())) {\n pendingTeleports.remove(sender.getName(),originalSender);\n if (senderPlayer.dimension != teleportee.dimension) {\n TeleportHelper.transferPlayerToDimension(teleportee,senderPlayer.dimension,server.getPlayerList());\n }\n teleportee.setPositionAndUpdate(senderPlayer.posX,senderPlayer.posY,senderPlayer.posZ);\n sender.addChatMessage(new TextComponentString(TextFormatting.GREEN+\"Teleport successful.\"));\n teleportee.addChatMessage(new TextComponentString(TextFormatting.GREEN+\"Teleport successful.\"));\n } //if not, the teleportee moved\n }", "public abstract void leaveRoom();", "private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}", "@EventHandler\n\tpublic void onTravelToNether(PlayerPortalEvent e) {\n\t\tPlayerTR trPlayer = TaskRun.getPlayer(e.getPlayer());\n\t\tif (e.getTo().getWorld().getEnvironment() == Environment.NETHER) {\n\t\t\ttrPlayer.completeTask(1);\n\t\t}\n\t}", "@Override\n\tpublic void despawn() {\n\t\t\n\t}", "public static void teleport(LivingEntity ent, Location to, boolean saveYaw, boolean savePitch) {\n\t\tLocation tp = to.clone();\n\t\tif(saveYaw) tp.setYaw(ent.getLocation().getYaw());\n\t\tif(savePitch) tp.setPitch(ent.getLocation().getPitch());\n\t\tent.teleport(tp);\n\t}", "protected void moveTowards()\r\n {\r\n if(planet != null)\r\n turnTowards(planet.getX(), planet.getY());\r\n\r\n //If the invader touches a planet, it will go into the planet\r\n TargetPlanet t = (TargetPlanet)getOneIntersectingObject (TargetPlanet.class);\r\n //if t exists and looking for nearest planet OR looking for unconquered planet and reached it or no set planet\r\n if (t != null && ((findNearestPlanet || (!findNearestPlanet && t.equals(planet))) || planet == null))\r\n {\r\n t.hitByFighter(isHuman); //planet's stats will change\r\n removeMe = true;\r\n }\r\n }", "public void attemptMove(BoardPos to) {\n if (legalPos.contains(to)) {\n lastColor = !lastColor; // next turn\n // move striking piece to the end position\n board.set(to, board.get(legalPos.get(legalPos.indexOf(to)).getRouteLast()));\n // clear positions \"en route\" - pieces to strike and the initial position\n for (BoardPos step : legalPos.get(legalPos.indexOf(to)).getRoute())\n board.get(step).setEmpty();\n // promote qualifying pieces to crown\n findCrown();\n }\n\n legalPos.clear(); // next turn - no highlights\n }", "public void runaway(ScannedRobotEvent e){\r\n if(didenemyshoot(e)){\r\n //moves away from the enemy\r\n setTurnRight(5 * turndir);\r\n setAhead(e.getVelocity() * movedir);\r\n //tell where it is heading\r\n movedir *= -1;\r\n }\r\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "public void sendTeleport(final Player player) {\r\n player.lock();\r\n World.submit(new Pulse(1) {\r\n\r\n int delay = 0;\r\n\r\n @Override\r\n public boolean pulse() {\r\n if (delay == 0) {\r\n player.getActionSender().sendMessage(\"You've been spotted by an elemental and teleported out of its garden.\");\r\n player.graphics(new Graphics(110, 100));\r\n player.getInterfaceState().openComponent(8677);\r\n PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));\r\n face(player);\r\n } else if (delay == 6) {\r\n player.getProperties().setTeleportLocation(Location.create(getRespawnLocation()));\r\n PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 0));\r\n player.getInterfaceState().close();\r\n face(null);\r\n player.unlock();\r\n return true;\r\n }\r\n delay++;\r\n return false;\r\n }\r\n });\r\n }", "private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}", "public void stopMovement() {\n this.movementComposer.stopMovement();\n }" ]
[ "0.6112452", "0.6098328", "0.5998135", "0.5992446", "0.5839167", "0.575454", "0.5741962", "0.5721066", "0.57154155", "0.5711066", "0.57005036", "0.5685818", "0.566666", "0.5656172", "0.5632", "0.5630312", "0.56265205", "0.5605626", "0.5601163", "0.55929554", "0.5577592", "0.5567589", "0.55427945", "0.5539513", "0.55320704", "0.5528953", "0.54978544", "0.5490105", "0.54515904", "0.543389", "0.5398476", "0.5387822", "0.5375943", "0.5371789", "0.5358175", "0.5357922", "0.5332761", "0.53279674", "0.53232557", "0.532256", "0.5320104", "0.53190446", "0.53184444", "0.5316811", "0.5307935", "0.5303746", "0.5297419", "0.5295567", "0.52716106", "0.52464724", "0.5242631", "0.52422595", "0.5239666", "0.5229399", "0.522894", "0.5228708", "0.52228504", "0.5219652", "0.5218266", "0.5215966", "0.52152765", "0.5202915", "0.5200646", "0.52001226", "0.51798046", "0.5178263", "0.5176895", "0.5176173", "0.5170116", "0.5162855", "0.51584804", "0.51561373", "0.51517963", "0.51496774", "0.51490134", "0.5146208", "0.5144994", "0.5144596", "0.5142842", "0.5140911", "0.5140308", "0.5135257", "0.5126061", "0.5125728", "0.5119722", "0.5116722", "0.51152384", "0.51137215", "0.5103569", "0.5095531", "0.5094873", "0.50939405", "0.50938094", "0.5091711", "0.50911444", "0.5080402", "0.50775355", "0.5076231", "0.50607246", "0.50475687", "0.5046415" ]
0.0
-1
end of ghost method This method is to see if the player is at a door.
public boolean onDoor(){ int yp = 0; int xp = 0;//coordinates to hold player position int yd = 1; int xd = 1;//coordinates to hold door position for(int i = 0; i < this.position.length; i ++){//looks though arrays to gather position for(int p = 0 ; p < this.position.length; p++){ if(this.position[i][p] == 1 && this.Door[i][p] == 1){ yp = i; xp = p; yd = i; xd = p; } } } if(yp==yd && xp==xd){ return true; } return false;//if they are not in the same location, return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDoor() {\n return this.type == Type.DOOR;\n }", "private boolean checkDoor(Door door){\n\n\t \treturn(door.getStatus().equalsIgnoreCase(\"Unlocked\"));\n\t \t\t//return true;//returns the value true\n\t //else\n\t \t //return false;//returns the value false\n\t }", "public boolean isDoorway() {\n\t\tif(doorDirection != DoorDirection.NONE) {\t\t\t\t\t\t\t\t// catches if there is a door direction, indicating that the cell is a door\n\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return true, indicating that the cell is a door\n\t\t}\n\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if there is no door direction\n\t\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return false, indicating that the cell is not a door\n\t\t}\n\t}", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }", "public boolean isDoorway(){\n\t\treturn (cellType == CellType.DOORWAY);\n\t}", "public boolean doorTicker()\n\t{\n\t\tif(!isDoor)\n\t\t\treturn false;\n\t\tif(stateOfDoor!=this.DOOR_STATE_OPENING)\n\t\t\treturn false;\n\t\t\n\t\t//Now, find angle to (x2,y2) (which is the moving end of the wall)\n\t\t//to (x1,y2) relative to (originalX,originalY) which is a copy of x2,y2\n\t\t//set x2,y2 so that the angle is now a little larger, if that angle is now\n\t\t//greater than PI/2, set the stateOfDoor as OPEN\n\t\t\n\t\tdouble angleTo2 = this.angleToSide2(x1,y1);\n\t\t\n\t\tdouble newAngle;\n\t\t\n\t\tif(swingingWay1)\n\t\t{\n\t\t\tnewAngle= angleTo2 + ANGLE_CHANGE;\n\t\t\tticks++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewAngle= angleTo2 - ANGLE_CHANGE;\n\t\t\tticks--;\n\t\t}\n\t\t\n\t\t//distance from pivot\n\t\tdouble dx = this.length()*Math.cos(newAngle);\n\t\tdouble dy = this.length()*Math.sin(newAngle);\n\t\t\n\t\tx2 = x1+dx;\n\t\ty2 = y1+dy;\n\n\t\t//BECAUSE X2 and Y2 have changed, certain values need to be recalculated so that it paints ok\n\t\tmx = (x1+x2)/2;\n\t\tmy = (y1+y2)/2;\n\t\tif(x1!=x2)\n\t\t{\n\t\t\tm = (this.y1-this.y2)/(this.x1-this.x2);\n\t\t\tb = y1-m*this.x1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm = 0;\n\t\t\tb = 0;\n\t\t}\n\t\t\n\t\t\n\t\t//now check if the door is all the way open\n\t\tdouble angleToOriginal = this.angleToOriginal(x1,y1);\n\t\t\n\t\t//if((newAngle-angleToOriginal>Math.PI/2)||(newAngle-angleToOriginal<-Math.PI/2))\n\t\t//if(ArtWork.isBetween(angleToOriginal-3*Math.PI/4, ArtWork.normalizeAngle(angleToOriginal+3*Math.PI/4), newAngle))\n\t\tif((ticks*ANGLE_CHANGE>Math.PI/2)||(ticks*ANGLE_CHANGE<-Math.PI/2))\n\t\t\tstateOfDoor=this.DOOR_STATE_OPEN;//stop!\n\t\t\n\t\treturn true;\n\t}", "public boolean isDoor() {\n\t\treturn isaDoor;\n\t}", "public boolean isWin() {\n if (chosen_door.getContains() == Contains.CAR) {\n return true;\n }\n return false;\n }", "private void openDoor(Player player) {\n if (player.getHasKey()) {\n isOpen = true;\n System.out.println(\"The door creaks when it opens\");\n } else {\n System.out.println(\"The door is locked, you probably need a key of some sort...\");\n }\n }", "public static boolean walkToDoor(RSTile finalTile, long timeOut)\r\n {\r\n String[] doorNames = {\"Door\", \"Gate\"};\r\n long startingTime = Timing.currentTimeMillis();\r\n\r\n if (DaxWalker.walkTo(finalTile, () -> WalkingCondition.State.CONTINUE_WALKER))\r\n {\r\n // If you made it before timeout, click the door.\r\n while (Timing.currentTimeMillis() - startingTime < timeOut)\r\n {\r\n RSObject[] doors = Objects.find(5, doorNames);\r\n\r\n if (doors.length > 0 && doors != null)\r\n {\r\n RSObject door = doors[0];\r\n // immuatble bullshit might need diff class type????\r\n String uptext = null;\r\n\r\n // Get general uptext for all doors/gates\r\n for (String action : door.getDefinition().getActions())\r\n {\r\n if (action.contains(\"Open\"))\r\n {\r\n uptext = action + \" \" + door.getDefinition().getName();\r\n System.out.println(\"APIMethods: Door uptext: \" + uptext);\r\n break;\r\n }\r\n }\r\n\r\n if (uptext != null && clickObject(doors, uptext, -1))\r\n {\r\n // Doors.handledoor if above isn't good.\r\n System.out.println(\"APIMethods -- walkToDoor: Succesfully walked through the door\");\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean getIsIndoor() {\n return this.isIndoor;\n }", "public boolean checkOpen(float x, float y)\r\n/* 483: */ {\r\n/* 484:580 */ if (!tileWalkable(x, y)) {\r\n/* 485:582 */ return false;\r\n/* 486: */ }\r\n/* 487:585 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 488:586 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 489:588 */ return false;\r\n/* 490: */ }\r\n/* 491:591 */ return true;\r\n/* 492: */ }", "public boolean isTrapDoor() {\n return this.type == Type.TRAP_DOOR;\n }", "protected boolean isWall2()\n {\n\n if(isTouching(Wall.class)) //&&!isTouching(Door.class))\n return true;\n /*else if(isTouching(Door.class))\n {\n Door d = (Door)getOneIntersectingObject(Door.class);\n if(d.alreadyOpened==false)\n return true;\n else\n return false;\n }*/\n else\n return false;\n }", "public boolean hasDoor(Direction direction) {\r\n\t\treturn this.doors.get(direction);\r\n\t}", "public boolean isNear(Player player) {\n if(this.worldObject.getLocation().distance(player.getLocation()) <= this.harvestableObject.distanceToInteract()) {\n return true;\n }\n return false;\n }", "private boolean isOpponentAround(Actor actor, GameMap map) {\n Location currentPosition = map.locationOf(this);\n int closeOpponent = 0;\n for (Exit exit : currentPosition.getExits()) {\n Location destination = exit.getDestination();\n if (destination.containsAnActor()) {\n if (!(destination.getActor()\n instanceof Player)) { // If not player there is dinasours arround\n closeOpponent++;\n }\n }\n }\n return closeOpponent > 0;\n }", "public static boolean isOpenableDoor(IBlockState block)\n\t{\n\t\tif (block != null)\n\t\t{\n\t\t\tMaterial mat = block.getMaterial();\n\t\t\t\n\t\t\tif (block == Blocks.TRAPDOOR || block instanceof BlockFenceGate)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tif (block instanceof BlockDoor)\n\t\t\t{\n\t\t\t\tif (mat == Material.WOOD) return true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean CanMakeaMove(Player p) {\r\n List<Integer> dominoesNumbers = p.getAllNumbers();\r\n System.out.println(\"There is \" + this.stack.size() + \" more dominoes in the stack\");\r\n return this.stack.isEmpty() || playedDominoes.isEmpty() || dominoesNumbers.contains(end[0]) || dominoesNumbers.contains(end[1]);\r\n }", "private boolean _checkDoors(int x, int y) {\n\t\t\n\t\tfor(Door door : DKObject.level.getDoors()) {\n\t\t\t\n\t\t\tif(door.equalPosition(x, y) && !door.isOpen())\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean verifyRoom() throws NotEnoughDoorsException {\n if (getDoors().get(\"N\") == null && getDoors().get(\"W\") == null\n && getDoors().get(\"S\") == null && getDoors().get(\"E\") == null) {\n throw new NotEnoughDoorsException();\n }\n\n for (String key: getDoors().keySet()) {\n Door doorHolder = getDoors().get(key);\n if (doorHolder != null) {\n if (doorHolder.getConnectedRooms().size() < 2 || doorHolder.getOtherRoom(this) == null) {\n return false;\n }\n }\n }\n\n for (Item singleItem: roomItems) {\n int itemX = (int) singleItem.getXyLocation().getX();\n int itemY = (int) singleItem.getXyLocation().getY();\n if (itemX >= getWidth() - 1 || itemX <= 0) {\n return false;\n }\n if (itemY >= getHeight() - 1 || itemY <= 0) {\n return false;\n }\n }\n\n if (isPlayerInRoom()) {\n int playerX = (int) getPlayer().getXyLocation().getX();\n int playerY = (int) getPlayer().getXyLocation().getY();\n if (playerX >= getWidth() - 1 || playerX <= 0) {\n return false;\n }\n if (playerY >= getHeight() - 1 || playerY <= 0) {\n return false;\n }\n }\n\n return true;\n }", "public boolean isHouse() {\n return (this.getId() == Player.PLAYER_1.getHouseIndex())\n || (this.getId() == Player.PLAYER_2.getHouseIndex());\n }", "public boolean getDoor( int d){\n\t\tswitch( d){\n\t\t\tcase CONST.NORTH:\n\t\t\t\treturn doorN;\n\t\t\tcase CONST.EAST:\n\t\t\t\treturn doorE;\n\t\t\tcase CONST.SOUTH:\n\t\t\t\treturn doorS;\n\t\t\tcase CONST.WEST:\n\t\t\t\treturn doorW;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "public boolean hitDealer() {\r\n while (getHandValue() <= 16) {\r\n hit();\r\n }\r\n return getHandValue() <= 21;\r\n }", "static boolean canEscape(Point dog, Point gopher, Point hole)\n {\n double dog_dist = distance(dog.x, dog.y, hole.x, hole.y);\n double gopher_dist = distance(gopher.x, gopher.y, hole.x, hole.y);\n return (dog_dist >= (gopher_dist*2));\n }", "public boolean isDead() {\n if (this.x + this.radius/2 < 0\n || this.x - this.radius/2 > World.MAP_WIDTH\n || this.y + this.radius < 0\n || this.y - this.radius > World.MAP_HEIGHT) {\n return true;\n }\n return false;\n }", "public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }", "private boolean isAtPortal(EnderDragon dragon) {\n // check position\n double x = Math.floor(Math.abs(dragon.getLocation().getX()));\n double z = Math.floor(Math.abs(dragon.getLocation().getY()));\n\n // check phase\n boolean isPortalPhase = PORTAL_PHASES.contains(dragon.getPhase());\n\n return isPortalPhase && (x <= 3 && z <= 3);\n }", "public boolean getDoorIsLocked()\n {\n return isLocked;\n }", "protected boolean IsPlayerStaringAtMe( EntityPlayer player )\r\n {\r\n ItemStack headStack = player.inventory.armorInventory[3];\r\n\r\n if ( headStack == null || headStack.itemID != \r\n \tFCBetterThanWolves.fcItemEnderSpectacles.itemID )\r\n {\r\n Vec3 vLook = player.getLook( 1F ).normalize();\r\n \r\n Vec3 vDelta = worldObj.getWorldVec3Pool().getVecFromPool( posX - player.posX, \r\n \tboundingBox.minY + ( height / 2F ) - ( player.posY + player.getEyeHeight() ), \r\n \tposZ - player.posZ );\r\n \r\n double dDist = vDelta.lengthVector();\r\n \r\n vDelta = vDelta.normalize();\r\n \r\n double dotDelta = vLook.dotProduct( vDelta );\r\n \r\n if ( dotDelta > 1D - 0.025D / dDist )\r\n {\r\n \treturn player.canEntityBeSeen( this );\r\n }\r\n }\r\n \r\n return false;\r\n }", "public boolean isAlive(){\n if(this.hp <= 0){\n return false;\n }\n else{\n return true;\n }\n }", "public boolean isPlayerInRoom() {\n return !(roomPlayer == null);\n }", "public boolean isPressed() {\r\n List<Entity> entities = dungeon.getEntities();\r\n for (Entity e: entities) {\r\n if (e != null && e.getY() == getY() && e.getX() == getX()) {\r\n if (\"Boulder\".equals(e.getClass().getSimpleName()))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private void checkPlayerCondition()\n\t{\n\t\tif (playerExists() && PlayerAccess.getPlayer().isInExit())\n\t\t{\n\t\t\twon = true;\n\t\t}\n\t\tif (playerIsDead())\n\t\t{\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t\tif (playerHasLost())\n\t\t{\n\t\t\tlost = true;\n\t\t}\n\t\tif (runOutOfTime())\n\t\t{\n\t\t\tPlayerAccess.getPlayer().die();\n\t\t}\n\t}", "public void openDoor() {\n\t\tSystem.out.println(\"The spaceship door has opened.\");\n\t\tSpaceship sp = getTheSpaceship();\n\t\tArrayList<GameObject> remove = new ArrayList<GameObject>();\n\t\tfor(GameObject object : gameObject) {\n\t\t\tif(object instanceof Opponents) {\n\t\t\t\tOpponents o = (Opponents) object;\n\t\t\t\tdouble x = Math.abs(sp.getLocation().getX() - o.getLocation().getX());\n\t\t\t\tdouble y = Math.abs(sp.getLocation().getY() - o.getLocation().getY());\n\t\t\t\tif(x >= 0 && x <= sp.getSize() && y >= 0 && y <= sp.getSize()) {\n\t\t\t\t\trescueAnObject(object);\n\t\t\t\t\tremove.add(object);\n\t\t\t\t\tSystem.out.println(\"You've rescued a \" + object);\n\t\t\t\t}\n\t\t\t}\n\t}\n\t\t/* Concurrency issue with for each loop, created delete ArrayList<GameObject>.\n\t\t * and remove after.\n\t\t */\n\t\tfor(GameObject object : remove)\n\t\t\tgameObject.remove(object);\n\t}", "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "public boolean isPacmanToClose(){\n\n\t\tposXPacman = pacman.getX();\n\t\tposYPacman = pacman.getY();\n\t\tposXBlueEnemy = getX();\n\t\tposYBlueEnemy = getY();\n\n\t\t//pacman links van spook\n\t\tif(posYBlueEnemy == posYPacman && posXPacman < posXBlueEnemy && posYBlueEnemy > posXPacman + 60)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t// pacman rechts van spook\t\n\t\telse if(posYBlueEnemy == posYPacman && posXPacman > posXBlueEnemy && posXPacman < posXBlueEnemy + 60)\n\t\t{\n\t\t\treturn true;\n\t\t}\t\n\t\t//pacman boven spook\n\t\telse if(posXBlueEnemy == posXPacman && posYPacman < posYBlueEnemy && posYBlueEnemy > posYPacman + 60)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t//pacman onder spook\n\t\telse if(posXBlueEnemy == posXPacman && posYPacman > posYBlueEnemy && posYPacman < posYBlueEnemy + 60)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "@Override\n public boolean canMove(double x, double y) {\n return !getOwner().isDead();\n }", "public boolean moveable() {\n //check reach border\n if (reachBorder()) {\n return false;\n }\n //get the location of the next spot to move to\n //move up\n Point nextLocation = this.getCenterLocation();\n if (direction == 12) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() - speed);\n }\n //move right\n if (direction == 3) {\n nextLocation = new Point(this.getCenterX() + speed,\n this.getCenterY());\n\n }\n //move down\n if (direction == 6) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() + speed);\n\n }\n //move left\n if (direction == 9) {\n nextLocation = new Point(this.getCenterX() - speed,\n this.getCenterY());\n }\n\n // get all objects in a circle of radius tileSize * 2 around the players\n //these objects are those which can possibly colide with the players\n int checkRadius = GameUtility.GameUtility.TILE_SIZE * 2;\n for (GameObject gameObject : GameManager.getGameObjectList()) {\n if (GameUtility.GameUtility.distance(gameObject.getCenterLocation(),\n this.getCenterLocation()) < checkRadius) {\n if ((GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n nextLocation)) && !(GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n this.getCenterLocation())) && gameObject.getType() != GameObjectType.POWER_UP && gameObject.getType() != GameObjectType.MONSTER && gameObject.getType() != GameObjectType.PLAYER) {\n return false;\n }\n }\n }\n return true;\n\n }", "public boolean checkForTreasure(){\n Object obj=charactersOccupiedTheLocation[3];\n if(obj!=null){return true;}\n return false; \n }", "public boolean isWalkable() {\n return type != CellType.WALL && isInBoundaries();\n }", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "public boolean movePlayer(Player p, Direction d) {\n\n\t\tLocation playerLoc = p.getLocation();\n\t\tTile playerTil = p.getTile();\n\t\tPosition playerPos = playerTil.getPos();\n\n\t\tTile newTile = null;\n\n\t\tswitch (d) {\n\n\t\tcase NORTH:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.NORTH);\n\t\t\tp.setFacing(Direction.NORTH);\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.EAST);\n\t\t\tp.setFacing(Direction.EAST);\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.WEST);\n\t\t\tp.setFacing(Direction.WEST);\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.SOUTH);\n\t\t\tp.setFacing(Direction.SOUTH);\n\t\t\tbreak;\n\t\t}\n\n\t\tif (newTile != null) {\n\t\t\tif (newTile.getGameObject() == null) {\n\t\t\t\tif (newTile instanceof WaterTile) {\n\t\t\t\t\tif (!p.getHasFloatingDevice()) {\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"It's deep blue and cold as ice, perhaps you require something to float on\", p);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (newTile instanceof DoorOutTile) {\n\t\t\t\t\tDoorOutTile dot = (DoorOutTile) newTile;\n\n\t\t\t\t\tif (board.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos())\n\t\t\t\t\t\t\t.getGameObject() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tplayerTil.setGameObject(null);\n\n\t\t\t\t\tp.setLocation(dot.getOutLocationID());\n\t\t\t\t\tp.setTile(board.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos()));\n\n\t\t\t\t\tboard.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos()).setGameObject(p);\n\t\t\t\t\tp.setFacing(Direction.SOUTH);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tplayerTil.setGameObject(null);\n\t\t\t\tnewTile.setGameObject(p);\n\t\t\t\tp.setTile(newTile);\n\t\t\t\tp.setLocation(board.getLocationById(newTile.getLocationID()));\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\ttriggerInteraction(p, newTile);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public Door isDoor(Position position) {\n // check north\n if (board[position.x][position.y - 1] instanceof Door)\n return (Door) board[position.x][position.y - 1];\n // south\n if (board[position.x][position.y + 1] instanceof Door)\n return (Door) board[position.x][position.y + 1];\n // east\n if (board[position.x + 1][position.y] instanceof Door)\n return (Door) board[position.x + 1][position.y];\n // west\n if (board[position.x - 1][position.y] instanceof Door)\n return (Door) board[position.x - 1][position.y];\n return null;\n }", "private boolean isMyWormInShootingRange(Direction d) {\n MyWorm currentWorm = getCurrentWorm(gameState);\n // direction N(0, -1), NE(1, -1), E(1, 0), SE(1, 1), S(0, 1), SW(-1, 1), W(-1,0), NW(-1, -1)\n Worm[] myWorms = player.worms;\n int i = 0;\n boolean found = false;\n while ((i < myWorms.length) && (!found)) {\n int weaponRange = currentWorm.weapon.range;\n if(myWorms[i].id != currentWorm.id && myWorms[i].health > 0){\n if ((d.name().equals(\"N\")) && (between(myWorms[i].position.y, currentWorm.position.y - weaponRange, currentWorm.position.y) && currentWorm.position.x == myWorms[i].position.x)) {\n found = true;\n }\n else if ((d.name().equals(\"E\")) && (between(myWorms[i].position.x, currentWorm.position.x + weaponRange, currentWorm.position.x) && currentWorm.position.y == myWorms[i].position.y)) {\n found = true;\n }\n else if ((d.name().equals(\"S\")) && (between(myWorms[i].position.y, currentWorm.position.y + weaponRange, currentWorm.position.y) && currentWorm.position.x == myWorms[i].position.x)) {\n found = true;\n }\n else if ((d.name().equals(\"W\")) && (between(myWorms[i].position.x, currentWorm.position.x - weaponRange, currentWorm.position.x) && currentWorm.position.y == myWorms[i].position.y)) {\n found = true;\n }\n else if ((d.name().equals(\"NE\")) && (between(myWorms[i].position.x, currentWorm.position.x + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n else if ((d.name().equals(\"SE\")) && (between(myWorms[i].position.x, currentWorm.position.x + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n else if ((d.name().equals(\"SW\")) && (between(myWorms[i].position.x, currentWorm.position.x - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n else if ((d.name().equals(\"NW\")) && (between(myWorms[i].position.x, currentWorm.position.x - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n\n }\n i++;\n }\n return found;\n }", "public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }", "public static void inspectDoors(Player player) {\n System.out.println(\"You look for doors.\");\n System.out.println(\"You see:\");\n ArrayList<Door> doors = player.getCurrentRoom().getDoors();\n for (int i = 0; i < doors.size(); i++) {\n System.out.print(\"\\t(\" + i + \") \");\n doors.get(i).inspect();\n }\n System.out.println(\"Which door will you take? (-1 to stay)\");\n }", "public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean hasMovements(Color playerColor){\r\n for(Point pos : getPieces(playerColor)){\r\n if(canMove(pos) || canEats(pos)) return true;\r\n }\r\n return false;\r\n }", "public boolean canTeleport(Entity t) {\r\n if (getDirection() == Direction.EAST && (t.getLocation().getX() - getLocation().getX()) < 4 && (t.getLocation().getX() - getLocation().getX()) > -1 && (t.getLocation().getY() - getLocation().getY()) == 0) {\r\n return true;\r\n }\r\n if (getDirection() == Direction.WEST && (getLocation().getX() - t.getLocation().getX()) < 4 && (getLocation().getX() - t.getLocation().getX()) > -1 && (t.getLocation().getY() - getLocation().getY()) == 0) {\r\n return true;\r\n }\r\n if (getDirection() == Direction.NORTH && (t.getLocation().getY() - getLocation().getY()) < 4 && (t.getLocation().getY() - getLocation().getY()) > -1 && (t.getLocation().getX() - getLocation().getX()) == 0) {\r\n return true;\r\n }\r\n if (getDirection() == Direction.SOUTH && (getLocation().getY() - t.getLocation().getY()) < 4 && (getLocation().getY() - t.getLocation().getY()) > -1 && (t.getLocation().getX() - getLocation().getX()) == 0) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(elevator.getWristPosition() - elevator.getWristStages()[elevator.getWristStage()]) < Math.PI/18 && !elevator.isRunning(ElevatorSubsystem.Follower.ELEVATOR);\r\n\t}", "public boolean damagable() {\n return !this.state.equals(\"knockedBack\")\n && !this.state.equals(\"dodge\");\n }", "boolean reach() {\n\t\treturn PlayerreachEnd;\n\t}", "public boolean isPlayer() {\n return player != null;\n }", "public boolean isAlive(){\r\n\t\tif(dead==true){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }", "static boolean canWin() throws GameActionException {\n\t\tfloat difference = 1000 - rc.getTeamVictoryPoints();\n\t\tif ((rc.getTeamBullets() / 10) >= difference) {\n\t\t\trc.donate(rc.getTeamBullets());\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "public void setDoor() {\n\t\tisaDoor = true;\n\t}", "public boolean isDoorSelected(int i) {\n return chosen_door == doors.get(i);\n }", "private boolean shouldAttackPlayer(EntityPlayer player) {\n ItemStack itemStack = player.inventory.armorInventory[3];\n if (itemStack != null && itemStack.getItem() == Item.getItemFromBlock(Blocks.pumpkin))\n return false;\n Vec3 lookVec = player.getLook(1.0F).normalize();\n Vec3 posVec = Vec3.createVectorHelper(this.posX - player.posX, this.boundingBox.minY + this.height / 2.0 - player.posY - player.getEyeHeight(), this.posZ - player.posZ);\n double distance = posVec.lengthVector();\n posVec = posVec.normalize();\n double dotProduct = lookVec.dotProduct(posVec);\n return dotProduct > 1.0 - 0.025 / distance ? player.canEntityBeSeen(this) : false;\n }", "public int checkChasingPlayer()\n {\n if(stunCountdown > 0)\n {\n chasingPlayer = false;\n return stunCountdown;\n }\n if(Game.getInstance().getPlayer().getCurrentRoom().isControlRoom())\n {\n chasingPlayer = false;\n return(-1);\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n for(Exit neighbor : neighbors)\n {\n if(getCurrentRoom().getExit(neighbor).equals(Game.getInstance().getPlayer().getCurrentRoom()) && neighbor.isOperating())\n {\n chasingPlayer = true;\n return(5 + (int) Math.floor(Math.random() * 6));\n }\n }\n chasingPlayer = false;\n return(-1);\n }\n }", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "private boolean checkDoors(ArrayList<Door> doors, int direction) {\n\t\tboolean stopSeaching = false;\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < doors.size() && !stopSeaching; i++) {\n\t\t\tstopSeaching = doors.get(i).isInRange(player.pos);\n\t\t\tif (stopSeaching) {\n\t\t\t\tfound = checkDoor(doors.get(i), direction);\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}", "public boolean canMove(Character c, DirectionFactory d){\n int x = c.getPosX() ;\n int y = c.getPosY();\n\n try {\n Cell nextCell = labyrinth.getNextCell(x, y, d);\n for(int i =0; i < monsters.size(); i++){\n if(nextCell.getX()==monsters.get(i).getPosX() && nextCell.getY()==monsters.get(i).getPosY()){\n return false;\n }\n }\n if(!c.isThroughWall() && nextCell.isSolid()){\n return false;\n }\n\n return true;\n }catch (NullPointerException e){\n\n }\n return false;\n }", "@Override\n public boolean canInteractWith(EntityPlayer player)\n {\n return teKeeper.isUsableByPlayer(player);\n }", "public boolean canPlaceRoad(Player p, Edge e){\r\n for(Corner c: e.getConnectingCorners()){\r\n if(c.getOwner()==p) return true;\r\n }\r\n return false;\r\n }", "@Override\n public void interactWith(Door door) {\n if(door instanceof CastleDoor){ //CASTLE DOOR\n if(door.isOpen()){\n setIsPassingADoor(door);\n ((CastleDoor) door).close();\n } else {\n if(possess(ARPGItem.CASTLEKEY)){\n ((CastleDoor) door).open();\n }\n }\n } else { //SIMPLE DOOR\n setIsPassingADoor(door);\n }\n }", "boolean isPlayerTurn();", "public boolean isAlive() {\r\n\t\treturn hp > 0;\r\n\t}", "private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust direction\n\t\t\tif (x <= 0 || x + width >= _world.getWidth())\n\t\t\t\tdx = -dx;\n\t\t\tif (y <= 0 || y + height >= _world.getHeight())\n\t\t\t\tdy = -dy;\n\t\t\tdtheta = 0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean checkIfDragonsAreAlive() {\n\t\tboolean fim = false;\n\t\tfor (int i = 0; i < dragoes.length; i++) {\n\t\t\tif (dragoes[i].isAlive())\n\t\t\t\tfim = true;\n\t\t}\n\t\treturn fim;\n\t}", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }", "private boolean canArcherHarrasing(Creature a) {\n return heroC.getX() == a.getX() || heroC.getY() == a.getY();\n }", "public boolean isAlive(){\n\t\treturn lifeForce > 0;\n\t}", "public abstract boolean isPlayer();", "public boolean isOutsidePlatform(GameObject object, Platform platform, GameObject gameObject2){\n if ( (object.isAirborne()) //if already airborne, it is still airborne (until it is belowPlatform\n || (object.getPos().getY()==platform.getY())\n && ((object.getPos().getX()<platform.getX()-object.getWidth()) //Outside to the left\n || (platform.getX()+platform.getWidth()<object.getPos().getX())) //Outside te the right\n && !(hasCollided(object,gameObject2)) \n || (object.getPos().getY()>720) //if object over screen its probably in air\n ){ //\n return true;\n } else {\n return false;\n }\n }", "public void checkPlayer(Player player, int heart, int endDoor) {\n\t\tlong id;\n\t\tif (!player.isAtDoor && doorPos > 0\n\t\t\t\t&& mapArray[player.getPosition()] != 5) {\n\t\t\tmapArray[doorPos] = 4;\n\t\t\tdoorPos = -1;\n\t\t}\n\t\tif (mapArray[player.getPosition()] == 0\n\t\t\t\t|| mapArray[player.getPosition()] == 5\n\t\t\t\t|| mapArray[player.getPosition()] == 3) {\n\t\t\tif (mapArray[player.getPosition()] == 5) {\n\t\t\t\tswitch (player.getDirection()) {\n\t\t\t\tcase North:\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tplayer.setPosition(player.getPosition() - width);\n\t\t\t\t\tbreak;\n\t\t\t\tcase South:\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tplayer.setPosition(player.getPosition() + width);\n\t\t\t\t\tbreak;\n\t\t\t\tcase East:\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tplayer.setPosition(player.getPosition() + 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase West:\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tplayer.setPosition(player.getPosition() - 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (mapArray[player.getPosition()] == 3) {\n\t\t\t\tcatMEOW.play(0.25f);\n\t\t\t\tmapArray[player.getOldPosition()] = 0;\n\t\t\t\thitCat = true;\n\t\t\t} else {\n\t\t\t\tmapArray[player.getOldPosition()] = 0;\n\t\t\t\tmapArray[player.getPosition()] = 2;\n\t\t\t\tid = footSteps.play(0.05f);\n\t\t\t\tfootSteps.setVolume(id, 0.001f);\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (mapArray[player.getPosition()]) {\n\t\t\tcase 1:\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tmapArray[player.getPosition()] = 5;\n\t\t\t\topenDoor.play(0.025f);\n\t\t\t\tdoorPos = player.getPosition();\n\t\t\t\tplayer.isAtDoor = true;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmapArray[player.getPosition()] = 0;\n\t\t\t\tplayer.hasHeart = true;\n\t\t\t\tplayer.setVolume(1.0f);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tif(player.hasHeart){\n\t\t\t\t\topenDoor.play(0.045f);\n\t\t\t\t\tendGame = true;\n\t\t\t\t\tendGameAnime = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(!endGame){\n\t\t\t\tplayer.setPosition(player.getOldPosition());\n\t\t\t}\n\t\t}\n\t\tif (!player.hasHeart) {\n\t\t\tint heartOffset_x = (player.getPosition() % width)\n\t\t\t\t\t- (heart % width);\n\t\t\tint heartOffset_y = (player.getPosition() / width)\n\t\t\t\t\t- (heart / width);\n\t\t\t//System.out.println(\"x: \" + heartOffset_x + \" y: \" + heartOffset_y);\n\t\t\tdouble distance = Math.sqrt(Math.pow(heartOffset_x, 2)\n\t\t\t\t\t+ Math.pow(heartOffset_y, 2));\n\t\t\tif (distance > maxDistance / 2.0) {\n\t\t\t\tplayer.setVolume(0.0f);\n\t\t\t} else {\n\t\t\t\tdistance = distance / maxDistance;\n\t\t\t\tdistance = 1.0 - distance;\n\t\t\t\t//distance = Math.pow(distance, 8);\n\t\t\t\tplayer.setVolume((float) distance);\n\t\t\t\t\t\t\t}\n\t\t} else{\n\t\t\tplayer.setVolume(1.0f);\n\t\t\tint endDoorOffset_x = (player.getPosition() % width)\n\t\t\t\t\t- (endDoor % width);\n\t\t\tint endDoorOffset_y = (player.getPosition() / width)\n\t\t\t\t\t- (endDoor / width);\n\t\t\t//System.out.println(\"x: \" + endDoorOffset_x + \" y: \" + endDoorOffset_y);\n\t\t\tdouble distance = Math.sqrt(Math.pow(endDoorOffset_x, 2)\n\t\t\t\t\t+ Math.pow(endDoorOffset_y, 2));\n\t\t\tdistance = distance / maxDistance;\n\t\t\tdistance = 1.0 - distance;\n\t\t\tdistance = Math.pow(distance, 3);\n\t\t\tplayer.setFear(bobBarker(distance));\n\t\t\t//System.out.println(\"dist: \" + distance + \" bob: \" + bobBarker(distance));\n\t\t}\n\t\t//System.out.println(\"player pos: \" + player.getPosition());\n\t}", "public boolean isGoal() {\n return (man == 0);\n }", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "private boolean rightCollision(InteractiveObject obj){\n\t\treturn rightUpCollision(obj) || rightDownCollision(obj);\n\t}", "public Boolean tryWalk(int nextX, int nextY) {\n List<Entity> obstacles = this.dungeon.getEntities().stream()\n .filter(o -> o != null && o.getX() == nextX && o.getY() == nextY)\n .collect(Collectors.toList());\n if (dungeon.isWall(nextX, nextY)) {\n if(dungeon.isBroken(nextX, nextY)) {\n return true;\n } else {\n return false;\n }\n }\n \n if (!obstacles.isEmpty()) {\n if ((obstacles.get(0) instanceof Switch)) {\n return true;\n } else {\n return false;\n } \n }\n return true;\n }", "public boolean isWin_LordDeWorde(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 4){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "public static boolean inspectNPCs(Player player) {\n boolean npcExists = false;\n System.out.println(\"You look if there's somebody.\");\n System.out.println(\"You see:\");\n ArrayList<DungeonNpc> npcs = player.getCurrentRoom().getNPCs();\n if(npcs.size() > 0) {\n for (int i = 0; i < npcs.size(); i++) {\n System.out.print(\"\\t(\" + i + \") \"+ \"[\" + npcs.get(i).getType() + \"]\" + \"(\" + npcs.get(i).getSpecies()\n + \") \" + npcs.get(i).getName() + \": \");\n npcs.get(i).inspect();\n }\n npcExists = true;\n System.out.println(\"Who will you approach? (-1 to stay by yourself)\");\n } else System.out.println(\"\\tNobody.\");\n return npcExists;\n }", "boolean playerExists() {\n return this.game.h != null;\n }", "private boolean needToTurn() {\n\t\tdouble curDir = sens.getDirection();\n\t\tdouble desDirPlusAmount = desiredDirection + TURNSPEED;\n\t\tdouble desDirMinusAmount = desiredDirection - TURNSPEED;\n\n\t\t// if desired direction is <||> +_ x degrees\n\t\tif (curDir < desDirMinusAmount || curDir > desDirPlusAmount) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasAnyoneLost()\n {\n gameOver = false;\n if(dw.isEmpty() || de.isEmpty())\n gameOver = true;\n \n return gameOver;\n }", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "public boolean isOwner(EntityPlayer player) {\n\t\treturn player.getDisplayName().equals(owner) /*|| Platform.worldType() != Platform.WorldMode.MP*/;\r\n\t}", "public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }", "public boolean canMove ()\n {\n return ((ActiveAdvancer)_advancer).canMove();\n }", "public boolean canCastle(int direction){\n\t\tPiece rook;\n\t\t\n\t\tif(!((getColor().equals(\"White\") && getSquare().getCol() == 4 && getSquare().getRow() == 7 ) ||\n\t\t\t\t(getColor().equals(\"Black\") && getSquare().getCol() == 4 && getSquare().getRow() == 0 )))\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tif(direction == 1){\n\t\t\trook = getSquare().getEast().getEast().getEast().getOccupant();\n\t\t\tif(rook == null || !rook.getColor().equals(this.getColor()) || !rook.getType().equals(\"Rook\") || rook.hasMoved() || this.hasMoved())\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getEast().getEast().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getEast().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tif(getColor().equals(\"White\")){\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"Black\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 75 || location == 76){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"White\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 5 || location == 6){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\telse if (direction == -1){//East\n\t\t\trook = getSquare().getWest().getWest().getWest().getWest().getOccupant();\n\t\t\tif(rook == null || !rook.getColor().equals(this.getColor()) || !rook.getType().equals(\"Rook\") || rook.hasMoved() || this.hasMoved())\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getWest().getWest().getWest().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getWest().getWest().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\tif(getSquare().getWest().getOccupant() != null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tif(getColor().equals(\"White\")){\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"Black\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 73 || location == 72 || location == 71){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int i = 0; i < ChessBoard.getPieces().size(); i++){\n\t\t\t\t\tif(ChessBoard.getPieces().get(i).getColor().equals(\"White\"))\n\t\t\t\t\t\tfor(int location: ChessBoard.getPieces().get(i).getMoves()){\n\t\t\t\t\t\t\tif(location == 3 || location == 2 || location == 1){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean isDraw() {\n\t\tif (!h1.isAlive() && !h2.isAlive())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public boolean encountered(){\n boolean encounter = false;\n\n int stepsNeeded = player.getDestination().getStepsNeeded();\n\n float percent = (chance * 1.0f / stepsNeeded * 1.0f) * 100;\n float result = r.nextFloat() * 100;\n\n if(result <= percent && percent >= 20) {\n encounter = true;\n }\n\n return encounter;\n }", "public static boolean characterDeathCheck(){\n if (MainCharacter.hpNow <= 0){\n return true;\n }\n return false;\n }", "public boolean canFly() {\n\t\treturn !isEgg() && !isHatchling();\n\t}", "private boolean canOpenDoors(){\n\n // if the train is stoped, we can open doors\n if (this.selectedTrain.getVelocity() == 0.0){ return true; }\n else { return false; }\n }" ]
[ "0.73365015", "0.72655326", "0.71722305", "0.71679735", "0.68552476", "0.6840503", "0.68355256", "0.6708684", "0.6484926", "0.64750415", "0.643283", "0.64066064", "0.63935655", "0.63157624", "0.6312315", "0.6289394", "0.6255181", "0.62293863", "0.6218609", "0.6190501", "0.6188062", "0.61767495", "0.6137445", "0.6128446", "0.61274374", "0.61267513", "0.6119634", "0.6116747", "0.61124337", "0.6104492", "0.6098036", "0.60863656", "0.6083648", "0.6052401", "0.60051113", "0.6003804", "0.60026854", "0.60022056", "0.5976235", "0.5973007", "0.596379", "0.59615225", "0.5960593", "0.5934742", "0.5933208", "0.59324586", "0.59302104", "0.5929653", "0.59263325", "0.5918453", "0.59107745", "0.5909208", "0.5906715", "0.59039223", "0.59014344", "0.58959603", "0.5888424", "0.58882594", "0.5877152", "0.5876452", "0.5865142", "0.5857621", "0.585693", "0.5848105", "0.58457637", "0.58442056", "0.58424217", "0.5842317", "0.58349437", "0.58333987", "0.58268243", "0.5824583", "0.58218586", "0.5815199", "0.5814984", "0.5814262", "0.58137065", "0.58130157", "0.5812027", "0.5799942", "0.57964164", "0.57958174", "0.5794359", "0.5792644", "0.5792248", "0.57888055", "0.57879037", "0.57865196", "0.57864296", "0.578204", "0.57814574", "0.5781348", "0.5780348", "0.5780142", "0.57797265", "0.5777543", "0.5776109", "0.577551", "0.5770875", "0.57682776" ]
0.7340268
0
end of onDoor method This method is to see if the player is at the stairs.
public boolean onStairs(){ int yp = 0; int xp = 0; int ys = 1; int xs = 1; for(int i = 0; i < this.position.length; i ++){//looks though arrays to gather position for(int p = 0 ; p < this.position.length; p++){ if(this.position[i][p] == 1 && this.Stairs[i][p] == 1){ yp=i; xp=p; ys=i; xs=p; } } } if(yp==ys && xp==xs){ return true; } return false;//if they are not in the same location, return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean onDoor(){\n\t\tint yp = 0; int xp = 0;//coordinates to hold player position\n\t\tint yd = 1; int xd = 1;//coordinates to hold door position\n\t\tfor(int i = 0; i < this.position.length; i ++){//looks though arrays to gather position\n\t\t\tfor(int p = 0 ; p < this.position.length; p++){\n\t\t\t\tif(this.position[i][p] == 1 && this.Door[i][p] == 1){\n\t\t\t\t\typ = i; xp = p;\n\t\t\t\t\tyd = i; xd = p;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tif(yp==yd && xp==xd){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;//if they are not in the same location, return false\n\t}", "public boolean isStair() {\n return this.type == Type.STAIR;\n }", "public boolean checkSight() {\r\n\t\tint x = (int) (creature.getXlocation()/Tile.TILEWIDTH);\r\n\t\tint y = (int) (creature.getYlocation()/Tile.TILEHEIGHT);\r\n\t\t//Facing Left\r\n\t\tif (creature.getLastDirection() == 1) {\r\n\t\t\tif (checkSeesPlayer(x-1, y+1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x-1, y+1)) {\r\n\t\t\t\tif (checkSeesPlayer(x-2, y+1)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else if (checkSeesPlayer(x-2, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x-1, y)) {\r\n\t\t\t\treturn true; \r\n\t\t\t}else if (!checkCollision(x-1, y)) {\r\n\t\t\t\tif (checkSeesPlayer(x-2, y)) {\r\n\t\t\t\t\treturn true; \r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x-1, y-1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x-1, y-1)) {\r\n\t\t\t\tif (checkSeesPlayer(x-2, y-1)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else if (checkSeesPlayer(x-2, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t//Facing Right\r\n\t\t}else if (creature.getLastDirection() == 3) {\r\n\t\t\tif (checkSeesPlayer(x+1, y+1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x+1, y+1)) {\r\n\t\t\t\tif (checkSeesPlayer(x+2, y+1)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tif (checkSeesPlayer(x+2, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x+1, y)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x+1, y)) {\r\n\t\t\t\tif (checkSeesPlayer(x+2, y)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x+1, y-1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x+1, y-1)) {\r\n\t\t\t\tif (checkSeesPlayer(x+2, y-1)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tif (checkSeesPlayer(x+2, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t//Facing Up\r\n\t\t}else if (creature.getLastDirection() == 0) {\r\n\t\t\tif (checkSeesPlayer(x-1, y-1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x-1, y-1)) {\r\n\t\t\t\tif (checkSeesPlayer(x-1, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else if (checkSeesPlayer(x-2, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x, y-1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x, y-1)) {\r\n\t\t\t\tif (checkSeesPlayer(x, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x+1, y-1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x+1, y-1)) {\r\n\t\t\t\tif (checkSeesPlayer(x+1, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else if (checkSeesPlayer(x+2, y-2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t//Facing Down\r\n\t\t}else if (creature.getLastDirection() == 2) {\r\n\t\t\tif (checkSeesPlayer(x-1, y+1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x-1, y+1)) {\r\n\t\t\t\tif (checkSeesPlayer(x-1, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else if (checkSeesPlayer(x-2, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x, y+1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x, y+1)) {\r\n\t\t\t\tif (checkSeesPlayer(x, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else if (checkSeesPlayer(x+1, y+1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else if (!checkCollision(x+1, y+1)) {\r\n\t\t\t\tif (checkSeesPlayer(x+1, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else if (checkSeesPlayer(x+2, y+2)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }", "public boolean inLineOfSight(){\n\t\t\n\t\tboolean keepGoing=true;\n\t\t\n\t\tfor (int i=0; i<this._movingTrainers.size(); i++){\n\t\t\tthis._LOSTrainer=i;\n\t\t\tkeepGoing=true;\n\t\t\t//within their line of sight\n\t\t\tif(this._movingTrainers.get(i)!=null && !this._movingTrainers.get(i).isDefeated()){\n\t\t\t\tfor (int j=0; j<this._movingTrainers.get(i).getLOS(); j++){\n\t\t\t\t\tif(keepGoing){\n\t\t\t\t\t\tint tx=this._movingTrainers.get(i).getXIndex();\n\t\t\t\t\t\tint ty=this._movingTrainers.get(i).getYIndex();\n\t\t\t\t\t\tint jx=0;\n\t\t\t\t\t\tint jy=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//facing the right way\n\t\t\t\t\t\tswitch(this._movingTrainers.get(i).getDirection()){\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tjx=0;\n\t\t\t\t\t\t\t\tjy=1*j;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tjx=0;\n\t\t\t\t\t\t\t\tjy=-1*j;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tjx=1*j;\n\t\t\t\t\t\t\t\tjy=0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tjx=-1*j;\n\t\t\t\t\t\t\t\tjy=0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//What's in the way? if nothing and they see the player, return true.\n\t\t\t\t\t\tif((tx+jx)>=0 && (ty+jy)>=0){\n\t\t\t\t\t\t\tchar next= this._room._roomGrid[tx + jx][ty + jy];\n\t\t\t\t\t\t\tif(tx+jx==xObs && ty+jy==yObs){\n\t\t\t\t\t\t\t\tthis._interruptedTrainer=this._LOSTrainer;\n\t\t\t\t\t\t\t\tTrainer interrupted = this._movingTrainers.get(this._interruptedTrainer);\n\t\t\t\t\t\t\t\t//_busy=true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//These two statements are for moving trainers who can interrupt. \n\t\t\t\t\t\t\t\tif(!interrupted.isStationary() && _gbs.npctick!=0){\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile(!interrupted.isStationary() && !this._approachTimer.isRunning()){\n\t\t\t\t\t\t\t\t\tinterrupted.setAvoidMethod(\"freeze\");\n\t\t\t\t\t\t\t\t\tinterrupted.setStationary(true);\n\t\t\t\t\t\t\t\t\tSysOut.print(\"Frozen\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t////////////////\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(interrupted.getXIndex()>this.xObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(xObs+1==interrupted.getXIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs+1, yObs);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getXIndex()<this.xObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(xObs-1==interrupted.getXIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs-1, yObs);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getYIndex()>this.yObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(yObs+1==interrupted.getYIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs, yObs+1);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getYIndex()<this.yObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(yObs-1==interrupted.getYIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs, yObs-1);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t////SysOut.print(\"HE SEES YOU WHEN YOU'RE SLEEPING: \"+ _interruptedTrainer);\n\t\t\t\t\t\t\t\t//End the loop, return true.\n\t\t\t\t\t\t\t\tif(interrupted.getLOS()==0 || !interrupted.isStationary()){\n\t\t\t\t\t\t\t\t\tthis._paintAlert=false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getLOS()>0){\n\t\t\t\t\t\t\t\t\tthis._paintAlert=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\tif(!this._approachTimer.isRunning()){\n\t\t\t\t\t\t\t\t\tthis._seenByNPC=true;\n\t\t\t\t\t\t\t\t\tif(interrupted.getGender() == 'M' && interrupted.getBelt()!=null)\n\t\t\t\t\t\t\t\t\t\tM2.playBG(M2.TRAINER_APPROACH_M);\n\t\t\t\t\t\t\t\t\telse if(interrupted.getGender() == 'F'&& interrupted.getBelt()!=null)\n\t\t\t\t\t\t\t\t\t\tM2.playBG(M2.TRAINER_APPROACH_F);\n\t\t\t\t\t\t\t\t\telse if(interrupted.getGender() == 'R'&& interrupted.getBelt()!=null)\n\t\t\t\t\t\t\t\t\t\tM2.playBG(M2.RIVAL_MUSIC);\n\t\t\t\t\t\t\t\t\tthis._approachTimer.start();\n\t\t\t\t\t\t\t\t\tthis._tooCloseTrigger=true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if((next==SURF && !_gbs.getSurf() && !this._movingTrainers.get(this._LOSTrainer).canSurf())|| (next==SURF && _gbs.getSurf() && !this._movingTrainers.get(this._LOSTrainer).canSurf()) || (next==SURF && !_gbs.getSurf() && this._movingTrainers.get(this._LOSTrainer).canSurf()) || (next==NO && j!=0) || next==CUT){\n\t\t\t\t\t\t\t\t////SysOut.print(\"Something is in the way: \"+ _interruptedTrainer);\n\t\t\t\t\t\t\t\t//Stop this iteration, move on.\n\t\t\t\t\t\t\t\tkeepGoing = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int k=0; k<this._movingTrainers.size(); k++){\n\t\t\t\t\t\t\t\tif(tx+jx==this._movingTrainers.get(k).getXIndex() && ty+jy==this._movingTrainers.get(k).getYIndex() && j>0){\n\t\t\t\t\t\t\t\t\t////SysOut.print(\"Another trainer is in the way:\" + _interruptedTrainer);\n\t\t\t\t\t\t\t\t\t//Stop this iteration, move on.\n\t\t\t\t\t\t\t\t\tif(this._movingTrainers.get(k).isDefeated() && this._movingTrainers.get(k).getVanishing()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tkeepGoing = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t////SysOut.print(\"They don't see you.\");\n\t\treturn false;\n\t}", "public boolean isDoor() {\n return this.type == Type.DOOR;\n }", "public boolean isWin() {\n if (chosen_door.getContains() == Contains.CAR) {\n return true;\n }\n return false;\n }", "protected boolean IsPlayerStaringAtMe( EntityPlayer player )\r\n {\r\n ItemStack headStack = player.inventory.armorInventory[3];\r\n\r\n if ( headStack == null || headStack.itemID != \r\n \tFCBetterThanWolves.fcItemEnderSpectacles.itemID )\r\n {\r\n Vec3 vLook = player.getLook( 1F ).normalize();\r\n \r\n Vec3 vDelta = worldObj.getWorldVec3Pool().getVecFromPool( posX - player.posX, \r\n \tboundingBox.minY + ( height / 2F ) - ( player.posY + player.getEyeHeight() ), \r\n \tposZ - player.posZ );\r\n \r\n double dDist = vDelta.lengthVector();\r\n \r\n vDelta = vDelta.normalize();\r\n \r\n double dotDelta = vLook.dotProduct( vDelta );\r\n \r\n if ( dotDelta > 1D - 0.025D / dDist )\r\n {\r\n \treturn player.canEntityBeSeen( this );\r\n }\r\n }\r\n \r\n return false;\r\n }", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "public boolean wander() {\n\t\tMapLocation target = sensor.findTargetLocation();\n\t\treturn(nav.moveToLocation(target));\n\t}", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }", "public boolean isHouse() {\n return (this.getId() == Player.PLAYER_1.getHouseIndex())\n || (this.getId() == Player.PLAYER_2.getHouseIndex());\n }", "public boolean isDoorway(){\n\t\treturn (cellType == CellType.DOORWAY);\n\t}", "boolean canSnowFallOn();", "public boolean isAtWar(@Nonnull State state) {\n for(Conflict c : conflicts) {\n if(c.getSideOf(state) != null) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isDoor() {\n\t\treturn isaDoor;\n\t}", "public boolean hitOrStand(){\r\n\t\treturn hitOrStand;\r\n\t}", "private boolean checkDoor(Door door){\n\n\t \treturn(door.getStatus().equalsIgnoreCase(\"Unlocked\"));\n\t \t\t//return true;//returns the value true\n\t //else\n\t \t //return false;//returns the value false\n\t }", "public boolean isAtWar(EntityPlayer player) {\n State state = StateManager.getInstance().getStateFromPlayer(player);\n if(state == null)\n return false;\n\n return isAtWar(state);\n }", "private boolean isStation(SensorEvent e) {\n for (int[] p : STATION_POSITIONS) {\n if (atSensor(e, p[0], p[1])) {\n return true;\n }\n }\n return false;\n }", "private static boolean isWin()\n {\n boolean win = true;\n for(Ship[] k:map)\n {\n for(Ship o:k)\n {\n if(o.getState()==1)\n win=false;\n }\n }\n return win;\n }", "public boolean isSunk() {\n\t\tfor (Coordinate coordinate : shipPositions) {\n\t\t\tif (!coordinate.getIsHit()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void openDoor(Player player) {\n if (player.getHasKey()) {\n isOpen = true;\n System.out.println(\"The door creaks when it opens\");\n } else {\n System.out.println(\"The door is locked, you probably need a key of some sort...\");\n }\n }", "@Override\n public void steppedOn(Player p) {\n standingHere++;\n Game.log.format(\"# SnowyHole>steppedOn : Stepped on SnowyHole(%d, %d)\\n\", x, y);\n p.fallInWater();\n }", "public static int[] isMonsterInSight(Player curr) {\n int[] ans = {-1, -1};\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n String name = curr.getName();\n if (bodyDir == UP) {\n dirs.add(UP);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(DOWN);\n }\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(LEFT);\n }\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(UP);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(RIGHT);\n }\n }\n\n if (dirs == null || dirs.size() == 0)\n return ans; //{-1,-1}\n for (int m = 0; m < players.length; m++) { //skip player if Vehicle is not mind controlled and the player is not a monster\n //skip player if Vehicle is mind controlled and the player is a monster\n if (players[m] == null || players[m].getName().equals(\"NONE\") || curr == players[m] ||\n ((curr instanceof Vehicle && !((Vehicle) (curr)).isMindControlled()) && !(players[m] instanceof Monster)) ||\n ((curr instanceof Vehicle && ((Vehicle) (curr)).isMindControlled()) && (players[m] instanceof Monster)))\n continue;\n int mR = players[m].getRow();\n int mC = players[m].getCol();\n\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 0; r--) { //coastguard, destroyer, fighter planes and artillery have the monsters position known - the monster is not hidden by structures\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length; c++) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 0; c--) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n }\n if (skip)\n continue;\n }\n }\n return ans;\n }", "public void openDoor() {\n\t\tSystem.out.println(\"The spaceship door has opened.\");\n\t\tSpaceship sp = getTheSpaceship();\n\t\tArrayList<GameObject> remove = new ArrayList<GameObject>();\n\t\tfor(GameObject object : gameObject) {\n\t\t\tif(object instanceof Opponents) {\n\t\t\t\tOpponents o = (Opponents) object;\n\t\t\t\tdouble x = Math.abs(sp.getLocation().getX() - o.getLocation().getX());\n\t\t\t\tdouble y = Math.abs(sp.getLocation().getY() - o.getLocation().getY());\n\t\t\t\tif(x >= 0 && x <= sp.getSize() && y >= 0 && y <= sp.getSize()) {\n\t\t\t\t\trescueAnObject(object);\n\t\t\t\t\tremove.add(object);\n\t\t\t\t\tSystem.out.println(\"You've rescued a \" + object);\n\t\t\t\t}\n\t\t\t}\n\t}\n\t\t/* Concurrency issue with for each loop, created delete ArrayList<GameObject>.\n\t\t * and remove after.\n\t\t */\n\t\tfor(GameObject object : remove)\n\t\t\tgameObject.remove(object);\n\t}", "public boolean isShivering();", "private boolean isMyWormInShootingRange(Direction d) {\n MyWorm currentWorm = getCurrentWorm(gameState);\n // direction N(0, -1), NE(1, -1), E(1, 0), SE(1, 1), S(0, 1), SW(-1, 1), W(-1,0), NW(-1, -1)\n Worm[] myWorms = player.worms;\n int i = 0;\n boolean found = false;\n while ((i < myWorms.length) && (!found)) {\n int weaponRange = currentWorm.weapon.range;\n if(myWorms[i].id != currentWorm.id && myWorms[i].health > 0){\n if ((d.name().equals(\"N\")) && (between(myWorms[i].position.y, currentWorm.position.y - weaponRange, currentWorm.position.y) && currentWorm.position.x == myWorms[i].position.x)) {\n found = true;\n }\n else if ((d.name().equals(\"E\")) && (between(myWorms[i].position.x, currentWorm.position.x + weaponRange, currentWorm.position.x) && currentWorm.position.y == myWorms[i].position.y)) {\n found = true;\n }\n else if ((d.name().equals(\"S\")) && (between(myWorms[i].position.y, currentWorm.position.y + weaponRange, currentWorm.position.y) && currentWorm.position.x == myWorms[i].position.x)) {\n found = true;\n }\n else if ((d.name().equals(\"W\")) && (between(myWorms[i].position.x, currentWorm.position.x - weaponRange, currentWorm.position.x) && currentWorm.position.y == myWorms[i].position.y)) {\n found = true;\n }\n else if ((d.name().equals(\"NE\")) && (between(myWorms[i].position.x, currentWorm.position.x + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n else if ((d.name().equals(\"SE\")) && (between(myWorms[i].position.x, currentWorm.position.x + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n else if ((d.name().equals(\"SW\")) && (between(myWorms[i].position.x, currentWorm.position.x - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n else if ((d.name().equals(\"NW\")) && (between(myWorms[i].position.x, currentWorm.position.x - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) {\n found = true;\n }\n\n }\n i++;\n }\n return found;\n }", "public static int isVehicleInSight(Player curr) {\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n if (bodyDir == UP) {\n dirs.add(UP);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(DOWN);\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(LEFT);\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(UP);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(RIGHT);\n }\n\n if (dirs == null || dirs.size() == 0)\n return -1;\n for (int vi = 0; vi < players.length; vi++) {\n if (players[vi] == null || players[vi].getName().equals(\"NONE\") || (players[vi] instanceof Monster)) //we don't want the AI monster to consider itself or other monsters a target\n continue;\n Player veh = players[vi];\n boolean isAir = veh.isFlying();\n int vR = veh.getRow();\n int vC = veh.getCol();\n if (veh.getName().endsWith(\"civilian\"))\n continue;\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 1; r--) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length - 1; c++) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 1; c--) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n }\n if (skip)\n continue;\n }\n }\n return -1;\n }", "public boolean isSandstone() {\n return this.type == Type.SANDSTONE;\n }", "public boolean playerThrough(int px, int py, int pw, int ph){\r\n Line2D.Double line = new Line2D.Double(p1,p2); //the gate line\r\n //check if line intersects the player's rectangle of space\r\n if(line.intersects(px, py, pw, ph)){\r\n return true; //gate triggered\r\n }\r\n return false; //gate not triggered\r\n }", "@Override\n public boolean isStealthOn() {\n // Try to find a Mek Stealth system.\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_STEALTH)) {\n if (mEquip.curMode().equals(\"On\")) {\n // Return true if the mode is \"On\"\n return true;\n }\n }\n }\n // No Mek Stealth or system inactive. Return false.\n return false;\n }", "public void checkPlayer(Player player, int heart, int endDoor) {\n\t\tlong id;\n\t\tif (!player.isAtDoor && doorPos > 0\n\t\t\t\t&& mapArray[player.getPosition()] != 5) {\n\t\t\tmapArray[doorPos] = 4;\n\t\t\tdoorPos = -1;\n\t\t}\n\t\tif (mapArray[player.getPosition()] == 0\n\t\t\t\t|| mapArray[player.getPosition()] == 5\n\t\t\t\t|| mapArray[player.getPosition()] == 3) {\n\t\t\tif (mapArray[player.getPosition()] == 5) {\n\t\t\t\tswitch (player.getDirection()) {\n\t\t\t\tcase North:\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tplayer.setPosition(player.getPosition() - width);\n\t\t\t\t\tbreak;\n\t\t\t\tcase South:\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tplayer.setPosition(player.getPosition() + width);\n\t\t\t\t\tbreak;\n\t\t\t\tcase East:\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tplayer.setPosition(player.getPosition() + 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase West:\n\t\t\t\t\tmapArray[player.oldPos] = 0;\n\t\t\t\t\tmapArray[player.getPosition()] = 4;\n\t\t\t\t\tplayer.setPosition(player.getPosition() - 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (mapArray[player.getPosition()] == 3) {\n\t\t\t\tcatMEOW.play(0.25f);\n\t\t\t\tmapArray[player.getOldPosition()] = 0;\n\t\t\t\thitCat = true;\n\t\t\t} else {\n\t\t\t\tmapArray[player.getOldPosition()] = 0;\n\t\t\t\tmapArray[player.getPosition()] = 2;\n\t\t\t\tid = footSteps.play(0.05f);\n\t\t\t\tfootSteps.setVolume(id, 0.001f);\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (mapArray[player.getPosition()]) {\n\t\t\tcase 1:\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tmapArray[player.getPosition()] = 5;\n\t\t\t\topenDoor.play(0.025f);\n\t\t\t\tdoorPos = player.getPosition();\n\t\t\t\tplayer.isAtDoor = true;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmapArray[player.getPosition()] = 0;\n\t\t\t\tplayer.hasHeart = true;\n\t\t\t\tplayer.setVolume(1.0f);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tif(player.hasHeart){\n\t\t\t\t\topenDoor.play(0.045f);\n\t\t\t\t\tendGame = true;\n\t\t\t\t\tendGameAnime = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(!endGame){\n\t\t\t\tplayer.setPosition(player.getOldPosition());\n\t\t\t}\n\t\t}\n\t\tif (!player.hasHeart) {\n\t\t\tint heartOffset_x = (player.getPosition() % width)\n\t\t\t\t\t- (heart % width);\n\t\t\tint heartOffset_y = (player.getPosition() / width)\n\t\t\t\t\t- (heart / width);\n\t\t\t//System.out.println(\"x: \" + heartOffset_x + \" y: \" + heartOffset_y);\n\t\t\tdouble distance = Math.sqrt(Math.pow(heartOffset_x, 2)\n\t\t\t\t\t+ Math.pow(heartOffset_y, 2));\n\t\t\tif (distance > maxDistance / 2.0) {\n\t\t\t\tplayer.setVolume(0.0f);\n\t\t\t} else {\n\t\t\t\tdistance = distance / maxDistance;\n\t\t\t\tdistance = 1.0 - distance;\n\t\t\t\t//distance = Math.pow(distance, 8);\n\t\t\t\tplayer.setVolume((float) distance);\n\t\t\t\t\t\t\t}\n\t\t} else{\n\t\t\tplayer.setVolume(1.0f);\n\t\t\tint endDoorOffset_x = (player.getPosition() % width)\n\t\t\t\t\t- (endDoor % width);\n\t\t\tint endDoorOffset_y = (player.getPosition() / width)\n\t\t\t\t\t- (endDoor / width);\n\t\t\t//System.out.println(\"x: \" + endDoorOffset_x + \" y: \" + endDoorOffset_y);\n\t\t\tdouble distance = Math.sqrt(Math.pow(endDoorOffset_x, 2)\n\t\t\t\t\t+ Math.pow(endDoorOffset_y, 2));\n\t\t\tdistance = distance / maxDistance;\n\t\t\tdistance = 1.0 - distance;\n\t\t\tdistance = Math.pow(distance, 3);\n\t\t\tplayer.setFear(bobBarker(distance));\n\t\t\t//System.out.println(\"dist: \" + distance + \" bob: \" + bobBarker(distance));\n\t\t}\n\t\t//System.out.println(\"player pos: \" + player.getPosition());\n\t}", "private boolean checkGameState() {\n\t\tint numberOfPlayers = this.manSys.lockedNavmap.size();\n\t\tfor (int i = 0; i < numberOfPlayers; i++) {\n\t\t\tif (!snakesList.get(i).isDestroyed()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }", "public boolean isPressed() {\r\n List<Entity> entities = dungeon.getEntities();\r\n for (Entity e: entities) {\r\n if (e != null && e.getY() == getY() && e.getX() == getX()) {\r\n if (\"Boulder\".equals(e.getClass().getSimpleName()))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }", "public boolean doorTicker()\n\t{\n\t\tif(!isDoor)\n\t\t\treturn false;\n\t\tif(stateOfDoor!=this.DOOR_STATE_OPENING)\n\t\t\treturn false;\n\t\t\n\t\t//Now, find angle to (x2,y2) (which is the moving end of the wall)\n\t\t//to (x1,y2) relative to (originalX,originalY) which is a copy of x2,y2\n\t\t//set x2,y2 so that the angle is now a little larger, if that angle is now\n\t\t//greater than PI/2, set the stateOfDoor as OPEN\n\t\t\n\t\tdouble angleTo2 = this.angleToSide2(x1,y1);\n\t\t\n\t\tdouble newAngle;\n\t\t\n\t\tif(swingingWay1)\n\t\t{\n\t\t\tnewAngle= angleTo2 + ANGLE_CHANGE;\n\t\t\tticks++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewAngle= angleTo2 - ANGLE_CHANGE;\n\t\t\tticks--;\n\t\t}\n\t\t\n\t\t//distance from pivot\n\t\tdouble dx = this.length()*Math.cos(newAngle);\n\t\tdouble dy = this.length()*Math.sin(newAngle);\n\t\t\n\t\tx2 = x1+dx;\n\t\ty2 = y1+dy;\n\n\t\t//BECAUSE X2 and Y2 have changed, certain values need to be recalculated so that it paints ok\n\t\tmx = (x1+x2)/2;\n\t\tmy = (y1+y2)/2;\n\t\tif(x1!=x2)\n\t\t{\n\t\t\tm = (this.y1-this.y2)/(this.x1-this.x2);\n\t\t\tb = y1-m*this.x1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm = 0;\n\t\t\tb = 0;\n\t\t}\n\t\t\n\t\t\n\t\t//now check if the door is all the way open\n\t\tdouble angleToOriginal = this.angleToOriginal(x1,y1);\n\t\t\n\t\t//if((newAngle-angleToOriginal>Math.PI/2)||(newAngle-angleToOriginal<-Math.PI/2))\n\t\t//if(ArtWork.isBetween(angleToOriginal-3*Math.PI/4, ArtWork.normalizeAngle(angleToOriginal+3*Math.PI/4), newAngle))\n\t\tif((ticks*ANGLE_CHANGE>Math.PI/2)||(ticks*ANGLE_CHANGE<-Math.PI/2))\n\t\t\tstateOfDoor=this.DOOR_STATE_OPEN;//stop!\n\t\t\n\t\treturn true;\n\t}", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(elevator.getWristPosition() - elevator.getWristStages()[elevator.getWristStage()]) < Math.PI/18 && !elevator.isRunning(ElevatorSubsystem.Follower.ELEVATOR);\r\n\t}", "public boolean isTrapDoor() {\n return this.type == Type.TRAP_DOOR;\n }", "protected boolean isWall2()\n {\n\n if(isTouching(Wall.class)) //&&!isTouching(Door.class))\n return true;\n /*else if(isTouching(Door.class))\n {\n Door d = (Door)getOneIntersectingObject(Door.class);\n if(d.alreadyOpened==false)\n return true;\n else\n return false;\n }*/\n else\n return false;\n }", "private boolean playerWonGameWithDiagonalLine(Player player) {\n char playerSymbol = player.getType();\n if (boardState[0][0] == playerSymbol && boardState[1][1] == playerSymbol \n && boardState[2][2] == playerSymbol) {\n return true; \n } else if (boardState[0][2] == playerSymbol && boardState[1][1] == playerSymbol \n && boardState[2][0] == playerSymbol) {\n return true; \n }\n return false; \n }", "public void setDoor() {\n\t\tisaDoor = true;\n\t}", "boolean canFall();", "public void stayDoor() {\n if (stage != Stage.DOOR_CHOSEN) {\n throw new RuntimeException(\"Invalid Stage\");\n }\n\n stage = Stage.END;\n for (Door door : doors) {\n if (door.getState() == State.CLOSED) {\n door.open();\n }\n continue;\n }\n total_stayed++;\n if (chosen_door.getContains() == Contains.CAR) {\n won_stayed++;\n }\n }", "public boolean isWin_LordRust(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 3){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "@Override\n\tpublic void canLand() {\n\t\tSystem.out.println(\"IF IM IN THE SKY, I CANT LAND. BY THE OMNISSIAH\");\n\t}", "private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }", "public boolean allSunken() {\n\t\tfor (Ship s : ships) {\n\t\t\tif (!s.isSunk()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isCurrentPlayerHungry() {\r\n\tboolean isHungry = true;\r\n\tint length = this.territory[this.currentSide].length;\r\n\tfor (short i = 0; i < length && isHungry; i++) {\r\n\t isHungry = (this.territory[this.currentSide][i] == 0);\r\n\t}\r\n\r\n\treturn isHungry;\r\n }", "private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "public boolean isDoorway() {\n\t\tif(doorDirection != DoorDirection.NONE) {\t\t\t\t\t\t\t\t// catches if there is a door direction, indicating that the cell is a door\n\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return true, indicating that the cell is a door\n\t\t}\n\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if there is no door direction\n\t\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return false, indicating that the cell is not a door\n\t\t}\n\t}", "public boolean isSunk(){\n if(places.isEmpty()){\n //ship cant be sunk if empty\n return false;\n }\n\n //Checks each place in list for hit\n for(Place place : places){\n if(!place.isHit()){\n return false;\n }\n }\n return true;\n }", "public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}", "private void startSailing(){\n\t\t\n\t\tgame.setOnKeyPressed(new EventHandler<KeyEvent>(){\n\t\t\n\t\t\t@Override\n\t\t\tpublic void handle(KeyEvent ke) {\n\t\t\t\tswitch(ke.getCode()){\n\t\t\t\tcase RIGHT:\n\t\t\t\t\tgameFactory.getShip().goEast();\n\t\t\t\t\tbreak;\n\t\t\t\tcase LEFT:\n\t\t\t\t\tgameFactory.getShip().goWest();\n\t\t\t\t\tbreak;\n\t\t\t\tcase UP:\n\t\t\t\t\tgameFactory.getShip().goNorth();\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tgameFactory.getShip().goSouth();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//call gameFactory to update all the ship locations, check treasures left\n\t\t\t\tgameFactory.updateScreen(gameplayPane);\n\t\t\t\tif(OceanMap.getInstance().getGameWin() && !gameOver){\n\t\t\t\t\tgameOver = true;\n\t\t\t\t\tgameFactory.gameWonAnim(gameplayPane, menu, window);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(OceanMap.getInstance().getGameLose() && !gameOver){\n\t\t\t\t\tgameOver = true;\n\t\t\t\t\tgameFactory.gameLostAnim(gameplayPane, menu, window);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public boolean checkOpen(float x, float y)\r\n/* 483: */ {\r\n/* 484:580 */ if (!tileWalkable(x, y)) {\r\n/* 485:582 */ return false;\r\n/* 486: */ }\r\n/* 487:585 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 488:586 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 489:588 */ return false;\r\n/* 490: */ }\r\n/* 491:591 */ return true;\r\n/* 492: */ }", "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "public boolean isThereStandingShips() {\r\n\t\r\n\t/*\t\r\n\t\tint SIZE = 100;\r\n\t\tint state = 0;\r\n\t\tboolean shipPresent = false;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tstate = shipStateMap.get(new Point(x, y));\r\n\t\t\tif (state == 1)\r\n\t\t\t\tshipPresent = true;\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn shipPresent;\r\n\t*/\r\n\r\n\t\treturn (numberOfAllowedShotsRemaining!=0);\r\n\t}", "@Override\n public boolean activate() {\n //When will this activate?\n return Areas.FALADOR.contains(ctx.players.local().tile())\n && ctx.widgets.component(1371,0).visible()\n && !ctx.objects.select().name(\"Waterpump\").within(6.0).isEmpty();\n }", "private boolean playerWonGameWithHorizontalLine(Player player) {\n char playerSymbol = player.getType();\n for (int i = 0; i < 3; i++) {\n if (boardState[i][0] == playerSymbol && boardState[i][1] == playerSymbol \n && boardState[i][2] == playerSymbol) {\n return true; \n }\n \n }\n return false; \n }", "public boolean CanMakeaMove(Player p) {\r\n List<Integer> dominoesNumbers = p.getAllNumbers();\r\n System.out.println(\"There is \" + this.stack.size() + \" more dominoes in the stack\");\r\n return this.stack.isEmpty() || playedDominoes.isEmpty() || dominoesNumbers.contains(end[0]) || dominoesNumbers.contains(end[1]);\r\n }", "public boolean isNear(Player player) {\n if(this.worldObject.getLocation().distance(player.getLocation()) <= this.harvestableObject.distanceToInteract()) {\n return true;\n }\n return false;\n }", "public static boolean onhand() {\n return InventoryManager.getCount(ItemPool.COMBAT_LOVERS_LOCKET) > 0\n || KoLCharacter.hasEquipped(ItemPool.COMBAT_LOVERS_LOCKET);\n }", "private boolean isEnPassant(Move move){\n if (super.player() == Player.WHITE){\n if (move.fromRow == 6){\n return true;\n }\n }else{\n if (move.fromRow == 1){\n return true;\n }\n }\n return false;\n }", "private boolean playerIsInSight(Point enemyLocation, Direction enemyLookDirection) {\n \tfor(int i = 1; i <= 2; i++) {\n \tif(enemyLookDirection == Direction.UP && !board.isOOB(enemyLocation.x - i, enemyLocation.y)) {\n \t\tif(board.getTile(enemyLocation.x - i, enemyLocation.y).hasPlayer() && !board.getTile(enemyLocation.x - i, enemyLocation.y).isRoom())\n \t\t\treturn true; \t\t\n \t}\n \telse if(enemyLookDirection == Direction.DOWN && !board.isOOB(enemyLocation.x + i, enemyLocation.y)) {\n \t\tif(board.getTile(enemyLocation.x + i, enemyLocation.y).hasPlayer() && !board.getTile(enemyLocation.x + i, enemyLocation.y).isRoom())\n \t\t\treturn true; \t\t\n \t}\n \telse if(enemyLookDirection == Direction.LEFT && !board.isOOB(enemyLocation.x, enemyLocation.y - i)) {\n \t\tif(board.getTile(enemyLocation.x, enemyLocation.y - i).hasPlayer() && !board.getTile(enemyLocation.x, enemyLocation.y - i).isRoom())\n \t\t\treturn true; \t\t\n \t}\n \telse if(enemyLookDirection == Direction.RIGHT && !board.isOOB(enemyLocation.x, enemyLocation.y + i)) {\n \t\tif(board.getTile(enemyLocation.x, enemyLocation.y + i).hasPlayer() && !board.getTile(enemyLocation.x, enemyLocation.y + i).isRoom())\n \t\t\treturn true; \t\t\n \t}\n \t}\n \treturn false;\n }", "public boolean getIsIndoor() {\n return this.isIndoor;\n }", "boolean isGameSpedUp();", "boolean isStraight();", "private boolean fourstonesReached() {\n\t\t\n\t\t\n\t\t//TO-DO: evtl. Abbruch, wenn ein freies Feld entdeckt wird\n\t\t\n\t\tint counter=0;\n\t\t\n\t\t//check horizontal lines\n\t\tfor(int i=0; i<horizontal;i++ ) {\n\t\t\t\n\t\t\tfor(int j=0; j<vertical;j++ ) {\n\t\t\t\t\n\t\t\t\tif(board[i][j] == player.ordinal()) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(counter == 4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcounter=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcounter=0;\n\t\t}\n\t\t\n\t\t\n\t\t//check vertical lines\n\t\tfor(int i=0; i<vertical;i++ ) {\n\t\t\t\n\t\t\tfor(int j=0; j<horizontal;j++ ) {\n\t\t\t\t\n\t\t\t\tif(board[j][i] == player.ordinal()) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(counter == 4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcounter=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcounter=0;\n\t\t}\n\t\t\n\t\t//check diagonal \n\t\tint ordinal = player.ordinal();\n\t\t\n\t\tif( //checking lines from up-left to down-right\n\t\t\t(board[3][0] == ordinal && board[2][1] == ordinal && board[1][2] == ordinal && board[0][3] == ordinal) || \n\t\t\t(board[4][0] == ordinal && board[3][1] == ordinal && board[2][2] == ordinal && board[1][3] == ordinal) ||\n\t\t\t(board[3][1] == ordinal && board[2][2] == ordinal && board[1][3] == ordinal && board[0][4] == ordinal) ||\n\t\t\t(board[5][0] == ordinal && board[4][1] == ordinal && board[3][2] == ordinal && board[2][3] == ordinal) ||\n\t\t\t(board[4][1] == ordinal && board[3][2] == ordinal && board[2][3] == ordinal && board[1][4] == ordinal) ||\n\t\t\t(board[3][2] == ordinal && board[2][3] == ordinal && board[1][4] == ordinal && board[0][5] == ordinal) ||\n\t\t\t(board[5][1] == ordinal && board[4][2] == ordinal && board[3][3] == ordinal && board[2][4] == ordinal) ||\n\t\t\t(board[4][2] == ordinal && board[3][3] == ordinal && board[2][4] == ordinal && board[1][5] == ordinal) ||\n\t\t\t(board[3][3] == ordinal && board[2][4] == ordinal && board[1][5] == ordinal && board[0][6] == ordinal) ||\n\t\t\t(board[5][2] == ordinal && board[4][3] == ordinal && board[3][4] == ordinal && board[2][5] == ordinal) ||\n\t\t\t(board[4][3] == ordinal && board[3][4] == ordinal && board[2][5] == ordinal && board[1][6] == ordinal) ||\n\t\t\t(board[5][3] == ordinal && board[4][4] == ordinal && board[3][5] == ordinal && board[2][6] == ordinal) ||\n\t\t\t\n\t\t\t//checking lines from up-right to down-left\n\t\t\t(board[2][0] == ordinal && board[3][1] == ordinal && board[4][2] == ordinal && board[5][3] == ordinal) ||\n\t\t\t(board[1][0] == ordinal && board[2][1] == ordinal && board[3][2] == ordinal && board[4][3] == ordinal) ||\n\t\t\t(board[2][1] == ordinal && board[3][2] == ordinal && board[4][3] == ordinal && board[5][4] == ordinal) ||\n\t\t\t(board[0][0] == ordinal && board[1][1] == ordinal && board[2][2] == ordinal && board[3][3] == ordinal) ||\n\t\t\t(board[1][1] == ordinal && board[2][2] == ordinal && board[3][3] == ordinal && board[4][4] == ordinal) ||\n\t\t\t(board[2][2] == ordinal && board[3][3] == ordinal && board[4][4] == ordinal && board[5][5] == ordinal) ||\n\t\t\t(board[0][1] == ordinal && board[1][2] == ordinal && board[2][3] == ordinal && board[3][4] == ordinal) ||\n\t\t\t(board[1][2] == ordinal && board[2][3] == ordinal && board[3][4] == ordinal && board[4][5] == ordinal) ||\n\t\t\t(board[2][3] == ordinal && board[3][4] == ordinal && board[4][5] == ordinal && board[5][6] == ordinal) ||\n\t\t\t(board[0][2] == ordinal && board[1][3] == ordinal && board[2][4] == ordinal && board[3][5] == ordinal) ||\n\t\t\t(board[1][3] == ordinal && board[2][4] == ordinal && board[3][5] == ordinal && board[4][6] == ordinal) ||\n\t\t\t(board[0][3] == ordinal && board[1][4] == ordinal && board[2][5] == ordinal && board[3][6] == ordinal)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean stepOn(Player player) {\n //System.out.println(\"Nem léphetsz rá a MapElementre.\");\n return false;\n }", "public boolean onEnPassant() {\n\t\tfinal FigureColor opponentColor = FigureColor.getOpponentColor(this.pawnColor);\n\t\tfinal BaseFigure lastUsedFigure = MoveWatcherEvent.getLastUsedFigure(opponentColor);\n\n\t\tif (lastUsedFigure.getFigureType() == FigureSet.PAWN) {\n\t\t\tfinal FigurePawn opponentPawn = (FigurePawn) lastUsedFigure;\n\n\t\t\tif (opponentPawn.getMoveInformation() == PawnMoveInformation.MOVED_TWO_FIELDS) {\n\t\t\t\tif (Matrix.INSTANCE.onPawnNeighbors(this, opponentPawn)) {\n\t\t\t\t\tthis.flagForEnPassant = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.flagForEnPassant = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.flagForEnPassant;\n\t}", "public boolean isWin_LordDeWorde(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 4){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "private boolean isAtPortal(EnderDragon dragon) {\n // check position\n double x = Math.floor(Math.abs(dragon.getLocation().getX()));\n double z = Math.floor(Math.abs(dragon.getLocation().getY()));\n\n // check phase\n boolean isPortalPhase = PORTAL_PHASES.contains(dragon.getPhase());\n\n return isPortalPhase && (x <= 3 && z <= 3);\n }", "protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }", "public boolean isTie() {\n if (gameStatus == null) return false;\n return gameStatus.isTie()\n || (gameStatus.getPlayerOnePoints() != -1\n && gameStatus.getPlayerOnePoints() == gameStatus.getPlayerTwoPoints()\n && isGameOver()\n && gameStatus.getWinner() == null);\n }", "void check_alien_direction() {\n // Aliens are moving right, check if aliens will move off screen\n if (Alien.direction == Alien.Directions.RIGHT) {\n double max_x = rightmost_alien_x();\n // Alien1 has largest width, so we use that one to calculate if all aliens will fit\n if (max_x + Dimensions.ALIEN1_WIDTH + Dimensions.X_PADDING > scene_width){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving left, check if aliens will move off screen\n else if (Alien.direction == Alien.Directions.LEFT) {\n double min_x = leftmost_alien_x();\n if (min_x < Dimensions.X_PADDING){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving down, check if they finished moving down\n else if (Alien.direction == Alien.Directions.DOWN &&\n Alien.down_distance_travelled >= Dimensions.ALIEN_VERTICAL_SPACE){\n random_alien_fires(); // After aliens all descend one row, one of the ships fires at the player\n Alien.changeDirections();\n }\n }", "public boolean sunIsOut(){\n \n if (sunOut == true) {\n return true;\n }else {\n return false;\n }\n }", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "public boolean isWin_LordSelachii(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 2){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "public void activeHandStand() {\n if (this.state == GameState.ROUNDACTIVE) {\n Hand curHand = this.getSeat(seatPlaying).getPlayer().getHands().get(0);\n curHand.setReady();\n if (isPlayerLeftBehind()) {\n for (int i = this.seatPlaying + 1; i <= this.seats.size(); i++) {\n if (this.getSeat(i).hasPlayer()) {\n Human h = (Human) this.getSeat(i).getPlayer();\n if (h.getBet() > 0) {\n this.seatPlaying = i;\n break;\n }\n }\n }\n repaintAll();\n } else {\n this.seatPlaying = 0;\n this.state = GameState.DEALTODEALER;\n //repaintAll();\n dealToDealer();\n }\n }\n }", "private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\n }", "public boolean isWin_LordVetinari(){\r\n // player got lordVetinari card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 1){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if (playerHoldCard != null) {\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n\r\n Set<Integer> areaList = new HashSet<Integer>();\r\n for (Integer minionID : playerHoldCard.getMinionList()) {\r\n int minion_ID = minionID;\r\n MinionPiece minion = discWorld.getMinionPiece_HASH().get(minion_ID);\r\n if (minion.getAreaNumber() != ConstantField.DEFAULT_UNDEFINED_PLAYID) {\r\n int areaID = minion.getAreaNumber();\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n // make sure free of demon\r\n if (area.getDemonList().size() == 0) {\r\n areaList.add(minion.getAreaNumber());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (numPlayers == 2) {\r\n\r\n if (areaList.size() >= 11) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 3) {\r\n\r\n if (areaList.size() >= 10) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 4) {\r\n\r\n if (areaList.size() >= 9) {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public boolean isStorniert() {\n\t\treturn this.storniert;\n\t}", "private boolean didMyShipSink(int x, int y) {\n boolean sunk = false; //assumes ship hasn't sunk\n for (int i = 0; i < fleet.size(); i++) { //going through fleet to find boat\n if (fleet.get(i).getStartX() == x && fleet.get(i).getStartY() == y) {\n sunk = fleet.get(i).hitAndMaybeSunk(); \n //System.out.println(\"didMyShipSink(): \" + fleet.get(i).getIsSunk());\n if (sunk) { \n shipsSunk.add(fleet.get(i)); \n fleet.remove(i);\n }\n }\n }\n return sunk;\n }", "public boolean hitDealer() {\r\n while (getHandValue() <= 16) {\r\n hit();\r\n }\r\n return getHandValue() <= 21;\r\n }", "public boolean isPassenger(Player player) {\n\t\tBlock[] blocks = this.blocks.clone();\n\t\tfor (int i = 0; i < blocks.length; i++) {\n\t\t\tBlock block = blocks[i];\n\t\t\tif (block.getType().equals(Material.AIR))\n\t\t\t\tcontinue;\n\t\t\tBlock blockon = player.getWorld().getBlockAt(player.getLocation().add(0, -1, 0));\n\t\t\tBlock blockon2 = player.getWorld().getBlockAt(player.getLocation().add(0, -2, 0));\n\t\t\tif (blockon.getLocation().equals(block.getLocation()) || blockon2.getLocation().equals(block.getLocation()))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void landOnSquare(Player player) {\n\t\tsuper.landOnSquare(player);\r\n\t}", "private boolean isStraight(ArrayList<Card> hand) {\n\t\treturn false;\r\n\t}", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "public boolean hitSide()\n {\n if(accel.getAcceleration(ADXL345_I2C.Axes.kX)>0)\n return true;\n else\n return false;\n }", "public boolean isOnSlopedTile() { return onSlopedTile; }", "public boolean gameIsOver() {return revealedShips >= 4;}", "boolean isInAir() {\n return inAir;\n }", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "public boolean ariFight(){\n\t\tint Xari = 0;\n\t\tint Yari = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Ari.length;i++){\n\t\t\tfor(int p = 0; p < this.Ari.length;p++){\n\t\t\t\tif(this.Ari[i][p] == 1){\n\t\t\t\t\tYari = i;\n\t\t\t\t\tXari = p;\n\t\t\t\t}\n\t\t\t\tif(this.position[i][p] == 1){\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(Yari==Yyou && Xari==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.6738467", "0.66445917", "0.6570417", "0.64226717", "0.6186679", "0.6155942", "0.61274123", "0.61191374", "0.60611486", "0.60244334", "0.5969782", "0.59653103", "0.5962272", "0.59561837", "0.5888277", "0.5875378", "0.5856536", "0.5850888", "0.584555", "0.5839162", "0.5811042", "0.5808761", "0.5808053", "0.5795578", "0.5794468", "0.57879645", "0.57872653", "0.5780173", "0.5768883", "0.5768861", "0.576246", "0.5761725", "0.5760846", "0.57584786", "0.57507914", "0.57472736", "0.5744106", "0.57412726", "0.56982756", "0.5684841", "0.5670983", "0.56683946", "0.56666476", "0.5662042", "0.5653296", "0.56385314", "0.5625066", "0.5595471", "0.55933475", "0.55877393", "0.5583564", "0.5581633", "0.55765253", "0.5573482", "0.55726105", "0.5565482", "0.55647326", "0.55644065", "0.5554796", "0.5552386", "0.55472666", "0.5547203", "0.55404013", "0.55281264", "0.55086166", "0.55080634", "0.55064875", "0.55008334", "0.54965174", "0.54962885", "0.54960674", "0.5494187", "0.549351", "0.5489786", "0.54849267", "0.54803306", "0.54658884", "0.5464482", "0.54644763", "0.54638755", "0.5462993", "0.5456627", "0.54527956", "0.545187", "0.545103", "0.5435904", "0.5431201", "0.5426235", "0.5423261", "0.54132426", "0.5412374", "0.54098725", "0.5408825", "0.54081553", "0.5405467", "0.54047096", "0.5404333", "0.5401733", "0.5401644", "0.54005367" ]
0.70374143
0
end of onStairs method This method creates the game board, distributes items onto the board.
public void create(){ //creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there for(int i = 0; i <this.position.length; i++){ for(int p = 0; p < this.position.length; p++){ this.position[i][p] = 0;//filling with zero } }//end of position making board this.position[1][1] = 1;//putting player in this position //creating door in the rooms for(int i = 0; i <this.Door.length; i++){ for(int p = 0; p < this.Door.length; p++){ this.Door[i][p] = 0;//filling with zero } }//end of Door making board this.Door[9][13] = 1;//puts the door here //makes board that tells if item is there for(int i = 0; i <this.Items.length; i++){ for(int p = 0; p < this.Items.length; p++){ this.Items[i][p] = null;//filling with null } }//end of filling board that has items //makes border of room for(int i = 0; i < this.area.length; i++){ for(int p = 0; p<this.area.length; p++){ if(i==0){ this.area[i][p] = "[ ]"; } else if (p==0 || p==19){ this.area[i][p] = "[ ]"; } else if(i==19){ this.area[i][p] = "[ ]"; } else{ this.area[i][p] = " "; } }//end of innner for }//end of outter for for(int i = 4; i< 5 ; i++){ for(int p = 4; p < 7; p++){ this.area[i][p] = "[ ]"; } } for(int i = 4; i< 5 ; i++){ for(int p = 4; p < 7; p++){ this.area[p][i] = "[ ]"; } } for(int i = 7; i< 8 ; i++){ for(int p = 2; p < 7; p++){ this.area[i][p] = "[ ]"; } } for(int i = 17; i< 18 ; i++){ for(int p = 13; p < 17; p++){ this.area[i][p] = "[ ]"; } } for(int i = 14; i< 15 ; i++){ for(int p = 13; p < 17; p++){ this.area[p][i] = "[ ]"; } } for(int i = 11; i< 12 ; i++){ for(int p = 10; p < 17; p++){ this.area[i][p] = "[ ]"; } } for(int i = 15; i< 16 ; i++){ for(int p = 3; p < 6; p++){ this.area[i][p] = "[ ]"; } } for(int i = 16; i< 17 ; i++){ for(int p = 6; p < 13; p++){ this.area[p][i] = "[ ]"; } } for(int i = 12; i< 13 ; i++){ for(int p = 5; p < 10; p++){ this.area[i][p] = "[ ]"; } System.out.println(" "); }//end of for that creates walls //for loop that distributes items int y = 0; int x = 0; for(int i = 0;i<10;i++){ Item thing = ItemGenerator.generate();//making an item boolean good = false; while(!good){//makes coordates until there is nothing in the way y = fate.nextInt(20);//getting coordiantaes x = fate.nextInt(20); if(this.Items[y][x]==null && this.area[y][x] != "[ ]"){ good = true; }//end of if else{ good = false; } }//end of while Items[y][x] = thing; }//end of for that distributes items on board }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create3(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating stairs to connect rooms\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Stairs[1][1] = 1;\n\n\t\t//creating board to keep track of garret\n\t\tfor(int i = 0; i <this.Garret.length; i++){\n\t\t\tfor(int p = 0; p < this.Garret.length; p++){\n\t\t\t\tthis.Garret[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of garret board\n\t\tthis.Garret[18][10] = 1;//putts garret there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 1; i< 6 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 7; p > 4; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 11 ; i++){\n\t\t\tfor(int p = 4; p < 5; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 10; i< 11 ; i++){\n\t\t\tfor(int p = 5; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 11; i< 15 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 7; p > 3; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 1; p < 4; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 12; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 5; i< 9 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 7; p < 12; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 16 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 12; p < 19; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public void create2(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[1][1] = 1;\n\n\t\t//creating stairs to transport to room3\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Stairs[18][18] = 1;\n\n\t\t//creating board to keep track of ari\n\t\tfor(int i = 0; i <this.Ari.length; i++){\n\t\t\tfor(int p = 0; p < this.Ari.length; p++){\n\t\t\t\tthis.Ari[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Ari[7][11] = 1;//putts ari there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 3; i< 4 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "private void prepareBoard(){\n gameBoard.arrangeShips();\n }", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "public void create() {\n\t\t// setup Chess board\n\t\tthis.removeAll();\n\t\tthis.layout = new GridLayout(this.startupBoardSize, this.startupBoardSize);\n\t\tthis.squares = new SquarePanel[this.startupBoardSize][this.startupBoardSize];\n\t\t\n\t\tsetLayout(layout);\n\t\tsetPreferredSize(new Dimension(600, 600));\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\n\n\t\t//paint the chess board\n\n\t\tfor (int i = 0; i < this.startupBoardSize; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.startupBoardSize; j++) \n\t\t\t{\n\t\t\t\tsquares[i][j] = new SquarePanel(j, i);\n\t\t\t\tsquares[i][j].setPreferredSize(new Dimension(600 / this.startupBoardSize - 5, 600 / this.startupBoardSize - 5));\n\n\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif (((i + j) % 2) == 0) \n\t\t\t\t{\n\t\t\t\t\tsquares[i][j].setBackground(Color.DARK_GRAY);\n\t\t\t\t}\n\t\t\t\tadd(squares[i][j]);\n\t\t\t}\n\t\t}\n\t}", "void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }", "public abstract void createBoard();", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }", "private void initPiles() {\n stockPile = new Pile(Pile.PileType.STOCK, \"Stock\", STOCK_GAP);\n stockPile.setBlurredBackground();\n stockPile.setLayoutX(STOCK_X_POS);\n stockPile.setLayoutY(STOCK_DISC_Y_POS);\n stockPile.setOnMouseClicked(stockReverseCardsHandler);\n getChildren().add(stockPile);\n // getChildren().add(undo);\n\n discardPile = new Pile(Pile.PileType.DISCARD, \"Discard\", DISCARD_GAP);\n discardPile.setBlurredBackground();\n discardPile.setLayoutX(DISCARD_X_POS);\n discardPile.setLayoutY(STOCK_DISC_Y_POS);\n getChildren().add(discardPile);\n\n for (int i = 0; i < 4; i++) {\n Pile foundationPile = new Pile(Pile.PileType.FOUNDATION, \"Foundation \" + i, FOUNDATION_GAP);\n foundationPile.setBlurredBackground();\n foundationPile.setLayoutX(610 + i * 180);\n foundationPile.setLayoutY(20);\n foundationPiles.add(foundationPile);\n getChildren().add(foundationPile);\n }\n for (int i = 0; i < 7; i++) {\n Pile tableauPile = new Pile(Pile.PileType.TABLEAU, \"Tableau \" + i, TABLEAU_GAP);\n tableauPile.setBlurredBackground();\n tableauPile.setLayoutX(95 + i * 180);\n tableauPile.setLayoutY(275);\n tableauPiles.add(tableauPile);\n getChildren().add(tableauPile);\n }\n }", "public void makeShips()\n\t{\n\t\t//The below is firstly to create the five ships \n\t\tint[] shipSizes= {2,3,3,4,5};\n\n\t\t//### Creating battleship to be put in the playerBattleShipsList\n\t\tfor (int x = 0; x < shipSizes.length; x ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newPlayerBattleShip = new BattleShip(shipSizes[x]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\tplayerBattleShipsList[x] = newPlayerBattleShip;\n\t\t}\n\n\t\t//### Creating battleship to be put in the aiBattleShipsList\n\n\t\tfor (int y = 0; y < shipSizes.length; y ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newAIBattleShip = new BattleShip(shipSizes[y]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\taiBattleShipsList[y] = newAIBattleShip;\n\t\t}\n\n\t}", "public static void newGame(){\n\t\tsetUp.buildBoard(8,8);\n\t\tfor(int i = 0; i < boardBoundsRow * boardBoundsColumn; i++){\n\t\t\tJPanel selectedTile = (JPanel) userInterface.boardButtons.getComponent(i);\n\t\t\tselectedTile.removeAll();\n\t\t\tselectedTile.revalidate();\n\t\t}\n\t\tuserInterface.addBlackPiece();\n\t\tuserInterface.addWhitePiece();\n\t\tuserInterface.check.setText(\"You are not in check\");\n\t\tking.blackKingCheck = false;\n\t\tking.whiteKingCheck = false;\n\t\tturn = \"white\";\n\t\tString playerTurn = \"Player turn: \";\n\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\tundoMoveClass.clearStacks();\n\t}", "public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}", "private void generateBoard(){\n\t}", "public void arrangeBoard(){\n for(int i=0;i<6;i++){\n for(int j=0;j<6;j++){\n if(i==2 && j==0){ //set the target ship.\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n targetShip = new JLabel();\n targetShip.setIcon(new ImageIcon(\"design\\\\ships\\\\targetShip.png\"));\n mainPanel.add(targetShip,gbc);\n }\n else if(i==2 && j==1){\n continue;\n }\n else{ //put free spaces in the other places.\n gbc.gridx = j;\n gbc.gridy = i;\n gbc.gridwidth = 1;\n gbc.gridheight = 1;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(j,i));\n mainPanel.add(freeSpace,gbc);\n }\n }\n }\n }", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void startNewGame(){\n if (selectedPiece!=null)\n selectedPiece.setBackground(getDefaultColor(selectedPiece));\n selectedPiece = null;\n setAllToDefaultColor();\n setDefulatMessage();\n board = new ChessBoard(1, false);\n for(int row = 0 ; row < ROWS; row++){\n for(int col = 0; col < COLS ; col++){\n setButtonIcon(row,col);\n }\n }\n }", "private void createShips() {\n //context,size, headLocation, bodyLocations\n Point point;\n Ship scout_One, scout_Two, cruiser, carrier, motherShip;\n if(player) {\n point = new Point(maxN - 1, 0); //row, cell\n scout_One = new Ship(1, point, maxN, \"Scout One\", player);\n ships.add(scout_One);\n point = new Point(maxN - 1, 1);\n scout_Two = new Ship(1, point, maxN, \"Scout Two\", player);\n ships.add(scout_Two);\n point = new Point(maxN - 2, 2);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n ships.add(cruiser);\n point = new Point(maxN - 2, 3);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n ships.add(carrier);\n point = new Point(maxN - 4, 5);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n ships.add(motherShip);\n\n }else{\n Random rand = new Random();\n int rowM = maxN-3;\n int colM = maxN -2;\n int row = rand.nextInt(rowM);\n int col = rand.nextInt(colM);\n point = new Point(row, col);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n updateOccupiedCells(motherShip.getBodyLocationPoints());\n ships.add(motherShip);\n\n rowM = maxN - 1;\n colM = maxN -1;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n updateOccupiedCells(carrier.getBodyLocationPoints());\n ships.add(carrier);\n checkIfOccupiedForSetShip(carrier, row, col, rowM, colM);\n\n\n rowM = maxN - 1;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n updateOccupiedCells(cruiser.getBodyLocationPoints());\n ships.add(cruiser);\n checkIfOccupiedForSetShip(cruiser, row, col, rowM, colM);\n\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_Two = new Ship(1, point, maxN, \"Scout_Two\", player);\n updateOccupiedCells(scout_Two.getBodyLocationPoints());\n ships.add(scout_Two);\n checkIfOccupiedForSetShip(scout_Two, row, col, rowM, colM);\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_One = new Ship(1, point, maxN, \"Scout_One\", player);\n updateOccupiedCells(scout_One.getBodyLocationPoints());\n ships.add(scout_One);\n checkIfOccupiedForSetShip(scout_One, row, col, rowM, colM);\n\n\n\n\n }\n //Need an algorithm to set enemy ship locations at random without overlaps\n }", "public void start() {\n clear();\n // Assigning chess pieces to players.\n whitePieces.add(new Piece(Owner.WHITE, Who.KING, Rank.R1, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.QUEEN, Rank.R1, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.H));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.H));\n\n for (Piece p : whitePieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n blackPieces.add(new Piece(Owner.BLACK, Who.KING, Rank.R8, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.QUEEN, Rank.R8, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.H));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.H));\n\n for (Piece p : blackPieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n whoseTurn = Owner.WHITE;\n canCastle = 15;\n passer = null;\n movesDone = lastEatMove = 0;\n }", "public void initChessBoardAutomaticly() {\r\n\t\tthis.initPieces();\r\n\t\tthis.clearBoard();\r\n\t\tfor (int i=0; i<board.size(); i++) {\r\n\t\t\tChessBoardBlock b = board.get(order[i]);\r\n\t\t\tb.setBorderPainted(false);\r\n\t\t}\r\n\t\tfor (int i = 0, w = 0, b = 0, s = 0; i < 8 * 8; i++) {\r\n\r\n\t\t\t// Assign1, Disable board clickable\r\n\t\t\tChessBoardBlock block = board.get(order[i]);\r\n\t\t\tblock.setEnabled(false);\r\n\r\n\t\t\t// Assign1, Put black pieces and record the position\r\n\t\t\tif (i % 2 != 1 && i >= 8 && i < 16) {\r\n\t\t\t\tChessPiece blackPiece = blackPieces[b];\r\n\t\t\t\tblackPiece.position = order[i];\r\n\t\t\t\tpiece.put(order[i], blackPiece);\r\n\t\t\t\tbody.add(blackPiece);\r\n\t\t\t\tb++;\r\n\t\t\t} else if (i % 2 != 0 && (i < 8 || (i > 16 && i < 24))) {\r\n\t\t\t\tChessPiece blackPiece = blackPieces[b];\r\n\t\t\t\tblackPiece.position = order[i];\r\n\r\n\t\t\t\tpiece.put(order[i], blackPiece);\r\n\t\t\t\tbody.add(blackPiece);\r\n\t\t\t\tb++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Assign1, Put white pieces and record the position\r\n\t\t\telse if (i % 2 != 0 && i > 48 && i < 56) {\r\n\t\t\t\tChessPiece whitePiece = whitePieces[w];\r\n\t\t\t\twhitePiece.position = order[i];\r\n\t\t\t\tpiece.put(order[i], whitePiece);\r\n\t\t\t\tbody.add(whitePiece);\r\n\t\t\t\tw++;\r\n\t\t\t} else if (i % 2 != 1\r\n\t\t\t\t\t&& ((i >= 40 && i < 48) || (i >= 56 && i < 64))) {\r\n\t\t\t\tChessPiece whitePiece = whitePieces[w];\r\n\t\t\t\twhitePiece.position = order[i];\r\n\t\t\t\t\r\n\t\t\t\tpiece.put(order[i], whitePiece);\r\n\t\t\t\tbody.add(whitePiece);\r\n\t\t\t\tw++;\r\n\t\t\t}\r\n\r\n\t\t\t// Assign1, Put empty pieces on the board\r\n\t\t\t// Actually, empty pieces will not display on the board, they are\r\n\t\t\t// not existing\r\n\t\t\t// to chess players, just for calculation\r\n\t\t\telse {\r\n\t\t\t\tChessPiece spacePiece = spacePieces[s];\r\n\t\t\t\tspacePiece.position = order[i];\r\n\t\t\t\tbody.add(spacePiece);\r\n\t\t\t\tpiece.put(order[i], spacePiece);\r\n\t\t\t\tspacePiece.setVisible(false);\r\n\t\t\t\ts++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tt.setText(\"Chess Board has been initialized automatically\");\r\n\t\tthis.startGame();\r\n\t}", "public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }", "public static void blankBoard() {\r\n\t\tfor (int i = 0; i < Spaces.length; i++) {\r\n\t\t\tSpaces[i] = new Piece();\r\n\t\t}\r\n\t}", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "private final void setupNewGame() throws IOException {\n\t\tmessage.setText(\"Make your move!\");\n\n\t\twhiteTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\t\tblackTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\n\t\tcreateImages();\n\n\t\tint middleSquare = BOARD_SIZE/2;\n\n\t\tint i=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][0];\n\t\t\tImageIcon icon = new ImageIcon(whiteImages.get(i++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tint j=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][BOARD_SIZE-1];\n\t\t\tImageIcon icon = new ImageIcon(blackImages.get(j++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tframe.pack();\n\t\t//\t\tfor (int ii = 0; ii < BOARD_SIZE; ii++) {\n\t\t//\t\t\tfor (int jj = 0; jj < BOARD_SIZE; jj++) {\n\t\t//\t\t\t\tchessBoardSquares[ii][jj].setIcon(new ImageIcon(whiteImages.get(0)));\n\t\t//\t\t\t}\n\t\t//\t\t}\n\t\t//\t\t// set up the black pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][0].setIcon(new ImageIcon(chessPieceImages[BLACK][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][1].setIcon(new ImageIcon(chessPieceImages[BLACK][PAWN]));\n\t\t//\t\t}\n\t\t//\t\t// set up the white pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][6].setIcon(new ImageIcon(chessPieceImages[WHITE][PAWN]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][7].setIcon(new ImageIcon(chessPieceImages[WHITE][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t}", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "public XOBoard() {\n\t\t// initialise the boards\n\t\tboard = new int[4][4];\n\t\trenders = new XOPiece[4][4];\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tboard[i][j] = EMPTY;\n\t\t\t\trenders[i][j] = null;\n\t\t\t}\n\t\tcurrent_player = XPIECE;\n\n\t\t// initialise the rectangle and lines\n\t\tback = new Rectangle();\n\t\tback.setFill(Color.GREEN);\n\t\th1 = new Line();\n\t\th2 = new Line();\n\t\th3 = new Line();\n\t\tv1 = new Line();\n\t\tv2 = new Line();\n\t\tv3 = new Line();\n\t\th1.setStroke(Color.WHITE);\n\t\th2.setStroke(Color.WHITE);\n\t\th3.setStroke(Color.WHITE);\n\t\tv1.setStroke(Color.WHITE);\n\t\tv2.setStroke(Color.WHITE);\n\t\tv3.setStroke(Color.WHITE);\n\n\t\t// the horizontal lines only need the endx value modified the rest of //\n\t\t// the values can be zero\n\t\th1.setStartX(0);\n\t\th1.setStartY(0);\n\t\th1.setEndY(0);\n\t\th2.setStartX(0);\n\t\th2.setStartY(0);\n\t\th2.setEndY(0);\n\t\th3.setStartX(0);\n\t\th3.setStartY(0);\n\t\th3.setEndY(0);\n\n\t\t// the vertical lines only need the endy value modified the rest of the\n\t\t// values can be zero\n\t\tv1.setStartX(0);\n\t\tv1.setStartY(0);\n\t\tv1.setEndX(0);\n\t\tv2.setStartX(0);\n\t\tv2.setStartY(0);\n\t\tv2.setEndX(0);\n\t\tv3.setStartX(0);\n\t\tv3.setStartY(0);\n\t\tv3.setEndX(0);\n\n\t\t// setup the translation of one cell height and two cell heights\n\t\tch_one = new Translate(0, 0);\n\t\tch_two = new Translate(0, 0);\n\t\tch_three = new Translate(0, 0);\n\t\th1.getTransforms().add(ch_one);\n\t\th2.getTransforms().add(ch_two);\n\t\th3.getTransforms().add(ch_three);\n\n\t\t// setup the translation of one cell width and two cell widths\n\t\tcw_one = new Translate(0, 0);\n\t\tcw_two = new Translate(0, 0);\n\t\tcw_three = new Translate(0, 0);\n\t\tv1.getTransforms().add(cw_one);\n\t\tv2.getTransforms().add(cw_two);\n\t\tv3.getTransforms().add(cw_three);\n\n\t\t// add the rectangles and lines to this group\n\t\tgetChildren().addAll(back, h1, h2, h3, v1, v2, v3);\n\n\t}", "private void placeAllShips()\n {\n \t\n \t//place 2 aircrafts\n \tfor(int n = 0; n < 2; n++){\n \trandomRow = rnd.nextInt(10); //get random integer from 0-9\n \trandomCol = rnd.nextInt(10);//get random integer from 0-9\n \trandomDir = rnd.nextInt(2);//get random integer from 0-1\n \twhile(!checkOverlap(randomRow,randomCol,AIRCRAFT_CARRIER_LENGTH)){ //check if random integers overlap existing ones\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \t//place aircraft if no overlap\n \tfor(int i = randomRow; i <randomRow + AIRCRAFT_CARRIER_LENGTH ; i++){\n \t\tfor(int j = randomCol; j < randomCol + AIRCRAFT_CARRIER_LENGTH; ++j){\n \t\t\tif(randomDir == DIRECTION_RIGHT)\n \t\t\t\tgrid[i][randomCol] = SHIP;\n \t\t\tif(randomDir == DIRECTION_DOWN)\n \t\t\t\tgrid[randomRow][j] = SHIP;\n \t\t\t}\n \t\t}\n \t}\n \t\n \t\n \t//place battleship\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,BATTLESHIP_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i <randomRow + BATTLESHIP_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + BATTLESHIP_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\t\n \t//place destroyer\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,DESTROYER_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + DESTROYER_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + DESTROYER_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\t\n \t//place submarine\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,SUBMARINE_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + SUBMARINE_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + SUBMARINE_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\n \t//place patrol\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,PATROL_BOAT_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + PATROL_BOAT_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + PATROL_BOAT_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\n }", "private void shopSwitchToMainMenu() {\n potionNum = 1;\n defenseNum = 1;\n pause();\n Pane canvas = new Pane();\n Stage stage = new Stage();\n stage.setTitle(\"Shopping Store\");\n Label winLabel = new Label(\"Shopping Castle!\");\n ShopItem[] buyItems = new ShopItem[8];\n ShopItem[] sellItems = new ShopItem[8];\n for (int i = 0; i < 8; i++) {\n int gold = world.getCharacter().getGold().get();\n ShopItem item = ShoppingItem(i, gold, true);\n Button newButton = new Button(\"Buy\" + item.getName() + \" \" + item.getPrice());\n newButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n buyItem(item);\n }\n });\n if (gold < item.getPrice()) {\n newButton.disableProperty().set(true);\n }\n newButton.relocate(30 + i * 100, 80);\n canvas.getChildren().addAll(newButton);\n\n buyItems[i] = item;\n buyItems[i].setButton(newButton);\n }\n\n for (int i = 0; i < 8; i++) {\n int gold = world.getCharacter().getGold().get();\n ShopItem item = ShoppingItem(i, gold, false);\n Button newButton = new Button(\"Sell\" + item.getName() + \" \" + item.getPrice());\n\n if (!world.ifHasItem(item.getName())) {\n newButton.disableProperty().set(true);\n }\n\n newButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n sellItem(item);\n }\n });\n\n newButton.relocate(30 + i * 100, 150);\n canvas.getChildren().addAll(newButton);\n\n sellItems[i] = item;\n sellItems[i].setButton(newButton);\n }\n Button tempButton;\n for (int i = 0; i < 8; i++) {\n tempButton = buyItems[i].getButton();\n tempButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n updateButtonState(buyItems, sellItems);\n }\n });\n tempButton = sellItems[i].getButton();\n tempButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n updateButtonState(buyItems, sellItems);\n }\n });\n }\n\n Button returnGameButton = new Button(\"Back to Game Menu\");\n returnGameButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n stage.close();\n startTimer();\n }\n });\n canvas.setPrefSize(1000, 400);\n winLabel.relocate(123, 30);\n returnGameButton.relocate(80, 200);\n canvas.getChildren().addAll(winLabel, returnGameButton);\n stage.setScene(new Scene(canvas, 1000, 400));\n stage.sizeToScene();\n stage.show();\n }", "public void deployComputerShips() {\r\n\r\n\t\ttry {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tint carrierX = rand.nextInt(9);\r\n\t\t\tint carrierY = rand.nextInt(11);\r\n\r\n\t\t\tHashMap<Integer, Integer> Carrier = new HashMap<>();\r\n\t\t\tBoolean placed = false;\r\n\r\n\t\t\twhile (!placed) {\r\n\t\t\t\tif (check(carrierX, carrierY, \"horizontal\", 5)) {\r\n\t\t\t\t\tif ((carrierY + 5) <= 11) {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\t\t\t\t\tCarrier.put((carrierY + i), carrierX);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\t\t\t\t\tCarrier.put((carrierY - i), carrierX);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplaced = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcarrierX = rand.nextInt(9);\r\n\t\t\t\t\tcarrierY = rand.nextInt(11);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : Carrier.entrySet()) {\r\n\t\t\t\trandomGrid[entry.getValue()][entry.getKey()] = 1;\r\n\t\t\t}\r\n\r\n\t\t\tint battleShipX = rand.nextInt(9);\r\n\t\t\tint battleShipY = rand.nextInt(11);\r\n\r\n\t\t\tHashMap<Integer, Integer> BattleShip = new HashMap<>();\r\n\r\n\t\t\tplaced = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\tif (check(battleShipX, battleShipY, \"vertical\", 4)) {\r\n\t\t\t\t\tif ((battleShipX + 4) < 9) {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\t\t\t\t\tBattleShip.put((battleShipX + i), battleShipY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\t\t\t\t\tBattleShip.put((battleShipX - i), battleShipY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplaced = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbattleShipX = rand.nextInt(9);\r\n\t\t\t\t\tbattleShipY = rand.nextInt(11);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : BattleShip.entrySet()) {\r\n\r\n\t\t\t\trandomGrid[entry.getKey()][entry.getValue()] = 1;\r\n\t\t\r\n\t\t\t}\r\n\r\n\t\t\tint cruiserX = rand.nextInt(9);\r\n\t\t\tint cruiserY = rand.nextInt(11);\r\n\r\n\t\t\tHashMap<Integer, Integer> Cruiser = new HashMap<>();\r\n\t\t\tplaced = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\tif (check(cruiserX, cruiserY, \"vertical\", 3)) {\r\n\t\t\t\t\tif ((cruiserX + 3) < 9) {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\t\t\t\tCruiser.put((cruiserX + i), cruiserY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\t\t\t\tCruiser.put((cruiserX - i), cruiserY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplaced = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcruiserX = rand.nextInt(9);\r\n\t\t\t\t\tcruiserY = rand.nextInt(11);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : Cruiser.entrySet()) {\r\n\r\n\t\t\t\trandomGrid[entry.getKey()][entry.getValue()] = 1;\r\n\t\t\r\n\t\t\t}\r\n\r\n\t\t\tint subX = rand.nextInt(9);\r\n\t\t\tint subY = rand.nextInt(11);\r\n\t\t\tHashMap<Integer, Integer> Submarine = new HashMap<>();\r\n\r\n\t\t\tplaced = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\tif (check(subX, subY, \"vertical\", 3)) {\r\n\t\t\t\t\tif ((subX + 3) < 9) {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\t\t\t\tSubmarine.put((subX + i), subY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\t\t\t\tSubmarine.put((subX - i), subY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplaced = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsubX = rand.nextInt(9);\r\n\t\t\t\t\tsubY = rand.nextInt(11);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : Submarine.entrySet()) {\r\n\r\n\t\t\t\trandomGrid[entry.getKey()][entry.getValue()] = 1;\r\n\t\t\r\n\t\t\t}\r\n\r\n\t\t\tint destroyerX = rand.nextInt(9);\r\n\t\t\tint destroyerY = rand.nextInt(11);\r\n\r\n\t\t\tHashMap<Integer, Integer> Destroyer = new HashMap<>();\r\n\r\n\t\t\tplaced = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\tif (check(destroyerX, destroyerY, \"horizontal\", 2)) {\r\n\t\t\t\t\tif ((destroyerY + 2) < 11) {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\t\t\t\tDestroyer.put((destroyerY + i), destroyerX);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\t\t\t\tDestroyer.put((destroyerY - i), destroyerX);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplaced = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdestroyerX = rand.nextInt(9);\r\n\t\t\t\t\tdestroyerY = rand.nextInt(11);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : Destroyer.entrySet()) {\r\n\r\n\t\t\t\trandomGrid[entry.getValue()][entry.getKey()] = 1;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t}", "public void play() {\n Player playerOne = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.one\"), null));\n Player currentPlayer = playerOne;\n ShipsGameBoard playerOneGameBoard = new ShipsGameBoard(playerOne, playerOneFleet);\n ShipsGameBoard playerOneCheckBoard = new ShipsGameBoard(playerOne, playerOneFleetToCheck);\n playerOneCheckBoard.setup();\n\n TreeMap<Character, Integer> lettersAndDigits = lettersAndDigits(playerOneGameBoard.getLength());\n ShipCreator threeMastShipCreatorPlayerOne = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerOne,\n ShipGameBoardMark.THREE_MASTS,\n playerOneGameBoard,\n playerOneShipsGameLogic);\n\n playerOneGameBoard.print();\n shipsDeployment(playerOneGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerOne,\n playerOneShipsGameLogic,\n playerOneFleet,\n NUMBER_OF_SHIPS);\n\n// playerOneShipsGameLogic.clearConsole();\n\n Player playerTwo = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.two\"), playerOne.getName()));\n ShipsGameBoard playerTwoGameBoard = new ShipsGameBoard(playerTwo, playerTwoFleet);\n ShipsGameBoard playerTwoCheckBoard = new ShipsGameBoard(playerTwo, playerTwoFleetToCheck);\n playerTwoCheckBoard.setup();\n\n ShipCreator threeMastShipCreatorPlayerTwo = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerTwo,\n ShipGameBoardMark.THREE_MASTS,\n playerTwoGameBoard,\n playerTwoShipsGameLogic);\n\n playerTwoGameBoard.print();\n shipsDeployment(playerTwoGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerTwo,\n playerTwoShipsGameLogic,\n playerTwoFleet,\n NUMBER_OF_SHIPS);\n\n\n boolean isAWinner = false;\n do {\n int userRow;\n int userCol;\n// playerOneGameBoard.clearConsole();\n showCurrentPlayerBoards(playerOne, currentPlayer, playerOneGameBoard, playerTwoGameBoard, playerOneCheckBoard,\n playerTwoCheckBoard, shipsGameText);\n System.out.println(shipsGameText.getMessage(\"show.witch.player.move\", currentPlayer.getName()));\n\n System.out.println(shipsGameText.getMessage(\"show.input.row\", Integer.toString(playerOneGameBoard.getLength())));\n userRow = getPlayerRowChoice(scanner, validator, playerOneGameBoard.getLength());\n\n System.out.println(shipsGameText.getMessage(\"show.input.col\",\n Character.toString(playerOneGameBoard.generateLastLetterOfColumn('A', playerOneGameBoard.getLength()))));\n userCol = convertLetterToDigit(lettersAndDigits, getPlayerColChoice(scanner, validator,\n lettersAndDigits));\n\n if (currentPlayer.equals(playerOne)) {\n if (playerTwoShipsGameLogic.checkForHit(userRow, userCol)) {\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerOneCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n playerTwoGameBoard.print();\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.MISS);\n }\n\n// if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n// playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n// playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n// System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n// System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n// playerOneCheckBoard.print();\n// System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n// playerTwoGameBoard.print();\n// }\n\n\n if (playerTwoShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerOne.getName()));\n isAWinner = true;\n }\n\n } else {\n if (playerOneShipsGameLogic.checkForHit(userRow, userCol)) {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerOneShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerOneShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerOne);\n playerTwoShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerOneFleet, playerTwo);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerTwoCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerOne.getName()));\n playerOneGameBoard.print();\n }\n else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne,\n ShipGameBoardMark.MISS);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n }\n if (playerOneShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerTwo.getName()));\n isAWinner = true;\n }\n }\n\n currentPlayer = swapPlayers(playerOne, currentPlayer, playerTwo);\n }\n while (!isAWinner);\n }", "public void newGame() {\n\n\n inGame = true;\n mines_left = mines+ePirate+mPirate+hPirate;\n\n all_cells = rows * cols;\n field = new int[all_cells];\n\n for (int i = 0; i < all_cells; i++)\n field[i] = COVER_FOR_CELL;\n\n statusbar.setText(Integer.toString(mines_left));\n\n // draw the board -- pass to the undo array\n drawBoard(mines) ; // now rocks\n drawBoard(ePirate) ;\n drawBoard(mPirate) ;\n drawBoard(hPirate) ;\n\n }", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}", "public static void setUpGameComp() {\r\n for (int i = 0; i < fleet.length; i++) {\r\n int random = (int)(Math.random() * 10);\r\n \r\n if (random < 5) {\r\n placeShipHorzRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n else {\r\n placeShipVertRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n }\r\n \r\n System.out.print(\" Computer is finished!\");\r\n //displayBoard(gameBoardComp);\r\n \r\n }", "MainBoard createMainBoard();", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public void define(){\n\n noOfCredits = Game.level.getCredits();\n unitsToWin = Game.level.getUnitsToWin();\n\n for (int i = 0; i <buttons.length ; i++) {\n buttons[i] = new ShopButton((Game.width/2) -\n ((noOfButtons*buttonsize)/2) -((smallSpace*\n (buttons.length-1)) /2) + ((buttonsize + smallSpace)*i),\n ((GameContainer.rowCount * GameContainer.squareSize )\n + largeSpace), buttonsize , buttonsize, i);\n }\n\n for (int i = 0; i < statsElements.length ; i++) {\n //define where the statselement should be placed.\n statsElements[i] = new ShopButton(((Game.width/2)\n - (GameContainer.columnCount*\n GameContainer.squareSize )/2 + (((GameContainer.columnCount\n *GameContainer.squareSize)/7)*3)*i ),\n (GameContainer.rowCount * GameContainer.squareSize\n ), buttonsize , buttonsize, i);\n }\n }", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "@Override\n public void mouseReleased(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(updateYourBoardHelper(xx, yy));\n //potential problem here during initialization of ships?\n \n }", "public Piece[][] createStandardChessboard(Player whitePlayer, Player blackPlayer) {\t\t\r\n\t\tPiece[][] start_board = {\r\n\t\t\t\t{new Rook(0,0,blackPlayer), new Knight(1,0,blackPlayer), new Bishop(2,0,blackPlayer), new Queen(3,0,blackPlayer),new King(4,0,blackPlayer), new Bishop(5,0,blackPlayer), new Knight(6,0,blackPlayer), new Rook(7,0,blackPlayer)},\r\n\t\t\t\t{new Pawn(0,1,blackPlayer), new Pawn(1,1,blackPlayer), new Pawn(2,1,blackPlayer), new Pawn(3,1,blackPlayer),new Pawn(4,1,blackPlayer), new Pawn(5,1,blackPlayer), new Pawn(6,1,blackPlayer), new Pawn(7,1,blackPlayer)},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{new Pawn(0,6,whitePlayer), new Pawn(1,6,whitePlayer), new Pawn(2,6,whitePlayer), new Pawn(3,6,whitePlayer),new Pawn(4,6,whitePlayer), new Pawn(5,6,whitePlayer), new Pawn(6,6,whitePlayer), new Pawn(7,6,whitePlayer)},\r\n\t\t\t\t{new Rook(0,7,whitePlayer), new Knight(1,7,whitePlayer), new Bishop(2,7,whitePlayer), new Queen(3,7,whitePlayer),new King(4,7,whitePlayer), new Bishop(5,7,whitePlayer), new Knight(6,7,whitePlayer), new Rook(7,7,whitePlayer)}\r\n\t\t};\r\n\t\treturn start_board;\r\n\t}", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "public ERSBoard(int numPlayers)\n {\n board = new ArrayList<Card>();\n slapOrder = new ArrayList<Integer>();\n players = new ArrayList<Player>();\n starters = new ArrayList<Deck>();\n deck = new Deck(RANKS, SUITS);\n deck.shuffle();\n for (int x = 0; x < numPlayers; x++) {\n starters.add(new Deck());\n }\n int divisions = 52/numPlayers;\n int leftovers = 52 % numPlayers;\n int place = 0;\n for (int x = 0; x < starters.size(); x++) {\n for (int y = place; y < place + divisions; y++) {\n starters.get(x).addCard(deck.deal());\n }\n }\n for (int x = 0; x < numPlayers; x++) {\n players.add(new Player(starters.get(x),x+1));\n }\n \n\n }", "private void createShopMenu() {\n Player player = gameInstance.getEntityManager().getOrCreatePlayer();\n\n Table table = new Table();\n table.top();\n table.setFillParent(true);\n\n //WELCOME MESSAGE\n Label welcome = new Label(\"Welcome to the \"+department.getName()+\" Department!\",\n StyleManager.generateLabelStyle(50, Color.GOLD));\n\n //REPAIR BUTTON\n //label to display if player's boat has full health\n Label noRepair = new Label(\"Your ship does not need repair!\", StyleManager.generateLabelStyle(30, Color.BLACK));\n\n //button updated regularly in render\n repair = new TextButton(\"\", StyleManager.generateTBStyle(40, Color.BLACK, Color.GRAY));\n repair.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent ev, float x, float y) {\n if(player.getBalance()>=getHealCost()) {\n //has enough gold\n player.deductBalance(getHealCost());\n player.setHealth(player.getMaxHealth());\n }\n }\n });\n\n //UPDATE BUTTON\n //label to display if allied college not defeat (crew member not unlocked)\n Label noUpgrade = new Label(\"You have not unlocked this crew member!\", StyleManager.generateLabelStyle(40, Color.BLACK));\n\n //Maximum level label\n Label maxUpgrade = new Label(\"This crew member is at it's maximum level!\", StyleManager.generateLabelStyle(40, Color.BLACK));\n\n\n //button updated regularly in render\n CrewMember crewMember = department.getCrewMember();\n upgrade = new TextButton(\"\",\n StyleManager.generateTBStyle(30, Color.BLACK, Color.GRAY));\n upgrade.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent ev, float x, float y) {\n if((player.getBalance()>=crewMember.getUpgradeCost())\n && crewMember.canUpgrade()) {\n //has enough gold and not maximum level\n player.deductBalance(crewMember.getUpgradeCost());\n crewMember.upgrade();\n }\n }\n });\n\n //EXIT BUTTON\n TextButton exit = new TextButton(\"Exit!\", StyleManager.generateTBStyle(25, Color.RED, Color.GRAY));\n exit.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent ev, float x, float y) {\n gameInstance.fadeSwitchScreen(gameInstance.getSailScreen());\n }\n });\n\n //POPULATE TABLE\n table.add(welcome).padTop(Value.percentHeight(0.35f, table)).expandX();\n table.row();\n if(player.getHealth().equals(player.getMaxHealth())) {\n table.add(noRepair).padTop(Value.percentHeight(0.05f, table)).expandX();\n } else {\n table.add(repair).padTop(Value.percentHeight(0.05f, table)).expandX();\n }\n table.row();\n if(player.getCrewMembers().contains(crewMember)) {\n //has unlocked crew member\n if(crewMember.canUpgrade()) {\n table.add(upgrade).padTop(Value.percentHeight(0.02f, table)).expandX();\n } else {\n table.add(maxUpgrade).padTop(Value.percentHeight(0.02f, table)).expandX();\n }\n } else {\n table.add(noUpgrade).padTop(Value.percentHeight(0.02f, table)).expandX();\n }\n table.row();\n table.add(exit).padTop(Value.percentHeight(0.05f, table)).expandX();\n\n getStage().addActor(table);\n }", "public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}", "private Parent createGame() {\n\n nextScene.setDisable(true); //disable the button. prevent user from switching scenes\n\n //set the computer pieces using random coordinates generator\n int loop = 0; //index. Increment only if setting the piece was successful\n while(loop != 4) {\n try { //check if it goes out of bounds\n int CX = ((int) (Math.random() * (10)) - 0); //random from 0 to 9\n int CY = ((int) (Math.random() * (10)) - 0); //random from 0 to 9\n int rand = ((int) (Math.random() * (5)) - 0); //random from 0 to 5\n String CDIR = direc[rand]; //add random direction\n if (CDIR == \"VERTICAL\") { //if vertical\n arr1[loop].setDirection(\"VERTICAL\"); //sets direction vertical\n\n } else if (CDIR == \"HORIZONTAL\") { //if horizontal\n arr1[loop].setDirection(\"HORIZONTAL\"); //sets direction to horizontal\n }\n if (computerBoard.setPiece(CX, CY, arr1[loop].getDirection(), arr1[loop])) { //sets the piece on board\n loop++; //if successful increment\n }\n }\n catch(IndexOutOfBoundsException err1) { //catch if out of index\n continue; //continue --> try different coordinates until setting piece is successful\n }\n }\n\n BorderPane game = new BorderPane(); //create new BorderPane root\n game.setPrefSize(1200, 900); //set resolution\n\n Label user = new Label(\"User\"); //user label\n Label computer = new Label(\"Computer\"); //computer label\n\n VBox vert1 = vertNum(); //get vertical grid label\n VBox vert2 = vertNum();\n\n HBox hor1 = horNum(); //get horizontal grid label\n HBox hor2 = horNum();\n\n Label row = new Label(\"Row\"); //Row\n Label column = new Label(\"Column\"); //Column\n Button submit = new Button(\"Submit\"); //Submit coordinates\n Text Miss = new Text(); //text used to print if user missed\n Text isWin = new Text(); //text used to print if user/computer won\n\n TextField rows = new TextField(); //rows input\n TextField columns = new TextField(); //columns input\n\n HBox hbox1 = new HBox(500, user, computer); //put user and computer label in HBox\n\n //add number labels with the board grid\n HBox hbox3 = new HBox(40, vert1, humanBoard);\n HBox hbox4 = new HBox(40, vert2, computerBoard);\n\n //put them in VBox\n VBox human = new VBox(40, hor1, hbox3);\n VBox comp = new VBox(40, hor2, hbox4);\n\n //then put then in HBox side by side\n HBox sidebyside = new HBox(100, human, comp);\n\n //center align all grids present\n hbox1.setAlignment(Pos.CENTER);\n hor1.setAlignment(Pos.CENTER);\n hor2.setAlignment(Pos.CENTER);\n human.setAlignment(Pos.CENTER);\n comp.setAlignment(Pos.CENTER);\n sidebyside.setAlignment(Pos.CENTER);\n\n //put all input together\n HBox input1 = new HBox(10, row, rows);\n HBox input2 = new HBox(10, column, columns);\n HBox input = new HBox(50, input1, input2, submit);\n\n //event handle for submit button\n submit.setOnAction(e -> {\n int turn = 1; //turns between computer and player. 1 = player 0 = computer.\n if(humanBoard.getAddPiece() != 0 && turn == 1) { //if user didn't lose all his pieces, game keeps going.\n try { //catch non-numeric input\n try { //catch out of bounds input\n int y, x, attack; //x > rows, y > cols, attack > return value. 1 > hit, 2 > already guess, 3 > missed, 0 > program failure\n y = Integer.parseInt(rows.getText()); //convert text into int\n x = Integer.parseInt(columns.getText());\n attack = humanBoard.attack(x, y, computerBoard); //perform the attack\n if (attack == 3) { //missed\n Miss.setText(\"Miss!\");\n turn = 0;\n } else if (attack == 1) { //hit\n Miss.setText(\"Hit!\");\n turn = 0;\n } else if (attack == 2) {\n Miss.setText((\"Already Guess!\")); //already guessed\n turn = 1; //user still plays if already guessed\n } else if (attack == 0) {\n System.exit(-1); //exit with status -1\n }\n } catch (IndexOutOfBoundsException err) { //catch and print message\n Miss.setText(\"Invalid Location\");\n }\n } catch (NumberFormatException e1) { //catch and print message\n Miss.setText(\"Invalid Location\");\n }\n }\n\n if(computerBoard.getAddPiece() != 0 && turn == 0) { //same process for computer as human, except input is random generated\n turn = 1; //Computer only attacks when successful, therefore turn = 1.\n int attack = 0, choose = 0;\n if(DIFFICULTY == 2) {\n do {\n try {\n if (TCX == -1) { //if temporary is empty, normal attack\n CXG = ((int) (Math.random() * (10)) - 0); //random number between 0 and 9\n CYG = ((int) (Math.random() * (10)) - 0);\n attack = computerBoard.attack(CYG, CXG, humanBoard); //computer attack\n\n } else { //else, add 1 to temporary to up, down, right or left. Randomly selected\n choose = 0;\n if (((CXG + 1) <= 9)) {//down\n if (!(humanBoard.getPosition(CYG, CXG + 1).isGuess())) {\n System.out.println(\"Down\");\n positionArrayList.add(humanBoard.getPosition(CYG, CXG + 1));\n choose = 1;\n } else if (!(humanBoard.getPosition(CYG, CXG + 1).getHitOrMiss()) || (humanBoard.getPosition(CYG, CXG + 1).getHitOrMiss())) {\n choose = 1;\n } else {\n TCX = -1;\n TCY = -1;\n }\n } else {\n choose = 1;\n }\n if (((CXG - 1) > -1) && choose == 1) {//up\n if (!(humanBoard.getPosition(CYG, CXG - 1).isGuess())) {\n System.out.println(\"Up\");\n positionArrayList.add(humanBoard.getPosition(CYG, CXG - 1));\n choose = 2;\n } else if (!(humanBoard.getPosition(CYG, CXG - 1).getHitOrMiss()) || (humanBoard.getPosition(CYG, CXG - 1).getHitOrMiss())) {\n choose = 2;\n } else {\n TCX = -1;\n TCY = -1;\n }\n } else {\n choose = 2;\n }\n if (((CYG + 1) <= 9) && choose == 2) {//right\n if (!(humanBoard.getPosition(CYG + 1, CXG).isGuess())) {\n System.out.println(\"Right\");\n positionArrayList.add(humanBoard.getPosition(CYG + 1, CXG));\n choose = 3;\n } else if (!(humanBoard.getPosition(CYG + 1, CXG).getHitOrMiss()) || (humanBoard.getPosition(CYG + 1, CXG).getHitOrMiss())) {\n choose = 3;\n } else {\n TCX = -1;\n TCY = -1;\n }\n } else {\n choose = 3;\n }\n if (((CYG - 1) > -1) && choose == 3) {//left\n if (!(humanBoard.getPosition(CYG - 1, CXG).isGuess())) {\n System.out.println(\"Left\");\n positionArrayList.add(humanBoard.getPosition(CYG - 1, CXG));\n } else if (!(humanBoard.getPosition(CYG - 1, CXG).getHitOrMiss()) || (humanBoard.getPosition(CYG - 1, CXG).getHitOrMiss())) {\n choose = 4;\n } else {\n TCX = -1;\n TCY = -1;\n }\n }\n if (positionArrayList.size() == 0) {\n TCX = -1;\n TCY = -1;\n } else {\n int index = rand.nextInt(positionArrayList.size());\n System.out.println(index);\n for (int i = 0; i < positionArrayList.size(); i++) {\n System.out.println(positionArrayList.get(i));\n }\n if (((CXG + 1) <= 9)) {//down\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG, CXG + 1)) {\n System.out.println(\"down\");\n CXG = TCX + 1;\n CYG = TCY;\n }\n }\n if (((CXG - 1) > -1)) {\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG, CXG - 1)) {\n System.out.println(\"up\");\n CXG = TCX - 1;\n CYG = TCY;\n }\n }\n if (((CYG + 1) <= 9)) {\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG + 1, CXG)) {\n System.out.println(\"right\");\n CXG = TCX;\n CYG = TCY + 1;\n }\n }\n if (((CYG - 1) > -1)) {\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG - 1, CXG)) {\n System.out.println(\"left\");\n CXG = TCX;\n CYG = TCY - 1;\n }\n }\n positionArrayList.removeAll(positionArrayList);\n }\n if (TCY != -1) {\n attack = computerBoard.attack(CYG, CXG, humanBoard); //attack\n } else {\n attack = 2;\n }\n\n }\n } catch (IndexOutOfBoundsException err1) { //catch index out of bounds, do nothing\n TCY = -1;\n TCX = -1;\n continue;\n }\n } while (attack == 2); //since computer can't guess already guessed grid, computer keeps choosing until either hitting or missing\n\n if (attack == 1) { //if hit, memorize x and y\n TCX = CXG;\n TCY = CYG;\n } else {\n TCX = -1;\n TCY = -1;\n }\n }\n else if(DIFFICULTY == 1){\n\n do {\n try {\n CXG = ((int) (Math.random() * (10)) - 0); //random number between 0 and 9\n CYG = ((int) (Math.random() * (10)) - 0);\n attack = computerBoard.attack(CYG, CXG, humanBoard); //computer attack\n }catch(IndexOutOfBoundsException err1){\n attack = 2;\n }\n } while (attack == 2);\n\n }\n if(humanBoard.getAddPiece() == 0) {\n isWin.setText(\"Computer is the winner!\"); //print winner message\n nextScene.setText(\"Play Again!\"); //change text to Play Again. Refer to line 471\n rows.setDisable(true);\n columns.setDisable(true);\n nextScene.setDisable(false); //enable button\n submit.setDisable(true); //disable button\n }\n\n\n }\n else if(turn != 1) { //if user choose all the correct, human wins\n isWin.setText(\"Human is the winner!\");\n nextScene.setText(\"Play Again!\");\n rows.setDisable(true);\n columns.setDisable(true);\n nextScene.setDisable(false);\n submit.setDisable(true);\n }\n\n\n });\n\n //center align input\n input1.setAlignment(Pos.CENTER);\n input2.setAlignment(Pos.CENTER);\n input.setAlignment(Pos.CENTER);\n\n //add buttons in HBox\n HBox buttons = new HBox(40, nextScene, exit);\n\n //center align buttons\n buttons.setAlignment(Pos.CENTER);\n\n //set background color to light blue\n game.setStyle(\"-fx-background-color: #B5D3E7\");\n\n //add everything in VBox and center align them\n VBox vbox = new VBox(30,hbox1, sidebyside, input, isWin, buttons, Miss);\n vbox.setAlignment(Pos.CENTER);\n game.setCenter(vbox); //center align the VBox in root\n return game; //return root\n\n\n }", "public void creationSable(){\n\t\tfor(int x=2;x<=this.taille-3;x++) {\n\t\tfor(int y=2;y<=this.taille-3;y++) {\n\t\tif( grille.get(x).get(y).getTypeOccupation()==0 &&\n\t\t\t\tgrille.get(x+2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y-2).getTypeOccupation()!=3 ) {\n\t\t\t\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0]=x;\n\t\t\tcoord[1]=y;\n\t\t\tSable sable = new Sable(coord);\n\t\t\tgrille.get(x).set(y, sable);\n\t\t}\n\t\t}\n\t\t}\n\t}", "private void copyToBoard(FallingPiece piece) {\r\n \ttablero.reverse();\r\n \tfor (BlockDrawable block : piece.allBlocks()){\r\n \t\tBlockDrawable aux = new BlockDrawable(piece.toOuterPoint(block.getPoint()), block.getStyle(), false, block.getTextureRegion()); \r\n\t\t\ttablero.add(aux);\r\n\t\t}\r\n \ttablero.reverse();\r\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "private void addItems() {\n int random3 = 0;\n for (int i = 0; i < MAP_LENGTH; i++) {\n for (int j = 0; j < MAP_LENGTH; j++) {\n random3 = (int)(Math.round(Math.random()*9));\n if (tileMap[i][j].getTerrain() instanceof Grass) {\n if (adjacentCity(i, j) && tileMap[i][j].getCity() == null) { //Only have an item if possibly within city borders\n if (random3 == 0) {\n tileMap[i][j].setResource(new Fruit(i,j)); //Rep Fruit\n } else if (random3 == 1) {\n tileMap[i][j].setResource(new Animal(i,j)); //Rep Animal\n } else if (random3 == 2) {\n tileMap[i][j].setResource(new Forest(i,j)); //Rep Trees (forest)\n } else if (random3 == 3) {\n tileMap[i][j].setResource(new Crop(i,j)); //Rep Crop\n }\n }\n } else {\n if (adjacentCity(i, j)) {\n if (random3 < 2) {\n tileMap[i][j].setResource(new Fish(i, j)); //Rep fish\n } else if (random3 == 4) {\n if (Math.random() < 0.5) {\n tileMap[i][j].setResource(new Whale(i, j)); //Rep whale\n }\n }\n }\n }\n }\n }\n }", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public void updateBoard() {\r\n\t\tfor(int i = 0, k = 0; i < board.getWidth(); i+=3) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j+=3) {\r\n\t\t\t\t//Check that there are pieces to display\r\n\t\t\t\tif(k < bag.size()) {\r\n\t\t\t\t\tboard.setTile(bag.get(k), i, j);\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tboard.fillSpace(GridSquare.Type.EMPTY, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}", "public void addPieces() {\r\n\t\tboard[0] = 8;\r\n\t\tboard[1] = 1;\r\n\t\tboard[2] = 6;\r\n\t\tboard[3] = 3;\r\n\t\tboard[4] = 5;\r\n\t\tboard[5] = 7;\r\n\t\tboard[6] = 4;\r\n\t\tboard[7] = 9;\r\n\t\tboard[8] = 2;\r\n\t}", "public void create() {\n\n\t\tthis.data = new Object[lb.getBoardLen()+3][3];\n\t\tdata[0][0] = \"RANK\";\n\t\tdata[0][1] = \"PLAYER\";\n\t\tdata[0][2] = \"POINTS\";\n\t\t\n\t\tfor (int i = 1; i <= lb.getBoardLen(); i++) {\n\t\t\tdata[i][0] = \"#\" + Integer.toString(i);\n\t\t\tdata[i][1] = lb.getUserPointsList().get(i-1).username;\n\t\t\tdata[i][2] = Integer.toString(lb.getUserPointsList().get(i-1).points);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif (Sfunctions.sUserPull(user.getUsername(), user.getPassword()).getWeek() == -1) {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"THE SEASON HAS ENDED.\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"THANKS FOR PLAYING!\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\telse {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\n\tJTable table = new JTable(data, headers);\n\ttable.setBackground(new Color(104, 0, 0));\n\ttable.setForeground(Color.WHITE);\n\ttable.setFont(textFont);\n\ttable.setShowGrid(false);\n\ttable.setEnabled(false);\n\n\t//Depending on where the ME is\n\tme_row = getRowByValue(table, user.getUsername());\n\ttable.setRowSelectionInterval(me_row, me_row);\n\t\n\t\n\n\t\n\tTableColumn column = null;\n\tfor (int i = 0; i < 3; i++) {\n\t column = table.getColumnModel().getColumn(i);\n\t if (i == 0) {\n\t \t\tcolumn.setPreferredWidth(60);\n\t }\n\t if (i == 1) {\n\t column.setPreferredWidth(210); //third column is bigger\n\t } else {\n\t \t\tcolumn.setPreferredWidth(80);\n\t }\n\t}\n\n\t\n\tthis.add(table);\n\tthis.setBackground(new Color(104, 0, 0));\n\t}", "@Override\n\tpublic void nextTurn()\n\t{\n\t\tif (isInventoryFull())\n\t\t{\n\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\"[THE INVENTORY OF \" + myWorker.getId()\n\t\t\t\t\t\t\t+ \" IS FULL AND IS GONNA UNLOAD]\");\n\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\tBuilding unloadBuilding = null;\n\t\t\tif (getMyPlayer().getStockpiles().size() > 0)\n\t\t\t{\n\t\t\t\tRandom random = new Random(100);\n\t\t\t\tint chosenStockpile = random.nextInt(getMyPlayer()\n\t\t\t\t\t\t.getStockpiles().size());\n\n\t\t\t\tunloadBuilding = getMyPlayer().getStockpiles().get(\n\t\t\t\t\t\tchosenStockpile);\n\t\t\t} else if (getMyPlayer().getMainBuildings().size() > 0)\n\t\t\t{\n\t\t\t\tunloadBuilding = getMyPlayer().getMainBuildings().get(0);\n\t\t\t}\n\n\t\t\tif (doIMoveToBuilding(unloadBuilding))\n\t\t\t{\n\t\t\t\tMoveAction move;\n\t\t\t\tPoint dest = getMoveDestination(unloadBuilding);\n\t\t\t\tif (dest != null)\n\t\t\t\t{\n\t\t\t\t\tmove = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\t\tmove.doAction();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADDED \"\n\t\t\t\t\t\t\t\t+ myWorker.getLoadInInventory()\n\t\t\t\t\t\t\t\t+ \" TO RESOURCES]\");\n\t\t\t\tif (destBuilding instanceof Farm)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getFoodInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof StoneMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getStoneInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof GoldMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getGoldInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof WoodCamp)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getLumberInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\tmyWorker.setOccupationType(OccupationType.IDLE);\n\t\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\t\tmyWorker.setLoadInInventory(0);\n\t\t\t\tmyWorker.setActionController(null);\n\t\t\t}\n\t\t} else if (doIMoveToBuilding(destBuilding))\n\t\t{\n\t\t\tPoint dest = getMoveDestination(destBuilding);\n\t\t\tif (dest == null)\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"BuildController class:nextTurn(): dest is null! do something!!!!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tMoveAction move = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\tmove.doAction();\n\t\t\t}\n\t\t} else if (!isInventoryFull())\n\t\t{\n\t\t\tdestBuilding.getWorkersInside().add(myWorker);\n\t\t\tint collectResourcePerTurn = 0;\n\t\t\tif (destBuilding instanceof Farm)\n\t\t\t{\n\t\t\t\tmyWorker.setFoodCollectingExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getFood();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getFoodProductionRate()));\n\t\t\t} else if (destBuilding instanceof GoldMine)\n\t\t\t{\n\t\t\t\tmyWorker.setGoldMiningExperience(myWorker\n\t\t\t\t\t\t.getGoldMiningExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getGold();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getGoldMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getGoldProductionRate()));\n\t\t\t} else if (destBuilding instanceof StoneMine)\n\t\t\t{\n\t\t\t\tmyWorker.setStoneMiningExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getStone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getStoneMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getStoneProductionRate()));\n\n\t\t\t} else if (destBuilding instanceof WoodCamp)\n\t\t\t{\n\t\t\t\tmyWorker.setWoodCampExperience(myWorker.getWoodCampExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()]\n\t\t\t\t\t\t\t\t.getLumber();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getWoodCampExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getWoodProductionRate()));\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADD \"\n\t\t\t\t\t\t\t\t+ collectResourcePerTurn\n\t\t\t\t\t\t\t\t+ \" OF RESOURCE THIS TURN]\");\n\t\t\t}\n\n\t\t\tmyWorker.setLoadInInventory(collectResourcePerTurn\n\t\t\t\t\t+ myWorker.getLoadInInventory());\n\t\t}\n\t}", "public void establishShop(String owner, String establisher, String establisherName, Integer x, Integer y, Integer z, World world, ItemStack item, Float buy, Float sell){\n\t\tString displayName = item.getItemMeta().getDisplayName();\n\t\tString material = item.getType().toString();\n\t\tString enchantments = enchantmentsToString(item);\n\t\tString data = item.getData().toString();\n\t\t//Insert in to database\n\t\tString query = \"INSERT INTO shops (shopowner, shopestablisher, x, y, z, world, itemname, itemmaterial, itemenchantments, buy, sell, data) VALUES ('\"+\n\t\t\t\towner+\"', '\"+\n\t\t\t\testablisher+\"', '\"+\n\t\t\t\tx+\"', '\"+\n\t\t\t\ty+\"', '\"+\n\t\t\t\tz+\"', '\"+\n\t\t\t\tworld + \"', '\"+\n\t\t\t\tdisplayName+\"', '\"+\n\t\t\t\tmaterial+\"', '\"+\n\t\t\t\tenchantments+\"', '\"+\n\t\t\t\tbuy+\"', '\"+\n\t\t\t\tsell+\"', '\"+\n\t\t\t\tdata+\"' \"+\n\t\t\t\t\");\";\n\t\tdebugOut(\"Performing Query:\");\n\t\tdebugOut(query);\n\t\ttry {\n\t\t\tPreparedStatement sql = connection.prepareStatement(query);\n\t\t\tsql.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tPlayerMakingShop.remove(establisherName);\n\t\tdebugOut(establisherName+\" is finished making a shop\");\n\t\t\n\t}", "public void PlaceRandomBoard(){\r\n\r\n\t\tString whichShip;\r\n\t\tString coordinate;\r\n\t\t\r\n\t\t\t// Display the random board and the random board menu \r\n\t\t// DISPLAY BOARDS!!!!!\r\n\t\tint whichInput=0;\r\n\t\tShip temp = new Ship();\r\n\t\tRandom generator = new Random();\r\n\t\tint randomIndex = generator.nextInt();\r\n\t\twhile (!this.myBoard.carrier.placed || !this.myBoard.battleship.placed\r\n\t\t\t\t|| !this.myBoard.cruiser.placed || !this.myBoard.submarine.placed\r\n\t\t\t\t|| !this.myBoard.patrolboat.placed) {\r\n\r\n\t\t\twhichInput++;\r\n\r\n\t\t\twhichShip = String.valueOf(whichInput);\r\n\t\t\t\r\n\t\t\tint direction=0;\r\n\r\n\t\t\tboolean placed = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\trandomIndex = generator.nextInt(10);\r\n\t\t\t\tcoordinate = this.indexToLetter(randomIndex);\r\n\t\t\t\tcoordinate += String.valueOf(generator.nextInt(10)+1);\r\n\t\t\t\tdirection = generator.nextInt(4) + 1;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tswitch (Integer.parseInt(whichShip)) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttemp = new Carrier();\r\n\t\t\t\t\ttemp.name=\"Carrier\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\ttemp = new Battleship();\r\n\t\t\t\t\ttemp.name=\"Battleship\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\ttemp = new Cruiser();\r\n\t\t\t\t\ttemp.name=\"Cruiser\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\ttemp = new Submarine();\r\n\t\t\t\t\ttemp.name=\"Submarine\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\ttemp = new PatrolBoat();\r\n\t\t\t\t\ttemp.name=\"Patrol Boat\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\tplaced = this.validateShipPlacement(temp, coordinate, direction);\r\n\r\n\t\t\t\tif (placed) {\r\n\t//\t\t\t\tSystem.out.println(\"Success\");\r\n\t\t\t\t\tthis.placeShip(temp, coordinate, direction);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t//\t\t\t\tdisplay.scroll(\"Invalid coordinate, please enter another\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void atBattleStartPreDraw() {\n\n this.flash();\n ArrayList<Integer> orbs = new ArrayList();\n orbs.add(1);\n orbs.add(2);\n orbs.add(3);\n orbs.add(4);\n\n for (int i = 0; i < 2; i++) {\n\n Integer o = orbs.get(AbstractDungeon.cardRng.random(orbs.size() - 1));\n\n switch (o) {\n case 1:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new AttackSlime(), false, true));\n break;\n case 2:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new ShieldSlime(), false, true));\n break;\n case 3:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new SlimingSlime(), false, true));\n break;\n case 4:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new PoisonSlime(), false, true));\n break;\n }\n }\n\n com.megacrit.cardcrawl.dungeons.AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.defect.IncreaseMaxOrbAction(1));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PotencyPower(AbstractDungeon.player, AbstractDungeon.player, 1), 1));\n\n\n }", "public void newgame() {\n\t\tthis.player = 1;\n\t\t\n\n\t\tSystem.out.println(\"made a pice\");\n\t\tthis.piece = new String [9] [9];\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tfor (int j= 0; j<8; j++) {\n\t\t\tpiece[i] [j] = \" \";\n\t\t\t}\n\t\t}\n\t\tint p = 0;\n\t\tfor (int i=0; i<=2 ;i++) {\n\t\t\tfor (int j= 0; j<8; j++) {\t\t\t\t\n\t\t\tif (p%2==1) {\n\t\t\t\tpiece[i][j]= \"1\";\n\t\t\t\tpiece[i+5][j+1] = \"2\";\n\t\t\t\tj +=1;}\n\t\t\telse {\n\t\t\t\tpiece[i][j+1]= \"1\";\n\t\t\t\tpiece[i+5][j] = \"2\";\n\t\t\t\tj +=1;\n\t\t\t\t}\n\t\t\t}p +=1;\n\t\t}\n\t\t\n\t}", "public void fillTable() {\n\t\tif (scroll.getWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean showedNew = false;\n\t\tArrayList<Placeable> currentView = new ArrayList<Placeable>();\n\t\tif (viewing == ViewingMode.MATERIAL) {\n\t\t\tif (loadedMats == null)\n\t\t\t\tloadedMats = repo.getAllMats();\n\t\t\tfor (NamedMaterial m: loadedMats) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t}\n\t\telse if (viewing == ViewingMode.PIECE){\n\t\t\tif (loadedPieces == null)\n\t\t\t\tloadedPieces = repo.getAllPieces();\n\t\t\tfor (Piece m: loadedPieces) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t\tshowedNew = true;\n\t\t}\n\t\t\n\t\ttiles.clearChildren();\n\t\tfloat cellWidth = 64.0f;\n\t\tint numAcross = (int)(scroll.getWidth() / cellWidth);\n\t\tif (numAcross <= 0) {\n\t\t\tnumAcross = 1;\n\t\t}\n\t\tint count = 0;\n\t\tActor tile;\n\t\twhile (count < currentView.size()) {\n\t\t\tfor (int y = 0; y < numAcross; y++) {\n\t\t\t\tif (!showedNew) {\n\t\t\t\t\ttile = new Label(\"New\", TextureOrganizer.getSkin());\n\t\t\t\t\t((Label)tile).setAlignment(Align.center);\n\t\t\t\t\ttile.addListener(new ClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t public void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\tmakeNew();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tshowedNew = true;\n\t\t\t\t}\n\t\t\t\telse if (count >= currentView.size()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttile = new ColoredRectActor(currentView.get(count++));\n\t\t\t\t\ttile.addListener(new TileListener((ColoredRectActor)tile));\n\t\t\t\t}\n\t\t\t\ttiles.add(tile).width(cellWidth).height(cellWidth).fill();\n\t\t\t}\n\t\t\tif (count < currentView.size())\n\t\t\t\ttiles.row();\n\t\t}\n\t}", "public abstract void buildMoveData(ChessBoard board);", "private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }", "@FXML\r\n public void makeSale(ActionEvent event) throws Exception {\r\n // TODO:\r\n // K, here's what needs to happen to beautify this:\r\n // ShipBar needs to extend javafx.scene.control.Toggle,\r\n // and then we can use ToggleGroup.getSelectedToggle()\r\n // rather than this shit\r\n Map<String, ShipType> ships = Data.SHIPS.get();\r\n for (ShipBar bar : buyShips.getItems()) {\r\n if (bar.isSelected()) {\r\n ShipType ship = ships.get(bar.getKey());\r\n int playerCash = player.getMoney();\r\n int price = ship.getPrice() - currentShip.getNetWorth();\r\n if (!(playerCash < price)) {\r\n // TODO: use a dedicated class to facilitate ship upgrades\r\n // the same way Transaction is used for goods\r\n Ship newShip = new Ship(ship);\r\n player.setShip(newShip);\r\n player.setMoney(playerCash - price);\r\n // update labels\r\n fillLabels();\r\n // rebuild ships list (?)\r\n currentShip = player.getShip();\r\n buildShipsList();\r\n }\r\n /*else {\r\n // TODO: warning: not enough money\r\n\r\n }*/\r\n // TODO: don't use a for loop here (see above)\r\n break;\r\n }\r\n }\r\n }", "Board createLayout();", "protected void putItems() {\n\t\tlevelSetup[0][5].putItem(new Dynamite());\n\t\tlevelSetup[6][6].putItem(new Flint());\n\t\tlevelSetup[6][3].putItem(new ManaPotion());\n\t\tlevelSetup[5][0].putItem(new ManaPotion());\n\t\tlevelSetup[2][1].putItem(new HealthPotion());\n\t\tlevelSetup[3][6].putItem(new HealthPotion());\n\t\tlevelSetup[4][2].putItem(new Spinach());\n\t}", "public void doNewGame() {\n setGameInProgress(false);\n console(\"New Game\");\n if (gameInProgress() == true) {\n // This should not be possible, but it doens't hurt to check.\n console(\"Finish the current game first!\");\n return;\n }\n\n boardData.setUpGame(); // Set up the pieces.\n currentPlayer = CheckersData.RED; // RED moves first.\n legalMoves = boardData.getLegalMoves(CheckersData.RED); // Get RED's legal moves.\n selectedRow = -1; // RED has not yet selected a piece to move.\n console(\"Red: Make your move.\");\n setGameInProgress(true);\n refreshBoard();\n }", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "private Board(Piece[][] initialContents, Side player) {\n assert player != null && initialContents.length == 8;\n Piece p;\n for (int i = 0; i < 8; i++) {\n for(int j = 0; j < 8; j++) {\n p = initialContents[i][j];\n if (p.side() != null) {\n if (p.side() == BLACK) {\n _countBlack += 1;\n } else {\n _countWhite += 1;\n }\n addPiece(j + 1, i + 1);\n }\n _pieces[i][j] = p\n }\n }\n _turn = player;\n }", "protected Board(){\n\t\tpool = 0;\n\t\tsquares = new Square[3][61];\n\t\tcommunityCards = new LinkedList<CommunityCard>();\n\t\tchanceCards = new LinkedList<ChanceCard>();\n\t\tmap = new HashMap<String, Integer>();\n\t\tcompanyArray = new Company[6];\n\t\tcreateBoard();\n\t\tfillHashMap();\t\t\t\n\t\tfillChanceCards();\n\t\tfillCommunityChestCards();\n\t\tfillCompanyArray();\n\t\tshuffleChanceCards();\n\t\tshuffleCommunityCards();\n\t}", "private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }", "@Override\n public void startGame() {\n //create new board instance\n board = new int[NUM_ROWS][NUM_COLS];\n //set all elements to EMPTY\n for (int c = 0; c < NUM_COLS; c++) {\n for (int r = 0; r < NUM_ROWS; r++) {\n board[r][c] = EMPTY;\n }\n }\n //set the turn to red\n turn = RED;\n }", "ArrayList<ArrayList<GamePiece>> makeBoard() {\n ArrayList<ArrayList<GamePiece>> row = new ArrayList<ArrayList<GamePiece>>();\n for (int i = 0; i < this.width; i++) {\n ArrayList<GamePiece> column = new ArrayList<GamePiece>();\n for (int j = 0; j < this.height; j++) {\n GamePiece temp = new GamePiece(i, j);\n column.add(temp);\n nodes.add(temp);\n }\n row.add(column);\n }\n return row;\n }", "public Board(ArrayList<Piece> pieces)\n {\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n firstSelected = null;\n mainBoard=true;\n turn = 0;\n fiftyMove = 0;\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n {\n squares[i][j] = new Square(i,j,this);\n for (Piece p: pieces)\n if (p.getOrigin().equals(new Location(i,j)))\n squares[i][j].setPiece(p);\n add(squares[i][j]);\n }\n positions = new ArrayList<>();\n positions.add(toString());\n }", "public SetBoard(String newName){\n super(\"BattleShip Set\");\n\n //configuracoes basicas da janela\n\t\tsetSize(1100, 550);\n\t\tsetLocationRelativeTo(null);\n\t\tsetResizable(false);\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setContentPane(panel);\n container = getContentPane();\n container.setLayout(null);\n\n //cria a base do board do player e do computador\n gridPlayer.setBounds(3, 100, 497, 325);\n\t\tgridPlayer.setLayout(new GridLayout(10, 10, 2, 2));\n gridPc.setBounds(599, 100, 497, 325);\n\t\tgridPc.setLayout(new GridLayout(10, 10, 2, 2));\n\n //pega o name do player passado por parametro\n player.setName(newName);\n name = newName;\n\n //preenche ambos boards com uma imagem de ocean\n for(int line = 0; line < 10; line++){\n\t\t\tfor(int column = 0; column < 10; column++){\n\t\t\t\ttablePlayer[line][column] = new JButton(line+\"-\"+column, new ImageIcon(RandomBoard.class.getResource(\"/images/ocean.png\")));\n tablePlayer[line][column].setHorizontalTextPosition(SwingConstants.CENTER);\n tablePlayer[line][column].setMargin( new Insets(10, 10, 10, 10) );\n\t\t\t\ttablePlayer[line][column].addActionListener(this);\n tablePlayer[line][column].setForeground(Color.WHITE);\n\t\t\t\tgridPlayer.add(tablePlayer[line][column]);\n tablePc[line][column] = new JButton(line+\"-\"+column, new ImageIcon(RandomBoard.class.getResource(\"/images/ocean.png\")));\n tablePc[line][column].setHorizontalTextPosition(SwingConstants.CENTER);\n tablePc[line][column].setMargin( new Insets(10, 10, 10, 10) );\n\t\t\t\ttablePc[line][column].addActionListener(this);\n tablePc[line][column].setForeground(Color.WHITE);\n\t\t\t\tgridPc.add(tablePc[line][column]);\n\t\t\t}\n\t\t}\n\n //posiciona os elementos na janela\n exit.setBounds(7, 14, 120, 35);\n\t\texit.addActionListener(this);\n\n\t\tnewGame.setBounds(127, 14, 120, 35);\n\t\tnewGame.addActionListener(this);\n\n reset.setBounds(247, 14, 120, 35);\n\t\treset.addActionListener(this);\n\n hint.setBounds(367, 14, 120, 35);\n\t\thint.addActionListener(this);\n\n singleShot.setBounds(487, 14, 120, 35);\n\t\tsingleShot.addActionListener(this);\n\n commonShot.setBounds(607, 14, 120, 35);\n\t\tcommonShot.addActionListener(this);\n\n cascade.setBounds(727, 14, 120, 35);\n\t\tcascade.addActionListener(this);\n\n star.setBounds(847, 14, 120, 35);\n\t\tstar.addActionListener(this);\n\n playerLabel.setFont(new Font(\"Arial\", Font.BOLD, 15));\n\t\tplayerLabel.setBounds(12, 78, 120, 18);\n\n pc.setFont(new Font(\"Arial\", Font.BOLD, 15));\n\t\tpc.setBounds(607, 78, 120, 18);\n\n stopwatch.setFont(new Font(\"Arial\", Font.BOLD, 25));\n\t\tstopwatch.setBounds(1000, 10, 120, 50);\n\n aircraft.setBounds(7, 450, 120, 35);\n\t\taircraft.addActionListener(this);\n aircraft.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/aircraft.png\")));\n \n submarine.setBounds(127, 450, 120, 35);\n\t\tsubmarine.addActionListener(this);\n submarine.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/submarine.png\")));\n\n escortShip.setBounds(247, 450, 120, 35);\n\t\tescortShip.addActionListener(this);\n escortShip.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/escortShip.png\")));\n\n aircraftCarrier.setBounds(367, 450, 120, 35);\n\t\taircraftCarrier.addActionListener(this);\n aircraftCarrier.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/aircraftCarrier.png\")));\n\n play.setBounds(487, 450, 120, 35);\n play.addActionListener(this);\n\n container.add(gridPlayer);\n\t\tcontainer.add(gridPc);\n container.add(exit);\n container.add(newGame);\n container.add(reset);\n container.add(hint);\n container.add(singleShot);\n container.add(commonShot);\n container.add(cascade);\n container.add(star);\n container.add(playerLabel);\n container.add(pc);\n container.add(stopwatch);\n container.add(aircraft);\n container.add(submarine);\n container.add(escortShip);\n container.add(aircraftCarrier);\n container.add(play);\n\n //distribui os vehicles aleatoriamente no board do computador\n distVehPc.distribui(arrayPc, tablePc);\n\n //copia os valuees do arrayPc para outro array, ele sera usado caso o jogo seja reiniciado\n for(int line = 0; line < 10; line++){\n for(int column = 0; column < 10; column++){\n arrayPcAux[line][column] = arrayPc[line][column];\n }\n }\n\n //desabilita a maioria dos botoes, eles serao reativados quando o player montar seu campo e clicar em \"play\"\n hint.setEnabled(false);\n singleShot.setEnabled(false);\n commonShot.setEnabled(false);\n cascade.setEnabled(false);\n star.setEnabled(false);\n play.setEnabled(false);\n newGame.setEnabled(false);\n reset.setEnabled(false);\n }", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "public void createSquares() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n playingBoard[row][col] = new Square();\n }\n }\n }", "private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }", "public Board(String gameName) {\n\n super(gameName);\n \n gameBoard = this;\n squares = new Square[Chess.CHESS][Chess.CHESS];\n moveListener = new MoveListener(this);\n this.setLayout(new GridLayout(Chess.CHESS, Chess.CHESS));\n \n JMenuBar menuBar = new JMenuBar();\n setJMenuBar(menuBar);\n \n // Define and add menu items.\n JMenu fileMenu = new JMenu(\"File\");\n menuBar.add(fileMenu);\n \n // Add the same and load actions.\n JMenuItem saveAction = new JMenuItem(\"Save Game\");\n JMenuItem loadAction = new JMenuItem(\"Load Game\");\n fileMenu.add(saveAction);\n fileMenu.add(loadAction);\n \n initBoard();\n \n initMenu(gameBoard);\n \n setup();\n \n p1 = new Player(Color.RED, true);\n p2 = new Player(Color.BLACK, false);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n this.centre();\n this.setVisible(true); \n }", "public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}", "public Board() {\n\t\tthis.table = new int[Constants.SIZE][Constants.SIZE];\n\t\tthis.P1Movable = new boolean[Constants.SIZE][Constants.SIZE];\n\t\tthis.P2Movable = new boolean[Constants.SIZE][Constants.SIZE];\n\t\tP1turn = true;\n\t\tnumPieces = 0;\n\t\t\n\t\tfor(int i=0; i<table.length; i++) {\n\t\t\tfor(int j=0; j<table[i].length; j++) {\n\t\t\t\ttable[i][j] = Constants.EMPTY;\n\t\t\t\tP1Movable[i][j] = true;\n\t\t\t\tP2Movable[i][j] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public OthelloBoard (int height, int width){\n super(height, width);\n m_Pieces = new OthelloPiece[WIDTH][HEIGHT];\n m_PieceCount+=4;\n \n }", "public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }", "private static void setup(KieSession kSession){\n \t\n \tString[] s = {\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",}; //standard game\n \t//String[] s = {\"x\",\"x\",\"x\",\" \",\" \",\" \",\" \",\" \",\" \",}; //row win\n \t//String[] s = {\"x\",\" \",\" \",\"x\",\" \",\" \",\"x\",\" \",\" \",}; //col win\n \t//String[] s = {\"x\",\" \",\" \",\" \",\"x\",\" \",\" \",\" \",\"x\",}; //angle win\n \t//String[] s = {\"x\",\"x\",\" \",\" \",\"x\",\" \",\" \",\" \",\" \",}; //posible wins row & col 1 % cross 1 to 9\n \t\n \tCell cell1 = new Cell(0,0,s[0],2); kSession.insert(cell1);cellarray[0][0]=cell1;\n \tCell cell2 = new Cell(0,1,s[1],1); kSession.insert(cell2);cellarray[0][1]=cell2;\n \tCell cell3 = new Cell(0,2,s[2],2); kSession.insert(cell3);cellarray[0][2]=cell3;\n \tCell cell4 = new Cell(1,0,s[3],1); kSession.insert(cell4);cellarray[1][0]=cell4;\n \tCell cell5 = new Cell(1,1,s[4],3); kSession.insert(cell5);cellarray[1][1]=cell5;\n \tCell cell6 = new Cell(1,2,s[5],1); kSession.insert(cell6);cellarray[1][2]=cell6;\n \tCell cell7 = new Cell(2,0,s[6],2); kSession.insert(cell7);cellarray[2][0]=cell7;\n \tCell cell8 = new Cell(2,1,s[7],1); kSession.insert(cell8);cellarray[2][1]=cell8;\n \tCell cell9 = new Cell(2,2,s[8],2); kSession.insert(cell9);cellarray[2][2]=cell9;\n \t\n \t//X starts game\n \tContext context = new Context(\"x\"); kSession.insert(context);\n\n }", "public void RunGame(){\r\n \r\n for (int i=0;i<numberoplayers;i++){ \r\n if (Objects.equals(Players.get(i).numofdestroyedships,numberofships))\r\n {\r\n Leave(Players.get(i));\r\n }\r\n if (Players.size()==1){\r\n Stop(Players.get(0));\r\n return ;\r\n }\r\n Square attackmove=Players.get(i).AttackOpponent();\r\n if (attackmove==null){\r\n if (i==1)\r\n i=-1;\r\n continue;\r\n }\r\n //know the player name and the attack point and add it to the list\r\n moves.add(new ToturialClass(Players.get(i).name,attackmove.x,attackmove.y,new Date()));\r\n //to know the targeted player\r\n int temp=i+1;\r\n if (temp==2)\r\n temp=0;\r\n AttackResult result=Players.get(temp).AcceptAttack(attackmove); \r\n Players.get(i).AcceptAttackResult(result);\r\n playerboard.repaintafterupdate();\r\n \r\n if (i==1)\r\n i=-1;\r\n }\r\n }", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public void initBoard() {\n board = new Board();\n\n // initilaisation des groupes\n Group violet = new Group();\n Group bleu = new Group();\n Group orange = new Group();\n Group vert = new Group();\n Group rouge = new Group();\n Group jaune = new Group();\n Group rose = new Group();\n Group marine = new Group();\n Group gare = new Group();\n Group compagnie = new Group();\n\n // ajout des cases\n board.addCaseBoard(new StartCase());\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd Belleville\", 60, 2, 10,30, 90, 160,250, 30,violet, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de caumunauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue lecourbe\", 60, 4,20,60,180,320,450, 30,violet, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Taxes\"));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare Monparnasse\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Vaugirard\", 100, 6,30,90,270,400,550, 50, bleu, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Courcelles\", 100, 6,30,90,270,400,550, 50, bleu, 50));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de la Republique\", 120, 8,40,100,300,450,600, 60, bleu, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Prison\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd de la villette\", 140, 10,50,150,450,625,750, 70, orange, 100));\n board.addCaseBoard(new BuyableCaseImpl(\"Compagnie de distribution d'electricité\",150, 0, 75, compagnie));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Neuilly\", 140, 10,50,150,450,625,750, 70, orange, 100));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Paradis\", 160, 12,60,180,500,700,900, 80, orange, 100));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare de Lyon\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Mozart\", 180, 14,70,200,550,700,900, 90, vert, 100));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd Saint Michel\", 180, 14,70,200,550,700,900, 90, vert, 100));\n board.addCaseBoard(new BuildingCaseImpl(\"Place Pigalle\", 200, 16,80,220,600,800,950, 100, vert, 100));\n board.addCaseBoard(new CaseBoardImpl(\"Park Gratuit\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Matignon\", 220, 18,90,250,700,875,1050, 110, rouge, 150));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd MalesHerbes\", 220, 18,90,250,700,875,1050, 110, rouge, 150));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Henri-Martin\", 240, 20,100,300,750,925,1100, 120, rouge, 150));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare du Nord\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Fb Saint Honoré\", 260, 22,110,330,800,975,1150, 130, jaune, 150));\n board.addCaseBoard(new BuildingCaseImpl(\"Place de la Bourse\", 260, 22,110,330,800,975,1150, 130, jaune, 150));\n board.addCaseBoard(new BuyableCaseImpl(\"Compagnie de distribution des eaux\",150, 0, 75, compagnie));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue lafayette\", 280, 24,120,360,850,1025,1200, 140, jaune, 150));\n board.addCaseBoard(new CaseBoardImpl(\"Aller en Prison\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Breteuil\", 300, 26,130,390,900,1100,1275, 150, rose, 200));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Foch\", 300, 26,130,390,900,1100,1275, 150, rose, 200));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd des Capucines\", 320, 28,150,450,1000,1200,1400, 160, rose, 200));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare Saint-Lazarre\", 200, 2, 100,gare));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av des Champs Elysées\", 350, 35,175,500,1100,1300,1500, 175, marine, 200));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de la Paix\", 400, 50,200,600,1400,1700,2000, 200, marine, 200));\n }", "public SpawnBoardSquareClient(Room room, Coordinates coordinates, InterSquareLink north,\n InterSquareLink south, InterSquareLink east, InterSquareLink west) {\n\n super(room, coordinates, north, south, east, west);\n weaponCards = new ArrayList<>();\n }", "void makePlacement(String placement) {\n\n // Task8 Do not clear the textField in order to place pieces step by step.\n // board.getChildren().clear();\n if (!StepsGame.isPlacementWellFormed(placement)) {\n throw new IllegalArgumentException(\"Hide board incorrect length: \" + placement);\n }\n Rectangle r = new Rectangle(BOARD_X, BOARD_Y, XSIDE*SQUARE_SIZE, YSIDE*SQUARE_SIZE);\n r.setFill(SUBBOARD_FILL);\n r.setStroke(SUBBOARD_STROKE);\n board.getChildren().add(r);\n String alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxy\";\n for (int i = 0; i<50; i++){\n double x = 1.0/3;\n Text t = new Text(BOARD_X + SQUARE_SIZE/3 + (i %XSIDE) * SQUARE_SIZE - 5, BOARD_Y + 2*SQUARE_SIZE/3 +(i / XSIDE) * SQUARE_SIZE + 10, alphabet.substring(i, i+1));\n t.setFont(new Font(20));\n t.setFill(Color.GREY);\n board.getChildren().add(t);\n }\n // Making board and adding the letters.\n\n\n String[] onepiece = placement.split(\"(?<=\\\\G...)\");\n String[] shape = new String[onepiece.length];\n String[] location = new String[onepiece.length];\n char[] loc = new char[onepiece.length];\n int[] lct = new int[onepiece.length];\n for (int i = 0; i<onepiece.length; i++){\n shape[i] = onepiece[i].substring(0, 2);\n location[i] = onepiece[i].substring(2, 3);\n loc[i] = location[i].charAt(0);\n if(loc[i] >= 'A' && loc[i] <= 'Y'){\n lct[i] = (int)loc[i] - 65;\n }else if(loc[i] >= 'a' && loc[i] <= 'y'){\n lct[i] = (int)loc[i] - 72;\n }\n //Split String into 3 letters and NUMBER the positions A-y into 0-49.\n\n\n String tile = shape[i];\n if (tile != \"\")\n board.getChildren().add(new Square(tile, lct[i]-11));\n }\n // Adding shapes\n board.toBack();\n\n // FIXME Task 4: implement the simple placement viewer\n }", "@Override\n\tpublic ItemStack onItemRightClick(ItemStack bucket, World world, EntityPlayer user)\n {\n boolean flag = this.isFull == Blocks.air;\n MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, user, flag);\n\n if (movingobjectposition == null)\n {\n return bucket;\n }\n else\n {\n if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)\n {\n int x = movingobjectposition.blockX;\n int y = movingobjectposition.blockY;\n int z = movingobjectposition.blockZ;\n\n if (!world.canMineBlock(user, x, y, z))\n {\n return bucket;\n }\n\n if (flag)\n {\n if (!user.canPlayerEdit(x, y, z, movingobjectposition.sideHit, bucket))\n {\n return bucket;\n }\n\n Material material = world.getBlock(x, y, z).getMaterial();\n int l = world.getBlockMetadata(x, y, z);\n\n if (material == Material.water && l == 0)\n {\n world.setBlockToAir(x, y, z);\n return this.createNewInstance(bucket, user, ToolListMF.bucketwood_water, 0);\n }\n\n if (material == Material.lava && l == 0)\n {\n \tworld.playSound(x+0.5, y+0.5, z+0.5, \"random.fizz\", 1.0F, 1.0F, true);\n world.spawnParticle(\"largeSmoke\", x+0.5, y+1F, z+0.5, 0F, 0.5F, 0F);\n \treturn this.createNewInstance(bucket, user, Items.coal, 1);\n }\n }\n else\n {\n if (this.isFull == Blocks.air)\n {\n return new ItemStack(ToolListMF.bucketwood_empty);\n }\n\n if (movingobjectposition.sideHit == 0)\n {\n --y;\n }\n\n if (movingobjectposition.sideHit == 1)\n {\n ++y;\n }\n\n if (movingobjectposition.sideHit == 2)\n {\n --z;\n }\n\n if (movingobjectposition.sideHit == 3)\n {\n ++z;\n }\n\n if (movingobjectposition.sideHit == 4)\n {\n --x;\n }\n\n if (movingobjectposition.sideHit == 5)\n {\n ++x;\n }\n\n if (!user.canPlayerEdit(x, y, z, movingobjectposition.sideHit, bucket))\n {\n return bucket;\n }\n\n if (this.tryPlaceContainedLiquid(world, x, y, z) && !user.capabilities.isCreativeMode)\n {\n return new ItemStack(ToolListMF.bucketwood_empty);\n }\n }\n }\n\n return bucket;\n }\n }", "Board (boolean[][] board, List<Piece> pieces) {\n\n this.board = board;\n unusedPieces = new ArrayList<>(pieces);\n List<Piece> possiblePieces = new ArrayList<>(pieces);\n tessellate(possiblePieces.get(0));\n }", "@Override\n\t\t\tpublic void Execute()\n\t\t\t{\n\t\t\tSquare square = (Square) receiver;\n\t\t\t// The args for SpawnBuildingCommand are the X,Y coordinate for the Building used by the factory, \n\t\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\t\tSystem.out.println(\"Spawning Building at (\" + args[0] + \",\" + args[1] + \")\");\n\t\t\tsquare.Add(factory.MakeBuilding());\n\t\t\tGameBoard.Instance().IncrementBuildingCount();\n\t\t}", "@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }", "private void board() {\r\n\t\tfor (int n = 0; n < ROW; n++) {\r\n\t\t\tfor (int m = 0; m < COL; m++) {\r\n\t\t\t\tboard[n][m] = 'X';\r\n\t\t\t}\r\n\t\t}\r\n\t\tturnRemaining = 42;\r\n\t}" ]
[ "0.68469596", "0.6612235", "0.62838125", "0.6146911", "0.609599", "0.6094007", "0.60869217", "0.6067302", "0.60143524", "0.590868", "0.5879469", "0.5856047", "0.5847817", "0.58273417", "0.5810305", "0.58027804", "0.5798951", "0.57750934", "0.5760477", "0.57509273", "0.57414895", "0.56597525", "0.5657524", "0.56447357", "0.5643694", "0.5614154", "0.56013644", "0.55940527", "0.5574749", "0.5569456", "0.5568331", "0.55666727", "0.55611885", "0.55267924", "0.5526519", "0.5520441", "0.551441", "0.5509045", "0.5508128", "0.54846025", "0.54839075", "0.5481162", "0.54800504", "0.5479904", "0.5473522", "0.5463738", "0.5459438", "0.54567105", "0.5454772", "0.54429066", "0.544093", "0.5437032", "0.5425602", "0.54153746", "0.5413158", "0.5398213", "0.53812677", "0.53785473", "0.53783494", "0.53758305", "0.5372928", "0.5352036", "0.53510225", "0.53496295", "0.5336411", "0.53316146", "0.5321825", "0.53157175", "0.53138417", "0.53069156", "0.5305391", "0.5304445", "0.5301738", "0.5297082", "0.5294841", "0.52910674", "0.52824295", "0.5280238", "0.5279014", "0.5264813", "0.52612615", "0.52601457", "0.5253434", "0.52529174", "0.52505726", "0.5243206", "0.524214", "0.5240605", "0.524052", "0.52401346", "0.5237156", "0.5227973", "0.52199966", "0.52153975", "0.5213267", "0.5209628", "0.52084935", "0.5204851", "0.52013665", "0.5200421" ]
0.6484115
2
end of create This method creates the second game board and distributes the items onto it.
public void create2(){ //creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there for(int i = 0; i <this.position.length; i++){ for(int p = 0; p < this.position.length; p++){ this.position[i][p] = 0;//filling with zero } }//end of position making board //creating door in the rooms for(int i = 0; i <this.Door.length; i++){ for(int p = 0; p < this.Door.length; p++){ this.Door[i][p] = 0;//filling with zero } }//end of Door making board this.Door[1][1] = 1; //creating stairs to transport to room3 for(int i = 0; i <this.Stairs.length; i++){ for(int p = 0; p < this.Stairs.length; p++){ this.Stairs[i][p] = 0;//filling with zero } }//end of Door making board this.Stairs[18][18] = 1; //creating board to keep track of ari for(int i = 0; i <this.Ari.length; i++){ for(int p = 0; p < this.Ari.length; p++){ this.Ari[i][p] = 0;//filling with zero } } this.Ari[7][11] = 1;//putts ari there //makes board that tells if item is there for(int i = 0; i <this.Items.length; i++){ for(int p = 0; p < this.Items.length; p++){ this.Items[i][p] = null;//filling with null } }//end of filling board that has items //makes border of room for(int i = 0; i < this.area.length; i++){ for(int p = 0; p<this.area.length; p++){ if(i==0){ this.area[i][p] = "[ ]"; } else if (p==0 || p==19){ this.area[i][p] = "[ ]"; } else if(i==19){ this.area[i][p] = "[ ]"; } else{ this.area[i][p] = " "; } }//end of innner for }//end of outter for for(int i = 3; i< 4 ; i++){ for(int p = 1; p < 18; p++){ this.area[i][p] = "[ ]"; } } for(int i = 6; i< 7 ; i++){ for(int p = 19; p > 1; p--){ this.area[i][p] = "[ ]"; } } for(int i = 9; i< 10 ; i++){ for(int p = 1; p < 18; p++){ this.area[i][p] = "[ ]"; } } for(int i = 12; i< 13 ; i++){ for(int p = 19; p > 1; p--){ this.area[i][p] = "[ ]"; } } for(int i = 15; i< 16 ; i++){ for(int p = 1; p < 18; p++){ this.area[i][p] = "[ ]"; } System.out.println(" "); }//end of for that creates walls //for loop that distributes items int y = 0; int x = 0; for(int i = 0;i<10;i++){ Item thing = ItemGenerator.generate();//making an item boolean good = false; while(!good){//makes coordates until there is nothing in the way y = fate.nextInt(20);//getting coordiantaes x = fate.nextInt(20); if(this.Items[y][x]==null && this.area[y][x] != "[ ]"){ good = true; }//end of if else{ good = false; } }//end of while Items[y][x] = thing; }//end of for that distributes items on board }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create3(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating stairs to connect rooms\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Stairs[1][1] = 1;\n\n\t\t//creating board to keep track of garret\n\t\tfor(int i = 0; i <this.Garret.length; i++){\n\t\t\tfor(int p = 0; p < this.Garret.length; p++){\n\t\t\t\tthis.Garret[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of garret board\n\t\tthis.Garret[18][10] = 1;//putts garret there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 1; i< 6 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 7; p > 4; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 11 ; i++){\n\t\t\tfor(int p = 4; p < 5; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 10; i< 11 ; i++){\n\t\t\tfor(int p = 5; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 11; i< 15 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 7; p > 3; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 1; p < 4; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 12; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 5; i< 9 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 7; p < 12; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 16 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 12; p < 19; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public void create(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\t\tthis.position[1][1] = 1;//putting player in this position\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[9][13] = 1;//puts the door here \n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 7; i< 8 ; i++){\n\t\t\tfor(int p = 2; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 17; i< 18 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\t\n\t\t}\n\t\tfor(int i = 14; i< 15 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\t\n\t\t}\t\n\t\tfor(int i = 11; i< 12 ; i++){\n\t\t\tfor(int p = 10; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 3; p < 6; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 16; i< 17 ; i++){\n\t\t\tfor(int p = 6; p < 13; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 5; p < 10; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\t\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes \n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{ \n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public void makeBoard2d() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board2d[i][j] = this.board[(i * 3) + j];\n }\n }\n }", "public BoardBuilder placePlayer2(){\n\t\tif(!boardInitialized)\n\t\t\tthrow new RuntimeException(\"Board must be initialized before placing players\");\n\t\t\n\t\treturn this;\n\t}", "void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }", "public void create() {\n\t\t// setup Chess board\n\t\tthis.removeAll();\n\t\tthis.layout = new GridLayout(this.startupBoardSize, this.startupBoardSize);\n\t\tthis.squares = new SquarePanel[this.startupBoardSize][this.startupBoardSize];\n\t\t\n\t\tsetLayout(layout);\n\t\tsetPreferredSize(new Dimension(600, 600));\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\n\n\t\t//paint the chess board\n\n\t\tfor (int i = 0; i < this.startupBoardSize; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.startupBoardSize; j++) \n\t\t\t{\n\t\t\t\tsquares[i][j] = new SquarePanel(j, i);\n\t\t\t\tsquares[i][j].setPreferredSize(new Dimension(600 / this.startupBoardSize - 5, 600 / this.startupBoardSize - 5));\n\n\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif (((i + j) % 2) == 0) \n\t\t\t\t{\n\t\t\t\t\tsquares[i][j].setBackground(Color.DARK_GRAY);\n\t\t\t\t}\n\t\t\t\tadd(squares[i][j]);\n\t\t\t}\n\t\t}\n\t}", "MainBoard createMainBoard();", "public void initialiseBoard() {\n\t\tPlayer1Mancala = new MancalaPit(this.player1Name, 0, null);\n\t\tPit player1_Pit6 = new Pit(this.player1Name, 6, 1, Player1Mancala);\n\t\tPit player1_Pit5 = new Pit(this.player1Name, 5, 1, player1_Pit6);\n\t\tPit player1_Pit4 = new Pit(this.player1Name, 4, 1, player1_Pit5);\n\t\tPit player1_Pit3 = new Pit(this.player1Name, 3, 1, player1_Pit4);\n\t\tPit player1_Pit2 = new Pit(this.player1Name, 2, 1, player1_Pit3);\n\t\tPit player1_Pit1 = new Pit(this.player1Name, 1, 1, player1_Pit2);\n\n\t\t// Define Player2 Pits in descending order \n\t\tPlayer2Mancala = new MancalaPit(this.player2Name, 0, null);\n\t\tPit player2_Pit6 = new Pit(this.player2Name, 6, 1, Player2Mancala);\n\t\tPit player2_Pit5 = new Pit(this.player2Name, 5, 1, player2_Pit6);\n\t\tPit player2_Pit4 = new Pit(this.player2Name, 4, 1, player2_Pit5);\n\t\tPit player2_Pit3 = new Pit(this.player2Name, 3, 1, player2_Pit4);\n\t\tPit player2_Pit2 = new Pit(this.player2Name, 2, 1, player2_Pit3);\n\t\tPit player2_Pit1 = new Pit(this.player2Name, 1, 1, player2_Pit2);\n\n\t\t// Complete the board by connecting mancala with player pits\n\t\tPlayer1Mancala.setNextPit(player2_Pit1);\n\t\tPlayer2Mancala.setNextPit(player1_Pit1);\n\n\t\t//Initialize the Player1 board \n\t\tthis.Player1Pits[0] = player1_Pit1;\n\t\tthis.Player1Pits[1] = player1_Pit2;\n\t\tthis.Player1Pits[2] = player1_Pit3;\n\t\tthis.Player1Pits[3] = player1_Pit4;\n\t\tthis.Player1Pits[4] = player1_Pit5;\n\t\tthis.Player1Pits[5] = player1_Pit6;\n\n\t\t// Initialize the Player2 board \n\t\tthis.Player2Pits[0] = player2_Pit1;\n\t\tthis.Player2Pits[1] = player2_Pit2;\n\t\tthis.Player2Pits[2] = player2_Pit3;\n\t\tthis.Player2Pits[3] = player2_Pit4;\n\t\tthis.Player2Pits[4] = player2_Pit5;\n\t\tthis.Player2Pits[5] = player2_Pit6;\n\t}", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "public void initiateBoardSecondaryColors(){\n\t\tremoveAllSeconderyColorsFromBoard();\n\t\tColoredTilesFactory coloredTilesFactory = new ColoredTilesFactory();\n\t\t// add 3 yellow tiles\n\t\tfor(int i=0 ; i<YELLOW_TILES_AMOUNT;i++) {\n\t\t\tTile randTile=null;\n\t\t\tdo {\n\t\t\t\trandTile= getRandomFreeTile();\n\t\t\t}while(coloredTilesList.contains(randTile));\n\t\t\tYellowTile yTile= (YellowTile) coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.YELLOW);\n\t\t\treplaceTileInSameTileLocation(yTile);\n\t\t\tcoloredTilesList.add(yTile);\n\n\t\t}\n\n\n\t\t//add red tiles\n\t\tif(canAddRedTile() && isThereLegalTilesNotColored()){\n\t\t\tArrayList<Tile> possibleRed=getPossibleRedTiles();\n\t\t\tTile randTile=null;\n\t\t\tif(possibleRed.size() > 0) {\n\t\t\t\tRandom rand=new Random();\n\t\t\t\tdo {\n\t\t\t\t\tint tempp = rand.nextInt(possibleRed.size());\n\t\t\t\t\trandTile= possibleRed.get(tempp);\n\t\t\t\t\tpossibleRed.remove(tempp);\n\t\t\t\t}while(coloredTilesList.contains(randTile) && !possibleRed.isEmpty());\n\t\t\t\tTile rTile =coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.RED);\n\t\t\t\treplaceTileInSameTileLocation(rTile);\n\t\t\t\tcoloredTilesList.add(rTile);\n\t\t\t}\n\t\t}\n\n\n\t\t// add blue tiles\n\t\tif(canAddBlueTile()){\n\n\t\t\tTile randTile=null;\n\t\t\tdo {\n\t\t\t\trandTile = getRandomFreeTile();\n\t\t\t}while(coloredTilesList.contains(randTile));\n\t\t\tBlueTile bTile =(BlueTile)coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.BLUE);\n\t\t\treplaceTileInSameTileLocation(bTile);\n\t\t\tcoloredTilesList.add(bTile);\n\t\t}\n\n\t}", "public abstract void createBoard();", "public Board(Player p1, Player p2) {\r\n try {\r\n crownImage = ImageIO.read(new File(\"crown.jpg\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n checks = new int[8][8];\r\n currentPlayer = p2;\r\n nextPlayer = p1;\r\n whiteQueens = 0;\r\n whiteChecks = 12;\r\n blackQueens = 0;\r\n blackChecks = 12;\r\n winner = null;\r\n isGame = true;\r\n window(this);\r\n initializeBoard();\r\n swapPlayer();\r\n repaint();\r\n\r\n }", "private void addToBag2(GridSquare.Type id, GridSquare.Type N, GridSquare.Type E, GridSquare.Type S, GridSquare.Type W) {\r\n\t\tbag2.add(new PieceTile(new GridSquare(id), new GridSquare[] {\r\n\t\t\t\tnew GridSquare(N),\r\n\t\t\t\tnew GridSquare(E),\r\n\t\t\t\tnew GridSquare(S),\r\n\t\t\t\tnew GridSquare(W)\r\n\t\t}));\r\n\t}", "public Board(C4.Canvas gameContext, String player1Colour, String player2Colour) {\r\n game = gameContext;\r\n players = new Player[2];\r\n players[0] = new Player(player1Colour);\r\n players[1] = new Player(player2Colour);\r\n boardArray = new Piece[7][7];\r\n for (int nx = 0; nx < 7; nx++) {\r\n for (int ny = 0; ny < 7; ny++) {\r\n boardArray[nx][ny] = new Piece();\r\n }\r\n }\r\n }", "public Board(String gameType) {\n propertyFactory = new TileFactory(gameType);\n createBoard();\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "private Board(int[][] tiles, Position first, Position second) {\n this.dimension = tiles.length;\n this.tiles = new int[dimension][dimension];\n for (int i = 0; i < dimension; i++)\n System.arraycopy(tiles[i], 0, this.tiles[i], 0, dimension);\n\n int temp = this.tiles[first.i][first.j];\n this.tiles[first.i][first.j] = this.tiles[second.i][second.j];\n this.tiles[second.i][second.j] = temp;\n }", "public Board(String gameName) {\n\n super(gameName);\n \n gameBoard = this;\n squares = new Square[Chess.CHESS][Chess.CHESS];\n moveListener = new MoveListener(this);\n this.setLayout(new GridLayout(Chess.CHESS, Chess.CHESS));\n \n JMenuBar menuBar = new JMenuBar();\n setJMenuBar(menuBar);\n \n // Define and add menu items.\n JMenu fileMenu = new JMenu(\"File\");\n menuBar.add(fileMenu);\n \n // Add the same and load actions.\n JMenuItem saveAction = new JMenuItem(\"Save Game\");\n JMenuItem loadAction = new JMenuItem(\"Load Game\");\n fileMenu.add(saveAction);\n fileMenu.add(loadAction);\n \n initBoard();\n \n initMenu(gameBoard);\n \n setup();\n \n p1 = new Player(Color.RED, true);\n p2 = new Player(Color.BLACK, false);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n this.centre();\n this.setVisible(true); \n }", "private final void setupNewGame() throws IOException {\n\t\tmessage.setText(\"Make your move!\");\n\n\t\twhiteTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\t\tblackTeam = PokemonDao.getRandomPokemons(TEAM_SIZE);\n\n\t\tcreateImages();\n\n\t\tint middleSquare = BOARD_SIZE/2;\n\n\t\tint i=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][0];\n\t\t\tImageIcon icon = new ImageIcon(whiteImages.get(i++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tint j=0;\n\t\tfor(int col = middleSquare - whiteTeam.size()/2; col< middleSquare+ whiteTeam.size()/2;col++){\n\t\t\tJButton jButton = chessBoardSquares[col][BOARD_SIZE-1];\n\t\t\tImageIcon icon = new ImageIcon(blackImages.get(j++));\n\t\t\tjButton.setIcon(icon);\n\t\t}\n\n\t\tframe.pack();\n\t\t//\t\tfor (int ii = 0; ii < BOARD_SIZE; ii++) {\n\t\t//\t\t\tfor (int jj = 0; jj < BOARD_SIZE; jj++) {\n\t\t//\t\t\t\tchessBoardSquares[ii][jj].setIcon(new ImageIcon(whiteImages.get(0)));\n\t\t//\t\t\t}\n\t\t//\t\t}\n\t\t//\t\t// set up the black pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][0].setIcon(new ImageIcon(chessPieceImages[BLACK][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][1].setIcon(new ImageIcon(chessPieceImages[BLACK][PAWN]));\n\t\t//\t\t}\n\t\t//\t\t// set up the white pieces\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][6].setIcon(new ImageIcon(chessPieceImages[WHITE][PAWN]));\n\t\t//\t\t}\n\t\t//\t\tfor (int ii = 0; ii < STARTING_ROW.length; ii++) {\n\t\t//\t\t\tchessBoardSquares[ii][7].setIcon(new ImageIcon(chessPieceImages[WHITE][STARTING_ROW[ii]]));\n\t\t//\t\t}\n\t}", "public BigTwoTable(BigTwoClient game)\n\t{\n\t\tthis.game = game;\n\n\t\tString avatar_src[] = new String[5]; //Array to store avatar locations\n\t\tavatar_src[0] = \"src/avatars/superman_128.png\";\n\t\tavatar_src[1] = \"src/avatars/batman_128.png\";\n\t\tavatar_src[2] = \"src/avatars/flash_128.png\";\n\t\tavatar_src[3] = \"src/avatars/green_lantern_128.png\";\n\t\tavatar_src[4] = \"src/avatars/wonder_woman_128.png\";\n\n\t\tString avatar_selected[] = randomize(avatar_src, 4); //Randomly picks any 4 of the 5 avatars to allot to players.\n\n\t\tavatars = new Image[4];\n\t\tfor (int i = 0; i < 4; i++)\n\t\t{\n\t\t\tavatars[i] = new ImageIcon(avatar_selected[i]).getImage();\n\t\t}\n\n\t\tchar[] suits = { 'd', 'c', 'h', 's'}; //Array to store card suits\n\t\tchar[] ranks = { 'a', '2', '3', '4', '5', '6', '7', '8', '9', 't', 'j', 'q', 'k' }; //Array to store card ranks\n\n\t\tcardImages = new Image[4][13];\n\t\tString loc = new String();\n\t\tcardBackImage = new ImageIcon(\"src/cards/b.gif\").getImage();\n\n\t\tfor (int i = 0; i < 4; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < 13; j++)\n\t\t\t{\n\t\t\t\tloc = \"src/cards/\"+ ranks[j] + suits[i] + \".gif\";\n\t\t\t\tcardImages[i][j] = new ImageIcon(loc).getImage();\n\t\t\t}\n\t\t}\n\n\t\t//Creates main frame\n\t\tframe = new JFrame();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setLayout(new BorderLayout());\n\n\t\t//Menubar\n\t\tJMenuBar menubar = new JMenuBar(); //The menubar item.\n\t\tJMenu menu = new JMenu(\"Game\"); //The menu item.\n\t\tJMenuItem c = new JMenuItem(\"Connect\"); //The menu option Restart.\n\t\tJMenuItem q = new JMenuItem(\"Quit\"); //The menu option Quit.\n\t\tc.addActionListener(new ConnectMenuItemListener());\n\t\tq.addActionListener(new QuitMenuItemListener());\n\t\tmenu.add(c);\n\t\tmenu.add(q);\n\t\tJMenu msgMenu = new JMenu(\"Message\");\n\t\tJMenuItem clr = new JMenuItem(\"Clear\");\n\t\tclr.addActionListener(new ClearMenuItemListener());\n\t\tmsgMenu.add(clr);\n\t\tmenubar.add(menu);\n\t\tmenubar.add(msgMenu);\n\t\tframe.setJMenuBar(menubar);\n\n\t\t//Buttons at the bottom\n\t\tplayButton = new JButton(\"Play\");\n\t\tpassButton = new JButton(\"Pass\");\n\t\tplayButton.addActionListener(new PlayButtonListener());\n\t\tpassButton.addActionListener(new ButtonListener());\n\n\t\tJPanel buttons = new JPanel(); //Bottom Panel for the two buttons.\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tbuttons.add(playButton);\n\t\tbuttons.add(new JSeparator());\n\t\tbuttons.add(passButton);\n\t\tbuttons.setBackground(Color.gray.brighter());\n\n\t\tJPanel chatPanel = new JPanel();\n\t\tchatPanel.setLayout(new BorderLayout());\n\n\t\tJLabel msgLabel = new JLabel(\"Message: \");\n\t\tmsgLabel.setFont(new Font(null, Font.PLAIN, 16));\n\t\ttf = new JTextField(40);\n\t\ttf.addActionListener(new TextFieldListener());\n\t\ttf.setPreferredSize(new Dimension(30, 26));\n\t\ttf.setFont(new Font(null, Font.PLAIN, 16));\n\t\ttf.setFocusable(true);\n\n\t\tJPanel chatMsgArea = new JPanel();\n\t\tchatMsgArea.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tchatMsgArea.add(msgLabel);\n\t\tchatMsgArea.add(tf);\n\t\tchatMsgArea.setBackground(Color.gray.brighter());\n\n\t\tchatPanel.setBackground(Color.gray.brighter());\n\t\tchatPanel.add(buttons, BorderLayout.CENTER);\n\t\tchatPanel.add(chatMsgArea, BorderLayout.EAST);\n\n\t\t//Green Play Area\n\t\tbigTwoPanel = new BigTwoPanel();\n\t\tbigTwoPanel.setLayout(new BoxLayout(bigTwoPanel, BoxLayout.Y_AXIS));\n\n\t\tp0 = new BigTwoPanel();\n\t\tp1 = new BigTwoPanel();\n\t\tp2 = new BigTwoPanel();\n\t\tp3 = new BigTwoPanel();\n\t\tprev_hand = new BigTwoPanel();\n\n\t\tbigTwoPanel.add(p0);\n\t\tbigTwoPanel.add(p1);\n\t\tbigTwoPanel.add(p2);\n\t\tbigTwoPanel.add(p3);\n\t\tbigTwoPanel.add(prev_hand);\n\n\t\tframe.add(BorderLayout.SOUTH, chatPanel);\n\t\tframe.add(bigTwoPanel);\n\n\t\t//Text area displaying gameplay dialogue.\n\t\tJPanel gameTxtArea = new JPanel();\n\t\tgameTxtArea.setLayout(new BoxLayout(gameTxtArea, BoxLayout.Y_AXIS));\n\t\tmsgArea = new JTextArea();\n\t\tmsgArea.setFont(new Font(\"Courier\", Font.PLAIN, 20));\n\t\tmsgArea.setEditable(false);\n\n\t\tDefaultCaret caret = (DefaultCaret) msgArea.getCaret(); //Sets scrollbar to down configuration permanently.\n\t\tcaret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n\t\ttextScroll = new JScrollPane(msgArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\ttextScroll.setPreferredSize(new Dimension(600, 400));\n\t\tchatArea = new JTextArea();\n\t\tchatArea.setFont(new Font(\"Sans Serif\", Font.PLAIN, 20));\n\t\tchatArea.setEditable(false);\n\n\t\tDefaultCaret chatCaret = (DefaultCaret)chatArea.getCaret(); //Setting the scrollbar to always remain down.\n\t\tchatCaret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n\t\tJScrollPane chatScroll = new JScrollPane(chatArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\tchatScroll.setPreferredSize(new Dimension(600, 400));\n\n\t\tgameTxtArea.add(textScroll);\n\t\tgameTxtArea.add(chatScroll);\n\t\tframe.getContentPane().add(BorderLayout.EAST, gameTxtArea);\n\n\t\t//Displays frame at end.\n\t\tframe.setTitle(\"BigTwo\");\n\t\tframe.setSize(1500, 950);\n\t\tframe.setVisible(true);\n\n\t\tblackline = BorderFactory.createLineBorder(Color.black);\n\t\tselected = new boolean[13];\n\t\tthis.reset();\n\t\tthis.setActivePlayer(game.getCurrentIdx());\n\n\t}", "public Parent createContent(){\n Pane root = new Pane();\n root.setPrefSize((dimension * tileSize)+(tileSize*4)+menuWidth, (dimension * tileSize)+(tileSize*4));\n root.getChildren().addAll(tileGroup);\n TopOfBoard top = new TopOfBoard();\n Parent controlsAndMovement = top.newScene();\n root.getChildren().addAll(controlsAndMovement);\n\n // setting main game board template\n for (int i = 0; i< dimension; i++){\n for (int j = 0; j< dimension; j++){\n if (i==0||i== dimension -1||j==0||j== dimension -1){\n if (i==0) {\n if (j==0){\n tileInit(i, j, tileGroup, tileSize * 2, tileSize * 2, j * tileSize, i * tileSize);\n }\n else if (j== dimension -1){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, (j * tileSize)+tileSize, i * tileSize);\n }\n else {\n tileInit(i, j, tileGroup, tileSize*2, tileSize, (j * tileSize)+tileSize, i * tileSize);\n }\n }\n else if (i== dimension -1){\n if (j==0){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, j * tileSize, (i * tileSize)+tileSize);\n }\n else if (j== dimension -1){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, (j * tileSize)+tileSize, (i * tileSize)+tileSize);\n }\n else {\n tileInit(i, j, tileGroup, tileSize * 2, tileSize, (j * tileSize) + tileSize, (i * tileSize) + tileSize);\n }\n }\n else if (j==0){\n tileInit(i, j, tileGroup, tileSize, tileSize*2, j * tileSize, (i * tileSize)+(tileSize));\n\n }\n else if (j== dimension -1) {\n tileInit(i, j, tileGroup, tileSize, tileSize*2, (j * tileSize)+(tileSize), (i * tileSize)+tileSize);\n }\n\n }\n }\n\n // Setting player score board\n for (int q = 1; q <= numOfPlayers; q++){\n if (q == 1){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*3);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*3.5), \"Player 1 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 2){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*5);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*5.5), \"Player 2 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 3){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*7);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*7.5), \"Player 3 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 4){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*9);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*9.5), \"Player 4 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n\n }\n\n for (int r = 1; r <= numOfPlayers; r++) {\n if (r == 1) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(0);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 0.5), \"Player 1 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 2) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 3);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 3.5), \"Player 2 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 3) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 6);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 6.5), \"Player 3 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 4) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 9);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 9.5), \"Player 4 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n\n }\n }\n addImg();\n }\n return root;\n }", "public void initiateTwoPlayers() {\n spaceShips.add(new SpaceShip(250, 700, friendlyBullets, \"spaceship_blue_30x30.png\", \"bullet_blue_20x30.png\", \"heart_blue_13x13.png\", 50, Bullets.BulletType.NORMAL, 0));\n spaceShips.add(new SpaceShip(500, 700, friendlyBullets, \"green_spaceship_30x30.png\", \"bullet_green_20x30.png\", \"heart_green_13x13.png\", 730, Bullets.BulletType.NORMAL, 0));\n\n playerOne = new Player(KeyboardEvent.KEY_UP, KeyboardEvent.KEY_DOWN, KeyboardEvent.KEY_LEFT, KeyboardEvent.KEY_RIGHT, KeyboardEvent.KEY_SPACE, spaceShips.get(0));\n playerTwo = new Player(KeyboardEvent.KEY_W, KeyboardEvent.KEY_S, KeyboardEvent.KEY_A, KeyboardEvent.KEY_D, KeyboardEvent.KEY_T, spaceShips.get(1));\n\n versus = false;\n init(); // TODO: 13/02/2019 passar nr de player\n\n }", "private void prepareBoard(){\n gameBoard.arrangeShips();\n }", "public levelTwo()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n prepare();\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "private void generateBoard(){\n\t}", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "public void preparePlayer2()\n {\n Player2 p2 = new Player2();\n addObject(p2, 878, 600);\n }", "private void Rightboard(Point2 position) {\r\n GameBoard Rightboard = new GameBoard(position, BoardColor, BoardType.Right);\r\n boards.add(Rightboard);\r\n }", "private void createShips() {\n //context,size, headLocation, bodyLocations\n Point point;\n Ship scout_One, scout_Two, cruiser, carrier, motherShip;\n if(player) {\n point = new Point(maxN - 1, 0); //row, cell\n scout_One = new Ship(1, point, maxN, \"Scout One\", player);\n ships.add(scout_One);\n point = new Point(maxN - 1, 1);\n scout_Two = new Ship(1, point, maxN, \"Scout Two\", player);\n ships.add(scout_Two);\n point = new Point(maxN - 2, 2);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n ships.add(cruiser);\n point = new Point(maxN - 2, 3);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n ships.add(carrier);\n point = new Point(maxN - 4, 5);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n ships.add(motherShip);\n\n }else{\n Random rand = new Random();\n int rowM = maxN-3;\n int colM = maxN -2;\n int row = rand.nextInt(rowM);\n int col = rand.nextInt(colM);\n point = new Point(row, col);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n updateOccupiedCells(motherShip.getBodyLocationPoints());\n ships.add(motherShip);\n\n rowM = maxN - 1;\n colM = maxN -1;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n updateOccupiedCells(carrier.getBodyLocationPoints());\n ships.add(carrier);\n checkIfOccupiedForSetShip(carrier, row, col, rowM, colM);\n\n\n rowM = maxN - 1;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n updateOccupiedCells(cruiser.getBodyLocationPoints());\n ships.add(cruiser);\n checkIfOccupiedForSetShip(cruiser, row, col, rowM, colM);\n\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_Two = new Ship(1, point, maxN, \"Scout_Two\", player);\n updateOccupiedCells(scout_Two.getBodyLocationPoints());\n ships.add(scout_Two);\n checkIfOccupiedForSetShip(scout_Two, row, col, rowM, colM);\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_One = new Ship(1, point, maxN, \"Scout_One\", player);\n updateOccupiedCells(scout_One.getBodyLocationPoints());\n ships.add(scout_One);\n checkIfOccupiedForSetShip(scout_One, row, col, rowM, colM);\n\n\n\n\n }\n //Need an algorithm to set enemy ship locations at random without overlaps\n }", "private Board twinBySwitching(int x1, int y1, int x2, int y2) {\n int value1 = blocks[x1][y1];\n int value2 = blocks[x2][y2];\n\n int[][] newBlocks = new int[dimension()][dimension()];\n for (int i = 0; i < dimension(); i++){\n for (int j = 0; j < dimension(); j++) {\n if (i == x1 && j == y1) {\n newBlocks[i][j] = value2;\n } else if (i == x2 && j == y2) {\n newBlocks[i][j] = value1;\n } else {\n newBlocks[i][j] = blocks[i][j];\n }\n }\n }\n\n return new Board(newBlocks);\n }", "public XOBoard() {\n\t\t// initialise the boards\n\t\tboard = new int[4][4];\n\t\trenders = new XOPiece[4][4];\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tboard[i][j] = EMPTY;\n\t\t\t\trenders[i][j] = null;\n\t\t\t}\n\t\tcurrent_player = XPIECE;\n\n\t\t// initialise the rectangle and lines\n\t\tback = new Rectangle();\n\t\tback.setFill(Color.GREEN);\n\t\th1 = new Line();\n\t\th2 = new Line();\n\t\th3 = new Line();\n\t\tv1 = new Line();\n\t\tv2 = new Line();\n\t\tv3 = new Line();\n\t\th1.setStroke(Color.WHITE);\n\t\th2.setStroke(Color.WHITE);\n\t\th3.setStroke(Color.WHITE);\n\t\tv1.setStroke(Color.WHITE);\n\t\tv2.setStroke(Color.WHITE);\n\t\tv3.setStroke(Color.WHITE);\n\n\t\t// the horizontal lines only need the endx value modified the rest of //\n\t\t// the values can be zero\n\t\th1.setStartX(0);\n\t\th1.setStartY(0);\n\t\th1.setEndY(0);\n\t\th2.setStartX(0);\n\t\th2.setStartY(0);\n\t\th2.setEndY(0);\n\t\th3.setStartX(0);\n\t\th3.setStartY(0);\n\t\th3.setEndY(0);\n\n\t\t// the vertical lines only need the endy value modified the rest of the\n\t\t// values can be zero\n\t\tv1.setStartX(0);\n\t\tv1.setStartY(0);\n\t\tv1.setEndX(0);\n\t\tv2.setStartX(0);\n\t\tv2.setStartY(0);\n\t\tv2.setEndX(0);\n\t\tv3.setStartX(0);\n\t\tv3.setStartY(0);\n\t\tv3.setEndX(0);\n\n\t\t// setup the translation of one cell height and two cell heights\n\t\tch_one = new Translate(0, 0);\n\t\tch_two = new Translate(0, 0);\n\t\tch_three = new Translate(0, 0);\n\t\th1.getTransforms().add(ch_one);\n\t\th2.getTransforms().add(ch_two);\n\t\th3.getTransforms().add(ch_three);\n\n\t\t// setup the translation of one cell width and two cell widths\n\t\tcw_one = new Translate(0, 0);\n\t\tcw_two = new Translate(0, 0);\n\t\tcw_three = new Translate(0, 0);\n\t\tv1.getTransforms().add(cw_one);\n\t\tv2.getTransforms().add(cw_two);\n\t\tv3.getTransforms().add(cw_three);\n\n\t\t// add the rectangles and lines to this group\n\t\tgetChildren().addAll(back, h1, h2, h3, v1, v2, v3);\n\n\t}", "public ServerGame(ServerPlayer _p1, ServerPlayer _p2) {\r\n\t\tsetP1(_p1);\r\n\t\tsetP2(_p2);\r\n\t\tcurrentPlayer = getP1();\r\n\r\n\t\tboard = new int[3][3];\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\tboard[i][j] = BLANK;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void newGame(){\n\t\tsetUp.buildBoard(8,8);\n\t\tfor(int i = 0; i < boardBoundsRow * boardBoundsColumn; i++){\n\t\t\tJPanel selectedTile = (JPanel) userInterface.boardButtons.getComponent(i);\n\t\t\tselectedTile.removeAll();\n\t\t\tselectedTile.revalidate();\n\t\t}\n\t\tuserInterface.addBlackPiece();\n\t\tuserInterface.addWhitePiece();\n\t\tuserInterface.check.setText(\"You are not in check\");\n\t\tking.blackKingCheck = false;\n\t\tking.whiteKingCheck = false;\n\t\tturn = \"white\";\n\t\tString playerTurn = \"Player turn: \";\n\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\tundoMoveClass.clearStacks();\n\t}", "public void play() {\n Player playerOne = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.one\"), null));\n Player currentPlayer = playerOne;\n ShipsGameBoard playerOneGameBoard = new ShipsGameBoard(playerOne, playerOneFleet);\n ShipsGameBoard playerOneCheckBoard = new ShipsGameBoard(playerOne, playerOneFleetToCheck);\n playerOneCheckBoard.setup();\n\n TreeMap<Character, Integer> lettersAndDigits = lettersAndDigits(playerOneGameBoard.getLength());\n ShipCreator threeMastShipCreatorPlayerOne = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerOne,\n ShipGameBoardMark.THREE_MASTS,\n playerOneGameBoard,\n playerOneShipsGameLogic);\n\n playerOneGameBoard.print();\n shipsDeployment(playerOneGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerOne,\n playerOneShipsGameLogic,\n playerOneFleet,\n NUMBER_OF_SHIPS);\n\n// playerOneShipsGameLogic.clearConsole();\n\n Player playerTwo = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.two\"), playerOne.getName()));\n ShipsGameBoard playerTwoGameBoard = new ShipsGameBoard(playerTwo, playerTwoFleet);\n ShipsGameBoard playerTwoCheckBoard = new ShipsGameBoard(playerTwo, playerTwoFleetToCheck);\n playerTwoCheckBoard.setup();\n\n ShipCreator threeMastShipCreatorPlayerTwo = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerTwo,\n ShipGameBoardMark.THREE_MASTS,\n playerTwoGameBoard,\n playerTwoShipsGameLogic);\n\n playerTwoGameBoard.print();\n shipsDeployment(playerTwoGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerTwo,\n playerTwoShipsGameLogic,\n playerTwoFleet,\n NUMBER_OF_SHIPS);\n\n\n boolean isAWinner = false;\n do {\n int userRow;\n int userCol;\n// playerOneGameBoard.clearConsole();\n showCurrentPlayerBoards(playerOne, currentPlayer, playerOneGameBoard, playerTwoGameBoard, playerOneCheckBoard,\n playerTwoCheckBoard, shipsGameText);\n System.out.println(shipsGameText.getMessage(\"show.witch.player.move\", currentPlayer.getName()));\n\n System.out.println(shipsGameText.getMessage(\"show.input.row\", Integer.toString(playerOneGameBoard.getLength())));\n userRow = getPlayerRowChoice(scanner, validator, playerOneGameBoard.getLength());\n\n System.out.println(shipsGameText.getMessage(\"show.input.col\",\n Character.toString(playerOneGameBoard.generateLastLetterOfColumn('A', playerOneGameBoard.getLength()))));\n userCol = convertLetterToDigit(lettersAndDigits, getPlayerColChoice(scanner, validator,\n lettersAndDigits));\n\n if (currentPlayer.equals(playerOne)) {\n if (playerTwoShipsGameLogic.checkForHit(userRow, userCol)) {\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerOneCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n playerTwoGameBoard.print();\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.MISS);\n }\n\n// if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n// playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n// playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n// System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n// System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n// playerOneCheckBoard.print();\n// System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n// playerTwoGameBoard.print();\n// }\n\n\n if (playerTwoShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerOne.getName()));\n isAWinner = true;\n }\n\n } else {\n if (playerOneShipsGameLogic.checkForHit(userRow, userCol)) {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerOneShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerOneShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerOne);\n playerTwoShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerOneFleet, playerTwo);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerTwoCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerOne.getName()));\n playerOneGameBoard.print();\n }\n else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne,\n ShipGameBoardMark.MISS);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n }\n if (playerOneShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerTwo.getName()));\n isAWinner = true;\n }\n }\n\n currentPlayer = swapPlayers(playerOne, currentPlayer, playerTwo);\n }\n while (!isAWinner);\n }", "public void PlaceRandomBoard(){\r\n\r\n\t\tString whichShip;\r\n\t\tString coordinate;\r\n\t\t\r\n\t\t\t// Display the random board and the random board menu \r\n\t\t// DISPLAY BOARDS!!!!!\r\n\t\tint whichInput=0;\r\n\t\tShip temp = new Ship();\r\n\t\tRandom generator = new Random();\r\n\t\tint randomIndex = generator.nextInt();\r\n\t\twhile (!this.myBoard.carrier.placed || !this.myBoard.battleship.placed\r\n\t\t\t\t|| !this.myBoard.cruiser.placed || !this.myBoard.submarine.placed\r\n\t\t\t\t|| !this.myBoard.patrolboat.placed) {\r\n\r\n\t\t\twhichInput++;\r\n\r\n\t\t\twhichShip = String.valueOf(whichInput);\r\n\t\t\t\r\n\t\t\tint direction=0;\r\n\r\n\t\t\tboolean placed = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\trandomIndex = generator.nextInt(10);\r\n\t\t\t\tcoordinate = this.indexToLetter(randomIndex);\r\n\t\t\t\tcoordinate += String.valueOf(generator.nextInt(10)+1);\r\n\t\t\t\tdirection = generator.nextInt(4) + 1;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tswitch (Integer.parseInt(whichShip)) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttemp = new Carrier();\r\n\t\t\t\t\ttemp.name=\"Carrier\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\ttemp = new Battleship();\r\n\t\t\t\t\ttemp.name=\"Battleship\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\ttemp = new Cruiser();\r\n\t\t\t\t\ttemp.name=\"Cruiser\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\ttemp = new Submarine();\r\n\t\t\t\t\ttemp.name=\"Submarine\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\ttemp = new PatrolBoat();\r\n\t\t\t\t\ttemp.name=\"Patrol Boat\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\tplaced = this.validateShipPlacement(temp, coordinate, direction);\r\n\r\n\t\t\t\tif (placed) {\r\n\t//\t\t\t\tSystem.out.println(\"Success\");\r\n\t\t\t\t\tthis.placeShip(temp, coordinate, direction);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t//\t\t\t\tdisplay.scroll(\"Invalid coordinate, please enter another\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void arrangeBoard(){\n for(int i=0;i<6;i++){\n for(int j=0;j<6;j++){\n if(i==2 && j==0){ //set the target ship.\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n targetShip = new JLabel();\n targetShip.setIcon(new ImageIcon(\"design\\\\ships\\\\targetShip.png\"));\n mainPanel.add(targetShip,gbc);\n }\n else if(i==2 && j==1){\n continue;\n }\n else{ //put free spaces in the other places.\n gbc.gridx = j;\n gbc.gridy = i;\n gbc.gridwidth = 1;\n gbc.gridheight = 1;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(j,i));\n mainPanel.add(freeSpace,gbc);\n }\n }\n }\n }", "public void initChessBoardAutomaticly() {\r\n\t\tthis.initPieces();\r\n\t\tthis.clearBoard();\r\n\t\tfor (int i=0; i<board.size(); i++) {\r\n\t\t\tChessBoardBlock b = board.get(order[i]);\r\n\t\t\tb.setBorderPainted(false);\r\n\t\t}\r\n\t\tfor (int i = 0, w = 0, b = 0, s = 0; i < 8 * 8; i++) {\r\n\r\n\t\t\t// Assign1, Disable board clickable\r\n\t\t\tChessBoardBlock block = board.get(order[i]);\r\n\t\t\tblock.setEnabled(false);\r\n\r\n\t\t\t// Assign1, Put black pieces and record the position\r\n\t\t\tif (i % 2 != 1 && i >= 8 && i < 16) {\r\n\t\t\t\tChessPiece blackPiece = blackPieces[b];\r\n\t\t\t\tblackPiece.position = order[i];\r\n\t\t\t\tpiece.put(order[i], blackPiece);\r\n\t\t\t\tbody.add(blackPiece);\r\n\t\t\t\tb++;\r\n\t\t\t} else if (i % 2 != 0 && (i < 8 || (i > 16 && i < 24))) {\r\n\t\t\t\tChessPiece blackPiece = blackPieces[b];\r\n\t\t\t\tblackPiece.position = order[i];\r\n\r\n\t\t\t\tpiece.put(order[i], blackPiece);\r\n\t\t\t\tbody.add(blackPiece);\r\n\t\t\t\tb++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Assign1, Put white pieces and record the position\r\n\t\t\telse if (i % 2 != 0 && i > 48 && i < 56) {\r\n\t\t\t\tChessPiece whitePiece = whitePieces[w];\r\n\t\t\t\twhitePiece.position = order[i];\r\n\t\t\t\tpiece.put(order[i], whitePiece);\r\n\t\t\t\tbody.add(whitePiece);\r\n\t\t\t\tw++;\r\n\t\t\t} else if (i % 2 != 1\r\n\t\t\t\t\t&& ((i >= 40 && i < 48) || (i >= 56 && i < 64))) {\r\n\t\t\t\tChessPiece whitePiece = whitePieces[w];\r\n\t\t\t\twhitePiece.position = order[i];\r\n\t\t\t\t\r\n\t\t\t\tpiece.put(order[i], whitePiece);\r\n\t\t\t\tbody.add(whitePiece);\r\n\t\t\t\tw++;\r\n\t\t\t}\r\n\r\n\t\t\t// Assign1, Put empty pieces on the board\r\n\t\t\t// Actually, empty pieces will not display on the board, they are\r\n\t\t\t// not existing\r\n\t\t\t// to chess players, just for calculation\r\n\t\t\telse {\r\n\t\t\t\tChessPiece spacePiece = spacePieces[s];\r\n\t\t\t\tspacePiece.position = order[i];\r\n\t\t\t\tbody.add(spacePiece);\r\n\t\t\t\tpiece.put(order[i], spacePiece);\r\n\t\t\t\tspacePiece.setVisible(false);\r\n\t\t\t\ts++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tt.setText(\"Chess Board has been initialized automatically\");\r\n\t\tthis.startGame();\r\n\t}", "public BigGameBoard(MainActivity m){\n super(m);\n createSmallBoards();\n createBoard(bigRowHeightWeight, vertBarWidthWeight);\n currentLetter = \"o\";\n setPadding(0,0,0,0);\n int z = 0;\n for (SmallGameBoard g: games){\n for(ButtonClass b:g.getAllButtons()){\n allButtons[z] = b;\n z++;\n }\n }\n }", "public Board(String boardName) {\n\n /*\n * Created according to the specs online.\n */\n if (boardName.equals(\"default\")) {\n Ball ball1 = new Ball(new Vect(0, 0), new Geometry.DoublePair(1.25,\n 1.25));\n Gadget circle = new CircleBumper(1, 10, new Gadget[] {});\n Gadget triangle = new TriangleBumper(12, 15, 180, new Gadget[] {});\n Gadget square1 = new SquareBumper(0, 17, new Gadget[] {});\n Gadget square2 = new SquareBumper(1, 17, new Gadget[] {});\n Gadget square3 = new SquareBumper(2, 17, new Gadget[] {});\n Gadget circle1 = new CircleBumper(7, 18, new Gadget[] {});\n Gadget circle2 = new CircleBumper(8, 18, new Gadget[] {});\n Gadget circle3 = new CircleBumper(9, 18, new Gadget[] {});\n this.balls = new Ball[] { ball1 };\n this.gadgets = new Gadget[] { circle, triangle, square1, square2,\n square3, circle1, circle2, circle3, top, bottom, left,\n right };\n\n } else if (boardName.equals(\"absorber\")) {\n Ball ball1 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 10.25, 15.25));\n Ball ball2 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 19.25, 3.25));\n Ball ball3 = new Ball(new Vect(0, 0), new Geometry.DoublePair(1.25,\n 5.25));\n Gadget absorber = new Absorber(0, 18, 20, 2, new Gadget[] {});\n Gadget triangle = new TriangleBumper(19, 0, 90, new Gadget[] {});\n Gadget circle1 = new CircleBumper(1, 10, new Gadget[] { absorber });\n Gadget circle2 = new CircleBumper(2, 10, new Gadget[] { absorber });\n Gadget circle3 = new CircleBumper(3, 10, new Gadget[] { absorber });\n Gadget circle4 = new CircleBumper(4, 10, new Gadget[] { absorber });\n Gadget circle5 = new CircleBumper(5, 10, new Gadget[] { absorber });\n this.balls = new Ball[] { ball1, ball2, ball3 };\n this.gadgets = new Gadget[] { absorber, triangle, circle1, circle2,\n circle3, circle4, circle5, top, left, right, bottom };\n }\n\n else if (boardName.equals(\"flippers\")) {\n Ball ball1 = new Ball(new Vect(0, 0), new Geometry.DoublePair(.25,\n 3.25));\n Ball ball2 = new Ball(new Vect(0, 0), new Geometry.DoublePair(5.25,\n 3.25));\n Ball ball3 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 10.25, 3.25));\n Ball ball4 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 15.25, 3.25));\n Ball ball5 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 19.25, 3.25));\n Gadget left1 = new LeftFlipper(0, 8, 90, new Gadget[] {});\n Gadget left2 = new LeftFlipper(4, 10, 90, new Gadget[] {});\n Gadget left3 = new LeftFlipper(9, 8, 90, new Gadget[] {});\n Gadget left4 = new LeftFlipper(15, 8, 90, new Gadget[] {});\n Gadget circle1 = new CircleBumper(5, 18, new Gadget[] {});\n Gadget circle2 = new CircleBumper(7, 13, new Gadget[] {});\n Gadget circle3 = new CircleBumper(0, 5, new Gadget[] { left1 });\n Gadget circle4 = new CircleBumper(5, 5, new Gadget[] {});\n Gadget circle5 = new CircleBumper(10, 5, new Gadget[] { left3 });\n Gadget circle6 = new CircleBumper(15, 5, new Gadget[] { left4 });\n Gadget triangle1 = new TriangleBumper(19, 0, 90, new Gadget[] {});\n Gadget triangle2 = new TriangleBumper(10, 18, 180, new Gadget[] {});\n Gadget right1 = new RightFlipper(2, 15, 0, new Gadget[] {});\n Gadget right2 = new RightFlipper(17, 15, 0, new Gadget[] {});\n Gadget absorber = new Absorber(0, 19, 20, 1, new Gadget[] { right1,\n right2, new Absorber(0, 19, 20, 1, new Gadget[] {}) });\n this.balls = new Ball[] { ball1, ball2, ball3, ball4, ball5 };\n this.gadgets = new Gadget[] { left1, left2, left3, left4, circle1,\n circle2, circle3, circle4, circle5, circle6, triangle1,\n triangle2, right1, right2, absorber, top, bottom, left,\n right };\n } else {\n this.gadgets = new Gadget[] {};\n this.balls = new Ball[] {};\n }\n\n checkRep();\n }", "Board createLayout();", "public Board(int boardSize) {\n\n sounds = new GameSounds();\n gridSize = boardSize;\n newGame = 0;\n titleScreen = true;\n traversedTiles = new boolean[gridSize][gridSize];\n pellets = new boolean[gridSize][gridSize];\n ghosts.add(new Ghost(180, 180, ghostImage1));\n ghosts.add(new Ghost(200, 180, ghostImage2));\n ghosts.add(new Ghost(220, 180, ghostImage3));\n map = getMapFromFile(\"first.txt\");\n// ghosts.add(new Ghost(220,180,ghostImage4));\n reset();\n }", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }", "private void testBoardCreation() {\n for (int r = 0; r < Constants.BOARD_GRID_ROWS; r++) {\n for (int c = 0; c < Constants.BOARD_GRID_COLUMNS; c++) {\n Vector2 tokenLocation = this.mBoardLevel.getCenterOfLocation(r, c);\n Image tokenImage = new Image(this.mResources.getToken(PlayerType.RED));\n tokenImage.setPosition(tokenLocation.x, tokenLocation.y);\n this.mStage.addActor(tokenImage);\n }\n }\n }", "public void newGame(String p1, String p2, int stonesInEachPit) {\n\t\toriginalCount = stonesInEachPit;\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tif (i == 6 || i == 13) {\n\t\t\t\tboard[i] = 0; \n\t\t\t} else {\n\t\t\t\tboard[i] = originalCount;\n\t\t\t}\n\t\t}\n\t\tplayer1 = new Player(p1,1);\n\t\tplayer2 = new Player(p2,2);\n\t\tcurrentPlayer = player1;\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }", "@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }", "private void cp2PlaceShips(){\n\t\tint start = 5, stop = 9, orientation;\n\t\tboolean placed;\n\n\t\tfor(int x = start; x <= stop; x++){\n\t\t\tplaced = false;\n\n\t\t\twhile(!placed)\n\t\t\t{\n\t\t\t\tranX = ranNum.nextInt(600);\n\t\t\t\tranY = ranNum.nextInt(600);\n\t\t\t\torientation = ranNum.nextInt(2);\n\t\t\t\tplaced = true;\n\n\t\t\t\tships[x] = new Ship(x, shipNames[x], 'H', shipPlayer[x], shipWidth[x], shipHeight[x], ranX, ranY, shipSize[x]);\n\t\t\t\tships[x].setLocation(ships[x].getX(), ships[x].getY());\n\t\t\t\tships[x].setSize(ships[x].getWidth(), ships[x].getHeight());\n\n\t\t\t\tif(orientation == 1){\n\t\t\t\t\tchangeOrientation(x);\n\t\t\t\t}\n\n\t\t\t\tif(ships[x].getX() + ships[x].getWidth() < boardTwo.getWidth() && ships[x].getY() + ships[x].getHeight() < boardTwo.getHeight()){\n\t\t\t\t\tfor(int y = start; y < x; y++){\n\t\t\t\t\t\tif(ships[x].getBounds().intersects(ships[y].getBounds())){\n\t\t\t\t\t\t\tplaced = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tplaced = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tboardTwo.add(ships[x]);\n\t\t}\n\t}", "public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public Board(int x, int y){\n player1 = \"Player 1\";\n player2 = \"Player 2\";\n randomPlayer1 = \"CPU 1\";\n randomPlayer2 = \"CPU 2\";\n board = new Square[x][y];\n for (int i = 0; i < board.length;i++){\n row++;\n for(int j = 0; j < board.length; j++){\n if(column == y){\n column = 0;\n }\n column++;\n board[i][j] = new Square(row, column);\n }\n }\n row = x;\n column = y;\n }", "private Board swap(int row1, int col1, int row2, int col2) {\n int[][] copy = new int[N][N]; // Instantiate a new N x N tile grid to avoid mutating the instance tile grid\n for (int row = 0; row < N; row++)\n copy[row] = tiles[row].clone(); // Copy each row of the instance grid to the copy grid\n\n // Swap tiles at the row/column indeces passed to the method\n int temp = copy[row1][col1];\n copy[row1][col1] = copy[row2][col2];\n copy[row2][col2] = temp;\n\n return new Board(copy); // Return new board containing swapped tiles\n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}", "public void initBoard() {\n board = new Board();\n\n // initilaisation des groupes\n Group violet = new Group();\n Group bleu = new Group();\n Group orange = new Group();\n Group vert = new Group();\n Group rouge = new Group();\n Group jaune = new Group();\n Group rose = new Group();\n Group marine = new Group();\n Group gare = new Group();\n Group compagnie = new Group();\n\n // ajout des cases\n board.addCaseBoard(new StartCase());\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd Belleville\", 60, 2, 10,30, 90, 160,250, 30,violet, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de caumunauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue lecourbe\", 60, 4,20,60,180,320,450, 30,violet, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Taxes\"));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare Monparnasse\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Vaugirard\", 100, 6,30,90,270,400,550, 50, bleu, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Courcelles\", 100, 6,30,90,270,400,550, 50, bleu, 50));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de la Republique\", 120, 8,40,100,300,450,600, 60, bleu, 50));\n board.addCaseBoard(new CaseBoardImpl(\"Prison\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd de la villette\", 140, 10,50,150,450,625,750, 70, orange, 100));\n board.addCaseBoard(new BuyableCaseImpl(\"Compagnie de distribution d'electricité\",150, 0, 75, compagnie));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Neuilly\", 140, 10,50,150,450,625,750, 70, orange, 100));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de Paradis\", 160, 12,60,180,500,700,900, 80, orange, 100));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare de Lyon\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Mozart\", 180, 14,70,200,550,700,900, 90, vert, 100));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd Saint Michel\", 180, 14,70,200,550,700,900, 90, vert, 100));\n board.addCaseBoard(new BuildingCaseImpl(\"Place Pigalle\", 200, 16,80,220,600,800,950, 100, vert, 100));\n board.addCaseBoard(new CaseBoardImpl(\"Park Gratuit\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Matignon\", 220, 18,90,250,700,875,1050, 110, rouge, 150));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd MalesHerbes\", 220, 18,90,250,700,875,1050, 110, rouge, 150));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Henri-Martin\", 240, 20,100,300,750,925,1100, 120, rouge, 150));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare du Nord\", 200, 2, 100,gare));\n board.addCaseBoard(new BuildingCaseImpl(\"Fb Saint Honoré\", 260, 22,110,330,800,975,1150, 130, jaune, 150));\n board.addCaseBoard(new BuildingCaseImpl(\"Place de la Bourse\", 260, 22,110,330,800,975,1150, 130, jaune, 150));\n board.addCaseBoard(new BuyableCaseImpl(\"Compagnie de distribution des eaux\",150, 0, 75, compagnie));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue lafayette\", 280, 24,120,360,850,1025,1200, 140, jaune, 150));\n board.addCaseBoard(new CaseBoardImpl(\"Aller en Prison\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av de Breteuil\", 300, 26,130,390,900,1100,1275, 150, rose, 200));\n board.addCaseBoard(new BuildingCaseImpl(\"Av Foch\", 300, 26,130,390,900,1100,1275, 150, rose, 200));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Bvd des Capucines\", 320, 28,150,450,1000,1200,1400, 160, rose, 200));\n board.addCaseBoard(new BuyableCaseImpl(\"Gare Saint-Lazarre\", 200, 2, 100,gare));\n board.addCaseBoard(new CaseBoardImpl(\"Chance\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Av des Champs Elysées\", 350, 35,175,500,1100,1300,1500, 175, marine, 200));\n board.addCaseBoard(new CaseBoardImpl(\"Caisse de Communauté\"));\n board.addCaseBoard(new BuildingCaseImpl(\"Rue de la Paix\", 400, 50,200,600,1400,1700,2000, 200, marine, 200));\n }", "private void Stingboard(Point2 position) {\r\n GameBoard Stingboard = new GameBoard(position, BoardColor, BoardType.Sting);\r\n boards.add(Stingboard);\r\n }", "private void getBoard() {\n gameBoard = BoardFactory.makeBoard();\n }", "private Parent createGame() {\n\n nextScene.setDisable(true); //disable the button. prevent user from switching scenes\n\n //set the computer pieces using random coordinates generator\n int loop = 0; //index. Increment only if setting the piece was successful\n while(loop != 4) {\n try { //check if it goes out of bounds\n int CX = ((int) (Math.random() * (10)) - 0); //random from 0 to 9\n int CY = ((int) (Math.random() * (10)) - 0); //random from 0 to 9\n int rand = ((int) (Math.random() * (5)) - 0); //random from 0 to 5\n String CDIR = direc[rand]; //add random direction\n if (CDIR == \"VERTICAL\") { //if vertical\n arr1[loop].setDirection(\"VERTICAL\"); //sets direction vertical\n\n } else if (CDIR == \"HORIZONTAL\") { //if horizontal\n arr1[loop].setDirection(\"HORIZONTAL\"); //sets direction to horizontal\n }\n if (computerBoard.setPiece(CX, CY, arr1[loop].getDirection(), arr1[loop])) { //sets the piece on board\n loop++; //if successful increment\n }\n }\n catch(IndexOutOfBoundsException err1) { //catch if out of index\n continue; //continue --> try different coordinates until setting piece is successful\n }\n }\n\n BorderPane game = new BorderPane(); //create new BorderPane root\n game.setPrefSize(1200, 900); //set resolution\n\n Label user = new Label(\"User\"); //user label\n Label computer = new Label(\"Computer\"); //computer label\n\n VBox vert1 = vertNum(); //get vertical grid label\n VBox vert2 = vertNum();\n\n HBox hor1 = horNum(); //get horizontal grid label\n HBox hor2 = horNum();\n\n Label row = new Label(\"Row\"); //Row\n Label column = new Label(\"Column\"); //Column\n Button submit = new Button(\"Submit\"); //Submit coordinates\n Text Miss = new Text(); //text used to print if user missed\n Text isWin = new Text(); //text used to print if user/computer won\n\n TextField rows = new TextField(); //rows input\n TextField columns = new TextField(); //columns input\n\n HBox hbox1 = new HBox(500, user, computer); //put user and computer label in HBox\n\n //add number labels with the board grid\n HBox hbox3 = new HBox(40, vert1, humanBoard);\n HBox hbox4 = new HBox(40, vert2, computerBoard);\n\n //put them in VBox\n VBox human = new VBox(40, hor1, hbox3);\n VBox comp = new VBox(40, hor2, hbox4);\n\n //then put then in HBox side by side\n HBox sidebyside = new HBox(100, human, comp);\n\n //center align all grids present\n hbox1.setAlignment(Pos.CENTER);\n hor1.setAlignment(Pos.CENTER);\n hor2.setAlignment(Pos.CENTER);\n human.setAlignment(Pos.CENTER);\n comp.setAlignment(Pos.CENTER);\n sidebyside.setAlignment(Pos.CENTER);\n\n //put all input together\n HBox input1 = new HBox(10, row, rows);\n HBox input2 = new HBox(10, column, columns);\n HBox input = new HBox(50, input1, input2, submit);\n\n //event handle for submit button\n submit.setOnAction(e -> {\n int turn = 1; //turns between computer and player. 1 = player 0 = computer.\n if(humanBoard.getAddPiece() != 0 && turn == 1) { //if user didn't lose all his pieces, game keeps going.\n try { //catch non-numeric input\n try { //catch out of bounds input\n int y, x, attack; //x > rows, y > cols, attack > return value. 1 > hit, 2 > already guess, 3 > missed, 0 > program failure\n y = Integer.parseInt(rows.getText()); //convert text into int\n x = Integer.parseInt(columns.getText());\n attack = humanBoard.attack(x, y, computerBoard); //perform the attack\n if (attack == 3) { //missed\n Miss.setText(\"Miss!\");\n turn = 0;\n } else if (attack == 1) { //hit\n Miss.setText(\"Hit!\");\n turn = 0;\n } else if (attack == 2) {\n Miss.setText((\"Already Guess!\")); //already guessed\n turn = 1; //user still plays if already guessed\n } else if (attack == 0) {\n System.exit(-1); //exit with status -1\n }\n } catch (IndexOutOfBoundsException err) { //catch and print message\n Miss.setText(\"Invalid Location\");\n }\n } catch (NumberFormatException e1) { //catch and print message\n Miss.setText(\"Invalid Location\");\n }\n }\n\n if(computerBoard.getAddPiece() != 0 && turn == 0) { //same process for computer as human, except input is random generated\n turn = 1; //Computer only attacks when successful, therefore turn = 1.\n int attack = 0, choose = 0;\n if(DIFFICULTY == 2) {\n do {\n try {\n if (TCX == -1) { //if temporary is empty, normal attack\n CXG = ((int) (Math.random() * (10)) - 0); //random number between 0 and 9\n CYG = ((int) (Math.random() * (10)) - 0);\n attack = computerBoard.attack(CYG, CXG, humanBoard); //computer attack\n\n } else { //else, add 1 to temporary to up, down, right or left. Randomly selected\n choose = 0;\n if (((CXG + 1) <= 9)) {//down\n if (!(humanBoard.getPosition(CYG, CXG + 1).isGuess())) {\n System.out.println(\"Down\");\n positionArrayList.add(humanBoard.getPosition(CYG, CXG + 1));\n choose = 1;\n } else if (!(humanBoard.getPosition(CYG, CXG + 1).getHitOrMiss()) || (humanBoard.getPosition(CYG, CXG + 1).getHitOrMiss())) {\n choose = 1;\n } else {\n TCX = -1;\n TCY = -1;\n }\n } else {\n choose = 1;\n }\n if (((CXG - 1) > -1) && choose == 1) {//up\n if (!(humanBoard.getPosition(CYG, CXG - 1).isGuess())) {\n System.out.println(\"Up\");\n positionArrayList.add(humanBoard.getPosition(CYG, CXG - 1));\n choose = 2;\n } else if (!(humanBoard.getPosition(CYG, CXG - 1).getHitOrMiss()) || (humanBoard.getPosition(CYG, CXG - 1).getHitOrMiss())) {\n choose = 2;\n } else {\n TCX = -1;\n TCY = -1;\n }\n } else {\n choose = 2;\n }\n if (((CYG + 1) <= 9) && choose == 2) {//right\n if (!(humanBoard.getPosition(CYG + 1, CXG).isGuess())) {\n System.out.println(\"Right\");\n positionArrayList.add(humanBoard.getPosition(CYG + 1, CXG));\n choose = 3;\n } else if (!(humanBoard.getPosition(CYG + 1, CXG).getHitOrMiss()) || (humanBoard.getPosition(CYG + 1, CXG).getHitOrMiss())) {\n choose = 3;\n } else {\n TCX = -1;\n TCY = -1;\n }\n } else {\n choose = 3;\n }\n if (((CYG - 1) > -1) && choose == 3) {//left\n if (!(humanBoard.getPosition(CYG - 1, CXG).isGuess())) {\n System.out.println(\"Left\");\n positionArrayList.add(humanBoard.getPosition(CYG - 1, CXG));\n } else if (!(humanBoard.getPosition(CYG - 1, CXG).getHitOrMiss()) || (humanBoard.getPosition(CYG - 1, CXG).getHitOrMiss())) {\n choose = 4;\n } else {\n TCX = -1;\n TCY = -1;\n }\n }\n if (positionArrayList.size() == 0) {\n TCX = -1;\n TCY = -1;\n } else {\n int index = rand.nextInt(positionArrayList.size());\n System.out.println(index);\n for (int i = 0; i < positionArrayList.size(); i++) {\n System.out.println(positionArrayList.get(i));\n }\n if (((CXG + 1) <= 9)) {//down\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG, CXG + 1)) {\n System.out.println(\"down\");\n CXG = TCX + 1;\n CYG = TCY;\n }\n }\n if (((CXG - 1) > -1)) {\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG, CXG - 1)) {\n System.out.println(\"up\");\n CXG = TCX - 1;\n CYG = TCY;\n }\n }\n if (((CYG + 1) <= 9)) {\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG + 1, CXG)) {\n System.out.println(\"right\");\n CXG = TCX;\n CYG = TCY + 1;\n }\n }\n if (((CYG - 1) > -1)) {\n if (positionArrayList.get(index) == humanBoard.getPosition(CYG - 1, CXG)) {\n System.out.println(\"left\");\n CXG = TCX;\n CYG = TCY - 1;\n }\n }\n positionArrayList.removeAll(positionArrayList);\n }\n if (TCY != -1) {\n attack = computerBoard.attack(CYG, CXG, humanBoard); //attack\n } else {\n attack = 2;\n }\n\n }\n } catch (IndexOutOfBoundsException err1) { //catch index out of bounds, do nothing\n TCY = -1;\n TCX = -1;\n continue;\n }\n } while (attack == 2); //since computer can't guess already guessed grid, computer keeps choosing until either hitting or missing\n\n if (attack == 1) { //if hit, memorize x and y\n TCX = CXG;\n TCY = CYG;\n } else {\n TCX = -1;\n TCY = -1;\n }\n }\n else if(DIFFICULTY == 1){\n\n do {\n try {\n CXG = ((int) (Math.random() * (10)) - 0); //random number between 0 and 9\n CYG = ((int) (Math.random() * (10)) - 0);\n attack = computerBoard.attack(CYG, CXG, humanBoard); //computer attack\n }catch(IndexOutOfBoundsException err1){\n attack = 2;\n }\n } while (attack == 2);\n\n }\n if(humanBoard.getAddPiece() == 0) {\n isWin.setText(\"Computer is the winner!\"); //print winner message\n nextScene.setText(\"Play Again!\"); //change text to Play Again. Refer to line 471\n rows.setDisable(true);\n columns.setDisable(true);\n nextScene.setDisable(false); //enable button\n submit.setDisable(true); //disable button\n }\n\n\n }\n else if(turn != 1) { //if user choose all the correct, human wins\n isWin.setText(\"Human is the winner!\");\n nextScene.setText(\"Play Again!\");\n rows.setDisable(true);\n columns.setDisable(true);\n nextScene.setDisable(false);\n submit.setDisable(true);\n }\n\n\n });\n\n //center align input\n input1.setAlignment(Pos.CENTER);\n input2.setAlignment(Pos.CENTER);\n input.setAlignment(Pos.CENTER);\n\n //add buttons in HBox\n HBox buttons = new HBox(40, nextScene, exit);\n\n //center align buttons\n buttons.setAlignment(Pos.CENTER);\n\n //set background color to light blue\n game.setStyle(\"-fx-background-color: #B5D3E7\");\n\n //add everything in VBox and center align them\n VBox vbox = new VBox(30,hbox1, sidebyside, input, isWin, buttons, Miss);\n vbox.setAlignment(Pos.CENTER);\n game.setCenter(vbox); //center align the VBox in root\n return game; //return root\n\n\n }", "private void createTableRight(Composite composite2){\n\t\tGridLayout layout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 4;\n\t\tcomposite2.setLayout(layout);\n\n\t\t// Create the table\n\t\tcreateCallTable(composite2);\n\n\t\t// Create and setup the TableViewer\n\t\tcreateCallsTableViewer();\n\t\ttableViewerRight.setContentProvider(new ContentProviderCallSeedsFanIN());\n\t\ttableViewerRight\n\t\t\t\t.setLabelProvider(new CallsDescriptionLabelProvider());\n\n\t\t\n\t}", "public BigTwoDeck(){\r\n\t\tinitialize();\r\n\t}", "BigTwo(){\n\t\tthis.playerList = new ArrayList<CardGamePlayer>();\n\t\tfor (int i = 0; i < NUM_OF_PLAYERS; i++) {\n\t\t\tthis.playerList.add(new CardGamePlayer());\n\t\t}\n\t\thandsOnTable = new ArrayList<Hand>();\n\t\tthis.table = new BigTwoTable(this);\n\t}", "public void AddRandom2(){\n\t\tboolean randomInserted = false;\n\t\twhile (!(randomInserted)){\n\t\t\tint colInd = (int)(Math.random() * 4);\n\t\t\tint rowInd = (int)(Math.random() * 4);\n\t\t\tif (this.myBoard[colInd][rowInd] == null){\n\t\t\t\tthis.myBoard[colInd][rowInd] = new BlockFor2048(2);\n\t\t\t\trandomInserted = true;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n boolean playWithMachine =false;\n String s1 = JOptionPane.showInputDialog(\"Do you want to play with a Machine?(Y/N)\");\n String s2 =JOptionPane.showInputDialog(\"Input how many rows you want to have:\");\n int rowSize = Integer.parseInt(s2);\n\n Player p1 = new Player(rowSize);\n Player p2 = new Player(rowSize);\n\n //Create player 1\n p1.setName();\n p1.setChessLabel();\n\n //Create player 2\n if(s1.toLowerCase().equals(\"y\"))\n {\n playWithMachine = true;\n p2.setPlayerIsMachine(playWithMachine);\n p2.machinePlayer();\n }else\n {\n p2.setName();\n p2.setChessLabel();\n }\n\n\n while(!p1.gameRestart)\n {\n p1.printBoard(p1, p2); //Print out a new empty chessboard\n\n p1.gameIsOn = true; // Game is moving further on\n\n while (p1.gameIsOn) {\n\n //Player 1 choose his/her own block and place the chess\n p1.placeChess(p1);\n //Print out the current board\n p1.printBoard(p1,p2);\n //Check winner\n p1.checkWinner(p1, p2);\n if (!p1.gameIsOn)\n break;\n\n //Player 2 choose his//her own block and place the chess\n p1.placeChess(p2);\n //Print out the current board\n p1.printBoard(p1,p2);\n p1.checkWinner(p2, p1);\n if (!p1.gameIsOn)\n break;\n }\n\n\n }\n }", "public Piece[][] createStandardChessboard(Player whitePlayer, Player blackPlayer) {\t\t\r\n\t\tPiece[][] start_board = {\r\n\t\t\t\t{new Rook(0,0,blackPlayer), new Knight(1,0,blackPlayer), new Bishop(2,0,blackPlayer), new Queen(3,0,blackPlayer),new King(4,0,blackPlayer), new Bishop(5,0,blackPlayer), new Knight(6,0,blackPlayer), new Rook(7,0,blackPlayer)},\r\n\t\t\t\t{new Pawn(0,1,blackPlayer), new Pawn(1,1,blackPlayer), new Pawn(2,1,blackPlayer), new Pawn(3,1,blackPlayer),new Pawn(4,1,blackPlayer), new Pawn(5,1,blackPlayer), new Pawn(6,1,blackPlayer), new Pawn(7,1,blackPlayer)},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{new Pawn(0,6,whitePlayer), new Pawn(1,6,whitePlayer), new Pawn(2,6,whitePlayer), new Pawn(3,6,whitePlayer),new Pawn(4,6,whitePlayer), new Pawn(5,6,whitePlayer), new Pawn(6,6,whitePlayer), new Pawn(7,6,whitePlayer)},\r\n\t\t\t\t{new Rook(0,7,whitePlayer), new Knight(1,7,whitePlayer), new Bishop(2,7,whitePlayer), new Queen(3,7,whitePlayer),new King(4,7,whitePlayer), new Bishop(5,7,whitePlayer), new Knight(6,7,whitePlayer), new Rook(7,7,whitePlayer)}\r\n\t\t};\r\n\t\treturn start_board;\r\n\t}", "public static void twoPlayers() {\r\n\t\tint[][] board = createBoard();\r\n\t\tshowBoard(board);\r\n\r\n\t\tSystem.out.println(\"Welcome to the 2-player Checkers Game !\");\r\n\r\n\t\tboolean oppGameOver = false;\r\n\t\twhile (!gameOver(board, RED) & !oppGameOver) {\r\n\t\t\tSystem.out.println(\"\\nRED's turn\");\r\n\t\t\tboard = getPlayerFullMove(board, RED);\r\n\r\n\t\t\toppGameOver = gameOver(board, BLUE);\r\n\t\t\tif (!oppGameOver) {\r\n\t\t\t\tSystem.out.println(\"\\nBLUE's turn\");\r\n\t\t\t\tboard = getPlayerFullMove(board, BLUE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint winner = 0;\r\n\t\tif (playerDiscs(board, RED).length == 0 | playerDiscs(board, BLUE).length == 0)\r\n\t\t\twinner = findTheLeader(board);\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"\\t ************************************\");\r\n\t\tif (winner == RED)\r\n\t\t\tSystem.out.println(\"\\t * The red player is the winner !! *\");\r\n\t\telse if (winner == BLUE)\r\n\t\t\tSystem.out.println(\"\\t * The blue player is the winner !! *\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"\\t * DRAW !! *\");\r\n\t\tSystem.out.println(\"\\t ************************************\");\r\n\t}", "public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}", "private void cp2turn(){\n\t\tboolean attacked = false;\n\t\twhile(!attacked){\n\t\t\tranX = ranNum.nextInt(30);\n\t\t\tranY = ranNum.nextInt(30);\n\n\t\t\tif(cp2Attacks[ranX][ranY] == false){\n\t\t\t\tcp2Shots.add(new Shot(ranX * 20,ranY * 20));\n\t\t\t\tboardOne.add(cp2Shots.get(cp2ShotCount));\n\n\t\t\t\tboardOne.setComponentZOrder(cp2Shots.get(cp2ShotCount), 0);\n\n\t\t\t\tfor(int x = 0; x < ships.length; x++){\n\t\t\t\t\tif(ships[x].getPlayer() == 1){\n\t\t\t\t\t\tif(ships[x].checkBounds(ranX * 20 + 5, ranY * 20 + 5)){\n\t\t\t\t\t\t\tcp2Shots.get(cp2ShotCount).hit();\n\t\t\t\t\t\t\tships[x].hit();\n\t\t\t\t\t\t\tif(ships[x].sunk()){\n\t\t\t\t\t\t\t\tcp1BoatsSunk++;\n\t\t\t\t\t\t\t\tcp1shipLabel.setText(\"Computer Player 1 ships sunk: \" + cp1BoatsSunk);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcp2ShotCount++;\n\t\t\t\tattacked = true;\n\t\t\t\tcp2Attacks[ranX][ranY] = true;\n\t\t\t}\n\t\t}\n\t\trepaint();\n\t}", "public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }", "public TTT_GamePlay() {\r\n\t\tArrays.fill(p1, 0);\r\n\t\tArrays.fill(p2, 0);\r\n\t\tArrays.fill(selectedCells, false);\r\n\t\tthis.board = new int[9];\r\n\t\tthis.player = player1;\r\n\t\twin = false;\r\n\t}", "protected Board(){\n\t\tpool = 0;\n\t\tsquares = new Square[3][61];\n\t\tcommunityCards = new LinkedList<CommunityCard>();\n\t\tchanceCards = new LinkedList<ChanceCard>();\n\t\tmap = new HashMap<String, Integer>();\n\t\tcompanyArray = new Company[6];\n\t\tcreateBoard();\n\t\tfillHashMap();\t\t\t\n\t\tfillChanceCards();\n\t\tfillCommunityChestCards();\n\t\tfillCompanyArray();\n\t\tshuffleChanceCards();\n\t\tshuffleCommunityCards();\n\t}", "public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }", "public static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }", "@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece piece: row){\n rowOfPieceCopies.add(piece.copy());\n }\n pieceCopies.add(rowOfPieceCopies);\n }\n return new Board(pieceCopies,new ArrayList<>(myNeighborhoods),myEmptyState);\n }", "public twoPlayer() {\n\n initComponents();\n //disables the turn box\n turn.setEditable(false);\n //when i is smaller than 9, initializes all squares to 2\n for (int i = 0; i < 9; i++) {\n tBoard[i] = 2;\n }\n //set to x's turn, alerting that it is the player with the X symbol\n turn.setText(\"It is x's turn\");\n\n }", "public static void main(String[] args) {\n int[][] initState = {{1, 2, 3}, {4, 0, 6}, {7, 8, 5}};\n Board board = new Board(initState);\n\n System.out.println(\"Size: \" + board.size());\n System.out.println(\"Solvable: \" + board.solvable());\n System.out.println(\"Manhattan: \" + board.manhattan());\n System.out.println(\"Is goal: \" + board.isGoal());\n System.out.println(\"Neighbors:\");\n Iterable<Board> it = board.neighbors();\n for(Board x : it){\n System.out.println(x.toString());\n }\n System.out.println(\"\\n\\n\\n\\n\");\n\n int[][] initState2 = {{1, 2, 3}, {4, 5, 6}, {7, 0, 8}};\n Board board2 = new Board(initState2);\n\n System.out.println(\"Size: \" + board2.size());\n System.out.println(\"Solvable: \" + board2.solvable());\n System.out.println(\"Manhattan: \" + board2.manhattan());\n System.out.println(\"Is goal: \" + board2.isGoal());\n System.out.println(\"Neighbors:\");\n Iterable<Board> it2 = board2.neighbors();\n for(Board x : it2){\n System.out.println(x.toString());\n }\n }", "private Game(Player player1, Player player2){\n\t\tplayer1.setGame(this);\n\t\tplayer2.setGame(this);\n\n\t\t//todo: We should be satisfied we only having turnManager not also Player array\n\t\tplayers = new Player[]{player1, player2};\n\n\t\tturnManager.addPlayer(player2); // want player2 to start, so add it first.\n\t\t//todo: we should want player1 to start because that's more logical.\n\t\tturnManager.addPlayer(player1);\n\n\t\t//Create Dealer\n\t\tdealer = new Dealer();\n\n\t\t// First Card\n\t\tUnoCard firstCard = getNextCard();\n\t\tplayedCards().add(firstCard);\n\n\t\tdealer.spreadOut(players);\n\t\t\n\t\tisOver = false;\n\t\t// Start the turn.\n\t\tturnManager.startTurn();\n\t}", "public Board twin() {\n Board newBoard = new Board(blocks); \n // Switch the first two blocks if they are not blank\n if (newBoard.blocks[0][0] != 0 && newBoard.blocks[0][1] != 0) {\n exchangeBlocks(newBoard.blocks, 0, 0, 0, 1);\n } else { // Switch the first two elements of the second row\n exchangeBlocks(newBoard.blocks, 1, 0, 1, 1);\n }\n return newBoard;\n }", "private void shopSwitchToMainMenu() {\n potionNum = 1;\n defenseNum = 1;\n pause();\n Pane canvas = new Pane();\n Stage stage = new Stage();\n stage.setTitle(\"Shopping Store\");\n Label winLabel = new Label(\"Shopping Castle!\");\n ShopItem[] buyItems = new ShopItem[8];\n ShopItem[] sellItems = new ShopItem[8];\n for (int i = 0; i < 8; i++) {\n int gold = world.getCharacter().getGold().get();\n ShopItem item = ShoppingItem(i, gold, true);\n Button newButton = new Button(\"Buy\" + item.getName() + \" \" + item.getPrice());\n newButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n buyItem(item);\n }\n });\n if (gold < item.getPrice()) {\n newButton.disableProperty().set(true);\n }\n newButton.relocate(30 + i * 100, 80);\n canvas.getChildren().addAll(newButton);\n\n buyItems[i] = item;\n buyItems[i].setButton(newButton);\n }\n\n for (int i = 0; i < 8; i++) {\n int gold = world.getCharacter().getGold().get();\n ShopItem item = ShoppingItem(i, gold, false);\n Button newButton = new Button(\"Sell\" + item.getName() + \" \" + item.getPrice());\n\n if (!world.ifHasItem(item.getName())) {\n newButton.disableProperty().set(true);\n }\n\n newButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n sellItem(item);\n }\n });\n\n newButton.relocate(30 + i * 100, 150);\n canvas.getChildren().addAll(newButton);\n\n sellItems[i] = item;\n sellItems[i].setButton(newButton);\n }\n Button tempButton;\n for (int i = 0; i < 8; i++) {\n tempButton = buyItems[i].getButton();\n tempButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n updateButtonState(buyItems, sellItems);\n }\n });\n tempButton = sellItems[i].getButton();\n tempButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n updateButtonState(buyItems, sellItems);\n }\n });\n }\n\n Button returnGameButton = new Button(\"Back to Game Menu\");\n returnGameButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n stage.close();\n startTimer();\n }\n });\n canvas.setPrefSize(1000, 400);\n winLabel.relocate(123, 30);\n returnGameButton.relocate(80, 200);\n canvas.getChildren().addAll(winLabel, returnGameButton);\n stage.setScene(new Scene(canvas, 1000, 400));\n stage.sizeToScene();\n stage.show();\n }", "public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "public GameBoard(MainMenu mainMenu) {\r\n\t\tthis.mainMenu = mainMenu;\r\n\t\tthis.gameLogic = new GameLogic();\r\n\t\tthis.boardButtons = new JButton[GameLogic.BOARD_SIZE][GameLogic.BOARD_SIZE];\r\n\r\n\t\tinitGUI();\r\n\t}", "protected BattleSecondMoveState secondMoveState(){\n return new BattleSecondMoveState(\n this.mFightButton,\n this.mPokemonButton,\n this.mBagButton,\n this.mRunButton,\n this.mActionButton,\n this.mOptionList,\n this.mBattle,\n this.mMessage\n );\n }", "public ERSBoard(int numPlayers)\n {\n board = new ArrayList<Card>();\n slapOrder = new ArrayList<Integer>();\n players = new ArrayList<Player>();\n starters = new ArrayList<Deck>();\n deck = new Deck(RANKS, SUITS);\n deck.shuffle();\n for (int x = 0; x < numPlayers; x++) {\n starters.add(new Deck());\n }\n int divisions = 52/numPlayers;\n int leftovers = 52 % numPlayers;\n int place = 0;\n for (int x = 0; x < starters.size(); x++) {\n for (int y = place; y < place + divisions; y++) {\n starters.get(x).addCard(deck.deal());\n }\n }\n for (int x = 0; x < numPlayers; x++) {\n players.add(new Player(starters.get(x),x+1));\n }\n \n\n }", "private void createpanel2() {\r\n\t\tpanels[1].setLayout(new GridLayout(1, 2));\r\n\r\n\t\tdescription[0] = new JLabel(\"Accountname: \");\r\n\t\tdescription[0].setFont(smallfont);\r\n\t\tdescription[0].setHorizontalAlignment(JLabel.CENTER);\r\n\t\tuserinfo = new JTextField() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\")) {\r\n\t\t\tuserinfo.setForeground(Color.WHITE);\r\n\t\t} else {\r\n\t\t\tuserinfo.setForeground(Color.BLACK);\r\n\t\t}\r\n\t\tuserinfo.setOpaque(false);\r\n\t\tuserinfo.setFont(smallfont);\r\n\t\tpanels[1].add(description[0]);\r\n\t\tpanels[1].add(userinfo);\r\n\t\tpanels[1].setOpaque(false);\r\n\t\tallComponents.add(panels[1]);\r\n\t\tpanels[0].revalidate();\r\n\t}", "private Parent create() {\n root.setPrefSize(600,600);\r\n\r\n for(int i = 0; i < 3; ++i) {\r\n for(int j = 0; j < 3; ++j) {\r\n Tile tile = new Tile();\r\n tile.setTranslateX(j * 200);\r\n tile.setTranslateY(i * 200);\r\n\r\n root.getChildren().add(tile);\r\n board[j][i] = tile;\r\n }\r\n }\r\n\r\n // horizontal strikes\r\n for(int i = 0; i < 3; ++i) {\r\n comboList.add(new Combination(board[0][i], board[1][i], board[2][i]));\r\n }\r\n\r\n // vertical strikes\r\n for(int j = 0; j < 3; ++j) {\r\n comboList.add(new Combination(board[j][0], board[j][1], board[j][2]));\r\n }\r\n\r\n // diagonal strikes\r\n comboList.add(new Combination(board[0][0], board[1][1], board[2][2]));\r\n comboList.add(new Combination(board[2][0], board[1][1], board[0][2]));\r\n\r\n return root;\r\n }", "private void updateBoard() throws FileNotFoundException {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Creating board image\");\r\n\t\tBufferedImage combined = new BufferedImage(GlobalVars.images.get(\"Board1\").getWidth(), GlobalVars.images.get(\"Board1\").getHeight(), BufferedImage.TYPE_INT_ARGB);\r\n\t\t\r\n\t\tGraphics g = combined.getGraphics();\r\n\t\t// Draws board template first\r\n\t\tg.drawImage(GlobalVars.images.get(\"Board1\"), 0, 0, null);\r\n\t\t\r\n\t\t// Loops through contents and adds secrets, artifacts, idols\r\n\t\tfor (int i = 0; i < mapContents.length; i++) {\r\n\t\t\tif (mapContents[i] != null && mapContents[i] != \"heart\") {\r\n\t\t\t\tint offsetX = 4;\r\n\t\t\t\tint offsetY = -1;\r\n\t\t\t\tif (mapContents[i].startsWith(\"Minor\")) {\r\n\t\t\t\t\toffsetX = 7;\r\n\t\t\t\t\toffsetY = 3;\r\n\t\t\t\t}\r\n\t\t\t\t// Specific spots to this map\r\n\t\t\t\tif (i == 18) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), 206, 286, null);\r\n\t\t\t\t} else if (i == 19) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), 299, 287, null);\r\n\t\t\t\t} else if (i == 25) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), 297, 352, null);\r\n\t\t\t\t} else if (i == 28) {\r\n\t\t\t\t\tint num = Integer.parseInt(mapContents[i].substring(10));\r\n\t\t\t\t\tif (num > 0) {\r\n\t\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"MonkeyIdol\"), 28, 369, null);\r\n\t\t\t\t\t\tif (num > 1) {\r\n\t\t\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"MonkeyIdol\"), 28, 395, null);\r\n\t\t\t\t\t\t\tif (num > 2) {\r\n\t\t\t\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"MonkeyIdol\"), 28, 422, null);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(mapContents[i]), GlobalVars.playerCoordsPerRoom[i][0]+offsetX, GlobalVars.playerCoordsPerRoom[i][1]+offsetY, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Draws dragons\r\n\t\tif (attackLevel == 0) g.drawImage(GlobalVars.images.get(\"Dragon\"), 395, 548, null);\r\n\t\telse if (attackLevel == 1) g.drawImage(GlobalVars.images.get(\"Dragon\"), 456, 542, null);\r\n\t\telse if (attackLevel == 2) g.drawImage(GlobalVars.images.get(\"Dragon\"), 513, 510, null);\r\n\t\telse if (attackLevel == 3) g.drawImage(GlobalVars.images.get(\"Dragon\"), 549, 462, null);\r\n\t\telse if (attackLevel == 4) g.drawImage(GlobalVars.images.get(\"Dragon\"), 561, 412, null);\r\n\t\telse if (attackLevel == 5) g.drawImage(GlobalVars.images.get(\"Dragon\"), 551, 349, null);\r\n\t\telse {\r\n\t\t\tg.drawImage(GlobalVars.images.get(\"Dragon\"), 552, 287, null);\r\n\t\t}\r\n\t\t\r\n\t\t// Draws characters\r\n\t\tg.drawImage(GlobalVars.images.get(\"RedChar\"), p1.getPiece().getX(), p1.getPiece().getY(), null);\r\n\t\tif (playerCount >= 2) {\r\n\t\t\tg.drawImage(GlobalVars.images.get(\"BlueChar\"), p2.getPiece().getX(), p2.getPiece().getY(), null);\r\n\t\t\tif (playerCount >= 3) {\r\n\t\t\t\tg.drawImage(GlobalVars.images.get(\"YellowChar\"), p3.getPiece().getX(), p3.getPiece().getY(), null);\r\n\t\t\t\tif (playerCount >= 4) {\r\n\t\t\t\t\tg.drawImage(GlobalVars.images.get(\"GreenChar\"), p4.getPiece().getX(), p4.getPiece().getY(), null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Writes the combined image into a file\r\n\t\ttry {\r\n\t\t\tImageIO.write(combined, \"PNG\", new File(\"newboard.png\"));\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Builds an embed and sends it to the filesChannel\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(gameChannel.getName());\r\n\t\tembed.setColor(Color.GRAY);\r\n\t\tInputStream test = new FileInputStream(\"newboard.png\");\r\n\t\tembed.setImage(\"attachment://newboard.png\");\r\n\t\tMessageBuilder m = new MessageBuilder();\r\n\t\tm.setEmbed(embed.build());\r\n\t\tGlobalVars.filesChannel.sendFile(test, \"newboard.png\", m.build()).queue();\r\n\t}", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "public Board twin() {\n \tint[][] newBlocks = new int[dimension()][dimension()];\n \tfor (int row = 0; row < dimension(); row++) {\n \t\tfor (int col = 0; col < dimension(); col++) {\n \t\t\tnewBlocks [row][col] = blocks[row][col];\n \t\t}\n \t}\n \tboolean swappable = false;\n \t//Swap 2 blocks that are not 0\n \tint r1 = 0;\n \tint c1 = 0;\n \tint r2 = 0;\n \tint c2 = 0;\n \twhile ( !swappable ){\n \t\tr1 = StdRandom.uniform(dimension());\n \t\tc1 = StdRandom.uniform(dimension());\n \t\tif ( newBlocks[r1][c1] == 0 )\n \t\t\tcontinue;\n \t\tfor (int i = -1; i <= 1; i+=2){\n \t\t\tif ( c1 + i < 0 || c1 + i > dimension()-1 ){\n \t\t\t\tcontinue;\n \t\t\t} else if ( newBlocks[r1][c1+i] != 0 ){\n \t\t\t\tr2 = r1;\n \t\t\t\tc2 = c1 + i;\n \t\t\t\tswappable = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \t\n \tint temp = newBlocks[r1][c1];\n \tnewBlocks[r1][c1] = newBlocks[r2][c2];\n \tnewBlocks[r2][c2] = temp;\n \t\n \t//Create new board to return\n \treturn new Board(newBlocks, moves);\n }", "public Board() {\n for (int y = 0; y < spaces.length; y++) {\n for (int x = 0; x < spaces[0].length; x++) {\n spaces[y][x] = new SubBoard();\n wonBoards[y][x] = ' ';\n }\n }\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "public static void stageTwo() {\n status.recount();\n if (play) {\n coar_maze1.ending1();\n }\n while (status.getCounter() < 6 && play) {\n coar_maze1.direction();\n if (coar_maze1.china) {\n china_maze.china_orbs();\n china_maze.china_enemies();\n } else if (coar_maze1.amazon_forest) {\n amazon_jungle.amazon_river_orbs();\n amazon_jungle.amazon_river_enemies();\n }\n status.addCounter();\n quit();\n }\n status.recount();\n }", "public SetBoard(String newName){\n super(\"BattleShip Set\");\n\n //configuracoes basicas da janela\n\t\tsetSize(1100, 550);\n\t\tsetLocationRelativeTo(null);\n\t\tsetResizable(false);\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setContentPane(panel);\n container = getContentPane();\n container.setLayout(null);\n\n //cria a base do board do player e do computador\n gridPlayer.setBounds(3, 100, 497, 325);\n\t\tgridPlayer.setLayout(new GridLayout(10, 10, 2, 2));\n gridPc.setBounds(599, 100, 497, 325);\n\t\tgridPc.setLayout(new GridLayout(10, 10, 2, 2));\n\n //pega o name do player passado por parametro\n player.setName(newName);\n name = newName;\n\n //preenche ambos boards com uma imagem de ocean\n for(int line = 0; line < 10; line++){\n\t\t\tfor(int column = 0; column < 10; column++){\n\t\t\t\ttablePlayer[line][column] = new JButton(line+\"-\"+column, new ImageIcon(RandomBoard.class.getResource(\"/images/ocean.png\")));\n tablePlayer[line][column].setHorizontalTextPosition(SwingConstants.CENTER);\n tablePlayer[line][column].setMargin( new Insets(10, 10, 10, 10) );\n\t\t\t\ttablePlayer[line][column].addActionListener(this);\n tablePlayer[line][column].setForeground(Color.WHITE);\n\t\t\t\tgridPlayer.add(tablePlayer[line][column]);\n tablePc[line][column] = new JButton(line+\"-\"+column, new ImageIcon(RandomBoard.class.getResource(\"/images/ocean.png\")));\n tablePc[line][column].setHorizontalTextPosition(SwingConstants.CENTER);\n tablePc[line][column].setMargin( new Insets(10, 10, 10, 10) );\n\t\t\t\ttablePc[line][column].addActionListener(this);\n tablePc[line][column].setForeground(Color.WHITE);\n\t\t\t\tgridPc.add(tablePc[line][column]);\n\t\t\t}\n\t\t}\n\n //posiciona os elementos na janela\n exit.setBounds(7, 14, 120, 35);\n\t\texit.addActionListener(this);\n\n\t\tnewGame.setBounds(127, 14, 120, 35);\n\t\tnewGame.addActionListener(this);\n\n reset.setBounds(247, 14, 120, 35);\n\t\treset.addActionListener(this);\n\n hint.setBounds(367, 14, 120, 35);\n\t\thint.addActionListener(this);\n\n singleShot.setBounds(487, 14, 120, 35);\n\t\tsingleShot.addActionListener(this);\n\n commonShot.setBounds(607, 14, 120, 35);\n\t\tcommonShot.addActionListener(this);\n\n cascade.setBounds(727, 14, 120, 35);\n\t\tcascade.addActionListener(this);\n\n star.setBounds(847, 14, 120, 35);\n\t\tstar.addActionListener(this);\n\n playerLabel.setFont(new Font(\"Arial\", Font.BOLD, 15));\n\t\tplayerLabel.setBounds(12, 78, 120, 18);\n\n pc.setFont(new Font(\"Arial\", Font.BOLD, 15));\n\t\tpc.setBounds(607, 78, 120, 18);\n\n stopwatch.setFont(new Font(\"Arial\", Font.BOLD, 25));\n\t\tstopwatch.setBounds(1000, 10, 120, 50);\n\n aircraft.setBounds(7, 450, 120, 35);\n\t\taircraft.addActionListener(this);\n aircraft.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/aircraft.png\")));\n \n submarine.setBounds(127, 450, 120, 35);\n\t\tsubmarine.addActionListener(this);\n submarine.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/submarine.png\")));\n\n escortShip.setBounds(247, 450, 120, 35);\n\t\tescortShip.addActionListener(this);\n escortShip.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/escortShip.png\")));\n\n aircraftCarrier.setBounds(367, 450, 120, 35);\n\t\taircraftCarrier.addActionListener(this);\n aircraftCarrier.setIcon(new ImageIcon(SetBoard.class.getResource(\"/images/aircraftCarrier.png\")));\n\n play.setBounds(487, 450, 120, 35);\n play.addActionListener(this);\n\n container.add(gridPlayer);\n\t\tcontainer.add(gridPc);\n container.add(exit);\n container.add(newGame);\n container.add(reset);\n container.add(hint);\n container.add(singleShot);\n container.add(commonShot);\n container.add(cascade);\n container.add(star);\n container.add(playerLabel);\n container.add(pc);\n container.add(stopwatch);\n container.add(aircraft);\n container.add(submarine);\n container.add(escortShip);\n container.add(aircraftCarrier);\n container.add(play);\n\n //distribui os vehicles aleatoriamente no board do computador\n distVehPc.distribui(arrayPc, tablePc);\n\n //copia os valuees do arrayPc para outro array, ele sera usado caso o jogo seja reiniciado\n for(int line = 0; line < 10; line++){\n for(int column = 0; column < 10; column++){\n arrayPcAux[line][column] = arrayPc[line][column];\n }\n }\n\n //desabilita a maioria dos botoes, eles serao reativados quando o player montar seu campo e clicar em \"play\"\n hint.setEnabled(false);\n singleShot.setEnabled(false);\n commonShot.setEnabled(false);\n cascade.setEnabled(false);\n star.setEnabled(false);\n play.setEnabled(false);\n newGame.setEnabled(false);\n reset.setEnabled(false);\n }", "public void makeShips()\n\t{\n\t\t//The below is firstly to create the five ships \n\t\tint[] shipSizes= {2,3,3,4,5};\n\n\t\t//### Creating battleship to be put in the playerBattleShipsList\n\t\tfor (int x = 0; x < shipSizes.length; x ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newPlayerBattleShip = new BattleShip(shipSizes[x]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\tplayerBattleShipsList[x] = newPlayerBattleShip;\n\t\t}\n\n\t\t//### Creating battleship to be put in the aiBattleShipsList\n\n\t\tfor (int y = 0; y < shipSizes.length; y ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newAIBattleShip = new BattleShip(shipSizes[y]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\taiBattleShipsList[y] = newAIBattleShip;\n\t\t}\n\n\t}", "private void setUpGame(){\n DotCom one = new DotCom();\n one.setName(\"Ship 1\");\n DotCom two = new DotCom();\n two.setName(\"Ship 2\");\n DotCom three = new DotCom();\n three.setName(\"Ship 3\");\n dotComsList.add(one);\n dotComsList.add(two);\n dotComsList.add(three);\n\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"Your goal is to sink three battleships.\");\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"Ships are Ship 1,Ship 2 and Ship 3\");;\n String structure=\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| A0 | A1 | A2 | A3 | A4 | A5 | A6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| B0 | B1 | B2 | B3 | B4 | B5 | B6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| C0 | C1 | C2 | C3 | C4 | C5 | C6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| D0 | D1 | D2 | D3 | D4 | D5 | D6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| E0 | E1 | E2 | E3 | E4 | E5 | E6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| F0 | F1 | F2 | F3 | F4 | F5 | F6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| G0 | G1 | G2 | G3 | G4 | G5 | G6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\";\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"The cell structure is\\n\"+structure);\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"The ships are of dimensions 3x1 arranged horizontally or vertically\");\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"Start sinking them! To battle! To victory! UUURRRRRAAAAAA!\");\n\n for ( DotCom dotcomToSet: dotComsList){\n ArrayList<String> newLocation = helper.placeDotCom(3);\n dotcomToSet.setLocationCells(newLocation);\n }\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "private void swapFirstTwoTiles() {\n ((Board) boardManager.getBoard()).swapTiles(0, 0, 0, 1);\n }" ]
[ "0.65539825", "0.64695245", "0.6448175", "0.6294802", "0.6141508", "0.6132015", "0.61204255", "0.59946185", "0.59584385", "0.5947826", "0.59276474", "0.59087557", "0.5900636", "0.5872359", "0.5835544", "0.5816897", "0.58103335", "0.57977825", "0.5796284", "0.57945377", "0.5788265", "0.57822865", "0.5764258", "0.5758865", "0.5757842", "0.57334113", "0.5726605", "0.57106596", "0.5704752", "0.56964326", "0.56559336", "0.5635011", "0.56203455", "0.56180817", "0.56091356", "0.56082386", "0.5605808", "0.5586725", "0.55502635", "0.5545136", "0.55411285", "0.5538324", "0.5535844", "0.55284274", "0.5520809", "0.55206424", "0.5515137", "0.5514016", "0.5502004", "0.5496297", "0.5485651", "0.54799587", "0.5477349", "0.5474598", "0.5459598", "0.5457181", "0.5448389", "0.5439322", "0.54344803", "0.54330885", "0.5425629", "0.5423875", "0.5419847", "0.54145265", "0.54126674", "0.5411192", "0.5407247", "0.54040414", "0.5400572", "0.5399984", "0.53985554", "0.5391616", "0.5388528", "0.53872454", "0.5384884", "0.5383919", "0.53743523", "0.53686094", "0.5368247", "0.53607523", "0.53568816", "0.5339008", "0.53265303", "0.5319658", "0.5319499", "0.53118986", "0.5297423", "0.52881324", "0.52873373", "0.5287132", "0.5284528", "0.52814233", "0.52719057", "0.5260714", "0.5260008", "0.52464545", "0.5246294", "0.52455115", "0.5240311", "0.523976" ]
0.7242972
0
end of create This method creates the third room and distributes the items onto it.
public void create3(){ //creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there for(int i = 0; i <this.position.length; i++){ for(int p = 0; p < this.position.length; p++){ this.position[i][p] = 0;//filling with zero } }//end of position making board //creating stairs to connect rooms for(int i = 0; i <this.Stairs.length; i++){ for(int p = 0; p < this.Stairs.length; p++){ this.Stairs[i][p] = 0;//filling with zero } } this.Stairs[1][1] = 1; //creating board to keep track of garret for(int i = 0; i <this.Garret.length; i++){ for(int p = 0; p < this.Garret.length; p++){ this.Garret[i][p] = 0;//filling with zero } }//end of garret board this.Garret[18][10] = 1;//putts garret there //makes board that tells if item is there for(int i = 0; i <this.Items.length; i++){ for(int p = 0; p < this.Items.length; p++){ this.Items[i][p] = null;//filling with null } }//end of filling board that has items //makes border of room for(int i = 0; i < this.area.length; i++){ for(int p = 0; p<this.area.length; p++){ if(i==0){ this.area[i][p] = "[ ]"; } else if (p==0 || p==19){ this.area[i][p] = "[ ]"; } else if(i==19){ this.area[i][p] = "[ ]"; } else{ this.area[i][p] = " "; } }//end of innner for }//end of outter for for(int i = 1; i< 6 ; i++){ for(int p = 7; p < 8; p++){ this.area[i][p] = "[ ]"; } } for(int i = 6; i< 7 ; i++){ for(int p = 7; p > 4; p--){ this.area[i][p] = "[ ]"; } } for(int i = 6; i< 11 ; i++){ for(int p = 4; p < 5; p++){ this.area[i][p] = "[ ]"; } } for(int i = 10; i< 11 ; i++){ for(int p = 5; p < 8; p++){ this.area[i][p] = "[ ]"; } } for(int i = 11; i< 15 ; i++){ for(int p = 7; p < 8; p++){ this.area[i][p] = "[ ]"; } } for(int i = 15; i< 16 ; i++){ for(int p = 7; p > 3; p--){ this.area[i][p] = "[ ]"; } } for(int i = 13; i< 14 ; i++){ for(int p = 1; p < 4; p++){ this.area[i][p] = "[ ]"; } } for(int i = 4; i< 5 ; i++){ for(int p = 12; p < 17; p++){ this.area[i][p] = "[ ]"; } } for(int i = 5; i< 9 ; i++){ for(int p = 12; p < 13; p++){ this.area[i][p] = "[ ]"; } } for(int i = 13; i< 14 ; i++){ for(int p = 7; p < 12; p++){ this.area[i][p] = "[ ]"; } } for(int i = 13; i< 16 ; i++){ for(int p = 12; p < 13; p++){ this.area[i][p] = "[ ]"; } } for(int i = 9; i< 10 ; i++){ for(int p = 12; p < 19; p++){ this.area[i][p] = "[ ]"; } System.out.println(" "); }//end of for that creates walls //for loop that distributes items int y = 0; int x = 0; for(int i = 0;i<10;i++){ Item thing = ItemGenerator.generate();//making an item boolean good = false; while(!good){//makes coordates until there is nothing in the way y = fate.nextInt(20);//getting coordiantaes x = fate.nextInt(20); if(this.Items[y][x]==null && this.area[y][x] != "[ ]"){ good = true; }//end of if else{ good = false; } }//end of while Items[y][x] = thing; }//end of for that distributes items on board }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public void create2(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[1][1] = 1;\n\n\t\t//creating stairs to transport to room3\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Stairs[18][18] = 1;\n\n\t\t//creating board to keep track of ari\n\t\tfor(int i = 0; i <this.Ari.length; i++){\n\t\t\tfor(int p = 0; p < this.Ari.length; p++){\n\t\t\t\tthis.Ari[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Ari[7][11] = 1;//putts ari there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 3; i< 4 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public void create(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\t\tthis.position[1][1] = 1;//putting player in this position\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[9][13] = 1;//puts the door here \n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 7; i< 8 ; i++){\n\t\t\tfor(int p = 2; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 17; i< 18 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\t\n\t\t}\n\t\tfor(int i = 14; i< 15 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\t\n\t\t}\t\n\t\tfor(int i = 11; i< 12 ; i++){\n\t\t\tfor(int p = 10; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 3; p < 6; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 16; i< 17 ; i++){\n\t\t\tfor(int p = 6; p < 13; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 5; p < 10; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\t\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes \n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{ \n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }", "public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }", "public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory = new ArrayList<>();\n\tArrayList<Exit> kitchenExits = new ArrayList<>();\n\tRoom Kitchen = new Room(\"Kitchen\", \"This is a very large kitchen.\", kitchenInventory, kitchenExits);\n\n\t//dining room\n\tArrayList<Item> diningInventory = new ArrayList<>();\n\tArrayList<Exit> diningExits = new ArrayList<>();\n\tRoom Dining = new Room(\"Dining Room\", \"This dining room is set for 12 people\", diningInventory, diningExits);\n\n\t//lounge\n\tArrayList<Item> loungeInventory = new ArrayList<>();\n\tArrayList<Exit> loungeExits = new ArrayList<>();\n\tRoom Lounge = new Room(\"Lounge\", \"The Lounge is a mess, and there are blood spatters on the wall\", loungeInventory, loungeExits);\n\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"Fill rooms with objects\">\n\thallInventory.add(new Item(\"a fruit bowl\", \"The fruit bowl contains some fruit\"));\n\thallInventory.add(new Item(\"a clock\", \"Tick Tock\"));\n\tkitchenInventory.add(new Item(\"a stove\", \"The stove is very hot\"));\n\tkitchenInventory.add(new Item(\"a knife\", \"The knife is blunt\"));\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"add exits to rooms\">\n\thallExits.add(new Exit(1, Lounge));\n\thallExits.add(new Exit(4, Dining));\n\tloungeExits.add(new Exit(2, Hall));\n\tdiningExits.add(new Exit(3, Hall));\n\tdiningExits.add(new Exit(4, Kitchen));\n\tkitchenExits.add(new Exit(3, Dining));\n\t//</editor-fold>\n\n\t//create character : Avatar\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"character creation\">\n\tArrayList<Item> invent = new ArrayList<>();\n\tCharacter Avatar = new Character(\"Tethys\", \"A tall elf dressed in armour\", 100, invent);\n\tinvent.add(new Item(\"armour\", \"leather armour\"));\n\t//</editor-fold>\n\t//begin\n\tRoom currentLoc = Hall;\n\tSystem.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\tcurrentLoc.printInventory();\n\tcurrentLoc.printExits();\n\n\tBufferedReader command = new BufferedReader(new InputStreamReader(System.in));\n\tString orders = null;\n\twhile (true) {\n\t System.out.print(\"What do you want to do? \");\n\t try {\n\t\torders = command.readLine();\n\t } catch (IOException ioe) {\n\t\tSystem.out.println(\"I'm sorry, I didn't understand that!\");\n\t\tSystem.exit(1);\n\t }\n\n\t String[] orderWords = orders.split(\" \");\n\n//\t for (String s : orderWords){\n//\t\tSystem.out.print(s);\n\t switch (orderWords[0].toLowerCase()) {\n\t\tcase \"go\":\n\t\t int count = 0;\n\t\t for (Exit e : currentLoc.getExits()) {\n\t\t\tString direct = orderWords[1].toUpperCase();\n\t\t\tif (direct.equals(e.getDirectionName())) {\n\t\t\t currentLoc = e.getLeadsTo();\n\t\t\t count++;\n\t\t\t System.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\t\t\t currentLoc.printInventory();\n\t\t\t currentLoc.printExits();\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (count == 0) {\n\t\t\tSystem.out.print(\"I'm sorry, I can't go that way.\\n\");\n\t\t }\n\t\t break;\n\n\t\tcase \"pick\":\n\n\n\t\tcase \"put\":\n\n\n\t\tcase \"exit\":\n\t\t System.exit(0);\n\t\t break;\n\t }\n\n\t}\n\n\n }", "private Room createCastle(){\n Room hallway = new Room(\"the hallway\");\n\n Room theStairs = new Room(\"the staircase\");\n Medic medic = new Medic(20, 3);\n theStairs.medic = medic;\n\n Room livingRoom = new Room(\"the living room\");\n Monster monster = new Monster(\"Grimeteeth\", 10, 100);\n livingRoom.monster = monster;\n\n Room firstFloor = new Room(\"first floor\");\n Room secondFloor = new Room(\"second floor\");\n Room thirdFloor = new Room(\"third floor\");\n monster = new Monster(\"Voodoobug\", 30, 100);\n thirdFloor.monster = monster;\n\n Room balcony = new Room(\"balcony\");\n balcony.endOfGameText = \"You fall out of the balcony, and die\";\n Room chamber = new Room(\"Chamber\");\n monster = new Monster (\"Smogstrike\", 50, 100);\n chamber.monster = monster;\n chamber.hasTreasure = true;\n chamber.endOfGameText = \"YEEES! You won the game, and found the treasure!\";\n\n Room bedchamber = new Room(\"bedchamber\");\n bedchamber.endOfGameText = \"You fall in a deep sleep, and will never wake up!\";\n\n\n /**\n * Options connecting to the rooms hallway,theStairs,sale,livingRoom variable\n */\n Connections[] hallwayConnections = new Connections[2];\n hallwayConnections[0] = new Connections(\"go left\",\"l\", theStairs);\n hallwayConnections[1] = new Connections(\"go right\",\"r\", livingRoom);\n hallway.connections = hallwayConnections;\n\n Connections[] stairsConnections = new Connections[3];\n stairsConnections[0] = new Connections(\"first floor\",\"1\", firstFloor);\n stairsConnections[1] = new Connections(\"second floor\",\"2\", secondFloor);\n stairsConnections[2] = new Connections(\"third floor\",\"3\", thirdFloor);\n theStairs.connections = stairsConnections;\n\n Connections[] firstFloorConnections = new Connections[3];\n firstFloorConnections[0] = new Connections(\"blue door\",\"b\",hallway);\n firstFloorConnections[1] = new Connections(\"red door\",\"r\",balcony);\n firstFloorConnections[2] = new Connections(\"yellow door\",\"y\",chamber);\n firstFloor.connections = firstFloorConnections;\n\n Connections[] secondFloorConnections = new Connections[1];\n secondFloorConnections[0] = new Connections(\"small door\",\"s\",chamber);\n secondFloor.connections = secondFloorConnections;\n\n Connections[] thridConnections = new Connections[2];\n thridConnections[0] = new Connections(\"big door\",\"bd\",balcony);\n thridConnections[1] = new Connections(\"elevator\",\"e\",firstFloor);\n thirdFloor.connections = thridConnections;\n\n Connections[] livingRoomConnections = new Connections[2];\n livingRoomConnections[0] = new Connections(\"iron door\",\"i\",hallway);\n livingRoomConnections[1] = new Connections(\"tree door\",\"t\",bedchamber);\n livingRoom.connections = livingRoomConnections;\n\n return hallway;\n }", "public void placeMandatoryObjects()\r\n {\r\n Random rng = new Random();\r\n //Adds an endgame chest somewhere (NOT in spawn)\r\n Room tempRoom = getRoom(rng.nextInt(dungeonWidth - 1) +1, rng.nextInt(dungeonHeight - 1) +1);\r\n tempRoom.addObject(new RoomObject(\"Endgame Chest\", \"overflowing with coolness!\"));\r\n if (tempRoom.getMonster() != null)\r\n {\r\n tempRoom.removeMonster();\r\n }\r\n tempRoom.addMonster(new Monster(\"Pelo Den Stygge\", \"FINAL BOSS\", 220, 220, 12));\r\n //Adds a merchant to the spawn room\r\n getRoom(0,0).addObject(new RoomObject(\"Merchant\", \"like a nice fella with a lot of goods (type \\\"wares\\\" to see his goods)\"));\r\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public void setBasicNewGameWorld()\r\n\t{\r\n\t\tlistCharacter = new ArrayList<Character>();\r\n\t\tlistRelationship = new ArrayList<Relationship>();\r\n\t\tlistLocation = new ArrayList<Location>();\r\n\t\t\r\n\t\t//Location;\r\n\t\t\r\n\t\tLocation newLocationCity = new Location();\r\n\t\tnewLocationCity.setToGenericCity();\r\n\t\tLocation newLocationDungeon = new Location();\r\n\t\tnewLocationDungeon.setToGenericDungeon();\r\n\t\tLocation newLocationForest = new Location();\r\n\t\tnewLocationForest.setToGenericForest();\r\n\t\tLocation newLocationJail = new Location();\r\n\t\tnewLocationJail.setToGenericJail();\r\n\t\tLocation newLocationPalace = new Location();\r\n\t\tnewLocationPalace.setToGenericPalace();\r\n\t\t\r\n\t\tlistLocation.add(newLocationCity);\r\n\t\tlistLocation.add(newLocationDungeon);\r\n\t\tlistLocation.add(newLocationForest);\r\n\t\tlistLocation.add(newLocationJail);\r\n\t\tlistLocation.add(newLocationPalace);\r\n\t\t\r\n\t\t\r\n\t\t//Item\r\n\t\tItem newItem = new Item();\r\n\t\t\r\n\t\tString[] type =\t\tnew String[]\t{\"luxury\"};\r\n\t\tString[] function = new String[]\t{\"object\"};\t\r\n\t\tString[] property = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900101,\"diamond\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationPalace.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"weapon\"};\r\n\t\tfunction = new String[]\t{\"equipment\"};\t\r\n\t\tproperty = new String[]\t{\"weapon\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(500101,\"dagger\", type, function, \"null\", property, 1, false);\t\t\r\n\t\tnewLocationJail.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\ttype =\t\tnew String[]\t{\"quest\"};\r\n\t\tfunction = new String[]\t{\"object\"};\t\r\n\t\tproperty = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900201,\"treasure_map\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationDungeon.addOrUpdateItem(newItem);\r\n\r\n\t\t\r\n\t\t////// Add very generic item (10+ items of same name)\r\n\t\t////// These item start ID at 100000\r\n\t\t\r\n\t\t//Add 1 berry\r\n\t\t//100000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"berry\"};\r\n\t\tnewItem.setNewItem(100101,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100103,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t*/\r\n\r\n\t\t\r\n\t\t//Add 2 poison_plant\r\n\t\t//101000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem.setNewItem(100201,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100202,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\r\n\t\t//player\r\n\t\tCharacter newChar = new Character(\"player\", 1, true,\"city\", 0, false);\r\n\t\tnewChar.setIsPlayer(true);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//UNIQUE NPC\r\n\t\tnewChar = new Character(\"mob_NPC_1\", 15, true,\"city\", 0, false);\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\t\t\r\n\t\tnewChar = new Character(\"king\", 20, true,\"palace\", 3, true);\r\n\t\tnewChar.addOccupation(\"king\");\r\n\t\tnewChar.addOccupation(\"noble\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\r\n\t\t//Mob character\r\n\t\tnewChar = new Character(\"soldier1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// REMOVE to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"soldier2\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"soldier3\", 20, true,\"palace\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//listLocation.add(newLocationCity);\r\n\t\t//listLocation.add(newLocationDungeon);\r\n\t\t//listLocation.add(newLocationForest);\r\n\t\t//listLocation.add(newLocationJail);\r\n\t\t//listLocation.add(newLocationPalace);\r\n\t\t\r\n\t\tnewChar = new Character(\"doctor1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addSkill(\"heal\");\r\n\t\tnewChar.addOccupation(\"doctor\");\r\n\t\tlistCharacter.add(newChar);\t\r\n\t\tnewChar = new Character(\"blacksmith1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"blacksmith\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"thief1\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"thief\");\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"unlock\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(300101,\"lockpick\", type, function, \"thief1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// Remove to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"messenger1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"messenger\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\tnewChar = new Character(\"miner1\", 20, true,\"dungeon\", 1, true);\r\n\t\tnewChar.addOccupation(\"miner\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"lumberjack1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"lumberjack\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewChar = new Character(\"scout1\", 20, true,\"forest\", 2, true);\r\n\t\tnewChar.addOccupation(\"scout\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"farmer1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"farmer\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"merchant1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addOccupation(\"merchant\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\t// Merchant Item\r\n\t\t//NPC item start at 50000\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200101,\"potion_poison\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"healing\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200201,\"potion_heal\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"cure_poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200301,\"antidote\", type, function, \"merchant1\", property, 1, false);\t\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\t//add merchant to List\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Relation\r\n\t\tRelationship newRelation = new Relationship();\r\n\t\tnewRelation.setRelationship(\"merchant1\", \"soldier1\", \"friend\");\r\n\t\tlistRelationship.add(newRelation);\r\n\t\t\r\n\t\t//\r\n\t\r\n\t}", "public void buildProjector(int quantity){\r\n if (quantity != 0){\r\n eventRoomItems.addItem(itemFactory.constructProjector());\r\n }\r\n else{\r\n eventRoomItems.addItem(null);\r\n }\r\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private void makeRooms(){\n roomPanel = new JPanel(new GridLayout(2,3,2,2));\n\n //rooms\n prison = new JTextArea(\"Prison\",10,20);\n embassy = new JTextArea(\"Embassy\",10,20);\n academy = new JTextArea(\"Academy\",10,20);\n treasury = new JTextArea(\"Treasury\",10,20);\n altar = new JTextArea(\"Altar\",10,20);\n market = new JTextArea(\"Market\",10,20);\n\n roomPanel.add(prison);\n roomPanel.add(embassy);\n roomPanel.add(academy);\n roomPanel.add(treasury);\n roomPanel.add(altar);\n roomPanel.add(market);\n }", "public Apartment(char apartmentType, Room room1, Room room2, Room room3) {\n this.apartmentType = apartmentType;\n this.room1 = room1;\n this.room2 = room2;\n this.room3 = room3;\n }", "private void createInstances()\n {\n Room EnchantedForest, IdyllicGlade, GumdropHill, DenseWoods, VolcanoHell, SecretHotSpring, MagmaChamber, MysteriousCloud, SkyParadise, Cirrostratus, Nimbostratus, Stratocumulus, WaterTemple, Whirlpool, EyeoftheStorm, BossQuarters, Portal;\n \n random = new Random();\n allrooms = new ArrayList<Room>();\n \n // create the rooms providing an ID to be passed into the room constructor\n EnchantedForest = new EnchantedForestRoom();\n allrooms.add(EnchantedForest);\n IdyllicGlade = new IdyllicGladeRoom();\n allrooms.add(IdyllicGlade);\n GumdropHill = new GumdropHillRoom();\n allrooms.add(GumdropHill);\n DenseWoods = new DenseWoodsRoom();\n allrooms.add(DenseWoods);\n VolcanoHell = new VolcanoHellRoom();\n allrooms.add(VolcanoHell);\n SecretHotSpring = new SecretHotSpringRoom();\n allrooms.add(SecretHotSpring);\n MagmaChamber = new MagmaChamberRoom();\n allrooms.add(MagmaChamber);\n MysteriousCloud = new MysteriousCloudRoom();\n allrooms.add(MysteriousCloud);\n SkyParadise = new SkyParadiseRoom();\n allrooms.add(SkyParadise);\n Cirrostratus = new CirrostratusRoom();\n allrooms.add(Cirrostratus);\n Nimbostratus = new NimbostratusRoom();\n allrooms.add(Nimbostratus);\n Stratocumulus = new StratocumulusRoom();\n allrooms.add(Stratocumulus);\n WaterTemple = new WaterTempleRoom();\n allrooms.add(WaterTemple);\n Whirlpool = new WhirlpoolRoom();\n allrooms.add(Whirlpool);\n EyeoftheStorm = new EyeoftheStormRoom();\n allrooms.add(EyeoftheStorm);\n BossQuarters = new BossQuartersRoom(); \n allrooms.add(BossQuarters);\n Portal = new PortalRoom();\n \n \n // initialise room exits, items and creatures\n EnchantedForest.setExit(\"east\", IdyllicGlade);\n EnchantedForest.setExit(\"west\", GumdropHill);\n EnchantedForest.setExit(\"south\", DenseWoods);\n \n IdyllicGlade.setExit(\"west\", EnchantedForest);\n \n GumdropHill.setExit(\"down\", EnchantedForest);\n GumdropHill.setExit(\"up\", MysteriousCloud);\n\n DenseWoods.setExit(\"north\", EnchantedForest);\n DenseWoods.setExit(\"south\", VolcanoHell);\n \n MagmaChamber.setExit(\"north\",VolcanoHell);\n \n VolcanoHell.setExit(\"east\", SecretHotSpring);\n VolcanoHell.setExit(\"north\", DenseWoods);\n VolcanoHell.setExit(\"west\", MysteriousCloud);\n VolcanoHell.setExit(\"south\", MagmaChamber);\n \n SecretHotSpring.setExit(\"west\", VolcanoHell);\n \n MysteriousCloud.setExit(\"west\", VolcanoHell);\n MysteriousCloud.setExit(\"in\", Portal);\n MysteriousCloud.setExit(\"up\", SkyParadise);\n \n SkyParadise.setExit(\"down\", MysteriousCloud);\n SkyParadise.setExit(\"up\", Cirrostratus);\n SkyParadise.setExit(\"east\", Nimbostratus);\n \n Cirrostratus.setExit(\"north\", SkyParadise);\n Cirrostratus.setExit(\"down\", WaterTemple);\n \n Nimbostratus.setExit(\"west\", SkyParadise);\n Nimbostratus.setExit(\"east\", Stratocumulus);\n \n Stratocumulus.setExit(\"west\", Nimbostratus);\n Stratocumulus.setExit(\"down\", WaterTemple);\n \n WaterTemple.setExit(\"up\",Stratocumulus);\n WaterTemple.setExit(\"high\", Cirrostratus);\n WaterTemple.setExit(\"down\", Whirlpool);\n WaterTemple.setExit(\"in\", BossQuarters);\n \n Whirlpool.setExit(\"up\", WaterTemple);\n Whirlpool.setExit(\"down\", EyeoftheStorm);\n \n EyeoftheStorm.setExit(\"up\", Whirlpool);\n EyeoftheStorm.setExit(\"in\", BossQuarters);\n \n BossQuarters.setExit(\"out\", WaterTemple);\n \n currentRoom = EnchantedForest; \n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public void createRoom(int len, int leftWid, int rightWid) {\n switch (facing) {\n case \"Up\":\n addUpBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Down\":\n addDownBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Left\":\n addLeftBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Right\":\n addRightBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n default:\n System.out.println(\"The wizard loses his direction!\");\n\n }\n }", "public void genLists() {\n\t\tItem noitem = new Item(\"nothing\", \"You don't see that here.\", \"no_item\", \"\", true);\r\n\t\titems.put(noitem.getId(), noitem);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//DataInputStream in = new DataInputStream(new FileInputStream(ITEM_FILE));\r\n\t\t\tDataInputStream in = new DataInputStream(getClass().getResourceAsStream(ITEM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tItem new_item = Item.readItem(in);\r\n\t\t\t\t\titems.put(new_item.getId(), new_item);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t\tin = new DataInputStream(getClass().getResourceAsStream(ROOM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tRoom new_room = Room.readRoom(in, items);\r\n\t\t\t\t\trooms.put(new_room.getId(), new_room);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tplayer.setCurrentRoom(getRoom(\"start\"));\r\n\t}", "void makeMoreRooms() {\n\t\twhile(rooms.size() < size.maxRooms) {\n\t\t\t\tRoom made;\n\t\t\t\tint height = baseHeight;\n\t\t\t\tint x = random.nextInt(size.width);\n\t\t\t\tint z = random.nextInt(size.width);\n\t\t\t\tint xdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tint zdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tif(bigRooms.use(random)) {\n\t\t\t\t\txdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t\tzdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t}\n\t\t\t\tint ymod = (xdim <= zdim) ? (int) Math.sqrt(xdim) : (int) Math.sqrt(zdim);\n\t\t\t\tint roomHeight = random.nextInt((verticle.value / 2) + ymod + 1) + 2;\n\t\t\t\tmade = new PlaceSeed(x, height, z).growRoom(xdim, zdim, roomHeight, this, null, null);\n\t\t\t}\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Extra Rooms (old)\");\n\t\t}", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createAccess(ArrayList<Room> rooms) {\n\n rooms.get(0).setNorth(rooms.get(1));\n\n rooms.get(1).setEast(rooms.get(2));\n rooms.get(1).setWest(rooms.get(4));\n rooms.get(1).setSouth(rooms.get(0));\n\n rooms.get(2).setWest(rooms.get(1));\n rooms.get(2).setNorth(rooms.get(10));\n rooms.get(2).setEast(rooms.get(3));\n\n rooms.get(3).setWest(rooms.get(2));\n\n rooms.get(4).setWest(rooms.get(5));\n rooms.get(4).setNorth(rooms.get(8));\n rooms.get(4).setEast(rooms.get(1));\n\n rooms.get(5).setNorth(rooms.get(7));\n rooms.get(5).setSouth(rooms.get(6));\n rooms.get(5).setEast(rooms.get(4));\n\n rooms.get(6).setNorth(rooms.get(5));\n\n rooms.get(7).setNorth(rooms.get(13));\n rooms.get(7).setSouth(rooms.get(5));\n\n rooms.get(8).setEast(rooms.get(9));\n rooms.get(8).setSouth(rooms.get(4));\n\n rooms.get(9).setWest(rooms.get(8));\n rooms.get(9).setNorth(rooms.get(15));\n rooms.get(9).setEast(rooms.get(10));\n\n rooms.get(10).setWest(rooms.get(9));\n rooms.get(10).setEast(rooms.get(11));\n rooms.get(10).setSouth(rooms.get(2));\n\n rooms.get(11).setWest(rooms.get(10));\n\n rooms.get(12).setEast(rooms.get(13));\n\n rooms.get(13).setWest(rooms.get(12));\n rooms.get(13).setEast(rooms.get(14));\n rooms.get(13).setSouth(rooms.get(7));\n\n rooms.get(14).setWest(rooms.get(13));\n rooms.get(14).setNorth(rooms.get(18));\n rooms.get(14).setEast(rooms.get(15));\n\n rooms.get(15).setWest(rooms.get(14));\n rooms.get(15).setNorth(rooms.get(19));\n rooms.get(15).setEast(rooms.get(16));\n rooms.get(15).setSouth(rooms.get(9));\n\n rooms.get(16).setWest(rooms.get(15));\n rooms.get(16).setEast(rooms.get(17));\n\n rooms.get(17).setWest(rooms.get(16));\n\n rooms.get(18).setSouth(rooms.get(14));\n\n rooms.get(19).setSouth(rooms.get(13));\n\n }", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "public List<Room> initialiseRooms() {\n\n Room mainRoom = new Room(0, \"mainroom.tmx\", \"Main Foyer\");\n\n Room rch037 = new Room(1, \"rch037.tmx\", \"RCH/037 Lecture Theatre\");\n\n Room portersOffice = new Room(2, \"portersoffice.tmx\", \"Porters Office\");\n\n Room kitchen = new Room(3, \"kitchen.tmx\", \"Kitchen\");\n\n Room islandOfInteraction = new Room(4, \"islandofinteraction.tmx\", \"Island of Interaction\");\n\n Room toilet = new Room(5, \"toilet.tmx\", \"Toilet\");\n\n Room computerRoom = new Room(6, \"computerroom.tmx\", \"Computer Room\");\n\n Room lakeHouse = new Room(7, \"lakehouse.tmx\", \"Lakehouse\");\n\n Room outside = new Room(8, \"outside.tmx\", \"Outside Ron Cooke Hub\");\n\n Room pod = new Room(9, \"pod.tmx\", \"Pod\");\n\n\n mainRoom.addTransition(new Room.Transition().setFrom(17, 17).setTo(portersOffice, 1, 5, Direction.EAST)) //To Porters Office\n\n .addTransition(new Room.Transition().setFrom(27, 13).setTo(kitchen, 1, 3, Direction.EAST)) //To Kitchen\n\n .addTransition(new Room.Transition().setFrom(26, 29).setTo(islandOfInteraction, 11, 14, Direction.WEST)) //To Island of Interaction\n\n .addTransition(new Room.Transition().setFrom(18, 2).setTo(toilet, 1, 1, Direction.EAST)) //To Toilet\n\n .addTransition(new Room.Transition().setFrom(2, 8).setTo(computerRoom, 2, 2, Direction.EAST)) //To Computer Room\n\n .addTransition(new Room.Transition().setFrom(3, 5).setTo(outside, 19, 4, Direction.SOUTH)) //To Outside\n .addTransition(new Room.Transition().setFrom(4, 5).setTo(outside, 20, 4, Direction.SOUTH)) //To Outside\n\n .addTransition(new Room.Transition().setFrom(11, 1).setTo(rch037, 2, 5, Direction.SOUTH)) //To RCH/037\n .addTransition(new Room.Transition().setFrom(12, 1).setTo(rch037, 3, 5, Direction.SOUTH)); //To RCH/037\n\n rch037.addTransition(new Room.Transition().setFrom(2, 5).setTo(mainRoom, 11, 1, Direction.NORTH)) //To Main Room\n .addTransition(new Room.Transition().setFrom(3, 5).setTo(mainRoom, 12, 1, Direction.NORTH)) //To Main Room\n\n .addTransition(new Room.Transition().setFrom(11, 17).setTo(computerRoom, 7, 1, Direction.NORTH)) //To Computer Room\n .addTransition(new Room.Transition().setFrom(12, 17).setTo(computerRoom, 8, 1, Direction.NORTH)); //To Computer Room\n\n portersOffice.addTransition(new Room.Transition().setFrom(1, 5).setTo(mainRoom, 17, 17, Direction.WEST)); //To Main Room\n\n kitchen.addTransition(new Room.Transition().setFrom(1, 3).setTo(mainRoom, 27, 13, Direction.WEST)); //To Main Room\n\n islandOfInteraction.addTransition(new Room.Transition().setFrom(11, 14).setTo(mainRoom, 26, 29, Direction.WEST)); //To Main Room\n\n toilet.addTransition(new Room.Transition().setFrom(1, 1).setTo(mainRoom, 18, 2, Direction.WEST)); //To Main Room\n\n computerRoom.addTransition(new Room.Transition().setFrom(13, 11).setTo(lakeHouse, 11, 1, Direction.NORTH)) //To Lakehouse\n\n .addTransition(new Room.Transition().setFrom(7, 1).setTo(rch037, 11, 17, Direction.SOUTH)) //To RCH/037\n .addTransition(new Room.Transition().setFrom(8, 1).setTo(rch037, 12, 17, Direction.SOUTH)) //To RCH/037\n\n .addTransition(new Room.Transition().setFrom(2, 2).setTo(mainRoom, 2, 8, Direction.EAST)); //To Main Room\n\n lakeHouse.addTransition(new Room.Transition().setFrom(11, 1).setTo(computerRoom, 13, 11, Direction.WEST)); //To Computer Room\n\n outside.addTransition(new Room.Transition().setFrom(19, 4).setTo(mainRoom, 3, 5, Direction.NORTH)) //To Main Room\n .addTransition(new Room.Transition().setFrom(20, 4).setTo(mainRoom, 4, 5, Direction.NORTH)) //To Main Room\n\n .addTransition(new Room.Transition().setFrom(9, 11).setTo(pod, 18, 9, Direction.WEST)) //To Pod\n .addTransition(new Room.Transition().setFrom(9, 12).setTo(pod, 18, 10, Direction.WEST)); //To Pod\n\n pod.addTransition(new Room.Transition().setFrom(18, 9).setTo(outside, 9, 11, Direction.EAST)) //To Outside\n .addTransition(new Room.Transition().setFrom(18, 10).setTo(outside, 9, 12, Direction.EAST)); //To Outside\n\n List<Room> rooms = Arrays.asList(mainRoom, rch037, portersOffice, kitchen, islandOfInteraction, toilet, computerRoom, lakeHouse, outside, pod);\n\n /**\n * Assign the murder room\n */\n rooms.get(new Random().nextInt(rooms.size())).setMurderRoom();\n\n this.rooms = rooms;\n\n return rooms;\n }", "protected abstract Item createTestItem3();", "public static void main(String[] args) {\n\n Room woods = new Room(\"Woods\");\n woods.setStory(\"You are a ferocious wolf, hungry, and tired after a long excursion \" +\n \"out in the deep dark woods. You have just heard some rumors that there are three little \" +\n \"pigs who have recently done some construction in the neighborhood…\");\n woods.setDescription(\"These woods are dark and scary.\");\n\n Room house1 = new Room (\"The Straw House\");\n house1.setStory(\"You’ve trekked out of the woods and followed the rocky dirt road until you\" +\n \" find a neighborhood full of questionably constructed straw houses. Your nose twitches \" +\n \"and you realize the one right in front of you contains some tasty bacon named Billy\");\n house1.setDescription(\"This is the site of the straw house.\");\n\n Room house2 = new Room(\"The Stick House\");\n house2.setStory(\"You decide to look for some more food and continue on to the next neighborhood,\" +\n \" filled with stick houses. You sniff the air and know immediately that the house to your left\" +\n \"houses Reginald -- a chunky pig\");\n house2.setDescription(\"Here is the site of a stick house.\");\n house2.setAccessible(false);// must set accessible again after the first pig is eaten\n\n Room house3 = new Room(\"The Brick House\");\n house3.setStory(\"You decide to look for some more food and continue on to the next neighborhood, filled with \" +\n \"brick houses. You sniff the air and have a good feeling about a house up ahead, which is made of bricks \" +\n \"and has a lovely skylight.\");\n house3.setDescription(\"Here is the site of the brick house.\");\n house3.setAccessible(false);// must set accessible again after the second pig is eaten\n\n Room house3Interior = new Room(\"Inside the brick house.\");\n house3Interior.setStory(\"Aha! Here is the delicious pig -- Spike! Your stomach is rumbling . . . \");\n house3Interior.setDescription(\"This is a nice house made for a pig. Above the fireplace is a framed photo eat \" +\n \"of the pig who lives here and his two brothers.\");\n house3Interior.setAccessible(false);// must set accessible again after the window is broken\n\n Room woods2 = new Room(\"More Woods\");\n woods2.setStory(\"You're feeling pretty good now, having gobbled up some pigs and successfully stopped your stomach from growling.\" +\n \"You walk out of the pig neighborhood and back towards the forest. \" +\n \"But you have a feeling that you're not out of the woods yet-- literally. There's a pig cop here, and if you don't get out of here fast, \" +\n \"you might find yourself in trouble again.\");\n woods2.setDescription(\"A dark and ominous forest.\");\n woods2.setAccessible(false); // must set accessible again after the third pig is eaten\n\n Room river = new Room (\"River shore\");\n river.setStory(\"You've run from the pig cop into another section of woods, but there's a wide rushing river in front of you. Surely you won't be able \" +\n \"to cross it without some sort of bridge . . .\");\n river.setDescription(\"A river cuts through the forest, rushing by quickly.\" );\n\n Room home = new Room(\"Home\");\n home.setStory(\"You're home! After a long and harrowing trip through the woods and a neighborhood full of pigs, you've managed to evade the cops\" +\n \"and arrive home. Your family cheers when they see you and you swear to never trek into the woods without some extra provisions\" +\n \"ever again.\" );\n home.setDescription(\"\");\n home.setAccessible(false); //must set accessible again after the river is crossed\n\n //END OF GAME\n //now possible to add another story...\n\n\n //Characters and their related actions\n\n Character owl = new Character(\"Owl\", \"A wise elderly owl who might have some helpful advice\", null);\n owl.setFirstDialogue(\"I'm an owl, hoot hoot.\");\n owl.setGeneralGreeting(\"Hello again. Hoot hoot!\");\n owl.populateDialogueByTopics(\"advice\", \"That straw house over there looks pretty flimsy. Even a slight breeze could knock it down!\" +\n \"Hoot hoot!\");\n owl.populateDialogueByTopics(\"owl things\", \"I eat mice. Hoot hoot!\");\n owl.populateDialogueByTopics(\"the forest\", \"It sure is dark and scary in here. Hoot hoot!\");\n\n Character pig1 = new Character(\"Billy\", \"A fat, delicious-looking pig\", null);\n pig1.setFirstDialogue(\"Hi, I'm Billy, the pig! You're not a wolf, are you?\");\n pig1.setGeneralGreeting(\"It's Billy the pig again!\");\n pig1.populateDialogueByTopics(\"new house\", \"I've just built a new house out of straw! I think it looks great.\");\n// pig1.setIsEatable(true);\n\n Character pig2 = new Character(\"Reginald\", \"A fat, delicious-looking pig\", null);\n pig2.setFirstDialogue(\"Hi, I'm Reginald, the pig! Have you heard from my brothers?\");\n pig2.setGeneralGreeting(\"It's Reginald again. I'm a little worried about my brothers.\");\n pig2.populateDialogueByTopics(\"new house\", \"I just built a house out of sticks. I bet it can withstand anything!\");\n// pig2.setIsEatable(true);\n\n Character pig3 = new Character(\"Spike\", \"A fat, delicious-looking pig\", null);\n pig3.setFirstDialogue(\"What's up? I'm Spike, the pig! Have you seen a wolf around here? I think one is prowling around . . .\");\n pig3.setGeneralGreeting(\"It's Reginald again. You should stay away, there's a wolf on the loose!\");\n pig3.populateDialogueByTopics(\"the wolf\", \"I think my brothers were eaten by a wolf! Thankfully I \" +\n \"have my strong brick house to protect me.\");\n pig3.setIsEatable(true);\n\n Character cop = new Character(\"Officer Pig\", \"A pig cop looking to find the wolf who ate his friends\", null);\n cop.setFirstDialogue(\"I'm Officer Pig. Hey! You look like the wolf who ate my friends!\");\n cop.setGeneralGreeting(\"I'm Officer Pig.\");\n cop.populateDialogueByTopics(\"wolf\", \"A wolf has been terrorizing the neighborhood. And you look quite a lot like a wolf . . .\");\n\n //Items that are spread throughout the game + what can happen to them\n\n Item house1Item = new Item(\"straw house\", \"a flimsy straw house\", null);\n house1Item.setPickUpAble(false);\n Item house2Item = new Item(\"stick house\", \"a slightly sturdier stick house\", null);\n house2Item.setPickUpAble(false);\n Item house3Item = new Item(\"brick house\", \"a strong, well-built brick house\", null);\n house3Item.setPickUpAble(false);\n\n Item leafBlower = new Item(\"leaf blower\", \"a gardening tool that generates a lot of wind\", null);\n Item brick = new Item(\"brick\", \"looks like a leftover brick from building a house\", null);\n Item window = new Item (\"window\", \"a nice skylight on the roof of the brick house\", null);\n window.setPickUpAble(false);\n Item rock = new Item(\"rock\", \"a flat gray rock\", null);\n Item vine = new Item(\"vine\", \"a long green vine suspended from a tree branch\", null);\n vine.setPickUpAble(false);\n\n //Where the items are placed in the game\n woods.addCharacter(owl);\n house1.addCharacter(pig1);\n house1.addItemToRoom(house1Item);\n house2.addCharacter(pig2);\n house2.addItemToRoom(leafBlower);\n house2.addItemToRoom(house2Item);\n house3.addItemToRoom(brick);\n house3.addItemToRoom(window);\n house3.addItemToRoom(house3Item);\n house3Interior.addCharacter(pig3);\n woods2.addCharacter(cop);\n river.addItemToRoom(rock);\n river.addItemToRoom(vine);\n\n //What directions the user can move throughout the game\n //Order of directions : N , S, E, W, in, out\n woods.setConnections(new Room[] {null, null, house1, null, null, null});\n house1.setConnections(new Room[] {null, house2, null, woods, null, null});\n house2.setConnections(new Room[] {house1, null, house3, null, null, null});\n house3.setConnections(new Room[] {null, null, null, house2, house3Interior, null});\n house3Interior.setConnections(new Room[] {null, null, null, null, null, house3});\n woods2.setConnections(new Room[] {house3, null, null, null, null, null});\n //river\n //home\n\n //Commands possible\n ArrayList<String> commands = new ArrayList<>(List.of(\"go\", \"show inventory\", \"pick up\", \"drop\", \"open\", \"eat\", \"talk\"));\n //Existing rooms in game\n ArrayList<Room> rooms = new ArrayList<>((List.of(woods, house1, house2, house3, house3Interior, woods2, river, home)));\n threeLittlePigs = new TextAdventure(\"Three Little Pigs\", commands, rooms, woods);\n\n //Item + item interactions possible\n threeLittlePigs.addInteraction(leafBlower, house1Item, () ->{\n house1.removeItemFromRoom(house1Item);\n house2.setAccessible(true);\n threeLittlePigs.addPoints(10);\n pig1.setIsEatable(true);\n// System.out.println(\"You have destroyed the Straw House.\");\n return \"You have destroyed the Straw House.\";\n\n });\n threeLittlePigs.addInteraction(leafBlower, house2Item, () ->{\n house2.removeItemFromRoom(house2Item);\n house3.setAccessible(true);\n threeLittlePigs.addPoints(10);\n pig2.setIsEatable(true);\n// System.out.println(\"You have destroyed the Stick House.\");\n return \"You have destroyed the Stick House\";\n });\n threeLittlePigs.addInteraction(brick, window, () ->{\n house3Interior.setAccessible(true);\n woods2.setAccessible(true);\n river.setAccessible(true);\n threeLittlePigs.getCurrentRoom().removeItemFromRoom(window);\n threeLittlePigs.getCurrentRoom().removeItemFromRoom(brick);\n house3Interior.addItemToRoom(brick);\n// System.out.println(\"You broke the window with the brick!\");\n return \"You broke the window with the brick!\";\n });\n threeLittlePigs.addInteraction(vine, rock, () -> {\n river.setAccessible(false);\n home.setAccessible(true);\n// System.out.println(\"You move the rock so that you can reach the vine and you swing across the river! The \" +\n// \"vine snaps just as you hit the other shore. You walk forwards from the shore and see a familiar neighborhood. \" +\n// \"Congratulations, you've made it home!\");\n threeLittlePigs.moveUserTo(home);\n return \"You move the rock so that you can reach the vine and you swing across the river! The \" +\n \"vine snaps just as you hit the other shore. You walk forwards from the shore and see a familiar neighborhood. \" +\n \"Congratulations, you've made it home!\";\n });\n\n //OUTLINE FOR LITTLE RED RIDING HOOD TEXT ADVENTURE\n\n Room woods3 = new Room(\"More Woods\");\n woods3.setStory(\"Congrats! You made it through a day of pig-eating and law-evading! After a good nights rest you are ready to\" +\n \" venture back out into the woods and try your luck at finding breakfast. You've recently heard that Grandma Riding-Hood\" +\n \"has fallen ill...Perhaps this is a good opportunity...\");\n woods3.setDescription(\"A dark and ominous forest.\");\n woods2.setAccessible(false); //is this needed?\n\n Room clearing = new Room(\"Clearing\");\n clearing.setStory(\"You heard whistling so you followed the noise which led you to a clearing in the woods where a wee girl in a\" +\n \"red-hooded poncho cape was bending over to pick flowers. To her left is a basket filled with muffins.\");\n clearing.setDescription(\"A sunny clearing in the woods\");\n clearing.setAccessible(false); //is this needed?\n\n Room grandmaHouse = new Room(\"Grandma's House\");\n grandmaHouse.setStory(\"You trot along the path for a while until you get to a wee cabin on a hill. \" +\n \"You smell a human inside!!\");\n grandmaHouse.setDescription(\"A cabin on a hill\");\n grandmaHouse.setAccessible(false); //Unlock once you have 'gotten directions' from lil Red\n\n Room insideGhouse = new Room(\"Inside Grandma's House\");\n insideGhouse.setStory(\"Poor Grandma lying asleep in the bed, she looks very ill, and you are very hungry...\");\n insideGhouse.setDescription(\"A rustic cabin with a huge, four poster bed and many quilts\");\n insideGhouse.setAccessible(false);\n\n Room inBed = new Room(\"Lying in Bed\");\n inBed.setStory(\"After eating Grandma and disguising yourself with her clothes, you decide to take a wee nap before lil Red arrives...\");\n inBed.setDescription(\"Lying amongst the quilts in Grandma's bed\");\n inBed.setAccessible(false); //ONLY UNLOCK ONCE GRANDMA IS EATEN\n\n Room woods4 = new Room(\"More Woods\");\n woods4.setStory(\"Congrats! You feel very full after eating so much today, perhaps its time to return home and get a good nights sleep\");\n woods4.setDescription(\"A dark and ominous forest.\");\n woods4.setAccessible(false); ////ONLY UNLOCK ONCE GRANDMA and lil Red are eaten\n\n //Now make it possible to go back to the original Room -- \"Home??\"\n\n }", "public Player(Room room)\n {\n Inventory = new HashMap<String, Items>();\n currentRoom = room; //Starting Room Number 1\n itemsHeld = 0; //Start with no items being held\n itemLimit = 2; // can only hold 2 items until a backpack\n Inventory = new HashMap<String, Items>();\n \n roomHistory = new Stack<Room>();\n \n haveBackpack = false; //no backpack at start\n usingFlashlight = false;\n }", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "public static void createGameRooms()\r\n\t{\r\n\t\tfor(int i = 0; i < MAX_FIREWORKS_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"fireworks_\" + i, new VMKGameRoom(\"fireworks_\" + i, \"Fireworks Game \" + i, \"\"));\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < MAX_PIRATES_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"pirates_\" + i, new VMKGameRoom(\"pirates_\" + i, \"Pirates Game \" + i, \"\"));\r\n\t\t}\r\n\t}", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "@Override\n\tpublic void randomRoom() {\n\t\tint randSide = random.nextInt(3) + 1;\n\t\tString side = properties.getSideFromProperties().get(randSide);\n\t\tint randRoom = random.nextInt(6) + 1;\n\t\tthis.room = properties.getRoomFromProperties().get(randRoom);\n\t\tthis.side = this.room.substring(0, 1).toLowerCase() + side;\n\t}", "private void addItems() {\n int random3 = 0;\n for (int i = 0; i < MAP_LENGTH; i++) {\n for (int j = 0; j < MAP_LENGTH; j++) {\n random3 = (int)(Math.round(Math.random()*9));\n if (tileMap[i][j].getTerrain() instanceof Grass) {\n if (adjacentCity(i, j) && tileMap[i][j].getCity() == null) { //Only have an item if possibly within city borders\n if (random3 == 0) {\n tileMap[i][j].setResource(new Fruit(i,j)); //Rep Fruit\n } else if (random3 == 1) {\n tileMap[i][j].setResource(new Animal(i,j)); //Rep Animal\n } else if (random3 == 2) {\n tileMap[i][j].setResource(new Forest(i,j)); //Rep Trees (forest)\n } else if (random3 == 3) {\n tileMap[i][j].setResource(new Crop(i,j)); //Rep Crop\n }\n }\n } else {\n if (adjacentCity(i, j)) {\n if (random3 < 2) {\n tileMap[i][j].setResource(new Fish(i, j)); //Rep fish\n } else if (random3 == 4) {\n if (Math.random() < 0.5) {\n tileMap[i][j].setResource(new Whale(i, j)); //Rep whale\n }\n }\n }\n }\n }\n }\n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void nextRoom() {\n room++;\n createRoom();\n }", "public void setRoomItems(ArrayList<Item> newRoomItems) {\n roomItems = newRoomItems;\n }", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }", "public void createMap (int nRooms, Player player) {\n\t\t// Flag representing if the room has been created successfully or not\n\t\tboolean failed = false;\n\t\t// Clear the room array to make a hole new map\n\t\trooms = new ArrayList<Room>();\n\t\t\n\t\t// Set all the positions to be a wall\n\t\tfor(int y = 0; y < SIZE_Y; y++) {\n\t\t\tfor(int x = 0; x < SIZE_X; x++) {\n\t\t\t\tthis.cell[y][x].setReference(\"WALL\"); \n\t\t\t}\n\t\t}\n\n\t\t// Creates rooms with the max number given\n\t\tfor(int i = 0; i < nRooms; i++) {\n\t\t\tfailed = false;\n\t\t\tRoom room = new Room();\n\t\t\troom.setSizeX(rand.nextInt(10) + 3);\n\t\t\troom.setSizeY(rand.nextInt(8) + 3);\n\t\t\troom.setCenterX(rand.nextInt(SIZE_X - room.getSizeX()) + 1);\n\t\t\troom.setCenterY(rand.nextInt(SIZE_Y - room.getSizeY()) + 1);\n\t\t\t\n\t\t\tfor(Room roomTested : rooms) {\n\t\t\t\tif(room.intersects(roomTested)) {\n\t\t\t\t\tfailed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!failed) {\n\t\t\t\trooms.add(room);\n\t\t\t\tfor(int y = room.getCenterY(); y < room.getCenterY() + room.getSizeY() && y < SIZE_Y - 1; y++) {\n\t\t\t\t\tfor(int x = room.getCenterX(); x < room.getCenterX() + room.getSizeX() && x < SIZE_X - 1; x++) {\n\t\t\t\t\t\tthis.cell[y][x].setReference(\"FLOOR\"); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Makes the connections between rooms\n\t\tfor(int j = 0; j < rooms.size() - 1; j++ ) {\n\t\t\tthis.makeCorridor(rooms.get(j), rooms.get(j+1));\n\t\t}\n\t\t\n\t\tplayer.Spawn(rooms, this.getMap());\n\t}", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }", "public static void main(String[] args) {\n Room roomNr1 = new Room();\n roomNr1.setHeight(3.00);\n roomNr1.setLightOn(false);\n\n Room roomNr2= new Room();\n roomNr2.setHeight(3.10);\n roomNr2.setLightOn(false);\n\n Room roomNr3= new Room();\n roomNr3.setHeight(2.90);\n roomNr3.setLightOn(true);\n\n Room roomNr4 = new Room();\n roomNr4.setHeight(9.00);\n roomNr4.setLightOn(false);\n\n Room roomNr5 = new Room();\n roomNr5.setHeight(9.00);\n roomNr5.setLightOn(true);\n\n Room roomNr6 = new Room();\n roomNr6.setHeight(7.00);\n roomNr6.setLightOn(false);\n\n //Setting up flats\n Flat flatNr1 = new Flat();\n flatNr1.setNr(1);\n flatNr1.setArea(64.14);\n flatNr1.setOwner(\"Kostik\");\n\n List<Room> roomsIn1 = new ArrayList<>();\n roomsIn1.add(roomNr1);\n roomsIn1.add(roomNr2);\n\n flatNr1.setRooms(roomsIn1);\n //--------------------------------------------\n Flat flatNr2 = new Flat();\n flatNr2.setNr(2);\n flatNr2.setArea(34.14);\n flatNr2.setOwner(\"Kostik\");\n\n List<Room> roomsIn2 = new ArrayList<>();\n roomsIn2.add(roomNr3);\n\n flatNr2.setRooms(roomsIn2);\n//--------------------------------------------\n Flat flatNr3 = new Flat();\n flatNr3.setNr(3);\n flatNr3.setArea(64.14);\n flatNr3.setOwner(\"Kostik\");\n\n List<Room> roomsIn3 = new ArrayList<>();\n roomsIn3.add(roomNr4);\n roomsIn3.add(roomNr5);\n\n flatNr3.setRooms(roomsIn3);\n //--------------------------------------------\n Flat flatNr4 = new Flat();\n flatNr4.setNr(4);\n flatNr4.setArea(34.14);\n flatNr4.setOwner(\"Kostik\");\n\n List<Room> roomsIn4 = new ArrayList<>();\n roomsIn4.add(roomNr6);\n\n flatNr4.setRooms(roomsIn4);\n\n\n //Setting up floors\n Floor floorNr1 = new Floor();\n floorNr1.setNr(1);\n List<Flat> flats1 = new ArrayList<>();\n flats1.add(flatNr1);\n flats1.add(flatNr2);\n floorNr1.setFlats(flats1);\n\n\n //Setting up house\n\n House house = new House();\n house.setNr(221);\n house.setStreetName(\"Baker str.\");\n\n List<Floor> floors = new ArrayList<>();\n floors.add(floorNr1);\n floors.add(new Floor());\n house.setFloors(floors);\n System.out.println(house.getFloors().get(0).getFlats().get(0).getRooms().get(0).getHeight());\n\n\n\n\n\n\n//// System.out.println(\"Hello, world!\");\n//\n// SomeFunctions functions = new SomeFunctions();\n//// String text = functions.getWelcomeText(\"Валера\");\n//// System.out.println(text);\n//\n// // System.out.println(functions.getEurFromUsd(150.00, 0.8924));\n// // System.out.println(functions.getCalories(2, 1));\n// // Date test = new Date(120, 5, 28);\n// // System.out.println(functions.getMsFromDate(test));\n// String text =\"Ранее 28 июня сообщалось, что кандидат от Демократической партии США на предстоящих президентских выборах Джо Байден призвал не приглашать Россию присоединиться к G7, если информация, опубликованная The New York Times о предположительном взаимодействии Москвы с афганскими боевиками, правдива. Он также обвинил Трампа в том, что тот несколько месяцев знал об этом опасном для Вашингтона взаимодействии и не ввел никаких санкций за грубейшее нарушение международного права.\";\n//\n// String[] words = text.split(\" \");\n// System.out.println(words.length);\n//// System.out.println(words[4]);\n// for (int i = 0; i < words.length; i++) {\n// System.out.println(\"The word with id \" + i + \" is: \" + words[i]);\n// }\n//\n// for (String word : words) {\n// System.out.println(word);\n// }\n//\n// List<String> names = new ArrayList<>();\n// names.add(\"Валерий\");\n// names.add(\"Константин лучший\");\n// names.add(\"Максим\");\n// names.add(\"Андрей\");\n//\n// System.out.println(names.get(1));\n//\n// for (String word : words) {\n// names.add(word);\n// }\n//\n// System.out.println(names.size());\n// for (String name : names) {\n// System.out.println(name);\n// }\n//\n// HashMap<String, Integer> bookUniqueWords = new HashMap<>();\n//// bookUniqueWords.put(names<0>, 1);\n//// bookUniqueWords.put(names<1>, 1);\n// for (String name : names) {\n//\n// bookUniqueWords.put(name, 1);\n// }\n//\n// for (Map.Entry<String, Integer> entry : bookUniqueWords.entrySet()) {\n// System.out.println(entry.getValue() + \" \" + entry.getKey());\n// }\n// System.out.println(bookUniqueWords.containsKey(\"Байден\"));\n\n\n\n\n }", "private void prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }", "public MotelRoom createRoom(String type, Iterable<String> amenities)\n {\n MotelRoom room = null;\n if(type.equals(\"regular\"))\n {\n room = new RegularRoom();\n }\n else if(type.equals(\"deluxe\"))\n {\n room = new DeluxeRoom();\n }\n else if(type.equals(\"suite\"))\n {\n room = new SuiteRoom();\n }\n else\n {\n // throw exception?\n return room;\n }\n \n for(String amenity : amenities)\n {\n room = addAmenity(room, amenity);\n }\n \n return room;\n }", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "public Room (String number, int seatingCapacity, String roomT){\r\n this.number = number;\r\n this.seatingCapacity = seatingCapacity;\r\n this.roomType= roomT;\r\n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "private void createCompositeGoodsShow() {\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 3;\r\n\t\tgridData4.heightHint = 380;\r\n\t\tgridData4.widthHint = 560;\r\n\t\tgridData4.grabExcessVerticalSpace = true;\r\n\t\tGridLayout gridLayout3 = new GridLayout();\r\n\t\tgridLayout3.numColumns = 3;\r\n\t\tcompositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE);\r\n\t\tcompositeGoodsShow.setLayout(gridLayout3);\r\n\t\tcompositeGoodsShow.setLayoutData(gridData4);\r\n\t\tdisplayRoom(compositeGoodsShow);\r\n\t}", "protected void putItems() {\n\t\tlevelSetup[0][5].putItem(new Dynamite());\n\t\tlevelSetup[6][6].putItem(new Flint());\n\t\tlevelSetup[6][3].putItem(new ManaPotion());\n\t\tlevelSetup[5][0].putItem(new ManaPotion());\n\t\tlevelSetup[2][1].putItem(new HealthPotion());\n\t\tlevelSetup[3][6].putItem(new HealthPotion());\n\t\tlevelSetup[4][2].putItem(new Spinach());\n\t}", "static void setItemsAndContainers (){\n\t \t/**Add containers to places*/\n\t \tLocation.places[0].addContainer(Container.depths);\n\t \tLocation.places[1].addContainer(Container.secondaryInv);\n\t \tLocation.places[4].addContainer(Container.SRCloset);\n\t \tLocation.places[6].addContainer(Container.couch1);\n\t\t Location.places[6].addContainer(Container.couch2);\n\t\t Location.places[6].addContainer(Container.couch3);\n\t\t Location.places[6].addContainer(Container.couch4);\n\t\t Location.places[13].addContainer(Container.closetBathroom);\n Location.places[15].addContainer(Container.K1Couch);\n Location.places[16].addContainer(Container.fridge);\n Location.places[23].addContainer(Container.autoAisle);\n Location.places[24].addContainer(Container.aisle15B);\n Location.places[26].addContainer(Container.bb);\n\t\t \n\t\t /**Add items to places*/\n\t\t Location.places[0].addItem(Item.grabber);\n\t\t Location.places[1].addItem(Item.parcans);\n\t\t Location.places[3].addItem(Item.bookbag);\n\t\t Location.places[4].addItem(Item.ladder);\n\t\t Location.places[7].addItem(Item.drill);\n\t\t Location.places[7].addItem(Item.screws);\n\t\t Location.places[7].addItem(Item.pipe);\n\t\t Location.places[7].addItem(Item.twobyfour);\n\t\t Location.places[8].addItem(Item.rope);\n\t\t Location.places[11].addItem(Item.car);\n\t\t Location.places[12].addItem(Item.twentyDollars);\n\t\t Location.places[16].addItem(Item.tupperware);\n\t\t Location.places[18].addItem(Item.bottle);\n Location.places[19].addItem(Item.plunger);\n Location.places[20].addItem(Item.map);\n Location.places[21].addItem(Item.magnet);\n Location.places[23].addItem(Item.avocados);\n Location.places[25].addItem(Item.noodles);\n\t\t Location.places[26].addItem(Item.Unibrow); \n\t\t \n\t\t /**test purposes*/\n\t\t Location.places[10].addItem(Item.otherWrench);\n//\t\t Location.places[0].addItem(Item.repellent);\n//\t\t Location.places[7].addItem(Item.repellent);\n// Location.places[7].addItem(Item.wrench);\n Location.places[7].addItem(Item.keys);\n\t\t \n\t\t /**Adds items in containers*/\n\t\t Container.setItemsInContainers();\n\t\t }", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public static Room newRoom(int random){\n String nameRoom = \"\";\n int monsterAmount = 0;\n\t\tMonster monster;\n MonsterFactory monsterFac = new MonsterFactory();\n\t\tmonster= monsterFac.buildMonster((int)(Math.random() * 3) + 1);\n boolean createHealingPot = false;\n boolean createPitRoom = false;\n boolean createPillar = false;\n boolean createEntrance = false;\n boolean createExit = false;\n boolean createVisionPot = false;\n\n switch (random){\n case 1:\n \tnameRoom = \"The Entrance room\";\n \tmonsterAmount = 0;\n createEntrance = true;\n break;\n\n case 2:\n \tnameRoom = \"The Exit room\";\n \tmonsterAmount = 0;\n createExit = true;\n break;\n\n case 3:\n \tnameRoom = \"The room\";\n \tmonsterAmount = 1; //THIS ROOM WILL HAVE 1 MONSTER\n break;\n \n case 4:\n \tnameRoom = \"The Healing Potion room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n createHealingPot = true;\n break;\n \n case 5:\n \tnameRoom = \"The Pit room\";\n \tmonsterAmount = 0;\n createPitRoom = true;\n break;\n\n case 6:\n \tnameRoom = \"The Pillar room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n \tcreatePillar = true;\n break;\n \n case 7:\n \tnameRoom = \"The Vision Potion room\";\n \tmonsterAmount=0;\n createVisionPot=true;\n break;\n }\n \n if(monsterAmount <= 0 ) \n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monsterAmount,createVisionPot);\n else\n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monster, monsterAmount,createVisionPot);\n\n }", "public Project3() {\n\t\tcreateComponent();\n\t\twireComponent();\n\t}", "public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }", "private Board create3by3Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 3);\n Tile t2 = new Tile(1, 3);\n Tile t3 = new Tile(2, 3);\n Tile t4 = new Tile(3, 3);\n Tile t5 = new Tile(4, 3);\n Tile t6 = new Tile(5, 3);\n Tile t7 = new Tile(6, 3);\n Tile t8 = new Tile(7, 3);\n Tile t9 = new Tile(8, 3);\n tiles = new Tile[3][3];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[1][0] = t5;\n tiles[1][1] = t9;\n tiles[1][2] = t3;\n tiles[2][0] = t1;\n tiles[2][1] = t8;\n tiles[2][2] = t4;\n return new Board(tiles);\n }", "public void makeRoom(int location)\r\n\t{\r\n\t\t//if that location isnt in the back\r\n\t\t//shift to the next index to create space\r\n\t\tif(location!=backIndex+1)\r\n\t\t\tfor(int i=backIndex; i>=location; i++)\r\n\t\t\t{\r\n\t\t\t\tnormalQueue[i+1]=normalQueue[i];\r\n\t\t\t\tpriorityQueue[i+1]=priorityQueue[i+1];\r\n\t\t\t}\r\n\t\t//continue iterating through the back\r\n\t\tbackIndex++;\r\n\t}", "public Room createRoom(Room room);", "protected abstract void makeItem();", "@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }", "public Room(String description) \n {\n this.description = description;\n items = new ArrayList<>();\n exits = new HashMap<>();\n }", "public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)\n {\n int var4 = par2 * 16;\n int var5 = par3 * 16;\n BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);\n boolean var7 = false;\n this.random.setSeed(this.worldObj.getSeed());\n long var8 = this.random.nextLong() / 2L * 2L + 1L;\n long var10 = this.random.nextLong() / 2L * 2L + 1L;\n this.random.setSeed((long)par2 * var8 + (long)par3 * var10 ^ this.worldObj.getSeed());\n Iterator var12 = this.field_82696_f.iterator();\n int k;\n int l;\n \n Random r = random;\n Chunk c = this.worldObj.getChunkFromChunkCoords(par2, par3);\n ArrayList<Object> var20 = rooms;\n \n for (int i = 1; i < 5; i++)\n {\n k = r.nextInt(23); //# of different rooms to generate\n l = r.nextInt(5); //Chance for boss rooms to generate 1/number specified\n\n if (k > 19 && l != 0 || i > 3) // boss chance\n {\n k = r.nextInt(20);\n }\n\n if (k < 21) //boss rooms have to use world gen while the rest use chunk gen\n {\n \t((DungeonComponentBase)(var20.get(k))).generate(c, r, var4, i * 8, var5);\n }\n else\n {\n \t((WorldGenerator)(var20.get(k))).generate(this.worldObj, r, var4, i * 8, var5);\n }\n }\n DungeonCeiling var21 = ceiling;\n var21.generate(c, r, var4, 40, var5);//80\n }", "public lv3()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n //super(950, 600, 1); \n //prepare();\n prepare();\n stopped();\n started();\n }", "private void thirdSlot(Player player, MessageBuilder payload) {\n int interfaceId = payload.getShort(edgeville.net.ByteOrder.LITTLE);\n int itemId = payload.getShort(edgeville.net.ValueType.A);\n int slot = payload.getShort(edgeville.net.ValueType.A);\n if (interfaceId < 0 || slot < 0 || itemId < 0)\n return;\n switch (interfaceId) {\n\n case 5064:\n player.getBank().depositFromInventory(slot, 10);\n break;\n\n case 5382:\n player.getBank().withdraw(slot, 10, true);\n break;\n case 3900:\n Shop.SHOPS.get(player.getOpenShop()).purchase(player, new Item(itemId, 5));\n break;\n case 3823:\n Shop.SHOPS.get(player.getOpenShop()).sell(player, new Item(itemId, 5), slot);\n break;\n case 3322:\n player.getTradeSession().add(new Item(itemId, 10), slot);\n break;\n case 3415:\n player.getTradeSession().remove(new Item(itemId, 10));\n break;\n\n }\n }", "private void initTestBuildingWithRoomsAndWorkplaces() {\n\t\tinfoBuilding = dataHelper.createPersistedBuilding(\"50.20\", \"Informatik\", new ArrayList<Property>());\n\t\troom1 = dataHelper.createPersistedRoom(\"Seminarraum\", \"-101\", -1, Arrays.asList(new Property(\"WLAN\")));\n\n\t\tworkplace1 = dataHelper.createPersistedWorkplace(\"WP1\",\n\t\t\t\tArrays.asList(new Property(\"LAN\"), new Property(\"Lampe\")));\n\t\tworkplace2 = dataHelper.createPersistedWorkplace(\"WP2\", Arrays.asList(new Property(\"LAN\")));\n\n\t\troom1.addContainedFacility(workplace1);\n\t\troom1.addContainedFacility(workplace2);\n\n\t\tinfoBuilding.addContainedFacility(room1);\n\t}", "public EventRoomBuilder(int capacity){\r\n itemFactory = new ItemFactory();\r\n newRoom = new EventRoom(capacity);\r\n eventRoomItems = new EventRoomItems();\r\n }", "public void populate() { \n \n // make some grounds\n ground1 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground1.setPosition(new Vec2(-380, -200));\n \n Body ground2 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground2.setPosition(new Vec2(-0, -200));\n\n Body ground3 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground3.setPosition(new Vec2(300, -100));\n \n // make a moving platform \n Body movingPlatform = new SlidingPlatform(world, PolygonShape.makeBox(100, 5), new Vec2(130, 0), 2);\n movingPlatform.setPosition(new Vec2(-260, -150));\n \n // make some bottles\n Bottle bottle1 = new Bottle(game);\n bottle1.putOn(ground1);\n bottle1.setName(\"bottle1\");\n \n Bottle bottle2 = new Bottle(game);\n bottle2.putOn(ground2);\n bottle2.setName(\"bottle2\");\n \n Bottle bottle3 = new Bottle(game);\n bottle3.putOn(ground3);\n bottle3.setName(\"bottle3\");\n \n // show dialog with information about level\n JOptionPane.showMessageDialog(frame, \"Press N or M to throw bottles to kill Boxies.\", \"Level instructions:\", JOptionPane.PLAIN_MESSAGE);\n \n // make some boxies\n Boxy boxy1 = new Boxy(game);\n boxy1.setName(\"boxy1\");\n Vec2 vec1 = new Vec2(100, 0);\n boxy1.move(vec1);\n\n Boxy boxy2 = new Boxy(game);\n boxy2.setName(\"boxy2\");\n Vec2 vec2 = new Vec2(-100, 200);\n boxy2.move(vec2);\n\n Boxy boxy3 = new Boxy(game);\n boxy3.setName(\"boxy3\");\n Vec2 vec3 = new Vec2(-400, 200);\n boxy3.move(vec3);\n \n }", "private void threeDimenItemDataInit() {\n\t\tfocusView = (LauncherFocusView) findViewById(R.id.activity_three_dimen_focusview);\n\t\tfocusView.setAnimatorEndListener(new FocusViewAnimatorEndListener() {\n\n\t\t\t@Override\n\t\t\tpublic void OnAnimateStart(View currentFocusView) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tmFocusAnimationEndFlag = false;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void OnAnimateEnd(View currentFocusView) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tmFocusAnimationEndFlag = true;\n\t\t\t\tlistTextColorSet();\n\t\t\t\t// fixed the keyboard repeat mode\n\t\t\t\tif (!mTextColorChangeFlag) {\n\t\t\t\t\tif ((mItemListCurPosition == 0 || mItemListCurPosition == commonSettingListView\n\t\t\t\t\t\t\t.getCount() - 1)) {\n\t\t\t\t\t\tmTextColorChangeFlag = true;\n\t\t\t\t\t\tlistTextColorSet();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmArrays = this.getResources().getStringArray(R.array.three_dimen);\n\n\t\tpageLefts[0] = pageLefts[1] = pageLefts[2] = pageLefts[3] = this.getResources()\n\t\t\t\t.getDrawable(R.drawable.page_left);\n\t\tpageRights[0] = pageRights[1] = pageRights[2] = pageRights[3] = this.getResources()\n\t\t\t\t.getDrawable(R.drawable.page_right);\n\t\t// Log.i(\"YQBBANG\", \"----3DModel=\" + tv.Get3DMode());\n\t\tmItemSettings[0] = this.getResources().getString(R.string.close);\n\t\tmItemSettings[1] = this.getResources().getString(R.string.open);\n\t\tmItemSettings[2] = this.getResources().getString(R.string.left);\n\t\tmItemSettings[3] = this.getResources().getString(R.string.top);\n\t\tfor (int i = 0; i < mArrays.length; i++) {\n\t\t\tCommonItemList mTemp = new CommonItemList();\n\t\t\tmTemp.setItemName(mArrays[i]);\n\n\t\t\tif (null != pageLefts[i]) {\n\t\t\t\tmTemp.setPageLeft(pageLefts[i]);\n\t\t\t}\n\t\t\tif (null != pageRights[i]) {\n\t\t\t\tmTemp.setPageRight(pageRights[i]);\n\t\t\t}\n\t\t\tif (null != mItemSettings[i]) {\n\t\t\t\tmTemp.setItemSetting(mItemSettings[i]);\n\t\t\t}\n\n\t\t\tmCommonItemList.add(mTemp);\n\t\t}\n\t\tmLeftRightList = mCommonItemList.get(2);\n\t\tmTopBottomList = mCommonItemList.get(3);\n\n\t}", "private void pickItem() \n {\n if(currentRoom.getShortDescription() == \"in the campus pub\" && i.picked3 == false)\n {\n i.item3 = true;\n i.picked3 = true;\n System.out.println(\"You picked a redbull drink\");\n }\n else if(currentRoom.getShortDescription() == \"in th hallway\" && i.picked2 == false)\n {\n i.item2 = true;\n i.picked2 = true;\n System.out.println(\"You picked a torch\");\n }\n else if(currentRoom.getShortDescription() == \"in the office\" && i.picked1 == false)\n {\n i.item1 = true;\n i.picked1 = true;\n System.out.println(\"You picked a pair of scissors\");\n }\n else\n System.out.println(\"There is no items in the room!\");\n }", "public Room(int noOfWindows) {\n\t\tthis.windows = noOfWindows;\n\t\tthis.floor=\"\";\n\t\tthis.wall=\"\";\n\t}", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "@Override\n\tpublic void onRoomCreated(RoomData arg0) {\n\t\t\n\t}", "@SideOnly(Side.CLIENT)\n\t public Item getItem(World wordl, int x, int y, int z)\n\t {\n//\t return this.blockMaterial == Material.iron ? Items.iron_door : Items.wooden_door;\n\t \t return MGHouseItems.item_boat_door;\n\t }", "public void randomBuildRoom(int len, int leftWid, int rightWid) {\n randomTeleport();\n while (!checkEnoughSpace(len, leftWid, rightWid)) {\n randomTeleport();\n }\n createRoom(len, leftWid, rightWid);\n }", "private void placeAsteroids() {\r\n\t\taddParticipant(new Asteroid(0, 2, EDGE_OFFSET, EDGE_OFFSET, speed, this));\r\n\t\taddParticipant(new Asteroid(1, 2, SIZE - EDGE_OFFSET, EDGE_OFFSET, 3, this));\r\n\t\taddParticipant(new Asteroid(2, 2, EDGE_OFFSET, SIZE - EDGE_OFFSET, 3, this));\r\n\t\taddParticipant(new Asteroid(3, 2, SIZE - EDGE_OFFSET, SIZE - EDGE_OFFSET, 3, this));\r\n\t}", "static private void loadGame() {\n ArrayList loadData = data.loadGame();\n\n //inventory\n inventory = new Inventory();\n LinkedTreeMap saveMap = (LinkedTreeMap) loadData.get(0);\n if (!saveMap.isEmpty()) {\n LinkedTreeMap inventoryItemWeight = (LinkedTreeMap) saveMap.get(\"itemWeight\");\n LinkedTreeMap inventoryItemQuantity = (LinkedTreeMap) saveMap.get(\"inventory\");\n String inventoryItemQuantityString = inventoryItemQuantity.toString();\n inventoryItemQuantityString = removeCrapCharsFromString(inventoryItemQuantityString);\n String itemListString = inventoryItemWeight.toString();\n itemListString = removeCrapCharsFromString(itemListString);\n\n for (int i = 0; i < inventoryItemWeight.size(); i++) {\n String itemSet;\n double itemQuantity;\n if (itemListString.contains(\",\")) {\n itemQuantity = Double.parseDouble(inventoryItemQuantityString.substring(inventoryItemQuantityString.indexOf(\"=\") + 1, inventoryItemQuantityString.indexOf(\",\")));\n inventoryItemQuantityString = inventoryItemQuantityString.substring(inventoryItemQuantityString.indexOf(\",\") + 1, inventoryItemQuantityString.length());\n itemSet = itemListString.substring(0, itemListString.indexOf(\",\"));\n itemListString = itemListString.substring(itemListString.indexOf(\",\") + 1, itemListString.length());\n } else {\n itemSet = itemListString;\n itemQuantity = Double.parseDouble(inventoryItemQuantityString.substring(inventoryItemQuantityString.indexOf(\"=\") + 1, inventoryItemQuantityString.length()));\n }\n String itemName = itemSet.substring(0, itemSet.indexOf(\"=\"));\n int itemWeight = Double.valueOf(itemSet.substring(itemSet.indexOf(\"=\") + 1, itemSet.length())).intValue();\n while (itemQuantity > 0) {\n Item item = new Item(itemName, \"\", itemWeight, true);\n inventory.addItemInInventory(item);\n itemQuantity--;\n }\n }\n }\n\n //itemList\n itemLocation = new ItemLocation();\n saveMap = (LinkedTreeMap) loadData.get(1);\n if (!saveMap.isEmpty()) {\n System.out.println(saveMap.keySet());\n LinkedTreeMap itemLocationOnMap = (LinkedTreeMap) saveMap;\n String rooms = saveMap.keySet().toString();\n rooms = removeCrapCharsFromString(rooms);\n for (int j = 0; j <= itemLocationOnMap.size() - 1; j++) {\n String itemToAdd;\n\n if (rooms.contains(\",\")) {\n itemToAdd = rooms.substring(0, rooms.indexOf(\",\"));\n } else {\n itemToAdd = rooms;\n }\n\n rooms = rooms.substring(rooms.indexOf(\",\") + 1, rooms.length());\n ArrayList itemInRoom = (ArrayList) itemLocationOnMap.get(itemToAdd);\n for (int i = 0; i < itemInRoom.size(); i++) {\n Item itemLocationToAdd;\n LinkedTreeMap itemT = (LinkedTreeMap) itemInRoom.get(i);\n String itemName = itemT.get(\"name\").toString();\n String itemDesc = \"\";\n int itemWeight = (int) Double.parseDouble(itemT.get(\"weight\").toString());\n boolean itemUseable = Boolean.getBoolean(itemT.get(\"useable\").toString());\n\n itemLocationToAdd = new PickableItem(itemName, itemDesc, itemWeight, itemUseable);\n itemLocation.addItem(itemToAdd, itemLocationToAdd);\n\n }\n }\n //set room\n String spawnRoom = loadData.get(3).toString();\n currentRoom = getRoomFromName(spawnRoom);\n }\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public static void main(String[] args) {\n playerTest();\n unlockedChunks = new ArrayList<Integer>();\n unlockedChunks.add(1);\n currentSkills = new int[Constant.NUMBER_OF_Skills];\n currentSkills[0] = 2;\n currentSkills[1] = 2;\n currentSkills[2] = 2;\n completedQuests = new ArrayList<String>();\n\n ArrayList<Integer> chunks = new ArrayList<Integer>();\n chunks.add(1);\n Item item = new Item(\"Test Item\", chunks);\n\n UnlockedItemDatabase.addToDB(item);\n\n ArrayList<String> itemReqs = new ArrayList();\n itemReqs.add(\"Test Item 2\");\n ArrayList<String> itemReqs2 = new ArrayList();\n QuestStep q1= new QuestStep(1,\"step 1\",itemReqs,1);\n QuestStep q2 = new QuestStep(2,\"step 2\", itemReqs2, 2);\n ArrayList<QuestStep> steps = new ArrayList();\n steps.add(q1);\n steps.add(q2);\n int[] skillReqs = new int[Constant.NUMBER_OF_Skills];\n skillReqs[0] = 1;\n skillReqs[1] = 1;\n skillReqs[2] = 1;\n ArrayList<String> questReqs = new ArrayList();\n Quest quest = new Quest(\"Quest 1\",steps,1,skillReqs,0,questReqs);\n System.out.println();\n System.out.println(\"Quest: \" + quest.getName() + \" has a completable section: \" + quest.isCompletable(unlockedChunks, currentSkills,completedQuests));\n }", "public void pickUp(Creature c, FloorCrate r){\r\n Item i = r.pickUp(c.area);\r\n if(!c.inventory.add(i)){\r\n c.area.plop(i, c.x, c.y);\r\n }\r\n }", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "public void incrementNumberOfRooms() {\n\t\t\n\t\tnumberOfRooms++;\n\t}", "public void populateRooms(){\n }", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }", "public void useWheelChair(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Take who?\");\n }\n else{\n //if there are items in the rooms\n if(currentRoom.emptyRoom() == false){\n Item chairWheel = null;\n for(Item chairWheelItem : inventory){\n if(chairWheelItem.getId().equals(\"wheelchair\")){\n chairWheel = chairWheelItem;\n }\n }\n if(chairWheel != null){\n maxWeight = 100;\n Item patient = currentRoom.getItemRoom(secondWord);\n if(patient != null){\n patient.changePickUpItem(true);\n if(patient.canBePickedUp() == true){\n if((inventoryWeight + patient.getItemWeight()) <= maxWeight){\n //take current item\n inventory.add(patient);\n inventoryWeight += patient.getItemWeight();\n currentRoom.removeItem(patient.getId());\n System.out.println(\"You are moving the patient: \" + patient.getId() + \".\");\n }\n else{\n System.out.println(\"You canīt get over the max weight.\");\n }\n }\n else{\n System.out.println(\"This patient canīt be moved.\");\n }\n }\n else{\n System.out.println(\"This patient donīt exist.\");\n }\n }\n else{\n System.out.println(\"You havenīt the wheelchair in your inventory.\");\n }\n }\n else{\n System.out.println(\"There are no items to take in this room.\");\n }\n }\n }", "public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }", "public Room(int roomNumber) \n\t{\n\t\tthis.roomNumber=roomNumber;\n\t}", "public void play() \n { \n \n createRooms();\n createCharacters();\n createItem();\n printWelcome();\n player = new Player(\"player\");\n Boolean exam;\n exam = false;\n /* player.addItem(necklace_red);\n player.addItem(halberd);\n player.addItem(set_of_forks_and_knives);\n player.addItem(candelar);\n player.addItem(potion6HP);\n player.addItem(bedroomkey);*/\n \n // Step 1 : start in the poolroom //\n Boolean step1Finish;\n Boolean step2Finish;\n Boolean step3Finish;\n Boolean step4Finish;\n Boolean step5Finish;\n Boolean step6Finish;\n Boolean step7Finish;\n Boolean step8Finish;\n Boolean step9Finish;\n Boolean step10Finish;\n Boolean step11Finish;\n step1Finish = false;\n step2Finish = false;\n step3Finish = false;\n step4Finish = false;\n step5Finish = false;\n step6Finish = false;\n step7Finish = false;\n step8Finish = false;\n step9Finish = false;\n step10Finish = false;\n step11Finish = false;\n \n // All the characters are in the poolroom and the exit opens only after speak with all the characters //\n Boolean canSpeak; // player can speak with PNG\n Boolean speak_with_mr_Taylor, speak_with_ms_Taylor, speak_with_ms_Cunningham, speak_with_chambermaid, speak_with_bob_Taylor, speak_with_mr_Cunningham;\n Boolean speak_with_ms_Wellington, speak_with_valet, speak_with_caretaker, speak_with_mr_Wellington, speak_with_nina_Taylor;\n Boolean find_bob_Taylor;\n Boolean toys_not_front_of_door = null;\n Boolean firstEnter;\n firstEnter = true;\n \n canSpeak = false;\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n\n Boolean can_exam_canvas;\n can_exam_canvas = false;\n Boolean find_bedroom_key;\n find_bedroom_key = false;\n \n int safe_code, essai_code;\n safe_code = 9515;\n \n if (exam)\n {\n System.out.println(\"You are in the poolroom. \\n\"\n + \"Mr Taylor was founded by the Chambermaid this morning when she came to clean the poolroom. Her scream attracted everyone. \\n\"\n + \"You notice that it is missing a pool cue and you find a strange red necklace nearby the pool. \\n\"\n + \"You examine the dead body and you notice a circular wound with the same diameter of a pool cue and some splinters of wood at the bottom of the neck. \\n\"\n + \"Take advantage that everyone is here to question them.\");\n canSpeak = true;\n exam = false;\n System.out.println(\"There are a lot of people in this room. \\n\" \n +\" Nina Taylor the master daughter has long brown hair. Sha has a beautiful blue dress. \\n\"\n +\" Bob Taylor is the little son of Mr Taylor. He seems to be really nice and kind. But he is really sad. \\n\"\n +\" Emma the Chambermaid is an old woman. She has been working for the family for a very long time. She has a black dress and a white pinny.\\n\" \n +\" Mr Cunningham is a grey-haired man with a beige square suit and a lie. \\n\"\n +\" Mr Taylor had dark blond hair and a mustache. He had nice black tuxedo. \\n\"\n +\" Mr Wellinghton is a brown-haired man with a brown square suit and a lie. \\n\"\n +\" Ms Cunnigham is a grey-blond-haired woman with a pink dress. \\n\"\n +\" Ms Taylor seems to be really sad. Sha has dark-brown hair and a long claret dress. \\n\"\n +\" Ms Wellinghton is a redhead-haired woman with a long light green dress. \\n \"\n +\" Alfred the Valet has curly blond hair. He seems to be bother. \\n\"\n +\" Sam the caretaker is a black-haired black man. \");\n }\n if (speak_with_mr_Taylor && speak_with_ms_Taylor && speak_with_ms_Cunningham && speak_with_chambermaid && speak_with_bob_Taylor && speak_with_mr_Cunningham\n && speak_with_ms_Wellington && speak_with_valet && speak_with_caretaker && speak_with_mr_Wellington && speak_with_nina_Taylor && exam)\n {\n canSpeak = false;\n step1Finish = true;\n poolroom.modifyExit(\"east\");\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n }\n\n // Step 2 : banqueting hall //\n if (step1Finish)\n {\n bob_Taylor.setRoom(cellar);\n nina_Taylor.setRoom(banquetinghall);\n ms_Cunningham.setRoom(dancingroom);\n if (currentRoom == banquetinghall)\n {\n if (firstEnter)\n { \n toys_not_front_of_door = false; //false = toys front of the door // true = toys not front of the door\n find_bob_Taylor = false;\n System.out.println(\" When you opened the poolroom door, you shut on a toy so you lose one HealthPoint\");\n player.setHP(player.getHP() - 1);\n firstEnter = false;\n }\n if (exam)\n {\n System.out.println(\"You cannot open the dancing room door now because there are a lot of toys. \\n\"\n + \"Nina Taylor is next to the toys and you can speak with her. \");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_nina_Taylor)\n {\n nina_Taylor.setText(\"These are my brother toys. Find him to tidy his toys\");\n speak_with_nina_Taylor = false;\n canSpeak = false;\n }\n }\n else if (currentRoom == hall)\n {\n // Step 2 bis : Hall //\n if (exam)\n {\n System.out.println(\" You are in the hall but there is nobody here. \");\n exam = false;\n }\n }\n else if (currentRoom == poolroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the poolroom. Mr Taylor's body was removed. All the peopple are gone. \\n\"\n + \"You do not want to stay in this room. The atmosphere has become bad. You want to leave.\");\n exam = false;\n }\n }\n else if (currentRoom == kitchen)\n {\n if (exam)\n {\n System.out.println(\"This is the kitchen, Bob Taylor is not here. \\n\"\n + \"A set of forks and knives is in one of the cupboards of the kitchen.\");\n exam = false;\n // Recupère arme\n }\n }\n else if (currentRoom == cellar)\n {\n if (exam)\n {\n System.out.println(\"You found Bob Taylor in the back of the cellar\");\n find_bob_Taylor = true;\n exam = false;\n canSpeak = true;\n }\n if (speak_with_bob_Taylor)\n {\n System.out.println(\"You convince Bob to tidy up his toys.\");\n toys_not_front_of_door = true;\n canSpeak = false;\n speak_with_bob_Taylor = false;\n }\n if (toys_not_front_of_door) \n {\n banquetinghall.modifyExit(\"south\");\n step2Finish = true;\n }\n }\n if (step2Finish)\n {\n if (currentRoom == dancingroom)\n {\n if (firstEnter)\n {\n if (exam)\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it. She seems to want to talk with you.\");\n exam = false;\n canSpeak = true;\n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.\");\n System.out.println(\"You spoke and danced a lot of time with Ms Cunningham. Then you are very tired so you lose one healthpoint\");\n player.setHP(player.getHP() - 1);\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n firstEnter = false;\n } \n if (exam)\n {\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it.\");\n exam = false;\n canSpeak = true; \n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Thank you. I feel better thanks to you.\");\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n }\n }\n else if (currentRoom == livingroom)\n {\n exam = false;\n System.out.println(\"You ride the last step and arrive in the living room. A little green ghost appears in the room. He seems not to be kind. \");\n if (ghost.getHP() <=0) \n {\n livingroom.modifyExit(\"north\");\n livingroom.modifyExit(\"west\");\n exam = true;\n if (exam)\n {\n System.out.println(\"There is no useful object and there is nobody here. \"); \n step3Finish = true;\n }\n }\n }\n \n if (step3Finish)\n {\n if (currentRoom == library)\n {\n if (exam)\n {\n System.out.println(\" A library with a lot of books is behind the door you just pushed. \\n\"\n + \"You see a big painting which depicts the same library where you are. There is just a difference between them. \\n\"\n + \"On the painting, a gramophone is pictured on a sideboard. The gramophone on the painting curiously looks like the gramophone in the dancing room. \\n\"\n + \"When you inspect the sideboard on the real library you see some wear marks as if an object was previously placed on it. \\n\"\n + \"You meet the chambermaid wanting to leave the library. She seems to want to tell you something but do not dare to approach you.\");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_chambermaid)\n {\n chambermaid.setText(\"I saw Nina Taylor go to the gardener hut some nights. I do not know what she is doing there. \");\n canSpeak = false;\n speak_with_chambermaid = false;\n \n }\n }\n \n else if (currentRoom == corridor)\n {\n System.out.println(\"There is a statut with a weapon in this corridor. You can take it weapon if you want. \");\n // recupere arme\n Boolean fight; // this variable will be initialize with the fight\n if (fight)\n {\n if (exam)\n {\n System.out.println(\" You are in a corridor. You see four doors. Only two are opened.\");\n exam = false;\n step4Finish = true;\n }\n }\n }\n if (step4Finish)\n {\n if (currentRoom == bathroom)\n {\n if (exam)\n {\n System.out.println(\" You enter in the bathroom and you see the chambermaid treating the valet's arm. \\n\"\n + \" The wound looks like a rodent bite but it is much bigger than a rat. It is strange because Mr Taylor was allergic to animals. \\n\"\n + \"You notice that there is a potion on the furniture next to the chambermaid. She notices that you are injured. \\n\"\n + \"She signals to you that you can take it. \"); \n //permet de prendre la potion\n exam = false;\n }\n //ajout potion possible pour le joueur\n\n }\n if (currentRoom == guestbedroom)\n {\n if (exam)\n {\n System.out.println(\" You are in the guest bedroom. Today this bedroom is Mr&Ms Cunnigham's bedroom. Mr Cunnigham is in his bedrrom.\");\n mr_Cunningham.setRoom(guestbedroom);\n ms_Cunningham.setText(\"It is strange, last time this canvas was not here.\");\n can_exam_canvas = true;\n if (exam && can_exam_canvas)\n {\n System.out.println(\" You find a key behind the canvas and you take it.\");\n find_bedroom_key = true;\n player.addItem(bedroomkey);\n } \n exam = false;\n }\n }\n \n if (step5Finish)\n {\n if (find_bedroom_key)\n {\n corridor.modifyExit(\"south\");\n }\n if (currentRoom == bedroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the host bedroom. You see a big safe with a four number code. Ms Taylor is in her room.\");\n ms_Taylor.setText(\"Oh no ! I am forgetting the number code ! Please, ask to my daughter, my guests and my employees. I gave to several of them a piece of this code. \");\n \n if (speak_with_ms_Taylor)\n {\n nina_Taylor.setRoom(dancingroom);\n nina_Taylor.setText(\"Bob Taylor has fallen into a 10-meter deep well and is trying to pull it up. \\n \" +\n \"Each day it rises 3 meters and slides 2 meters during the night.\\n\" +\n \"How many days will it take to get to the surface?\");\n ms_Wellington.setRoom(library);\n ms_Wellington.setText(\"In a girl group\\n\" +\n \" 70% wear a blue sweater\\n\" +\n \" 75% wear blue pants\\n\" +\n \" 85% wear a blue hat\\n\" +\n \" 85% wear a blue coat\\n\" +\n \"What is the minimum percentage of girls wearing only blue clothes?\");\n \n bob_Taylor.setRoom(library);\n bob_Taylor.setText(\"I saw my sister and my father arguing before his death.\");\n \n mr_Cunningham.setRoom(poolroom);\n mr_Cunningham.setText(\"David is 10 years old and his younger brother is half his age. \\n\" +\n \"When David will be 10 times older, how old will Franck be?\");\n \n \n }\n }\n }\n if (step6Finish)\n {\n if (currentRoom == bedroom)\n {\n System.out.println(\"Did you find the safe code? \");\n // enter the safe code -- creation int essai_code\n if (essai_code == safe_code)\n {\n System.out.println(\"You find the good number code, the safe door is opened. \\n \" +\n \"The safe contains a disk, a lot of money and a biscuits box.\");\n }\n }\n if (currentRoom == dancingroom\n // && il doit avoir le dique dans son inventaire\n )\n {\n ms_Taylor.setRoom(dancingroom);\n ms_Taylor.setText(\"What does this object do here, it should be in the library\");\n // player has to take the gramophone in his inventory\n }\n if (currentRoom == library \n // && il doit avoir le disque et le gramophone dans son inventaire\n )\n {\n System.out.println(\"You put the gramophone at its place and you insert the disk on it. \\n\"+\n \" You are hearing a loud noise and a door is appearing.\"); \n library.modifyExit(\"north\"); \n }\n if (step7Finish)\n {\n if (currentRoom == laboratory)\n {\n System.out.println(\"When you opened the door, a little green ghost appears and attacked you.\");\n if(fight_win)\n {\n System.out.println(\"The skeleton is dead. You see that one of its bone is strange. This bone seems to be carved as a key\");\n // joueur doit ramasser la clef\n \n if (exam)\n {\n System.out.println(\" You look and the desk and you find some construction plans. It seems that Mr Taylor wanted to dig very deeply at east from the garden. It is the same place than the gardener hut. \");\n }\n corridor.modifyExit(\"up\");\n System.out.println(\"You unblock a new room. A trapdoor appears in the corridor\");\n }\n }\n if (currentRoom == attic)\n {\n if (exam)\n {\n System.out.println(\" You finally discover the attic. It is dark because there is only one window lighting the room. \\n\"\n + \" You decide to look out the window and discover a huge garden hidden by the trees when guests arrive by the entrance. \");\n hall.modifyExit(\"north\");\n }\n }\n if (step8Finish)\n {\n if (currentRoom == garden)\n {\n if (exam)\n {\n System.out.println(\" You see a well at the north but there is a steel grid locked by a padlock.\\n\"\n + \"There is an apple tree next to it with only one apple on the tree. You can maybe pick up the apple and eat it now or later.\\n\"\n + \"\");\n }\n }\n }\n \n \n }\n \n \n \n \n /*player.addItem(necklace_red);\n player.addItem(necklace_red);\n player.addItem(necklace_red);*/\n /* \n \n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n */\n }\n }\n }\n }\n }\n }\n \n }" ]
[ "0.7004151", "0.69557995", "0.6779053", "0.6584342", "0.6538506", "0.6452616", "0.64249283", "0.6353023", "0.6235582", "0.61555296", "0.6135179", "0.60896915", "0.6008179", "0.60015917", "0.5978497", "0.59539545", "0.58541554", "0.5828009", "0.5824125", "0.58163816", "0.5802326", "0.578868", "0.57726884", "0.5714444", "0.57012546", "0.57000595", "0.5694892", "0.56164664", "0.55637705", "0.5543489", "0.5530532", "0.551867", "0.5516738", "0.54940236", "0.5472378", "0.54635185", "0.54626095", "0.5458966", "0.545717", "0.54248935", "0.54076236", "0.54031473", "0.5392707", "0.5392108", "0.53738207", "0.5373727", "0.536973", "0.53599435", "0.5355883", "0.5332911", "0.53322285", "0.5310229", "0.5299921", "0.5268483", "0.5266651", "0.5266186", "0.5260523", "0.5220746", "0.519224", "0.51866573", "0.5171027", "0.5167968", "0.5160623", "0.5158158", "0.51452196", "0.513628", "0.51331574", "0.5131851", "0.5126822", "0.51239645", "0.51163316", "0.50994414", "0.50784665", "0.5075615", "0.506934", "0.503988", "0.5023787", "0.50215596", "0.50197375", "0.5005898", "0.49964595", "0.49955395", "0.4989476", "0.49892226", "0.49888623", "0.49680057", "0.49662665", "0.4958256", "0.4950609", "0.49316278", "0.4921412", "0.49177706", "0.49140298", "0.49135706", "0.49071616", "0.4899112", "0.48988706", "0.48952994", "0.4893977", "0.4893598" ]
0.65247834
5
end of create / This method makes it so that Garret the enemy can initiate a battle.
public boolean garretFight(){ int XG = 0; int YG = 0; int Xyou = 1; int Yyou = 1; for(int i = 0 ; i < this.Garret.length;i++){ for(int p = 0; p < this.Garret.length;p++){ if(this.Garret[i][p] == 1){ YG = i; XG = p; } if(this.position[i][p] == 1){ Yyou = i; Xyou = p; } } }//end of outter for if(YG==Yyou && XG==Xyou){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void useInBattle(PlayerCharacter player, Opponent enemy) {\n\t}", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public void battleComplete() {\n\t}", "public void enemyTurnStart() {\n\r\n\t}", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }", "BossEnemy(){\n super();\n totallyDied = true;\n }", "protected abstract void defineEnemy();", "public void setupBattle(Pokemon ally, Pokemon enemy, boolean battleType, int battleLoc){\n\t\tPokemon.generateIV(enemy);\n\t\tPokemon.generateNewStats(enemy);\n\t\n\t\t_gbs.getBattlePanel().initializeBattle(_gbs.getPlayer(), enemy, battleLoc);\n\t\t\n\t\t_gbs.getBattlePanel().repaint();\n\t}", "private void battle(){\n\n while(!isBattleOver()){\n\n battleAllyAttack();\n if(isBattleOver()) return;\n\n battleEnemyAttack();\n if(isBattleOver()) return;\n\n readyNextAttackers();\n\n }\n System.out.println(\"battle over\");\n\n }", "public void readyNextAttackers() {\n if(battleAlly == null && battleEnemy == null){\n //if(battleAlly == null && battleEnemy == null && !isBattleOver()){\n battleAlly = battleAllies.get(0);\n battleEnemy = battleEnemies.get(0);\n }\n }", "@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}", "public void activatedBy(final Player player) {\n //Battle with a Boss Unit\n }", "public static void battle(int choice) {\n \t\tboolean monsterHeal = false;\r\n \t\tboolean monsterDefend = false;\r\n \t\tboolean monsterAttack = false;\r\n \t\tboolean playerDefend = false;\r\n \t\tboolean playerAttack = false;\r\n \t\tboolean playerHeal = false;\r\n \t\t\r\n \t\t//Get the move the monster will make\r\n \t\tint monsterAi = monster.getAiChoice();\r\n \t\t\r\n \t\t//Check what input the player has given\r\n \t\tif(choice == 1) {\r\n \t\t\t//Set the booleans according to the input for attack\r\n \t\t\tplayerAttack = true;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 2) {\r\n \t\t\t//Set the booleans according to the input for defend\r\n \t\t\tplayerDefend = true;\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 3) {\r\n \t\t\t//Set the booleans according to the input for heal\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = true;\r\n \t\t} else {\r\n \t\t\t//Set the player not to do anything if the input is wrong\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t}\r\n \t\t\r\n \t\t//Link the monster AI choice to a move\r\n \t\tif(monsterAi == 1) {\r\n \t\t\t//Set the booleans according to the AI for attack\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 2) {\r\n \t\t\t//Set the booleans according to the AI for defend\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 3) {\r\n \t\t\t//Set the booleans according to the AI for heal\r\n \t\t\tmonsterAttack = false;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = true;\r\n \t\t}\r\n \t\t\r\n \t\tString pFirst = \"\";\r\n \t\tString mFirst = \"\";\r\n \t\tString mAttack = \"\";\r\n \t\tString pAttack = \"\";\r\n \t\tString pLife = \"\";\r\n \t\tString mLife = \"\";\r\n \t\t\r\n \t\t//Player moves\r\n \t\tif(playerHeal) {\r\n \t\t\t//Heal the player by 10 life\r\n \t\t\tplayer.Heal(10);\r\n \t\t\t//Show a message saying the player was healed\r\n \t\t\tpFirst = player.name + \" healed 10 life! \\n\";\r\n \t\t} else if(playerDefend) {\r\n \t\t\t//Set the monster not to attack (do damage)\r\n \t\t\tmonsterAttack = false;\r\n \t\t\t//Shows a message that the player has defended\r\n \t\t\tpFirst = player.name + \" defended and has got 0 damage from \" + monster.name + \"\\n\";\r\n \t\t} else if(!playerAttack && !playerDefend && !playerHeal) {\r\n \t\t\t//Show a message that the player did not do anything\r\n \t\t\tpFirst = player.name + \" did nothing. \\n\";\r\n \t\t} \r\n \t\t\r\n \t\t//Monster moves\r\n \t\tif(monsterHeal) {\r\n \t\t\t//heal the monster by 10 life\r\n \t\t\tmonster.Heal(10);\r\n \t\t\t//Show a message that the monster was healed\r\n \t\t\tmFirst = (monster.name + \" healed 10 life! \\n\");\r\n \t\t} else if(monsterDefend) {\r\n \t\t\t//Set the player not to attack (do damage)\r\n \t\t\tplayerAttack = false;\r\n \t\t\t//Show a message that the monster has defended\r\n \t\t\tmFirst = monster.name + \" defended and has got 0 damage from \" + player.name + \"\\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Attack moves\r\n \t\tif(playerAttack) {\r\n \t\t\t//Lower the monsters life by the players power\r\n \t\t\tmonster.life -= player.strength;\r\n \t\t} \r\n \t\t\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Lower the players life by the monsters power\r\n \t\t\tplayer.life -= monster.strength;\r\n \t\t}\r\n \t\tif(playerAttack) {\r\n \t\t\t//Show a message that the player has attacked\r\n \t\t\tpAttack = player.name + \" hit \" + monster.name + \" for \" + player.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Show a message that the monster has attacked\r\n \t\t\tmAttack = monster.name + \" hit \" + player.name + \" for \" + monster.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Show the current life for the player and the monster\r\n \t\tpLife = player.name + \" does now have \" + player.life + \" life left. \\n\";\r\n \t\tmLife = monster.name + \" does now have \" + monster.life + \" life left. \\n\";\r\n \t\t\r\n \t\t//Print the moves message\r\n \t\tMainGame.display.disp(pFirst + mFirst + pAttack + mAttack + pLife + mLife);\r\n \t\t\r\n\t\t//Check if the player is still alive\r\n \t\tif(player.life <= 0) {\r\n \t\t\t\r\n \t\t\t//If the player has no life left, show him that he has lost\r\n \t\t\tMainGame.display.disp(\"Too bad! You lost!\" + \"\\n\" + \"Play again?\");\r\n \t\t\t\r\n \t\t\t//Show the option to play again\r\n \t\t\tMainGame.display.Enable(MainGame.display.playAgain);\r\n \t\t}\r\n \t\t\r\n\t\t//Check if the monster is still alive\r\n \t\tif(monster.life <= 0) {\r\n \t\t\t\r\n \t\t\tplayer.xp += monster.giveXp;\r\n \t\t\tMainGame.display.disp(\"You beat \" + monster.name + \"! \\n\" + \"You got \" + monster.giveXp + \" XP!\" + \"\\n\" + \"You now have \" + player.xp + \" XP!\");\r\n \t\t\t\r\n \t\t\tMainGame.display.Enable(MainGame.display.continueStage);\r\n \t\t}\r\n \t\t\r\n\t\tMainGame.display.Enable(MainGame.display.continueFight);\r\n \t\r\n \t}", "public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }", "public Battle(){\r\n\t\t\r\n\t}", "public void atBattleStartPreDraw() {\n\n this.flash();\n ArrayList<Integer> orbs = new ArrayList();\n orbs.add(1);\n orbs.add(2);\n orbs.add(3);\n orbs.add(4);\n\n for (int i = 0; i < 2; i++) {\n\n Integer o = orbs.get(AbstractDungeon.cardRng.random(orbs.size() - 1));\n\n switch (o) {\n case 1:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new AttackSlime(), false, true));\n break;\n case 2:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new ShieldSlime(), false, true));\n break;\n case 3:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new SlimingSlime(), false, true));\n break;\n case 4:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new PoisonSlime(), false, true));\n break;\n }\n }\n\n com.megacrit.cardcrawl.dungeons.AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.defect.IncreaseMaxOrbAction(1));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PotencyPower(AbstractDungeon.player, AbstractDungeon.player, 1), 1));\n\n\n }", "public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }", "public void startFCombat() {\n\t\ttry { \n\t\t\tenemyName = Monster.getFBossName();\n\t\t\tSystem.out.println(\"\\t!#> \" + enemyName + \" has appeared! <#! \");\n\t\t\tenemyNewHealth = Monster.getFBossHealth();\n\n\t\t\t// While enemy is alive\n\t\t\tCOMBAT_START: while (enemyNewHealth > 0) {\n\t\t\t\tSystem.out.println(Player.getPlayerName() + \"\\n HP: \" + playerNewHealth + \" Stamina: \"\n\t\t\t\t\t\t+ Player.getPlayerStamina());\n\t\t\t\tSystem.out.println(\"----------------------------\");\n\t\t\t\tSystem.out.println(enemyName + \" HP: \" + enemyNewHealth);\n\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"\\n\\t # ACTIONS # \");\n\t\t\t\tSystem.out.println(\"\\t1.) Attack!\");\n\t\t\t\tSystem.out.println(\"\\t2.) Block!\");\n\t\t\t\tSystem.out.println(\"\\t3.) Run!\\n\");\n\t\t\t\tSystem.out.println(\"What are you going to do?\");\n\t\t\t\tint input = in.nextInt();\n\t\t\t\t// conditonal preventing other input\n\t\t\t\tif (input == 1 || input == 2 || input == 3) {\n\t\t\t\t\t// Attack\n\t\t\t\t\tif (input == 1) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.getFBossAttack()+1);\n\t\t\t\t\t\thit = rand.nextInt(Player.Attack()+1);\n\t\t\t\t\t\tSystem.out.println(\"You lunge forward and strike the \" + enemyName + \"!!\");\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\tSystem.out.println(\"You dealt \" + hit + \" damage!\");\t\t\n\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\tenemyNewHealth = enemyNewHealth - hit;\n\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\t\t\tenemyNewHealth = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"The \" + enemyName + \" has \" + enemyNewHealth + \" health left!\");\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Block\n\t\t\t\t\tif (input == 2) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\tSystem.out.println(\"You attempt to cower behind your shield!\");\n\t\t\t\t\t\t// Block\n\t\t\t\t\t\tif (Player.Block() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\n\t\t\t\t\t\t\tSystem.out.println(\"\\tBlock Successful!\");\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" trys to deal \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\t// how much is blocked\n\t\t\t\t\t\t\tenemySwing = enemySwing - rand.nextInt(Player.getPlayerMaxBlock());\n\t\t\t\t\t\t\t// if how much is blocked results neg make it 0\n\t\t\t\t\t\t\tif (enemySwing <= 0) {\n\t\t\t\t\t\t\t\tenemySwing = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// output results\n\t\t\t\t\t\t\tSystem.out.println(\"You took \" + enemySwing + \" damage\");\n\t\t\t\t\t\t\t// adjust health value\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue COMBAT_START;\n\n\t\t\t\t\t}\n\t\t\t\t\t// Run chance\n\t\t\t\t\tif (input == 3) {\n\t\t\t\t\t\tSystem.out.println(\"You attempt to flee!\");\n\t\t\t\t\t\t// roll to see if flee\n\t\t\t\t\t\tif (Player.Run() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\t\tSystem.out.println(\"you've run away from the \" + enemyName + \"!\");\n\t\t\t\t\t\t\tbreak COMBAT_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\t!!!Invalid Input!!!\");\n\t\t\t\t\tSystem.out.println(\"\\tPlease try Again.\");\n\t\t\t\t}\n\n\t\t\t\t// When Enemy Dies.\n\t\t\t\t//TODO: add timeunit here\n\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\tSystem.out.println(\"You have defeated \" + enemyName + \"!!\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tYou have beaten my FIRST game ever.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tThank you so fuckin' much for playing.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tit means the W O R L D to me :)\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tIf you want to see more of my work,\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tfollow me on Twitter @Simons_saysNull\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\tSystem.out.println(\"\\tThanks again for playing my game. - Robb Simons\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public GenGameOver() { \n prepare();\n }", "private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\n\t \t\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }", "int defend(Unit unit, Unit enemy);", "public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}", "public void fight();", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public Battle(Player player, Enemy enemy) {\n\n this.player = player;\n this.enemy = enemy;\n System.out.println(\"While walking into the room, you encounter \" + enemy.getName() + \". He looks angry! Get ready to fight.\");\n System.out.println(\"Your options are: Attack, Eat, Inspect, Run\");\n }", "@Test\r\n public void testAutoBattleTrance() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(50000);\r\n character.restoreHP(999);\r\n // Equip a staff and armour\r\n character.equip(helper.testStaff);\r\n character.equip(helper.testArmour);\r\n\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n /* create 5 enemies and 5 allies */\r\n fighters.add(new Slug(null));\r\n fighters.add(new Slug(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Vampire(null));\r\n\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // character should win the battle, but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n // make sure only 5 enemies are defeated\r\n System.out.println(battler.getDefeated().toString());\r\n assertEquals(battler.getDefeated().size(), 5); \r\n\r\n }", "private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}", "@Test\r\n public void testAutoBattleAlliesAndEnemies() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(2700); \r\n // 2700 xp for lvl 10\r\n assertEquals(character.getLevel(), 10);\r\n // Equip a sword and increase attack damage\r\n character.equip(helper.testSword);\r\n assertEquals(character.getCurrATK(), 11.5, 0.001); // 6.5atk base + 5atk from sword\r\n // Equip some armour\r\n character.equip(helper.testArmour);\r\n\r\n // Spawn 5 enemies of not vampire type\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n fighters.add(new Slug(null));\r\n fighters.add(new Slug(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n\r\n // Spawn 3 allies\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // The character's team should win the battble but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n assertTrue(character.getCurrHP() > 0);\r\n // Make sure only 5 enemies are defeated\r\n assertEquals(battler.getDefeated().size(), 5); \r\n\r\n }", "public battle(player a) {\n initComponents();\n //set background color\n Color battle = new Color(255,129,106);\n this.getContentPane().setBackground(battle);\n \n //sets the given player to the subject player\n c = a;\n //players current xp\n exp = c.getXP();\n //players starting health\n playerHealth = 3;\n //displays the players stats\n btnEarth.setText(\"Earth: \" + c.getEarth());\n btnFire.setText(\"Fire: \" + c.getFire());\n btnWater.setText(\"Water: \" + c.getWater());\n btnIce.setText(\"Ice: \" + c.getIce());\n \n //determines which monster to fight\n if(exp < 4){\n fill(\"Blob-Boy\");\n }else if(exp < 8){\n fill(\"Spike\");\n }else{\n fill(\"Shadow\");\n }\n }", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);", "public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }", "public void atBattleStartPreDraw() {\n flash();\n AbstractMonster m = AbstractDungeon.getCurrRoom().monsters.getRandomMonster(true);\n AbstractDungeon.actionManager.addToBottom(new RelicAboveCreatureAction(m, this));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, AbstractDungeon.player, new BleedPower(m, BLEED_AMT)));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new BulletPower(AbstractDungeon.player, BULLET_AMT)));\n }", "public void battleVampire() {\n\n\t \tPlayer playern = this.playern;\n\t\tcyborgVampire = new CyborgVampire(\"Cyborg Vampire\");\n\t\tSystem.out.println(\"*shivers* It is the evil Cyber Vampire\");\n\t\tSystem.out.println(\"[press enter to fight]\");\n\t\tsc.nextLine();\n\n\t\twhile (true) {\n\t\t\tcyborgVampire.takeDamage(playern.attack());\n\t\t\tif (!cyborgVampire.getisDead()) {\n\t\t\t\tSystem.out.println(\"You killed the Cyborg Vampire, earned \" + cyborgVampire.giveExp() + \" experience\");\n\t\t\t\tplayern.setExp(cyborgVampire.giveExp());\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\t//playern.restoreHpAfterBattle();\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGame.playern.takeDamage(cyborgVampire.attack());\n\t\t\tif (!Game.playern.getIsAlive()){\n\t\t\t\tSystem.out.println(\"You are killed\");\n\t\t\t\tSystem.out.println(\"You have lost the game and turn into warrior zombie\");\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\tbreak;\n\t\t\t\t//System.exit(0);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"* \" + playern.getName() + \": \" + playern.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"* \" + cyborgVampire.getName() + \": \" + cyborgVampire.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\t\t topScore();\n\t}", "private boolean isCreateBattle() {\r\n int percent = ConfigUtil.getConfigInteger(\"battlePercent\", 30);\r\n if(RandomUtil.nextInt(100) < percent){\r\n return true;\r\n }\r\n return false;\r\n }", "@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }", "public void goAdventuring() {\n\n game.createRandomMonster(4);\n if(RandomClass.getRandomTenPercent() == 5) {\n System.out.println(\"Your are walking down the road... Everything looks peaceful and calm.. Hit enter to continue!\");\n sc.nextLine();\n\n } else {\n game.battle();\n p.checkXp();\n }\n }", "@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }", "public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }", "private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }", "public static void enemy(){\n\t\tenemy = null;\n\t\twhile(enemy == null){\n\t\t spawnEnemy();\n\t\t}\n\t}", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "public void interact() {\r\n\t\tif(alive) {\r\n\t\t\tCaveExplorer.print(attackDescription);\r\n\t\t\tbattle();\r\n\t\t}else {\r\n\t\t\tCaveExplorer.print(deadDescription);\r\n\t\t}\r\n\t}", "public void attack() {\n\n }", "public WarGame() {\r\n\t\tsetGame();\r\n\t}", "@Test\r\n public void testAutoBattleMoreEnemies() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(700);\r\n // 700xp should get to level 5\r\n assertEquals(character.getLevel(), 5);\r\n // Equip a sword and increase attack damage\r\n character.equip(helper.testSword);\r\n assertEquals(character.getCurrATK(), 9, 0.001); // 4atk base + 5atk from sword\r\n\r\n // Spawn 5 slugs\r\n int numSlugs = 5;\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n for (int count = numSlugs; count > 0; count --) {\r\n Slug newSlug = new Slug(null);\r\n fighters.add(newSlug);\r\n }\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // The character should win the battle, but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n assertTrue(character.getCurrHP() > 0);\r\n // All slugs should be defeated\r\n assertEquals(battler.getDefeated().size(), numSlugs);\r\n }", "@Override public void takeAction(Player[] players, Enemy[] enemies, char action)\n {\n \n if (action == 'a') //ATTACK!!!!\n {\n if(gun.isEmpty())\n { \n System.out.println(name+\"'s weapon is empty!\");\n gun.reload();\n }\n else\n {\n Enemy target = target(this, enemies, gun.getAccuracy());\n Attack(target);\n }\n } \n else if (action == 'd')//Hold this position!\n {\n this.defend();\n System.out.println(name+\" hunkers down!\");\n }\n else if (action == 'r')//Reloading! Cover me!\n {\n gun.reload();\n }\n else if (action == 'm')//Fall back! There's too many of them!\n {\n run();\n }\n else\n {\n System.out.println(\"Invalid command.\");\n }\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "@Override\r\n public void fromDeathToChase() {\r\n if (eaten()) {\r\n startChase();\r\n }\r\n }", "@Override\n\tpublic void attack() {\n\n\t}", "public void attack() {\n this.attacked = true;\n }", "public Kingdom(float x, float y, int width, int height, Stage s, Touchable touchable,KingdomNames kingdomNames, int kingdomID, final CradleGame cradleGame,final ResultsActor resultsActor)\n {\n super(x,y,s, touchable,cradleGame);\n System.out.println(\"Kingdom constructor. Id=\"+kingdomID);\n this.resultsActor = resultsActor;\n attackTargetInfo = new AttackTargetInfo(kingdomID);\n flagSize = height;\n this.kingdomID = kingdomID;\n this.kingdomNames = kingdomNames;\n kingdomRes = new KingdomRes();\n protectionState = 1;\n setHeight(height);\n setWidth(width);\n setBoundaryPolygon(8);\n //coinSound = Gdx.audio.newSound(Gdx.files.internal(\"sounds/change_drop_on_wood.mp3\"));\n coinSound = cradleGame.getCradleAssetManager().manager.get(Assets.SOUND_CHANGE_DROP_ON_WOOD);\n // Get screen size\n w = Gdx.graphics.getWidth();\n h = Gdx.graphics.getHeight();\n\n setUpKingdomFlagAndResources(width, height,s,kingdomNames);\n saveParams(); //useful for first run - remembers first run time\n final Action completeAction = new Action(){\n public boolean act( float delta ) {\n goldImage.setVisible(false);\n goldImage.setPosition(goldImageX,goldImageY);\n cradleGame.setGameResGold(GameRes.Gold+getGoldForLevelOfKingdom());\n resultsActor.UpdateRes();\n saveParams();\n return true;\n }\n };\n addListener(\n new InputListener() {\n public boolean touchDown(InputEvent event, float offsetX, float offsetY,\n int pointer, int button) {\n\n long timeForLevelOfKingdom = getTimeForLevelOfKingdom();\n long timeToShow = timeForLevelOfKingdom - (System.currentTimeMillis() - timeOfLastGoldCollection);\n if ((timeToShow<=0) && (protectionState == 0)) {\n timeOfLastGoldCollection = System.currentTimeMillis();\n if(cradleGame.isSoundOn()){\n coinSound.play(1f);\n }\n Action actions = sequence(Actions.moveTo(w*0.4f, h, 2.00f, Interpolation.bounceOut),completeAction,fadeIn(0.01f));\n goldImage.addAction(actions);\n goldImage.addAction(fadeOut(2.0f));\n cradleGame.getPly().logEvent(\"20\", \"Kingdom gold collected\", \"Kingdom gold collected\");\n if (!cradleGame.isKingdomGoldCollected()) {\n cradleGame.getPrefs().putBoolean(\"iskingdomgoldcollected\", true);\n cradleGame.getPrefs().flush();\n //cradleGame.getScreenGamePlay().HideGoldArrow();\n }\n }\n\n return true;\n }\n });\n\n }", "public static void spawnEnemy(){\n RNG.D100();\n if(PlayerStats.LVL <= 2){\n if(RNG.num <= 90){\n enemy = \"imp\";\n }else{\n enemy = \"IMP LORD\";\n }\n }else if(PlayerStats.LVL > 2 && PlayerStats.LVL <= 3){\n if(RNG.num <= 20){\n enemy = \"imp\";\n }else if(RNG.num > 20 && RNG.num <= 90){\n enemy = \"toadman\";\n }else{\n enemy = \"IMP LORD\";\n }\n }else if(PlayerStats.LVL > 3 && PlayerStats.LVL <= 5){\n if(RNG.num <= 10){\n enemy = \"toadman\";\n }else if(RNG.num > 10 && RNG.num <= 90){\n enemy = \"giant spider\";\n }else{\n enemy = \"BROODMOTHER\";\n }\n }else if (PlayerStats.LVL > 5 && PlayerStats.LVL <= 8){\n if(RNG.num <= 30){\n enemy = \"goblin sorceror\";\n }else if(RNG.num > 30 && RNG.num <= 60){\n enemy = \"goblin warrior\";\n }else if(RNG.num >60 && RNG.num <= 90){\n enemy = \"goblin archer\";\n }else if(RNG.num > 90 && RNG.num <= 100){\n enemy = \"GOBLIN CHIEFTAN\"; \n }\n } \n }", "public abstract void attack(Game g);", "public void attack(int idx)\n {\n CreatureWorld playerWorld = ;\n \n }", "public void startTurn() {\n nMovesBeforeGrabbing = 1;\n nMovesBeforeShooting = 0;\n\n if (damages.size() > 2)\n nMovesBeforeGrabbing = 2;\n\n if (damages.size() > 5)\n nMovesBeforeShooting = 1;\n\n playerStatus.isActive = true;\n }", "public GiantWarrior(float x, float y, boolean enemy, int level) {\r\n\t\tsuper(x, y, (int) Data.GIANTWARRIOR_STATS[0], (int) Data.GIANTWARRIOR_STATS[1],\r\n\t\t\t\t(int) Data.GIANTWARRIOR_STATS[2], Data.GIANTWARRIOR_STATS[3],\r\n\t\t\t\t(int) (Data.GIANTWARRIOR_STATS[4] * Math.pow(1.1, level - 1)), enemy, Data.GIANTWARRIOR_ICON,\r\n\t\t\t\tData.GIANTWARRIOR_ATTACK_ICON);\r\n\t}", "public static void playerEffectivelyEndsBattlePhase() {\r\n for (int index = 1; index <= 5; index++){\r\n SummonedMonster MonsterCPU = SummonedMonster.getNthSummonedMonster(index, false);\r\n if (MonsterCPU.isExisting) {\r\n MonsterCPU.canStillAttackThisTurn = false;\r\n }\r\n }\r\n endAttack(false);\r\n }", "private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }", "public void attack();", "@Override\n\tpublic void attack() {\n\t\t\n\t}", "public void attack() {\r\n\t\tmch.clicked = false;\r\n\t\t\r\n\t\t//Makes the troopsToDeploy and cashinButton not visible\r\n\t\t//This code will only be called once per attack()\r\n\t\tif (phaseInit == 0) {\r\n\t\t\ttroopsToDeploy.setVisible(false);\r\n\t\t\tcashInButton.setVisible(false);\r\n\t\t\t//Removes the mouse listeners from the cards and makes them invisible\r\n\t\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\t\tif (cardPics[x].getMouseListeners() != null)\r\n\t\t\t\t\tcardPics[x].removeMouseListener(mch);\r\n\t\t\t\tcardSelectedPics[x].setVisible(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tphaseInit++;\r\n\r\n\t\t//This code will determine when a battle will happen\r\n\t\tString s = \"\";\r\n\t\tfor (Player p : Board.players) {\r\n\t\t\t//get the name of the country that has been clicked\r\n\t\t\tfor (Country c : p.getCountries()) {\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor())) {\r\n\t\t\t\t\ts = c.getName();\r\n\t\t\t\t}\r\n\t\t\t\t//Ensure this country is one the current player owns and the country has more than one troop\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor()) && players.get(turnCounter).checkOwn(s)\r\n\t\t\t\t\t\t&& c.getTroops() > 1) {\r\n\t\t\t\t\t//Dehighlight any countries that were previously selected\r\n\t\t\t\t\tfor (Player player : players) {\r\n\t\t\t\t\t\tfor (Country ca : player.getCountries()) {\r\n\t\t\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\t\t\tnew threadz(ca, player.getColor(), false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Highlight the new selected country, and its neighboring countries\r\n\t\t\t\t\tnew threadz(c, players.get(turnCounter).getColor().brighter().brighter().brighter(), true);\r\n\t\t\t\t\tc.HighlightNeighbours();\r\n\t\t\t\t\t//the attacking country is the first clicked country\r\n\t\t\t\t\tattackingCountry = c;\r\n\t\t\t\t\ttempAtt = attackingCountry.getTroops();\r\n\t\t\t\t\t\r\n\t\t\t\t\tattackSlide.setVisible(true);\r\n\t\t\t\t\tattackSlide.setMaximum(attackingCountry.getTroops()-1);\r\n\t\t\t\t\tattackSlide.setMinimum(1);\r\n\t\t\t\t\tattackSlide.setValue(attackSlide.getMaximum());\r\n\t\t\t\t\tattacker.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (hoveredColor.equals(c.getDetectionColor()) && c.isHighlighted() && c.getName().equals(attackingCountry.getName()) == false && checkO(c) == false) {\r\n\t\t\t\t\t//The defending country is the second clicked country, and it must be highlighted\r\n\t\t\t\t\tdefendingCountry = c;\r\n\t\t\t\t\tbattle = true;\r\n\t\t\t\t\thasAttacked = true;\r\n\t\t\t\t\tattackSlide.setVisible(false);\r\n\t\t\t\t\tattacker.setVisible(false);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If a battle has been determined to happen\r\n\t\tif (battle == true) {\r\n\t\t\t\r\n\t\t\t//Makes sure the attacking country has more than one troop and that it is attacking a neighbour\r\n\t\t\tif (attackingCountry.getTroops() > 1 && defendingCountry.isHighlighted()) {\r\n\t\t\t\t//Makes a new battle between the attacker and defender then updates their troops after the battle \r\n\t\t\t\tBattle battle1 = new Battle(attackSlide.getValue(), defendingCountry.getTroops());\r\n\t\t\t\tbattle1.BattleTroops();\r\n\t\t\t\tattackingCountry.setTroops(Battle.getAttackers());\r\n\t\t\t\tdefendingCountry.setTroops(Battle.getDefenders());\r\n\t\t\t}\r\n\r\n\t\t\t//Determines the array index of the defending country in the players array\r\n\t\t\tint defNum = 0;\r\n\t\t\tfor (Player po : players) {\r\n\t\t\t\tfor (Country co : po.getCountries()) {\r\n\t\t\t\t\tif (defendingCountry.getName().equals(co.getName())) {\r\n\t\t\t\t\t\tdefNum = po.getPlayerNum();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//These two ifs ensure that the troops never go into the negative\r\n\t\t\tif (attackingCountry.getTroops() < 0) {\r\n\t\t\t\tattackingCountry.setTroops(0);\r\n\t\t\t}\r\n\t\t\tif (defendingCountry.getTroops() < 0) {\r\n\t\t\t\tdefendingCountry.setTroops(0);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t// If Attackers lose\r\n\t\t\tif (attackingCountry.getTroops() == 0) {\r\n\t\t\t\t//Unhighlight its neighbors\r\n\t\t\t\tattackingCountry.unHighlightNeighbours();\r\n\t\t\t\t\r\n\t\t\t\tattackingCountry.setTroops(tempAtt - attackSlide.getValue());\r\n\t\t\t\t//Updates the defenders based on the defenders left\r\n\t\t\t\tdefendingCountry.setTroops(defendingCountry.getTroops());\r\n\r\n\t\t\t\t\r\n\t\t\t\t//Ensures the troops never go negative or less than zero\r\n\t\t\t\tif (defendingCountry.getTroops() <= 0) {\r\n\t\t\t\t\tdefendingCountry.setTroops(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//If defenders lose\r\n\t\t\tif (defendingCountry.getTroops() == 0) {\r\n\t\t\t\t//Unhighlights the defending country\r\n\t\t\t\tfor (Player p: players) {\r\n\t\t\t\t\tfor (Country c: p.getCountries()) {\r\n\t\t\t\t\t\tif (c.getName().equals(defendingCountry.getName())){\r\n\t\t\t\t\t\t\tc.setHighlighted(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Recolor the defenders country to the attackers color\r\n\t\t\t\tnew threadz(defendingCountry, players.get(turnCounter).getColor(), false);\r\n\t\t\t\tattackingCountry.unHighlightNeighbours();\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Updates the troop numbers\r\n\t\t\t\r\n\t\t\t\tdefendingCountry.setTroops(attackingCountry.getTroops());\r\n\t\t\t\tattackingCountry.setTroops(tempAtt - attackSlide.getValue());\r\n\t\t\t\tif (attackingCountry.getTroops() <= 0) {\r\n\t\t\t\t\tattackingCountry.setTroops(1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Removes the defender from the defenders country arraylist\r\n\t\t\t\tplayers.get(defNum).getCountries().remove(defendingCountry);\r\n\t\t\t\t//Adds the defender country to the attackers country arrayList.\r\n\t\t\t\tplayers.get(turnCounter).getCountries().add(defendingCountry);\r\n\t\t\t\thasWon = true;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (players.get(defNum).getCountries().size() == 0) {\r\n\t\t\t\t\tFile fanfare = new File(\"Ressources/\" + \"fanfare2.wav\");\r\n\t\t\t\t\tplaySound(fanfare);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(window.getFrame(), \"Player \" + (defNum+1) + \" has been Eliminated!\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile(players.get(defNum).getCards().size() > 0) {\r\n\t\t\t\t\t\tusedCards.add(players.get(defNum).getCards().get(0));\r\n\t\t\t\t\t\tplayers.get(defNum).getCards().remove(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t} // End of i\r\n\r\n\t\tbattle = false;\r\n\t\t\r\n\t}", "public void fight() {\n\t\tif(roamingAstronauts <= 0 || roamingAliens <= 0){\n\t\t\tSystem.out.println(\"Error: Need at least 1 astronaut & alien to fight.\");\n\t\t\treturn;\n\t\t}\n\t\tAstronaut a = getRandomAstronaut();\n\t\ta.damage();\n\t\tSystem.out.println(\"The astronaut fought the alien & the alien won.\\nAstronaut takes 1 point of damage.\");\n\t}", "private static void decisionWhenAttacking() {\n\t\tif (isNewAttackState()) {\n\t\t\tchangeStateTo(STATE_ATTACK_PENDING);\n\n\t\t\t// We will try to define place for our army where to attack. It\n\t\t\t// probably will be center around a crucial building like Command\n\t\t\t// Center. But what we really need is the point where to go, not the\n\t\t\t// unit. As long as the point is defined we can attack the enemy.\n\n\t\t\t// If we don't have defined point where to attack it means we\n\t\t\t// haven't yet decided where to go. So it's the war's very start.\n\t\t\t// Define this assault point now. It would be reasonable to relate\n\t\t\t// it to a particular unit.\n\t\t\t// if (!isPointWhereToAttackDefined()) {\n\t\t\tStrategyManager.defineInitialAttackTarget();\n\t\t\t// }\n\t\t}\n\n\t\t// Attack is pending, it's quite \"regular\" situation.\n\t\tif (isGlobalAttackInProgress()) {\n\n\t\t\t// Now we surely have defined our point where to attack, but it can\n\t\t\t// be so, that the unit which was the target has been destroyed\n\t\t\t// (e.g. just a second ago), so we're standing in the middle of\n\t\t\t// wasteland.\n\t\t\t// In this case define next target.\n\t\t\t// if (!isSomethingToAttackDefined()) {\n\t\t\tdefineNextTarget();\n\t\t\t// }\n\n\t\t\t// Check again if continue attack or to retreat.\n\t\t\tboolean shouldAttack = decideIfWeAreReadyToAttack();\n\t\t\tif (!shouldAttack) {\n\t\t\t\tretreatsCounter++;\n\t\t\t\tchangeStateTo(STATE_RETREAT);\n\t\t\t}\n\t\t}\n\n\t\t// If we should retreat... fly you fools!\n\t\tif (isRetreatNecessary()) {\n\t\t\tretreat();\n\t\t}\n\t}", "@Override\n public void attack() {\n\n }", "public BattleWorld(int enemyPokemonID)\r\n {\r\n wildPokemon = false;\r\n isBattleOver = false;\r\n initWorld(\"\", 0, enemyPokemonID);\r\n }", "public abstract boolean attack(Enemy w);", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "@Override\n\tpublic void attack() {\n\t}", "public Enemy summon() {\n\t\treturn null;\n\t}", "public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t\t\t//screenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t//gui.setScreenID(screenNumber);\n\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\tCutscene.loadCutscene(player.getCurLevel(), false);\n\t\t\tgui.setScreenID(screenNumber);\n\t\t\tgui.initializeCutscene();\n\t\t\tplayer.setCurLevel(player.getCurLevel()+1);\n\t\t}\n\t\t\n\t\tif (end) {\n\t\t\tai.play();\n\t\t\tgui.setEnemyPath(ai.getMoveCommands());\n\t\t\t\n\t\t\ttotalEnemyAttacks = 0;\n\t\t\tcurEnemyAttacker = -1;\n\t\t\t\n\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\n\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\ttotalEnemyAttacks++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttacker == -1){\n\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (totalEnemyAttacks > 0){\n\t\t\t\tgui.setEnemyHasAttackCommand(true);\n\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\tisEnemyAttacking = true;\n\t\t\t\t//gui.setScreenID(screenNumber);\n\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\n\t\t\t\tcurEnemyAttack = 1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer.resetAllHeroes();\n\t\t\t}\n\n\t\t}\n\t}", "private void warSeed(Player player) {\n\t\t\n\t}", "public void autosimulateCombat() {\n\n int monstersRemainingHealth = monster.getHealth() - player.getPower();\n int playersRemainingHealth = player.getHealth() - monster.getPower();\n\n while (player.getHealth() > 0 && monster.getHealth() > 0) {\n\n monster.setHealth(monstersRemainingHealth);\n monstersRemainingHealth = monster.getHealth() - player.getPower();\n\n\n player.setHealth(playersRemainingHealth);\n playersRemainingHealth = player.getHealth() - monster.getPower();\n\n }\n isPlayerDefeated();\n return;\n }", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }", "@Override\n\tpublic void payCrew() {\n\t\tSystem.out.println(\"Crew paid!, You can start sailing now!\");\n\t\tgame.loading();\n\t}", "public void basicEnemyAI(){\n if(enemyMana == enemyManaMax){\n applyCard(enemyPlayCard(), \"enemy\");\n }\n }", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "public abstract void attack(Vector2 spawnPos, Vector2 target);", "public void Beginattack(HW10Trainer[] people, int numTrainer,Scanner scan)\n{\nString name1, name2;\nname1=scan.next();//reads the first part and sets it as a string \nname2=scan.next();//reads the second part and sets it as a string \nscan.nextLine();\nHW10Trainer a = new HW10Trainer();//pre set\nHW10Trainer b= new HW10Trainer(); \n\nfor (int i =0; i<numTrainer; i++)///matches the trainer with there name\n{\n\tif(name1.equals(people[i].getName()))//determines which trainer in the array goes with this name\n\t{\n\t\ta=people[i];\n\t}\n\tif(name2.equals(people[i].getName()))\n\t{\n\t\tb=people[i];\n\t}\n}\nint max1,max2;\nmax1=a.getNumMonsters();//gets the total amount of pokemen for that trainer\nmax2=b.getNumMonsters();\nint curr1,curr2; //acts as the index place value for the array \ncurr1=0;//starts the array at poistion 0\ncurr2=0;\nHW10Monster side1,side2;//sets the side for the battle \nside1= a.getMonster(curr1);//sets side one for all of the first trainers monsters\nside2=b.getMonster(curr2);//side two = all seconds trainers monsters\nSystem.out.println(a.getName() + \" is fighting \" + b.getName());\nSystem.out.println(\"Starting battle is \" + side1.name + \" versus \" + side2.name);\nwhile(curr1 < max1 && curr2<=max2)//if curr1 is less then max and curr2 is less then max2 then run\n{\n\t\n\tint result = fight(side1,side2,a,b);//sends the fight method the pokemon information and the Trainers information\nif(result==1)\n{\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\tif(curr2<max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n}\n else if(result == 2)\n{\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n}\n else if(result == 3)\n{\n\tSystem.out.println(\"*Draw*\");\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\t\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\t\n\tif(curr2 < max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n\tSystem.out.println(\"* End Draw *\");\n}\n\n\n\t\n}\n\tif( curr1<max1 && curr2>max2)//if the first trainer still has pokemon and the second does not\n\t{\n\t\tSystem.out.println(a.getName() + \" won the match\");\n\t}\n\telse if (curr2<max2 && curr1>max1)//if the second trainer still has pokemon and the first does not\n\t{\n\t\t\n\t\tSystem.out.println(b.getName() + \" won the match\");\n\t}\n\telse if(curr2<max2 && curr1<max1)//if both sides dont have any pokemon left\n\t\tSystem.out.println(\"Battle is a draw\");\n\n}", "int attack(Unit unit, Unit enemy);", "public boolean startBattle()\n {\n if(a.getHealth() <= 0) //if the health is 0 then you lose\n {\n return false; //lose\n }\n if(b.getHealth() <= 0) //if AI is 0 you when\n {\n return true; //win\n }\n if(gotAway)\n {\n return false;\n }\n if(!init) //first time\n {\n System.out.println(\"Go \" + a.getName() + \"!\");\n init = true; //sets it so its not first time anymore\n }\n System.out.println(\"What will \" + a.getName() + \" do?\");\n System.out.println(\"1. Fight 2. Run\");\n Scanner scanner = new Scanner(System.in); //scan for user input, fight or run\n int choice = scanner.nextInt();\n switch(choice) //switch for choices of options\n {\n case 1:\n {\n // Display move options\n System.out.println(\"Fight!\");\n for(int i = 1; i < a.actions.length + 1; i++) //print out all of the possible moves\n {\n System.out.println(i + \". \" + a.actions[i - 1]);\n }\n int fightSelection = scanner.nextInt();\n if(fightSelection < 1 || fightSelection > 4) //keeps the selection within boundaries\n {\n System.out.println(\"INVALID CHOICE\");\n startBattle();\n } else\n {\n Actions current = a.actions[fightSelection - 1];\n if(hit(current.getAccuracy())) //if the attack hits\n {\n b.subtractHealth(current.getPower()); //AIHealth - power\n current.subtractPp(1); //-PP\n //Display stats\n System.out.println(a.getName() + \" used \" + current.getName());\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n break;\n } else\n {\n System.out.println(a.getName() + \" missed!\");\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n current.subtractPp(1);\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n break;\n }\n }\n break;\n }\n case 2:\n {\n // Run\n if(hit(75))\n {\n // Run away successful\n System.out.println(\"Got away safely\");\n gotAway = true;\n break;\n } else\n {\n System.out.println(\"Can't escape!\");\n gotAway = false;\n break;\n }\n\n }\n default:\n {\n System.out.println(\"Please choose a valid choice.\");\n startBattle();\n }\n }\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n\n if(!gotAway)\n {\n // AI Turn\n Random random = new Random();\n int move = random.nextInt(4);\n int counter = 0;\n while(b.actions[move].getPp() <= 0 && counter < 50)\n {\n move = random.nextInt(4); //picks a random move\n counter++;\n }\n Actions aiAction = b.actions[move];\n if(hit(aiAction.getAccuracy()))\n {\n a.subtractHealth(aiAction.getPower());\n aiAction.subtractPp(1);\n System.out.println(b.getName() + \" used \" + aiAction.getName());\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n } else\n {\n System.out.println(b.getName() + \" missed!\");\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n aiAction.subtractPp(1);\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n }\n startBattle();\n return false;\n }\n return false;\n }", "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "@Test\r\n public void testAutoBattleMixedEnemies() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(2700); \r\n // 2700 xp should get to level 10\r\n assertEquals(character.getLevel(), 10);\r\n // Equip a sword and increase attack damage\r\n character.equip(helper.testSword);\r\n assertEquals(character.getCurrATK(), 11.5, 0.001); // 6.5atk base + 5atk from sword\r\n character.equip(helper.testArmour);\r\n\r\n // Spawn enemies of each type\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n fighters.add(helper.testSlug);\r\n fighters.add(helper.testZombie);\r\n fighters.add(helper.testVampire);\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // The character should lose the battle\r\n assertFalse(battleResult);\r\n // Character should be defeated\r\n assertTrue(character.getCurrHP() <= 0);\r\n // Slug and zombie should be defeated, but vampire survives\r\n assertEquals(helper.testSlug.getCurrHP(), 0, 0.01);\r\n assertEquals(helper.testZombie.getCurrHP(), 0, 0.01);\r\n assertTrue(helper.testVampire.getCurrHP() > 0);\r\n assertEquals(battler.getDefeated().size(), 2);\r\n\r\n }", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "private void fight(int playerNo, int fighter, int challenger)\r\n {\r\n LaughButton lt = new LaughButton();\r\n if(playerNo == 1)\r\n {\r\n int attack = worldPanel.player1.units[fighter].getAttack();\r\n int defence = worldPanel.player2.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player1 wins\r\n worldPanel.player2.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player1.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n\r\n if(playerNo == 2)\r\n {\r\n int attack = worldPanel.player2.units[fighter].getAttack();\r\n int defence = worldPanel.player1.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player2 wins\r\n worldPanel.player1.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player2.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n setMapPos();\r\n setInfoPanel();\r\n }", "@Override\n public void attack(){\n\n }", "public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendront les valeurs du random\n\n\n System.out.println(\"Bienvenue dans le dongeon\");\n System.out.println(\"Vous avez \" + aventurier.getPointDeVie() + \" Point de vie, \" + aventurier.getFlasqueDeau() + \" flasques pour combatre vos ennemies et une \");\n\n // i=room ;si pointdevie > room-->room+1 sinon game over(pas besoin de creer une classe)\n int i = 1;\n do {\n\n if (aventurier.getPointDeVie() > 0) ;\n {\n System.out.println(\"Room\" + i);\n\n Monsters enemieActuel = barbare;\n//nbr aleatoire entre sorcier et monster\n Random random = new Random();\n int nbrAl = random.nextInt(2 );\n//si nbr=0 = sorcier sinon barbare\n if (nbrAl == 0) {\n enemieActuel = sorciere;\n //sinon barbare\n } else {\n enemieActuel = barbare;\n }\n\n\n //Si barbare faire le do while\n\n if (enemieActuel == barbare) {\n\n do { //Faire des degats aleatoire grace au random à l'aide de l'epee\n epee.setDegat((int) (5 + (Math.random() * 30)));//comme .set dega=0 on lui donne la valeur de math.random\n int degat = epee.getDegat(); //.get renvoi la valeur au int nommer degat\n barbare.setPointDeVie(barbare.getPointDeVie() - degat);//vie - degat\n System.out.println(\"Il reste au barbare \" + barbare.getPointDeVie());//nouvelle valeur de point de vie\n\n\n //idem avec l'aventurier\n barbare.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = barbare.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n // tant que les Pvie de l'aventurier >= 0 et idem barbare continuer le combat\n } while (aventurier.getPointDeVie() >= 0 && barbare.getPointDeVie() >= 0);\n //à la fin du combat si pvie de l'aventurier sont >0 et que i (room) egale 5 \"gagné\"\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n\n //Si juste pvie de l'aventurier > 0 --->room suivante\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n //on redonne les valeurs de depart pdeVie pour la nouvelle room\n aventurier.setPointDeVie(200);\n barbare.setPointDeVie(180);\n i+=1;\n }\n\n // sinon room = 6 pour envoyer le sout \"game over\"\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n\n\n\n }\n\n //IDEM avec sorciere\n else {\n do {\n\n\n aventurier.setFlasqueDeau((int) (5 + (Math.random() * 30)));\n int degat = aventurier.getFlasqueDeau();\n sorciere.setPointDeVie(sorciere.getPointDeVie() - degat);\n System.out.println(\"Il reste à la sorciere \" + sorciere.getPointDeVie());\n\n sorciere.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = sorciere.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n } while (aventurier.getPointDeVie() >= 0 && sorciere.getPointDeVie() >= 0);\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n aventurier.setPointDeVie(200);\n sorciere.setPointDeVie(160);\n i+=1;\n }\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n }\n } } while (i <= 5 && aventurier.getPointDeVie() > 0);\n\n\n }", "void defendAttack(IUnit attacker, int incomingDamage);", "public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }", "public void chase() throws GameActionException {\n\t\tRobotInfo closestEnemy = dc.getClosestEnemy();\n\t\tif (closestEnemy == null) {\n\t\t\tcurrState = RobotState.RUSH;\n\t\t\treturn;\n\t\t}\n\t\t// attack closest enemy\n\t\tmi.setObjective(closestEnemy.location);\n\t\tmi.setChargeMode();\n\t\tmi.attackMove();\n\t\t// send dead enemy archon IDs\n\t\tsendDeadEnemyArchonIDs();\n\t}", "@Override\n\tvoid attack() {\n\n\t}", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tBattleStage.startBattleStage();\n\t\t\t\t\t\tPRIMARY.setScene(BATTLESCENE);\n\t\t\t\t\t\t//BattleStage.startMonster();\n\t\t\t\t\t}", "public void act() \n {\n \n move(1);\n \n Player2 player2 = new Player2();\n myWorld2 world = (myWorld2)getWorld();\n \n \n checkForDeath();\n }", "public abstract void activatedBy(Player player);" ]
[ "0.6944945", "0.6869196", "0.68681836", "0.67669433", "0.6717688", "0.66646004", "0.66453844", "0.65658087", "0.65630746", "0.654365", "0.6518733", "0.6477719", "0.6453887", "0.64522207", "0.6448205", "0.64345837", "0.6366469", "0.6362446", "0.63617", "0.6333657", "0.63192284", "0.6285851", "0.62648714", "0.6260438", "0.62466204", "0.6223084", "0.62189806", "0.6212595", "0.61941266", "0.618173", "0.6181313", "0.6175154", "0.6155435", "0.614842", "0.6136307", "0.6130962", "0.61221397", "0.6122074", "0.6116571", "0.6116537", "0.61144507", "0.61134714", "0.61099833", "0.61005265", "0.61001205", "0.6081675", "0.60761935", "0.60698116", "0.6068863", "0.6066408", "0.6060397", "0.60541946", "0.6052167", "0.60456485", "0.6045602", "0.60430545", "0.6038302", "0.6030643", "0.60283494", "0.60138184", "0.60070884", "0.60040927", "0.6003538", "0.59953403", "0.599497", "0.599445", "0.5994305", "0.59927773", "0.5991873", "0.59835374", "0.59814185", "0.5977965", "0.5975037", "0.5973932", "0.5972513", "0.5970958", "0.59703594", "0.59685534", "0.5967841", "0.59664524", "0.59620905", "0.59617126", "0.5960519", "0.5957602", "0.5956658", "0.5955019", "0.5953632", "0.5953099", "0.59497464", "0.5941163", "0.5936162", "0.5934664", "0.5932691", "0.59319144", "0.59309703", "0.59281266", "0.59265", "0.59250873", "0.5924654", "0.5924297", "0.59174144" ]
0.0
-1
end of garretFight This method makes it so that Ari the enemy can initate a battle.
public boolean ariFight(){ int Xari = 0; int Yari = 0; int Xyou = 1; int Yyou = 1; for(int i = 0 ; i < this.Ari.length;i++){ for(int p = 0; p < this.Ari.length;p++){ if(this.Ari[i][p] == 1){ Yari = i; Xari = p; } if(this.position[i][p] == 1){ Yyou = i; Xyou = p; } } }//end of outter for if(Yari==Yyou && Xari==Xyou){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readyNextAttackers() {\n if(battleAlly == null && battleEnemy == null){\n //if(battleAlly == null && battleEnemy == null && !isBattleOver()){\n battleAlly = battleAllies.get(0);\n battleEnemy = battleEnemies.get(0);\n }\n }", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "public static void battle(int choice) {\n \t\tboolean monsterHeal = false;\r\n \t\tboolean monsterDefend = false;\r\n \t\tboolean monsterAttack = false;\r\n \t\tboolean playerDefend = false;\r\n \t\tboolean playerAttack = false;\r\n \t\tboolean playerHeal = false;\r\n \t\t\r\n \t\t//Get the move the monster will make\r\n \t\tint monsterAi = monster.getAiChoice();\r\n \t\t\r\n \t\t//Check what input the player has given\r\n \t\tif(choice == 1) {\r\n \t\t\t//Set the booleans according to the input for attack\r\n \t\t\tplayerAttack = true;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 2) {\r\n \t\t\t//Set the booleans according to the input for defend\r\n \t\t\tplayerDefend = true;\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 3) {\r\n \t\t\t//Set the booleans according to the input for heal\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = true;\r\n \t\t} else {\r\n \t\t\t//Set the player not to do anything if the input is wrong\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t}\r\n \t\t\r\n \t\t//Link the monster AI choice to a move\r\n \t\tif(monsterAi == 1) {\r\n \t\t\t//Set the booleans according to the AI for attack\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 2) {\r\n \t\t\t//Set the booleans according to the AI for defend\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 3) {\r\n \t\t\t//Set the booleans according to the AI for heal\r\n \t\t\tmonsterAttack = false;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = true;\r\n \t\t}\r\n \t\t\r\n \t\tString pFirst = \"\";\r\n \t\tString mFirst = \"\";\r\n \t\tString mAttack = \"\";\r\n \t\tString pAttack = \"\";\r\n \t\tString pLife = \"\";\r\n \t\tString mLife = \"\";\r\n \t\t\r\n \t\t//Player moves\r\n \t\tif(playerHeal) {\r\n \t\t\t//Heal the player by 10 life\r\n \t\t\tplayer.Heal(10);\r\n \t\t\t//Show a message saying the player was healed\r\n \t\t\tpFirst = player.name + \" healed 10 life! \\n\";\r\n \t\t} else if(playerDefend) {\r\n \t\t\t//Set the monster not to attack (do damage)\r\n \t\t\tmonsterAttack = false;\r\n \t\t\t//Shows a message that the player has defended\r\n \t\t\tpFirst = player.name + \" defended and has got 0 damage from \" + monster.name + \"\\n\";\r\n \t\t} else if(!playerAttack && !playerDefend && !playerHeal) {\r\n \t\t\t//Show a message that the player did not do anything\r\n \t\t\tpFirst = player.name + \" did nothing. \\n\";\r\n \t\t} \r\n \t\t\r\n \t\t//Monster moves\r\n \t\tif(monsterHeal) {\r\n \t\t\t//heal the monster by 10 life\r\n \t\t\tmonster.Heal(10);\r\n \t\t\t//Show a message that the monster was healed\r\n \t\t\tmFirst = (monster.name + \" healed 10 life! \\n\");\r\n \t\t} else if(monsterDefend) {\r\n \t\t\t//Set the player not to attack (do damage)\r\n \t\t\tplayerAttack = false;\r\n \t\t\t//Show a message that the monster has defended\r\n \t\t\tmFirst = monster.name + \" defended and has got 0 damage from \" + player.name + \"\\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Attack moves\r\n \t\tif(playerAttack) {\r\n \t\t\t//Lower the monsters life by the players power\r\n \t\t\tmonster.life -= player.strength;\r\n \t\t} \r\n \t\t\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Lower the players life by the monsters power\r\n \t\t\tplayer.life -= monster.strength;\r\n \t\t}\r\n \t\tif(playerAttack) {\r\n \t\t\t//Show a message that the player has attacked\r\n \t\t\tpAttack = player.name + \" hit \" + monster.name + \" for \" + player.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Show a message that the monster has attacked\r\n \t\t\tmAttack = monster.name + \" hit \" + player.name + \" for \" + monster.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Show the current life for the player and the monster\r\n \t\tpLife = player.name + \" does now have \" + player.life + \" life left. \\n\";\r\n \t\tmLife = monster.name + \" does now have \" + monster.life + \" life left. \\n\";\r\n \t\t\r\n \t\t//Print the moves message\r\n \t\tMainGame.display.disp(pFirst + mFirst + pAttack + mAttack + pLife + mLife);\r\n \t\t\r\n\t\t//Check if the player is still alive\r\n \t\tif(player.life <= 0) {\r\n \t\t\t\r\n \t\t\t//If the player has no life left, show him that he has lost\r\n \t\t\tMainGame.display.disp(\"Too bad! You lost!\" + \"\\n\" + \"Play again?\");\r\n \t\t\t\r\n \t\t\t//Show the option to play again\r\n \t\t\tMainGame.display.Enable(MainGame.display.playAgain);\r\n \t\t}\r\n \t\t\r\n\t\t//Check if the monster is still alive\r\n \t\tif(monster.life <= 0) {\r\n \t\t\t\r\n \t\t\tplayer.xp += monster.giveXp;\r\n \t\t\tMainGame.display.disp(\"You beat \" + monster.name + \"! \\n\" + \"You got \" + monster.giveXp + \" XP!\" + \"\\n\" + \"You now have \" + player.xp + \" XP!\");\r\n \t\t\t\r\n \t\t\tMainGame.display.Enable(MainGame.display.continueStage);\r\n \t\t}\r\n \t\t\r\n\t\tMainGame.display.Enable(MainGame.display.continueFight);\r\n \t\r\n \t}", "private void battle(){\n\n while(!isBattleOver()){\n\n battleAllyAttack();\n if(isBattleOver()) return;\n\n battleEnemyAttack();\n if(isBattleOver()) return;\n\n readyNextAttackers();\n\n }\n System.out.println(\"battle over\");\n\n }", "public void battleComplete() {\n\t}", "void useInBattle(PlayerCharacter player, Opponent enemy) {\n\t}", "public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }", "public void atBattleStartPreDraw() {\n\n this.flash();\n ArrayList<Integer> orbs = new ArrayList();\n orbs.add(1);\n orbs.add(2);\n orbs.add(3);\n orbs.add(4);\n\n for (int i = 0; i < 2; i++) {\n\n Integer o = orbs.get(AbstractDungeon.cardRng.random(orbs.size() - 1));\n\n switch (o) {\n case 1:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new AttackSlime(), false, true));\n break;\n case 2:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new ShieldSlime(), false, true));\n break;\n case 3:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new SlimingSlime(), false, true));\n break;\n case 4:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new PoisonSlime(), false, true));\n break;\n }\n }\n\n com.megacrit.cardcrawl.dungeons.AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.defect.IncreaseMaxOrbAction(1));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PotencyPower(AbstractDungeon.player, AbstractDungeon.player, 1), 1));\n\n\n }", "public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }", "public void enemyTurnStart() {\n\r\n\t}", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public void setupBattle(Pokemon ally, Pokemon enemy, boolean battleType, int battleLoc){\n\t\tPokemon.generateIV(enemy);\n\t\tPokemon.generateNewStats(enemy);\n\t\n\t\t_gbs.getBattlePanel().initializeBattle(_gbs.getPlayer(), enemy, battleLoc);\n\t\t\n\t\t_gbs.getBattlePanel().repaint();\n\t}", "public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t\t\t//screenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t//gui.setScreenID(screenNumber);\n\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\tCutscene.loadCutscene(player.getCurLevel(), false);\n\t\t\tgui.setScreenID(screenNumber);\n\t\t\tgui.initializeCutscene();\n\t\t\tplayer.setCurLevel(player.getCurLevel()+1);\n\t\t}\n\t\t\n\t\tif (end) {\n\t\t\tai.play();\n\t\t\tgui.setEnemyPath(ai.getMoveCommands());\n\t\t\t\n\t\t\ttotalEnemyAttacks = 0;\n\t\t\tcurEnemyAttacker = -1;\n\t\t\t\n\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\n\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\ttotalEnemyAttacks++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttacker == -1){\n\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (totalEnemyAttacks > 0){\n\t\t\t\tgui.setEnemyHasAttackCommand(true);\n\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\tisEnemyAttacking = true;\n\t\t\t\t//gui.setScreenID(screenNumber);\n\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\n\t\t\t\tcurEnemyAttack = 1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer.resetAllHeroes();\n\t\t\t}\n\n\t\t}\n\t}", "BossEnemy(){\n super();\n totallyDied = true;\n }", "public GenGameOver() { \n prepare();\n }", "public void startFCombat() {\n\t\ttry { \n\t\t\tenemyName = Monster.getFBossName();\n\t\t\tSystem.out.println(\"\\t!#> \" + enemyName + \" has appeared! <#! \");\n\t\t\tenemyNewHealth = Monster.getFBossHealth();\n\n\t\t\t// While enemy is alive\n\t\t\tCOMBAT_START: while (enemyNewHealth > 0) {\n\t\t\t\tSystem.out.println(Player.getPlayerName() + \"\\n HP: \" + playerNewHealth + \" Stamina: \"\n\t\t\t\t\t\t+ Player.getPlayerStamina());\n\t\t\t\tSystem.out.println(\"----------------------------\");\n\t\t\t\tSystem.out.println(enemyName + \" HP: \" + enemyNewHealth);\n\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"\\n\\t # ACTIONS # \");\n\t\t\t\tSystem.out.println(\"\\t1.) Attack!\");\n\t\t\t\tSystem.out.println(\"\\t2.) Block!\");\n\t\t\t\tSystem.out.println(\"\\t3.) Run!\\n\");\n\t\t\t\tSystem.out.println(\"What are you going to do?\");\n\t\t\t\tint input = in.nextInt();\n\t\t\t\t// conditonal preventing other input\n\t\t\t\tif (input == 1 || input == 2 || input == 3) {\n\t\t\t\t\t// Attack\n\t\t\t\t\tif (input == 1) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.getFBossAttack()+1);\n\t\t\t\t\t\thit = rand.nextInt(Player.Attack()+1);\n\t\t\t\t\t\tSystem.out.println(\"You lunge forward and strike the \" + enemyName + \"!!\");\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\tSystem.out.println(\"You dealt \" + hit + \" damage!\");\t\t\n\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\tenemyNewHealth = enemyNewHealth - hit;\n\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\t\t\tenemyNewHealth = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"The \" + enemyName + \" has \" + enemyNewHealth + \" health left!\");\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Block\n\t\t\t\t\tif (input == 2) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\tSystem.out.println(\"You attempt to cower behind your shield!\");\n\t\t\t\t\t\t// Block\n\t\t\t\t\t\tif (Player.Block() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\n\t\t\t\t\t\t\tSystem.out.println(\"\\tBlock Successful!\");\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" trys to deal \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\t// how much is blocked\n\t\t\t\t\t\t\tenemySwing = enemySwing - rand.nextInt(Player.getPlayerMaxBlock());\n\t\t\t\t\t\t\t// if how much is blocked results neg make it 0\n\t\t\t\t\t\t\tif (enemySwing <= 0) {\n\t\t\t\t\t\t\t\tenemySwing = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// output results\n\t\t\t\t\t\t\tSystem.out.println(\"You took \" + enemySwing + \" damage\");\n\t\t\t\t\t\t\t// adjust health value\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue COMBAT_START;\n\n\t\t\t\t\t}\n\t\t\t\t\t// Run chance\n\t\t\t\t\tif (input == 3) {\n\t\t\t\t\t\tSystem.out.println(\"You attempt to flee!\");\n\t\t\t\t\t\t// roll to see if flee\n\t\t\t\t\t\tif (Player.Run() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\t\tSystem.out.println(\"you've run away from the \" + enemyName + \"!\");\n\t\t\t\t\t\t\tbreak COMBAT_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\t!!!Invalid Input!!!\");\n\t\t\t\t\tSystem.out.println(\"\\tPlease try Again.\");\n\t\t\t\t}\n\n\t\t\t\t// When Enemy Dies.\n\t\t\t\t//TODO: add timeunit here\n\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\tSystem.out.println(\"You have defeated \" + enemyName + \"!!\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tYou have beaten my FIRST game ever.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tThank you so fuckin' much for playing.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tit means the W O R L D to me :)\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tIf you want to see more of my work,\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tfollow me on Twitter @Simons_saysNull\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\tSystem.out.println(\"\\tThanks again for playing my game. - Robb Simons\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\n\t \t\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "private void initializeBadGuys() {\n\t\tplayer = new Player();\t\t\n\t\tfor (int i = 0; i < councilmen.length; i++) {\n\t\t\tcouncilmen[i] = new Councilman();\n\t\t}\n\t}", "public static void playerEffectivelyEndsBattlePhase() {\r\n for (int index = 1; index <= 5; index++){\r\n SummonedMonster MonsterCPU = SummonedMonster.getNthSummonedMonster(index, false);\r\n if (MonsterCPU.isExisting) {\r\n MonsterCPU.canStillAttackThisTurn = false;\r\n }\r\n }\r\n endAttack(false);\r\n }", "@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }", "@Test\r\n public void testAutoBattleTrance() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(50000);\r\n character.restoreHP(999);\r\n // Equip a staff and armour\r\n character.equip(helper.testStaff);\r\n character.equip(helper.testArmour);\r\n\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n /* create 5 enemies and 5 allies */\r\n fighters.add(new Slug(null));\r\n fighters.add(new Slug(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Vampire(null));\r\n\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // character should win the battle, but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n // make sure only 5 enemies are defeated\r\n System.out.println(battler.getDefeated().toString());\r\n assertEquals(battler.getDefeated().size(), 5); \r\n\r\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }", "public void Beginattack(HW10Trainer[] people, int numTrainer,Scanner scan)\n{\nString name1, name2;\nname1=scan.next();//reads the first part and sets it as a string \nname2=scan.next();//reads the second part and sets it as a string \nscan.nextLine();\nHW10Trainer a = new HW10Trainer();//pre set\nHW10Trainer b= new HW10Trainer(); \n\nfor (int i =0; i<numTrainer; i++)///matches the trainer with there name\n{\n\tif(name1.equals(people[i].getName()))//determines which trainer in the array goes with this name\n\t{\n\t\ta=people[i];\n\t}\n\tif(name2.equals(people[i].getName()))\n\t{\n\t\tb=people[i];\n\t}\n}\nint max1,max2;\nmax1=a.getNumMonsters();//gets the total amount of pokemen for that trainer\nmax2=b.getNumMonsters();\nint curr1,curr2; //acts as the index place value for the array \ncurr1=0;//starts the array at poistion 0\ncurr2=0;\nHW10Monster side1,side2;//sets the side for the battle \nside1= a.getMonster(curr1);//sets side one for all of the first trainers monsters\nside2=b.getMonster(curr2);//side two = all seconds trainers monsters\nSystem.out.println(a.getName() + \" is fighting \" + b.getName());\nSystem.out.println(\"Starting battle is \" + side1.name + \" versus \" + side2.name);\nwhile(curr1 < max1 && curr2<=max2)//if curr1 is less then max and curr2 is less then max2 then run\n{\n\t\n\tint result = fight(side1,side2,a,b);//sends the fight method the pokemon information and the Trainers information\nif(result==1)\n{\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\tif(curr2<max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n}\n else if(result == 2)\n{\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n}\n else if(result == 3)\n{\n\tSystem.out.println(\"*Draw*\");\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\t\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\t\n\tif(curr2 < max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n\tSystem.out.println(\"* End Draw *\");\n}\n\n\n\t\n}\n\tif( curr1<max1 && curr2>max2)//if the first trainer still has pokemon and the second does not\n\t{\n\t\tSystem.out.println(a.getName() + \" won the match\");\n\t}\n\telse if (curr2<max2 && curr1>max1)//if the second trainer still has pokemon and the first does not\n\t{\n\t\t\n\t\tSystem.out.println(b.getName() + \" won the match\");\n\t}\n\telse if(curr2<max2 && curr1<max1)//if both sides dont have any pokemon left\n\t\tSystem.out.println(\"Battle is a draw\");\n\n}", "@Override\r\n public void init() {\n \tHouse house = ((Room)getCharacterLocation()).getHouse();\r\n \tboolean freekitchen=false;\r\n \tboolean freestage=false;\r\n \tboolean freearena=false;\r\n \tboolean freebath=false;\r\n \tint chance=0;\r\n\r\n \tfor(Room room: house.getRooms()){\r\n \t\tif(room.getAmountPeople()==0){\r\n \t\t\tif(room.getRoomType()==RoomType.STAGE){freestage=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.KITCHEN){freekitchen=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.ARENA){freearena=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.SPAAREA){freebath=true;}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//List what the character can do\r\n\t\tfinal Map<Occupation, Integer> characterCanDo=new HashMap<Occupation, Integer>();\r\n\t\t\r\n\t\tCharakter character = getCharacters().get(0);\r\n\t\t\r\n\t\t\r\n\t\tfor (Occupation attendType: Occupation.values()) {\r\n\t\t\tcharacterCanDo.put(attendType, 0); \r\n\t\t}\r\n\t\t\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)<=80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.REST, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.REST, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.CLEANING)>=1 && house.getDirt()>30){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.SEDUCTION)>=1){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.SEDUCTION)/10;\r\n\t\t\tmaxCust=1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.STRIP)>=1 && freestage==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.STRIP)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.COOKING)>=1 && freekitchen==true){\t\t\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.COOK, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.COOK, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.WELLNESS)>=1 && freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.WELLNESS)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, 0);\r\n\t\t}\r\n\t\tif(freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(Sextype.FOREPLAY)>50 && character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.VETERAN)>=1 && freearena==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, chance);\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, 0);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, 0);\r\n\t\t}\r\n\r\n\t\tint previous=0;\r\n\t\tint actual=0;\r\n\t\tfor (Occupation occupation: Occupation.values()) {\r\n\t\t\tactual=characterCanDo.get(occupation);\r\n\t\t\tif(actual>previous && actual!=0){\r\n\t\t\t\tprevious=actual;\r\n\t\t\t\tcharacterOccupationMap.put(character, occupation);\r\n\t\t\t}\r\n\r\n\t\t}\r\n }", "public void initMission() {\n\t\tinitNumOfMoves();\t//reset counter\n\t\t//Begin by creating a random board.\n\t\t/* 1st parameter: is the cell at (0,0) always empty?\n\t\t * 2nd parameter: will this board be accessed by the AI?\n\t\t * See the constructor comments in Board.java for more details. */\n\n\t\tboard = new Board(this.options.toUpperCase().contains(\"00\") ? true : false, false);\n\n\t\t//TODO OPTIONAL: instead of spawning a random board, we can customize\n\t\t//our own board! Just un-comment any of the below boards or paste your own!\n\n\t\t//Wastes to the right AND to the south! Watch how the AI would react.\n\t\t//try one-player AI version (aggressive or not, doesn't matter)\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"P\", \"W\", \"\", \"\", \"\"},\n//\t\t\t\t {\"W\", \"\", \"\", \"\", \"G\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"P\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\t\t//What's the most efficient way for the AI to find the victim?\n\t\t//Note there are no wastes or fire pits in this scenario.\n//\t\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \"G\", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" }\n//\t\t\t\t});\n\n\t\t//Impossible one. Useful for explaining probability during presentation.\n//\t\t\t\t\t\tboard = new Board(new String[][]\n//\t\t\t\t\t\t\t\t{{\"\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"P\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"W\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"\", \"\", \"W\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"G\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t});\n\n\t\t/* Very tough board, but the AI is up to the task. */\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"P\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"W\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t {\"G\", \"\", \"\", \"W\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t//tough tough tough. The victim is surrounded by a wall of fire!\n\t\t//try it with 2 AI's, starting in random cell. One of them might die!\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"P\", \"\", \"G\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"P\", \"W\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"W\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"P\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t//with aggressiveModeOn set to true, the AI will disinfect both wastes.\n\t\t//if set to false, the AI will disinfect only one.\n\t\t//Either way, AI gets the victim.\n\t\t//\t\t\t\tboard = new Board(new String[][]\n\t\t//\t\t\t\t\t\t{{\"\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"\", \"\", \"P\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"W\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"W\", \"\", \"G\", \"\", \"P\"},\n\t\t//\t\t\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t});\n\n\n\t\t//RARE situation (one-player mode) where setting aggressiveModeOn to true will result in death.\n\t\t//Non-aggressive mode will get the victim. Start at cell (0,0).\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"P\", \"G\", \"P\"},\n//\t\t\t\t{\"\", \"\", \"P\", \"W\", \"W\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"P\", \"P\", \"\"},\n//\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\n\t\t//Very rare instance. if both players are AI and start at cell (0,0),\n\t\t//they will BOTH die. However, note that it's not the AI's fault.\n\t\t//The AI still managed to MINIMIZE risk. They just got unlucky.\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"\", \"P\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"W\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t{\"W\", \"\", \"\", \"\", \"G\", \"\"},\n//\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t/* Use custom method in Board class to print the board to the console and save it to a text file.\n\t\t * See the method comments in Board.java class for more details. */\n\t\tboard.printBoard();\n\n\t\t/* Initialize the cell in which the players will start the mission. */\n\t\tCell startRoom;\n\t\tCellAsPerceivedByAI startRoomAI;\n\t\tCell[] startRooms = this.setStartRoomAndBoardAI(this.options.toUpperCase().contains(\"00\"));\n\t\tstartRoom = startRooms[0];\n\t\tstartRoomAI = (CellAsPerceivedByAI)startRooms[1];\n\n\t\tthis.createPlayers(startRoom, startRoomAI, this.p1Name, this.p2Name,\n\t\t\t\tthis.options.toUpperCase().contains(\"A1\"), this.options.toUpperCase().contains(\"A2\"), this.options.toUpperCase().contains(\"S\"),\n\t\t\t\tthis.options.toUpperCase().contains(\"H\") ? \"H\" : this.options.toUpperCase().contains(\"R\") ? \"R\" : \"B\");\t//create players\n\n\t\tthis.hideAllPics();\n\t\tgreyOutCell(startRoomAI.getX(), startRoomAI.getY());\n\t\trepaint();\n\t}", "public void fight() {\n\t\tif(roamingAstronauts <= 0 || roamingAliens <= 0){\n\t\t\tSystem.out.println(\"Error: Need at least 1 astronaut & alien to fight.\");\n\t\t\treturn;\n\t\t}\n\t\tAstronaut a = getRandomAstronaut();\n\t\ta.damage();\n\t\tSystem.out.println(\"The astronaut fought the alien & the alien won.\\nAstronaut takes 1 point of damage.\");\n\t}", "public boolean startBattle()\n {\n if(a.getHealth() <= 0) //if the health is 0 then you lose\n {\n return false; //lose\n }\n if(b.getHealth() <= 0) //if AI is 0 you when\n {\n return true; //win\n }\n if(gotAway)\n {\n return false;\n }\n if(!init) //first time\n {\n System.out.println(\"Go \" + a.getName() + \"!\");\n init = true; //sets it so its not first time anymore\n }\n System.out.println(\"What will \" + a.getName() + \" do?\");\n System.out.println(\"1. Fight 2. Run\");\n Scanner scanner = new Scanner(System.in); //scan for user input, fight or run\n int choice = scanner.nextInt();\n switch(choice) //switch for choices of options\n {\n case 1:\n {\n // Display move options\n System.out.println(\"Fight!\");\n for(int i = 1; i < a.actions.length + 1; i++) //print out all of the possible moves\n {\n System.out.println(i + \". \" + a.actions[i - 1]);\n }\n int fightSelection = scanner.nextInt();\n if(fightSelection < 1 || fightSelection > 4) //keeps the selection within boundaries\n {\n System.out.println(\"INVALID CHOICE\");\n startBattle();\n } else\n {\n Actions current = a.actions[fightSelection - 1];\n if(hit(current.getAccuracy())) //if the attack hits\n {\n b.subtractHealth(current.getPower()); //AIHealth - power\n current.subtractPp(1); //-PP\n //Display stats\n System.out.println(a.getName() + \" used \" + current.getName());\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n break;\n } else\n {\n System.out.println(a.getName() + \" missed!\");\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n current.subtractPp(1);\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n break;\n }\n }\n break;\n }\n case 2:\n {\n // Run\n if(hit(75))\n {\n // Run away successful\n System.out.println(\"Got away safely\");\n gotAway = true;\n break;\n } else\n {\n System.out.println(\"Can't escape!\");\n gotAway = false;\n break;\n }\n\n }\n default:\n {\n System.out.println(\"Please choose a valid choice.\");\n startBattle();\n }\n }\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n\n if(!gotAway)\n {\n // AI Turn\n Random random = new Random();\n int move = random.nextInt(4);\n int counter = 0;\n while(b.actions[move].getPp() <= 0 && counter < 50)\n {\n move = random.nextInt(4); //picks a random move\n counter++;\n }\n Actions aiAction = b.actions[move];\n if(hit(aiAction.getAccuracy()))\n {\n a.subtractHealth(aiAction.getPower());\n aiAction.subtractPp(1);\n System.out.println(b.getName() + \" used \" + aiAction.getName());\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n } else\n {\n System.out.println(b.getName() + \" missed!\");\n System.out.println(a.getName() + \" Health: \" + a.getHealth());\n System.out.println(b.getName() + \" Health: \" + b.getHealth());\n aiAction.subtractPp(1);\n if(a.getHealth() <= 0)\n {\n return false;\n }\n if(b.getHealth() <= 0)\n {\n return true;\n }\n }\n startBattle();\n return false;\n }\n return false;\n }", "public void battleVampire() {\n\n\t \tPlayer playern = this.playern;\n\t\tcyborgVampire = new CyborgVampire(\"Cyborg Vampire\");\n\t\tSystem.out.println(\"*shivers* It is the evil Cyber Vampire\");\n\t\tSystem.out.println(\"[press enter to fight]\");\n\t\tsc.nextLine();\n\n\t\twhile (true) {\n\t\t\tcyborgVampire.takeDamage(playern.attack());\n\t\t\tif (!cyborgVampire.getisDead()) {\n\t\t\t\tSystem.out.println(\"You killed the Cyborg Vampire, earned \" + cyborgVampire.giveExp() + \" experience\");\n\t\t\t\tplayern.setExp(cyborgVampire.giveExp());\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\t//playern.restoreHpAfterBattle();\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGame.playern.takeDamage(cyborgVampire.attack());\n\t\t\tif (!Game.playern.getIsAlive()){\n\t\t\t\tSystem.out.println(\"You are killed\");\n\t\t\t\tSystem.out.println(\"You have lost the game and turn into warrior zombie\");\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\tbreak;\n\t\t\t\t//System.exit(0);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"* \" + playern.getName() + \": \" + playern.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"* \" + cyborgVampire.getName() + \": \" + cyborgVampire.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\t\t topScore();\n\t}", "public void fight();", "public WarGame() {\r\n\t\tsetGame();\r\n\t}", "public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }", "private void fight(int playerNo, int fighter, int challenger)\r\n {\r\n LaughButton lt = new LaughButton();\r\n if(playerNo == 1)\r\n {\r\n int attack = worldPanel.player1.units[fighter].getAttack();\r\n int defence = worldPanel.player2.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player1 wins\r\n worldPanel.player2.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player1.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n\r\n if(playerNo == 2)\r\n {\r\n int attack = worldPanel.player2.units[fighter].getAttack();\r\n int defence = worldPanel.player1.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player2 wins\r\n worldPanel.player1.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player2.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n setMapPos();\r\n setInfoPanel();\r\n }", "private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }", "public Battle(){\r\n\t\t\r\n\t}", "public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "public void atBattleStartPreDraw() {\n flash();\n AbstractMonster m = AbstractDungeon.getCurrRoom().monsters.getRandomMonster(true);\n AbstractDungeon.actionManager.addToBottom(new RelicAboveCreatureAction(m, this));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, AbstractDungeon.player, new BleedPower(m, BLEED_AMT)));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new BulletPower(AbstractDungeon.player, BULLET_AMT)));\n }", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "public void gameAttack(){\n int counter = 0;\n while (currentPlayer.wantToAttack(this)){\n counter++;\n if (counter > 100) break;\n /*In rare cases, AI players will repeatedly select the same attackers and defenders\n while also not wanting to dice fight. That will infinitely loop here and this counter will prevent it\n Under normal circumstances, no reasonable player will ever try to do more than 100 separate attacks in the same turn\n */\n\n String[] attackerDefender = {\"\",\"\"};\n //AttackStarterSelection\n attackerDefender[0] = currentPlayer.chooseAttackStarter(this);\n\n //AttackDefenderSelection\n attackerDefender[1] = currentPlayer.chooseAttackDefender(this, attackerDefender[0]);\n\n //DiceFightOrQuit\n int attackerDice, defenderDice;\n while (currentPlayer.wantToDiceFight(this, attackerDefender[0]+ \",\" + attackerDefender[1])){\n //DiceFightAttackerChoice\n attackerDice = currentPlayer.getAttackerDice(this, getTerritory(attackerDefender[0]));\n\n //DiceFightDefenderChoice\n Player defender = this.getPlayerFromList(this.getTerritory(attackerDefender[1]).getOwner());\n defenderDice = defender.getDefenderDice(this, this.getTerritory(attackerDefender[1]));\n\n\n //DiceFight results\n displayMessage(this.diceFight(attackerDefender, attackerDice,defenderDice));\n\n //Possible elimination and announcement of winner\n //Current diceFight ends if attacker has 1 troop left, or territory is conquered\n if (endDiceFight(attackerDefender, attackerDice)) break;\n\n }//End diceFightOrQuit\n\n\n }//End wantToAttack\n //Proceed to fortify stage of turn\n }", "public void autosimulateCombat() {\n\n int monstersRemainingHealth = monster.getHealth() - player.getPower();\n int playersRemainingHealth = player.getHealth() - monster.getPower();\n\n while (player.getHealth() > 0 && monster.getHealth() > 0) {\n\n monster.setHealth(monstersRemainingHealth);\n monstersRemainingHealth = monster.getHealth() - player.getPower();\n\n\n player.setHealth(playersRemainingHealth);\n playersRemainingHealth = player.getHealth() - monster.getPower();\n\n }\n isPlayerDefeated();\n return;\n }", "private static void decisionWhenAttacking() {\n\t\tif (isNewAttackState()) {\n\t\t\tchangeStateTo(STATE_ATTACK_PENDING);\n\n\t\t\t// We will try to define place for our army where to attack. It\n\t\t\t// probably will be center around a crucial building like Command\n\t\t\t// Center. But what we really need is the point where to go, not the\n\t\t\t// unit. As long as the point is defined we can attack the enemy.\n\n\t\t\t// If we don't have defined point where to attack it means we\n\t\t\t// haven't yet decided where to go. So it's the war's very start.\n\t\t\t// Define this assault point now. It would be reasonable to relate\n\t\t\t// it to a particular unit.\n\t\t\t// if (!isPointWhereToAttackDefined()) {\n\t\t\tStrategyManager.defineInitialAttackTarget();\n\t\t\t// }\n\t\t}\n\n\t\t// Attack is pending, it's quite \"regular\" situation.\n\t\tif (isGlobalAttackInProgress()) {\n\n\t\t\t// Now we surely have defined our point where to attack, but it can\n\t\t\t// be so, that the unit which was the target has been destroyed\n\t\t\t// (e.g. just a second ago), so we're standing in the middle of\n\t\t\t// wasteland.\n\t\t\t// In this case define next target.\n\t\t\t// if (!isSomethingToAttackDefined()) {\n\t\t\tdefineNextTarget();\n\t\t\t// }\n\n\t\t\t// Check again if continue attack or to retreat.\n\t\t\tboolean shouldAttack = decideIfWeAreReadyToAttack();\n\t\t\tif (!shouldAttack) {\n\t\t\t\tretreatsCounter++;\n\t\t\t\tchangeStateTo(STATE_RETREAT);\n\t\t\t}\n\t\t}\n\n\t\t// If we should retreat... fly you fools!\n\t\tif (isRetreatNecessary()) {\n\t\t\tretreat();\n\t\t}\n\t}", "private void warSeed(Player player) {\n\t\t\n\t}", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}", "@Test\r\n public void testAutoBattleAlliesAndEnemies() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(2700); \r\n // 2700 xp for lvl 10\r\n assertEquals(character.getLevel(), 10);\r\n // Equip a sword and increase attack damage\r\n character.equip(helper.testSword);\r\n assertEquals(character.getCurrATK(), 11.5, 0.001); // 6.5atk base + 5atk from sword\r\n // Equip some armour\r\n character.equip(helper.testArmour);\r\n\r\n // Spawn 5 enemies of not vampire type\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n fighters.add(new Slug(null));\r\n fighters.add(new Slug(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n\r\n // Spawn 3 allies\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // The character's team should win the battble but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n assertTrue(character.getCurrHP() > 0);\r\n // Make sure only 5 enemies are defeated\r\n assertEquals(battler.getDefeated().size(), 5); \r\n\r\n }", "public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}", "private void reviveAttacker() {\n\t\tString type = (mRandom.nextFloat() > mKnightSpawnChance) ? \"normal\" : \"knight\";\n\t\treviveAttacker(type);\n\t}", "protected abstract void defineEnemy();", "public void basicEnemyAI(){\n if(enemyMana == enemyManaMax){\n applyCard(enemyPlayCard(), \"enemy\");\n }\n }", "@Override\n public void onFrame() {\n intel.tabulateUnits();\n intel.updateEnemyBuildingMemory();\n\n DataManager dm = combat.getDataManagers().get(0);\n //game.setTextSize(10);\n game.drawTextScreen(10, 10, \"Playing as \" + self.getName() + \" - \" + self.getRace());\n if(dm != null) {\n game.drawTextScreen(10, 50, \"Type: \" + dm.getClassification());\n game.drawTextScreen(10, 60, \"Skirmish: \" + !skirmVal);\n game.drawTextScreen(10, 70, \"Data Points: \" + dm.getDataPoints().size());\n game.drawTextScreen(10, 80, \"Unique States: \" + dm.getStateFrequency().keySet().size());\n game.drawTextScreen(10, 90, \"Average Reward: \" + dm.getAverageReward());\n game.drawTextScreen(10, 100, \"Avg. Attack Reward: \" + dm.getAverageReward(ActionType.valueOf(\"ATTACK\")));\n game.drawTextScreen(10, 110, \"Avg. GoHome Reward: \" + dm.getAverageReward(ActionType.valueOf(\"GOHOME\")));\n game.drawTextScreen(10, 120, \"Avg. MoveTowards Reward: \" + dm.getAverageReward(ActionType.valueOf(\"MOVETOWARDS\")));\n game.drawTextScreen(10, 130, \"Avg. Retreat Reward: \" + dm.getAverageReward(ActionType.valueOf(\"RETREAT\")));\n }\n game.drawTextScreen(10, 230, \"Resources: \" + self.minerals() + \" minerals, \" + self.gas() + \" gas, \" + (self.supplyUsed() / 2) + \"/\" + (self.supplyTotal() / 2) + \" psi\");\n\n intel.tabulateUnits();\n\n if(frameCount % epoch == 0) {\n frameCount = 0;\n combat.controlArmy(game, new ArrayList<>(intel.getUnitsListOfType(UnitType.Protoss_Zealot)));\n Epoch_Cycles++;\n }\n if(Epoch_Cycles % 400 == 0) {\n Epoch_Cycles = 1;\n combat.setSkirmish(skirmVal);\n skirmVal = !skirmVal;\n }\n frameCount++;\n }", "public battle(player a) {\n initComponents();\n //set background color\n Color battle = new Color(255,129,106);\n this.getContentPane().setBackground(battle);\n \n //sets the given player to the subject player\n c = a;\n //players current xp\n exp = c.getXP();\n //players starting health\n playerHealth = 3;\n //displays the players stats\n btnEarth.setText(\"Earth: \" + c.getEarth());\n btnFire.setText(\"Fire: \" + c.getFire());\n btnWater.setText(\"Water: \" + c.getWater());\n btnIce.setText(\"Ice: \" + c.getIce());\n \n //determines which monster to fight\n if(exp < 4){\n fill(\"Blob-Boy\");\n }else if(exp < 8){\n fill(\"Spike\");\n }else{\n fill(\"Shadow\");\n }\n }", "public void LevelUp(int[] fighter) {\n fighter[LEVEL]++;\n Random rnd = new Random();\n if (rnd.nextBoolean()) {\n//Increase attack\n fighter[MAX_ATTACK]++;\n } else {\n//Increase defense\n fighter[MAX_DEFENSE]++;\n }\n fighter[MAX_LIFE] += 2;\n//Renew fighter\n renew(fighter);\n }", "public Battle() {\r\n\t\tnbVals = 0;\r\n\t\tplayer1 = new Deck();\r\n\t\tplayer2 = new Deck();\r\n\t\ttrick = new Deck();\r\n\t}", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public void newTurn() {\n int[] playersAlive = GameEngine.playersAlive();\n if (playersAlive[0] > 0) {\n turnData.clear();\n Die dice = new Die();\n thrown = dice.main();\n turnOnePlayer();\n\n } else {\n GameEngine.theEnd(playersAlive[1]);\n }\n }", "public void fight(String enemy)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//player input\n\t\tchar cAttack;\t\t\t\t\t\t\t//player input attack button\n\t\trandom = new Random();\n\t\t\n\t\tcAttack = 'x';\n\t\t\n\t\tif (strEquippedWeapon.equals(\"Dagger\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 5; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 2;\t\t\t\t\t//inclusive\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk 4-Barrel Pistol\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 8; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 3;\t\t\t\t\t//inclusive\t\t\t\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk Mach. II Riflesword\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 16; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 6;\t\t\t\t\t//inclusive\n\t\t}\n\t\t\n\t\tif (enemy.equals(\"alien1\"))\n\t\t{\n\t\t\tthis.iAlienHP = 15;\n\t\t\tthis.iAlienMaxDmg = 3;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \", but you have killed\"\n\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you have killed\"\n\t\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien2\"))\n\t\t{\n\t\t\tthis.iAlienHP = 18;\n\t\t\tthis.iAlienMaxDmg = 5;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Manhole Cover Shield\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damge, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien3\"))\n\t\t{\n\t\t\tif (evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 7;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 9;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 3;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 15;\n\t\t\t\t\tthis.inventory.add(\"Edison Grenade\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien4\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 6;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 8;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"boss\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 10;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 12;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 4;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\n\t\t\t\n\t\t\tif (evaluateInventory(\"Edison Grenade\"))\n\t\t\t{\n\t\t\t\tthis.inventory.remove(\"Edison Grenade\");\n\t\t\t\tthis.iAlienHP -= 20;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t+ \" explodes dealing 20\\ndamage to the boss alien!\\n\\nBoss Alien HP \" +\n\t\t\t\t\t\"left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t\t+ \" explodes dealing 20 damage to the boss alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Platinum Key\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public boolean runBattle() {\n // loop the battles here\n\n //battleAllies.addAll(structures);\n\n battle();\n \n findDefeated();\n cleanStatuses();\n \n // End condition of battle is: all enemies die, or character dies\n if(character.getCurrHP() <= 0){\n return false;\n } else {\n result = true;\n return true;\n }\n }", "public void activatedBy(final Player player) {\n //Battle with a Boss Unit\n }", "private void fight()\n {\n boolean fighting = true;\n int turn = 1;\n while(fighting)\n {\n //System.out.println(\"Just started\");\n \n switch(turn)\n {\n case 1:\n Collections.shuffle(army1);\n Collections.shuffle(army2);\n if(army1.size() > 0 && army2.size() > 0)\n {\n army2.get(0).takeDamage(army1.get(0).damage());\n if(army2.get(0).isDead())\n {\n army2.remove(0);\n }\n turn = 2;\n }\n else\n {\n turn = 3;\n }\n \n break;\n case 2:\n Collections.shuffle(army1);\n Collections.shuffle(army2);\n if (army2.size() > 0 && army1.size() > 0)\n {\n army1.get(0).takeDamage(army2.get(0).damage());\n if(army1.get(0).isDead())\n {\n army1.remove(0);\n }\n turn = 1;\n }\n else\n {\n turn = 3;\n }\n \n break;\n default:\n fighting = false;\n if(army2.size() > 0 && army1.size() <= 0)\n System.out.println(\"army2 wins\");\n if(army2.size() <= 0 && army1.size() > 0)\n System.out.println(\"army1 wins\");\n break; \n }\n \n \n \n \n }\n \n }", "private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }", "public void attack(int idx)\n {\n CreatureWorld playerWorld = ;\n \n }", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void attack() {\n this.attacked = true;\n }", "public void startAi(int num){\n int times = num;\n int test = 0;\n while(test < times){\n\n if (currentRoom.containsEnemy())\n {\n int eHealth = currentRoom.getEnemyHealth();\n int pHealth = player.getHealth();\n int pAD = player.getAttackDamage();\n int eAD = currentRoom.getEnemyDamage();\n ai.fightMath(eHealth, pHealth, pAD, eAD);\n player.setHealthExact(ai.getHealth());\n if (player.getHealth() > 0)\n {\n currentRoom.removeEnemy();\n System.out.println(\"\\n\" + \"AI defeated an enemy. Current health: \" + player.getHealth() + \"\\n\");\n }\n else{\n times = 0;\n }\n\n }\n \n else if(currentRoom.equals(prison))\n {\n ai.scheduleCommand(\"go\", \"up\", null);\n processCommand(command); \n test++;\n }\n\n else if(currentRoom.equals(promenade)){\n currentRoom = promenade;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"take\", \"wood\", \"sword\");\n processCommand(command);\n ai.scheduleCommand(\"take\", \"rope\", null);\n processCommand(command);\n ai.scheduleCommand(\"go\", \"up\", \"sword\"); \n processCommand(command);\n test++; \n } \n \n else if(currentRoom.equals(ossuary)){\n currentRoom = ossuary;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"open\", \"chest\", null);\n processCommand(command);\n ai.scheduleCommand(\"drop\", \"wood\", \"sword\");\n player.dropWeapon(command);\n ai.scheduleCommand(\"take\", \"silver\", \"sword\");\n processCommand(command);\n ai.scheduleCommand(\"take\", \"potion\", null);\n processCommand(command); \n ai.scheduleCommand(\"go\", \"straight\", null);\n processCommand(command);\n test++;\n\n }\n else if(currentRoom.equals(crypt))\n {\n currentRoom = crypt;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"take\", \"shovel\", null);\n processCommand(command); \n ai.scheduleCommand(\"go\", \"up\", null);\n processCommand(command);\n test++;\n }\n else if(currentRoom.equals(graveyard))\n {\n currentRoom = graveyard;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"go\", \"right\", null);\n processCommand(command);\n test++;\n }\n else if(currentRoom.equals(forest))\n {\n currentRoom = forest;\n player.setRoom(currentRoom);\n ai.runRope(player.getInventory());\n processCommand(command);\n ai.setCommand(\"go\", \"up\", null);\n processCommand(command);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n test++;\n\n\n }\n \n else if(currentRoom.equals(tower))\n {\n currentRoom = tower;\n player.setRoom(currentRoom);\n ai.setCommand(\"take\", \"potion\", null);\n processCommand(command);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"go\", \"straight\", null);\n processCommand(command);\n }\n else if(currentRoom.equals(ramparts))\n {\n currentRoom = ramparts;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"go\", \"straight\", null);\n processCommand(command);\n\n\n }\n else if(currentRoom.equals(castle))\n {\n currentRoom = castle;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"open\", \"chest\", null);\n processCommand(command);\n ai.setCommand(\"take\", \"potion\", null);\n processCommand(command);\n \n\n\n }\n\n else if(currentRoom.equals(throne))\n {\n currentRoom = throne;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n }\n\n else if(currentRoom.equals(sewers))\n {\n currentRoom = sewers;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"go\", \"down\", null);\n processCommand(command);\n\n }\n else if(currentRoom.equals(depths))\n {\n currentRoom = depths;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"right\", null);\n processCommand(command);\n }\n else if(currentRoom.equals(crypt))\n {\n currentRoom = crypt;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"up\", null);\n processCommand(command);\n\n }\n else if(currentRoom.equals(graveyard))\n {\n currentRoom = graveyard;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"straight\", null);\n processCommand(command);\n }\n else if(currentRoom.equals(bridge))\n {\n currentRoom = bridge;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"up\", null);\n processCommand(command);\n }\n\n \n } \n }", "public void attack() {\r\n\t\tmch.clicked = false;\r\n\t\t\r\n\t\t//Makes the troopsToDeploy and cashinButton not visible\r\n\t\t//This code will only be called once per attack()\r\n\t\tif (phaseInit == 0) {\r\n\t\t\ttroopsToDeploy.setVisible(false);\r\n\t\t\tcashInButton.setVisible(false);\r\n\t\t\t//Removes the mouse listeners from the cards and makes them invisible\r\n\t\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\t\tif (cardPics[x].getMouseListeners() != null)\r\n\t\t\t\t\tcardPics[x].removeMouseListener(mch);\r\n\t\t\t\tcardSelectedPics[x].setVisible(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tphaseInit++;\r\n\r\n\t\t//This code will determine when a battle will happen\r\n\t\tString s = \"\";\r\n\t\tfor (Player p : Board.players) {\r\n\t\t\t//get the name of the country that has been clicked\r\n\t\t\tfor (Country c : p.getCountries()) {\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor())) {\r\n\t\t\t\t\ts = c.getName();\r\n\t\t\t\t}\r\n\t\t\t\t//Ensure this country is one the current player owns and the country has more than one troop\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor()) && players.get(turnCounter).checkOwn(s)\r\n\t\t\t\t\t\t&& c.getTroops() > 1) {\r\n\t\t\t\t\t//Dehighlight any countries that were previously selected\r\n\t\t\t\t\tfor (Player player : players) {\r\n\t\t\t\t\t\tfor (Country ca : player.getCountries()) {\r\n\t\t\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\t\t\tnew threadz(ca, player.getColor(), false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Highlight the new selected country, and its neighboring countries\r\n\t\t\t\t\tnew threadz(c, players.get(turnCounter).getColor().brighter().brighter().brighter(), true);\r\n\t\t\t\t\tc.HighlightNeighbours();\r\n\t\t\t\t\t//the attacking country is the first clicked country\r\n\t\t\t\t\tattackingCountry = c;\r\n\t\t\t\t\ttempAtt = attackingCountry.getTroops();\r\n\t\t\t\t\t\r\n\t\t\t\t\tattackSlide.setVisible(true);\r\n\t\t\t\t\tattackSlide.setMaximum(attackingCountry.getTroops()-1);\r\n\t\t\t\t\tattackSlide.setMinimum(1);\r\n\t\t\t\t\tattackSlide.setValue(attackSlide.getMaximum());\r\n\t\t\t\t\tattacker.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (hoveredColor.equals(c.getDetectionColor()) && c.isHighlighted() && c.getName().equals(attackingCountry.getName()) == false && checkO(c) == false) {\r\n\t\t\t\t\t//The defending country is the second clicked country, and it must be highlighted\r\n\t\t\t\t\tdefendingCountry = c;\r\n\t\t\t\t\tbattle = true;\r\n\t\t\t\t\thasAttacked = true;\r\n\t\t\t\t\tattackSlide.setVisible(false);\r\n\t\t\t\t\tattacker.setVisible(false);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If a battle has been determined to happen\r\n\t\tif (battle == true) {\r\n\t\t\t\r\n\t\t\t//Makes sure the attacking country has more than one troop and that it is attacking a neighbour\r\n\t\t\tif (attackingCountry.getTroops() > 1 && defendingCountry.isHighlighted()) {\r\n\t\t\t\t//Makes a new battle between the attacker and defender then updates their troops after the battle \r\n\t\t\t\tBattle battle1 = new Battle(attackSlide.getValue(), defendingCountry.getTroops());\r\n\t\t\t\tbattle1.BattleTroops();\r\n\t\t\t\tattackingCountry.setTroops(Battle.getAttackers());\r\n\t\t\t\tdefendingCountry.setTroops(Battle.getDefenders());\r\n\t\t\t}\r\n\r\n\t\t\t//Determines the array index of the defending country in the players array\r\n\t\t\tint defNum = 0;\r\n\t\t\tfor (Player po : players) {\r\n\t\t\t\tfor (Country co : po.getCountries()) {\r\n\t\t\t\t\tif (defendingCountry.getName().equals(co.getName())) {\r\n\t\t\t\t\t\tdefNum = po.getPlayerNum();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//These two ifs ensure that the troops never go into the negative\r\n\t\t\tif (attackingCountry.getTroops() < 0) {\r\n\t\t\t\tattackingCountry.setTroops(0);\r\n\t\t\t}\r\n\t\t\tif (defendingCountry.getTroops() < 0) {\r\n\t\t\t\tdefendingCountry.setTroops(0);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t// If Attackers lose\r\n\t\t\tif (attackingCountry.getTroops() == 0) {\r\n\t\t\t\t//Unhighlight its neighbors\r\n\t\t\t\tattackingCountry.unHighlightNeighbours();\r\n\t\t\t\t\r\n\t\t\t\tattackingCountry.setTroops(tempAtt - attackSlide.getValue());\r\n\t\t\t\t//Updates the defenders based on the defenders left\r\n\t\t\t\tdefendingCountry.setTroops(defendingCountry.getTroops());\r\n\r\n\t\t\t\t\r\n\t\t\t\t//Ensures the troops never go negative or less than zero\r\n\t\t\t\tif (defendingCountry.getTroops() <= 0) {\r\n\t\t\t\t\tdefendingCountry.setTroops(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//If defenders lose\r\n\t\t\tif (defendingCountry.getTroops() == 0) {\r\n\t\t\t\t//Unhighlights the defending country\r\n\t\t\t\tfor (Player p: players) {\r\n\t\t\t\t\tfor (Country c: p.getCountries()) {\r\n\t\t\t\t\t\tif (c.getName().equals(defendingCountry.getName())){\r\n\t\t\t\t\t\t\tc.setHighlighted(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Recolor the defenders country to the attackers color\r\n\t\t\t\tnew threadz(defendingCountry, players.get(turnCounter).getColor(), false);\r\n\t\t\t\tattackingCountry.unHighlightNeighbours();\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Updates the troop numbers\r\n\t\t\t\r\n\t\t\t\tdefendingCountry.setTroops(attackingCountry.getTroops());\r\n\t\t\t\tattackingCountry.setTroops(tempAtt - attackSlide.getValue());\r\n\t\t\t\tif (attackingCountry.getTroops() <= 0) {\r\n\t\t\t\t\tattackingCountry.setTroops(1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Removes the defender from the defenders country arraylist\r\n\t\t\t\tplayers.get(defNum).getCountries().remove(defendingCountry);\r\n\t\t\t\t//Adds the defender country to the attackers country arrayList.\r\n\t\t\t\tplayers.get(turnCounter).getCountries().add(defendingCountry);\r\n\t\t\t\thasWon = true;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (players.get(defNum).getCountries().size() == 0) {\r\n\t\t\t\t\tFile fanfare = new File(\"Ressources/\" + \"fanfare2.wav\");\r\n\t\t\t\t\tplaySound(fanfare);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(window.getFrame(), \"Player \" + (defNum+1) + \" has been Eliminated!\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile(players.get(defNum).getCards().size() > 0) {\r\n\t\t\t\t\t\tusedCards.add(players.get(defNum).getCards().get(0));\r\n\t\t\t\t\t\tplayers.get(defNum).getCards().remove(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t} // End of i\r\n\r\n\t\tbattle = false;\r\n\t\t\r\n\t}", "public void battleAllyAttack() {\n if(battleAlly instanceof Character){\n battleTickStatuses();\n updateBattleSides();\n }\n\n // battleAlly now attacks targetEnemy or preference based on the type of battleAlly\n if(battleAlly != null){ // If all allies have attacked, they cannot attack anymore for this round\n MovingEntity target = battleAlly.getAttackPreference(targetEnemies);\n // if not picky, get preference is the default next target\n if(target == null) {\n target = targetEnemy;\n }\n battleAlly.attack(target, targetAllies, targetEnemies);\n //System.out.println(battleAlly.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still unfriendly\n targetEnemy = checkSideSwap(targetEnemy, true, battleAllies, targetAllies, battleEnemies, targetEnemies);\n }\n battleAlly = nextAttacker(battleAlly, battleAllies);\n\n }\n }", "@Override\n\tpublic void onFoeEncountered(NonPlayableFighter foe) {\n\t\tBattle fight=new Battle(player.getActiveFighter(),foe);\n\t\tfight.setListener(this);\n\t\tfight.start();\n\t\tGameGUI controller= (GameGUI)listener;\n\t\tSystem.out.println(\"LOL ? \");\n\t\tcontroller.setActiveBattle(fight);\n\t\tcontroller.initializeBattle();\n\t\tstate=GameState.BATTLE;\n\t\t\n\t}", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "public void warBattleHandling()\n\t{\n\t\tplayedCards.add(player1.draw());\n\t\tplayedCards.add(player2.draw());\n\t\t\n\t\tactivePlayerOneCard = player1.draw();\n\t\tactivePlayerTwoCard = player2.draw();\n\t\t\n\t\tplayedCards.add(activePlayerOneCard);\n\t\tplayedCards.add(activePlayerTwoCard);\n\t\t\n\t\tif(activePlayerOneCard.isEqual(activePlayerTwoCard))\n\t\t{\n\t\t\twarBattleHandling();\n\t\t}\n\t\tif(activePlayerOneCard.greaterThan(activePlayerTwoCard))\n\t\t{\n\t\t\tplayer1.winHandling(playedCards);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer2.winHandling(playedCards);\n\t\t}\n\t\t\n\t}", "public BattleWorld(int enemyPokemonID)\r\n {\r\n wildPokemon = false;\r\n isBattleOver = false;\r\n initWorld(\"\", 0, enemyPokemonID);\r\n }", "@Override\n\tpublic void attack() {\n\n\t}", "protected void wander() {\n\t\tfor(int i=3;i>0;){\n\t\t\tfindChest();\n\t\t\tint num = ((int) (Math.random()*100)) % 4;\n\t\t\tswitch (num+1){\n\t\t\t\tcase 1 :\n\t\t\t\t\tif(!(character.xOfFighter-1==game.getXofplayer()&&character.yOfFighter==game.getYofplayer())\n\t\t\t\t\t\t\t&&game.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter-1,character.yOfFighter)){\n\t\t\t\t\t\tcharacter.xOfFighter = character.xOfFighter-1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tif(!(character.xOfFighter==game.getXofplayer()&&character.yOfFighter-1==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter,character.yOfFighter-1)){\n\t\t\t\t\t\tcharacter.yOfFighter = character.yOfFighter-1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tif(!(character.xOfFighter+1==game.getXofplayer()&&character.yOfFighter==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter+1,character.yOfFighter)){\n\t\t\t\t\t\tcharacter.xOfFighter = character.xOfFighter+1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\t\tif(!(character.xOfFighter==game.getXofplayer()&&character.yOfFighter+1==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter,character.yOfFighter+1)){\n\t\t\t\t\t\tcharacter.yOfFighter = character.yOfFighter+1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfindChest();\n\t}", "@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }", "int defend(Unit unit, Unit enemy);", "public Warlock() {\n name = \"\";\n className = \"\";\n currentHealth = 0;\n strength = 0;\n defense = 0;\n special = 0;\n points = 0;\n }", "static void boss_fight() {\n miss_choice = miss.nextInt(2);//random used to determie a miss or a hit\n playerhealth = 3500;\n nagahealth = 3500;\n bosshealth = 10000;//#enemyobject-the actual boss that has created the game play(antagonsit)\n System.out.println(\"You have recently leveled up and have increased your HP to 3500. Be careful...\");\n System.out.println(\"You can now cast 8 different types of spells...\");\n enter = next.nextLine();\n System.out.println(\"These spells include fire, ice, wind, lightening, throw rocks, sacred sword, \");\n System.out.println(\"cosmic rays, and teleport\");\n enter = next.nextLine();\n System.out.println(\"Naga has his own spells don't worry about him...\");\n enter = next.nextLine();\n System.out.println(\"'I can use 3 different types of dark magic and 2 different types of normal attacks'\");\n System.out.println(\"Don't worry, we got this \"+ username + \".\");\n enter = next.nextLine();\n System.out.println(\"ALL OR NOTHING!!! GHAAAA!!!\");\n enter = next.nextLine();\n monsterisalive = true;\n //#while \n /* while loop that will let players fight the boss */\n while(monsterisalive){\n System.out.println(\"It is your turn...which move will you use:\");\n System.out.println(\"fire, ice, wind, lightening, throw rocks, sacred sword, cosmic rays, teleport, or heal.\");\n attack = next.nextLine();\n if(attack.contains(\"fire\")) {\n System.out.println(\"Alright, I'm fired up...FOOOSH!!!\");\n bosshealth = bosshealth-30; //player deals damage\n System.out.println(\"WHOA! The witch lost 30 HP. The boss now has \" + bosshealth + \" HP.\" );\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if(answer.contains(\"ice\")) {\n System.out.println(\"Alright, it's gonna be a little chilly...GHAAAA!!!\");\n bosshealth = bosshealth-20;\n System.out.println(\"BRRR... The evil witch lost 20 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if(answer.contains(\"lightening\")) {\n System.out.println(\"Someone's gonna get fried today! ZAAAAP!!!\");\n bosshealth = bosshealth-40;\n System.out.println(\"OUCH!!! The evil witch lost 40 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP\");\n }else if (answer.contains(\"throw rocks\")) {\n System.out.println(\"Incoming Boulder...BOOOOOMM!!!\");\n bosshealth = bosshealth-30;\n System.out.println(\"The witch lost 30 HP. It now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"sacred swords\")) {\n System.out.println(username + \" summons the guardians of the 9 sacred swords, and \");\n System.out.println(\"the guardians released their swords to punish the wicked witch...\");\n enter = next.nextLine();\n System.out.println(\"The 9 swords punctures the wicked releasing powerful, positive energy.\");\n bosshealth = bosshealth-150;\n System.out.println(\"ZHHHHNGG!!! BOOOM!!! Ouch...the boss lost 150 HP. The boss now has \" + bosshealth);\n System.out.println(\"HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"cosmic rays\")) {\n System.out.println(username + \" casts a spell that absorbs all of the radiation from space...\");\n System.out.println(\"Then a large light bombards the witch and inflicts 130 HP.\");\n bosshealth = bosshealth-130;\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"teleport\")) {\n System.out.println(username + \" creates a blue portal and jumps inside the portal...\");\n enter = next.nextLine();\n System.out.println(username + \" then teleports behind the witch and strikes...Then jumps back in...\");\n enter = next.nextLine();\n System.out.println(\"Then appears in the rear side and strikes the boss again and quickly disappears...\");\n enter = next.nextLine();\n System.out.println(\"Finally...\" + username + \" strikes again on top of the witch.\");\n enter = next.nextLine();\n bosshealth = bosshealth-210;\n System.out.println(\"WOW!!!\" + username + \" inflicted 210 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if(answer.contains(\"wind\")) {\n System.out.println(\"Alright, let's finish this up...WHIRL!!!\");\n bosshealth = bosshealth-10;\n System.out.println(\"The evil witch lost 10 HP. The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (answer.contains(\"heal\")){\n healing_challenge3();\n System.out.println(\"\\n\");\n System.out.println(username + \"'s HP increased 300 health points and now have \" + playerhealth + \".\");\n System.out.println(\"The boss still has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n }else{\n System.out.println(\"Please make sure you type everything correctly next time. You lost a turn...\");\n }\n \n if(bosshealth <= zero) { //check to see if boss is still alive\n System.out.println(\"You defeated the boss...Congratulations, you have won the war.\");\n enter = next.nextLine();\n System.out.println(\"The witch has disappeared, vanished forever in a black hole that consumed the boss.\");\n enter = next.nextLine();\n System.out.println(\"That is the last time you'll ever see that hideous thing ever again.\");\n monsterisalive = false;\n endgame();\n // It's Naga's turn\n }else if (bosshealth > zero) {\n System.out.println(\"It's Naga's turn...You can do this Naga!\");\n naga_attacks = naga.nextInt(6);\n if(naga_attacks == 0){\n System.out.println(\"Naga used shadow force...\");\n System.out.println(\"Naga disappears in a pitch black vortex...\");\n enter = next.nextLine();\n System.out.println(\"GHAAAAR!!!\");\n enter = next.nextLine();\n System.out.println(\"Naga flies out of his vortex and rams into the witch. YOUCH!\");\n System.out.println(\"The boss lost 180 HP.\");\n bosshealth = bosshealth-180;//Naga deals damage\n enter = next.nextLine();\n System.out.println(\"The evil witch now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 1) {\n System.out.println(\"Naga used firebreath...A large dark ember sparks from naga's mouth and \");\n System.out.println(\"begins to build up. The large black fire surrounds the witch and burns the witch\");\n enter = next.nextLine();\n System.out.println(\"'ARGHH! You will pay for that', the witch screamed.\");\n enter = next.nextLine();\n bosshealth = bosshealth-200;\n System.out.println(\"WHOA!!! The fiery breath inflicted 200 HP. The boss now has\" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 2) {\n System.out.println(\"Naga used his blades of terror to torture the witch...\");\n System.out.println(\"Naga creates a strong whirlwind with his wings and released thousands of sharp\");\n System.out.println(\"scales that severely wounded the witch. SHINGG!!!\");\n enter = next.nextLine();\n bosshealth = bosshealth-150;\n System.out.println(\"OWWW!!! The boss lost 150 HP and now has \" + bosshealth + \"HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\"); \n }else if (naga_attacks == 3) {\n System.out.println(\"Naga used wings of Justice. \");\n enter = next.nextLine();\n System.out.println(\"Naga flies up high and plunges down toward the witch...\");\n System.out.println(\"Naga uppercuts the witch with his large wings and knocks the witch off her feet.\");\n enter = next.nextLine();\n bosshealth = bosshealth-210;\n System.out.println(\"YIKES!!! Naga inflicted 210 HP. The boss has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 4) {\n System.out.println(\"Naga used tail whip...\");\n System.out.println(\"SWWWSSS!!! BRMMM!!!\");\n System.out.println(\"Naga sets himself apart and lunges forward with his tail and thrusts the witch\");\n System.out.println(\"off the arena...\");\n enter = next.nextLine();\n System.out.println(\"The witch teleports herself back into the arena, but loses 60 HP because of this.\");\n bosshealth = bosshealth-60;\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"Now Naga has \" + nagahealth + \" HP.\");\n }else if (naga_attacks == 5) {\n healing_naga_challenge3();\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n System.out.println(\"\\n\");\n System.out.println(\"The boss still has \" + bosshealth + \" HP.\");\n }\n }\n \n if(bosshealth <= zero) { //check to see if boss is still alive\n //#win\n /* This is the conditions to win. The boss's health must equal to or less than zero. If you win the \n boolean monsterisalive is equal to false and the player will come to the endgame method to \n displayt he credits...\n */\n System.out.println(\"You defeated the boss...Congratulations, you have won the war.\");\n enter = next.nextLine();\n System.out.println(\"The witch has disappeared, vanished forever in a black hole that consumed the boss.\");\n enter = next.nextLine();\n System.out.println(\"That is the last time you'll ever see that hideous thing ever again.\");\n monsterisalive = false;\n endgame();\n //it's the boss's turn\n }else if (bosshealth > zero) { //if it is still greater than zero...\n System.out.println(\"It's the monster's turn...brace yourselves\");\n System.out.println(\"'The witch has 8 different spells that she can use...she's very strong...\");\n System.out.println(\"BE CAREFUL,' stated Naga.\");\n enter = next.nextLine();\n System.out.println(\"Are you ready to feel what pain really is? Prepare yourself...\");\n System.out.println(\"ARGGHHH!!! BRRRM!!!\");\n enter = next.nextLine();\n System.out.println(\"Naga and \"+ username + \" are on their guard ready to defend against the witches attacks\");\n enter = next.nextLine();\n System.out.println(\"Here I go...\");\n enter = next.nextLine();\n which = pick.nextInt(2);//decide which one will get hit: player or Naga\n boss_attacks = boss.nextInt(9);//decides which\n if (boss_attacks == 0) {\n System.out.println(\"'Night Shadow!'\");\n //this will determine which player gets hit; you or Naga\n if(which == 0) { //player gets hit\n enter = next.nextLine();\n System.out.println(\"The witch summons a dark cloud from above with her staff...\");\n enter = next.nextLine();\n /* #enemyobject\n The witch affects the protagonist/player by harming the player's health through savage attacks that \n inflicts large amounts of damage to the player. \n */\n System.out.println(\"The dark cloud duplicates and strikes \" + username + \".\");\n enter = next.nextLine();\n System.out.println(\"Ouch \" + username + \" loses 200 HP.\");\n playerhealth = playerhealth-200;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) { //naga gets hit\n enter = next.nextLine();\n System.out.println(\"The witch summons a dark cloud from above with her staff...\");\n enter = next.nextLine();\n System.out.println(\"The dark cloud duplicates and strikes Naga. Naga collapses\");\n enter = next.nextLine();\n System.out.println(\"Ouch Naga loses 200 HP.\");\n nagahealth = nagahealth-200;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 1) {\n System.out.println(\"'Shadow Blade!'\");\n //this will determine who will get hit\n if (which == 0) { // player gets hit\n System.out.println(\"The witch's staff transforms into a deadly blade.\");\n System.out.println(\"The blade has \" + username + \"'s face on the back...\");\n enter = next.nextLine();\n System.out.println(\"Watch out \" + username + \". She's on to you...\");\n enter = next.nextLine();\n System.out.println(\"The witch charges up and strikes \" + username + \".\");\n System.out.println(\"SLASH...SHING!!!\");\n enter = next.nextLine();\n System.out.println(\"OUCH!!! \" + username + \" loses 150 HP.\");\n playerhealth = playerhealth-150;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) { //naga gets hit\n System.out.println(\"The witch's staff transforms into a deadly blade.\");\n System.out.println(\"The blade has a black dragon symbol on the edge...\");\n enter = next.nextLine();\n System.out.println(\"'Naga she's on to you. WATCH OUT!' \" + username + \" screams.\");\n System.out.println(\"SLASH...SHING!!!\");\n enter = next.nextLine();\n System.out.println(\"OUCH!!! naga loses 150 HP.\");\n nagahealth = nagahealth-150;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 2) {\n System.out.println(\"Dragon spiral!\");\n if(which == 0) { //player gets hit\n System.out.println(\"The witch summons a red and purple dragon underground...\");\n System.out.println(\"The red and purple dragon shoots out red and purple flames that fuse\");\n System.out.println(\"together to form a gigantic half red and purple flame.\");\n enter = next.nextLine();\n System.out.println(\"Look out \" + username + \".\");\n System.out.println(\"FOOOSH!!! The burning lava like embers engulf \" + username + \".\");\n enter = next.nextLine();\n System.out.println(\"ARRHHH!!! \" + username + \" loses 300 HP.\");\n playerhealth = playerhealth-300;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) { //naga gets hit\n System.out.println(\"The witch summons a red and purple dragon underground...\");\n System.out.println(\"The red and purple dragon shoots out red and purple flames that fuse\");\n System.out.println(\"together to form a gigantic half red and purple flame.\");\n enter = next.nextLine();\n System.out.println(\"'Look out Naga,' \" + username + \" stated.\");\n System.out.println(\"FOOOSH!!! The burning lava like embers engulf Naga.\");\n enter = next.nextLine();\n System.out.println(\"ARRHHH!!! Naga loses 300 HP.\");\n nagahealth = nagahealth-300;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 3) {\n System.out.println(\"Take over\");\n enter = next.nextLine();\n System.out.println(\"The witch summons the demons and releases them from a black portal she created\");\n System.out.println(\"Gouls, bats, and other hideous creatures emerged from the darkness\");\n if(which == 0) {// player gets hit\n System.out.println(\"The creatures targets \" + username + \".\");\n enter = next.nextLine();\n System.out.println(\"Watch out \" + username + \".\");\n System.out.println(\"GARRRL!!! SCRAA!!! FOOSHING!!!\");\n enter = next.nextLine();\n System.out.println(\"AHHH!!! \" + username + \" gets bitten, beaten, and scratched ...\");\n playerhealth = playerhealth-50;\n System.out.println(username + \" loses 50 HP. You now have \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (which == 1) {\n System.out.println(\"The creatures targets Naga.\");\n enter = next.nextLine();\n System.out.println(\"'Watch out Naga,' \" + username + \" stated.\");\n System.out.println(\"GARRRRL!!! SCRAAA!!! FOOOSHHING!!!\");\n enter = next.nextLine();\n nagahealth = nagahealth-50;\n System.out.println(\"ARRGGG!!! Naga loses 50 HP. Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 4) {\n System.out.println(\"dark cosmic swords!!!\");\n System.out.println(\"GHAAA!!!\");\n enter = next.nextLine();\n System.out.println(\"There are 5 darks lands in her reign, which means 5 different swords in her possession.\");\n System.out.println(\"Sword 1 released fire...\");\n System.out.println(\"FOOSHHH!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 2 released water...\");\n System.out.println(\"GURLG!!! FSHHH!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 3 released ice...\");\n System.out.println(\"SHING!!! BRRRRR!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 4 released wind...\");\n System.out.println(\"WHIRL!!! WHIRL!!! GUSHHH!!!\");\n enter = next.nextLine();\n System.out.println(\"Sword 5 released lightening...\");\n System.out.println(\"ZHNGGG!!! BAM!!!! BRVRMM!!!\");\n System.out.println(\"The ground ruptures and collides on \" + username + \" and Naga.\");\n enter = next.nextLine();\n System.out.println(\"These swords have just released the dark elements of the earth!\");\n System.out.println(\"YOUCH!!! Both Naga and \" + username + \" lost 220 HP.\");\n enter = next.nextLine();\n playerhealth = playerhealth-220;\n nagahealth = nagahealth-220;\n System.out.println(username + \" now has \" + playerhealth + \" HP and Naga has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }else if (boss_attacks == 5) {\n System.out.println(\"Knock down!\");\n if(miss_choice == 0) {//boss miss\n System.out.println(\"The witch summons a dark spell from her staff.\");\n enter = next.nextLine();\n System.out.println(\"An evil figure lurks in the shadows...'Can you see it Naga?' \");\n System.out.println(username + \" said.\");\n enter = next.nextLine();\n System.out.println(\"'No...I can't see a thing.\");\n enter = next.nextLine();\n System.out.println(\"Suddenly, you see a big shadow coming at Naga.\");\n enter = next.nextLine();\n System.out.println(username + \" sends a fireball flying at the shadowy figure and it disappears.\");\n System.out.println(\"Naga then sees the figure coming towards \" + username + \" and sends a flame\");\n System.out.println(\"at the shadow...The figure plunges back into the witches staff. \");\n enter = next.nextLine();\n System.out.println(\"'I guess you saw that coming, won't happen ever again!' the witch exclaimed.\");\n enter = next.nextLine();\n System.out.println(\"You dodged the witches attack!\");\n enter = next.nextLine();\n playerhealth = playerhealth-0;\n nagahealth = nagahealth-0;\n System.out.println(username + \" still has \" + playerhealth + \" HP.\");\n System.out.println(\"Naga still has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (miss_choice == 1) { //boss hits\n System.out.println(\"The witch summons a dark spell from her staff.\");\n enter = next.nextLine();\n System.out.println(\"An evil figure lurks in the shadows...'Can you see it Naga?' \");\n System.out.println(username + \" said.\");\n enter = next.nextLine();\n System.out.println(\"'No...I can't see a thing.\");\n enter = next.nextLine();\n System.out.println(\"Suddenly, you see a big shadow coming at Naga.\");\n enter = next.nextLine();\n System.out.println(username + \" sends a fireball flying at the shadowy figure, but you missed!\");\n System.out.println(\"The shadowy figure steals 50 HP of Naga's health.\");\n nagahealth = nagahealth-50;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The shadowy figure then turns towards \" + username + \".\");\n System.out.println(\"Naga spits out a large fire, but misses the figure...\");\n System.out.println(\"The shadowy figure steals 50 HP of \" + username + \".\");\n playerhealth = playerhealth-50;\n System.out.println(username + \" still has \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }else if (boss_attacks == 6) {\n System.out.println(\"Volcanic Eruption!\");\n if(miss_choice == 0) {//the boss misses\n System.out.println(\"The witch casts a spell that creates a series of volcanoes around you.\");\n System.out.println(\"The witch then forces the volcanoes to spit lava out...\");\n System.out.println(\"However, you saw that coming already. You and Naga jumped out of the way\");\n enter = next.nextLine();\n System.out.println(\"You dodged the attack!\");\n playerhealth = playerhealth-0;\n nagahealth = nagahealth-0;\n System.out.println(username + \" has \" + playerhealth + \" HP, and Naga has \" + nagahealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }else if (miss_choice == 1) {//the boss is able to hit you\n System.out.println(\"The witch summons the evil lava guardian...\");\n System.out.println(\"She then points her staff directly at...\");\n if(which == 0){//player gets hit\n System.out.println(username);\n enter = next.nextLine();\n System.out.println(\"Watch out!!!\");\n System.out.println(\"GURGLLE!!! FSH!!!\");\n System.out.println(\"The lava erupts like a fountain lake and basks \" + username + \".\");\n System.out.println(username + \" loses 100 HP.\");\n enter = next.nextLine();\n playerhealth = playerhealth-100;\n System.out.println(username + \" now has \" + playerhealth + \" HP.\");\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }else if (which == 1){ //naga gets hit\n System.out.println(\"Naga\");\n enter = next.nextLine();\n System.out.println(\"Watch out!\");\n System.out.println(\"GURGLRE!!! FSH!!!\");\n System.out.println(\"The lava shoots out at Naga's face, feet, and back...\");\n System.out.println(\"Removing all of his scales in the process\");\n System.out.println(\"Naga loses 100 HP.\");\n enter = next.nextLine();\n nagahealth = nagahealth-100;\n System.out.println(username + \" has \" + playerhealth + \" HP.\");\n System.out.println(\"Naga has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss has \" + bosshealth + \" HP.\");\n }\n }\n }else if (boss_attacks == 7) {\n System.out.println(\"Satin's Spear\");\n System.out.println(\"The witch uses her staff to summon her friend Satin...\");\n enter = next.nextLine();\n System.out.println(\"EXTERMINATE THEM!!!\");\n if(miss_choice == 0){ //boss missed\n System.out.println(\"Yes ma'm...\");\n System.out.println(\"Statin launches his spear...\");\n enter = next.nextLine();\n System.out.println(\"BUT, Naga and \" + username + \" were able to dodge the attack!\");\n System.out.println(\"MISS!\");\n enter = next.nextLine();\n System.out.println(\"OOPS!\");\n playerhealth = playerhealth-0;\n nagahealth = nagahealth-0;\n System.out.println(username + \" has \" + playerhealth + \" and Naga has \" + nagahealth + \" HP.\");\n System.out.println(\"The boss has \"+ bosshealth + \" HP.\");\n }else if(miss_choice == 1){//boss gets a hit\n System.out.println(\"Yes ma'm...\");\n System.out.println(\"URGGGHAAA!!!\");\n enter = next.nextLine();\n System.out.println(\"Satin launches his spear, which duplicated...\");\n System.out.println(\"The spear is still launching up on the air...\");\n enter = next.nextLine();\n if(which == 0) { //player gets hit\n System.out.println(username + \" wants to protect his friend so he jumps forward to block\");\n System.out.println(\"the threatening spear from piercing his friend...\");\n enter = next.nextLine();\n System.out.println(\"However, in doing so the spear lands on \" + username + \".\");\n System.out.println(\"The spear erupts into pieces, shattering \" + username + \"'s legs.\");\n enter = next.nextLine();\n System.out.println(\"The wound heals but inflicts 300 damage to \" + username + \".\");\n playerhealth = playerhealth-300;\n System.out.println(username + \" has \" + playerhealth + \" HP.\");\n }else if(which == 1) { //Naga gets hit\n System.out.println(\"Naga tries to shield \" + username + \" and successfully does.\");\n System.out.println(\"BUT, in doing so the spear pierces Naga's well-armored belly.\");\n enter = next.nextLine();\n System.out.println(\"The spear automatically drills deeper until Naga can't fight anymore...\");\n System.out.println(\"The wound heals, but dealt 300 damage to Naga.\");\n nagahealth = nagahealth-300;\n System.out.println(\"Naga now has \" + nagahealth + \" HP.\");\n }\n }\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }else if (boss_attacks == 8) {\n System.out.println(\"Health Spell...\");\n System.out.println(\"The evil witch raised her staff and a blue vortex emerged.\");\n System.out.println(\"\\n\");\n System.out.println(\"However, the witch suddenly jumps into the vortex and after a while jumps out.\");\n System.out.println(\"OH NO!!! She tried to heal herself...\");\n bosshealth = bosshealth + 350;\n if(bosshealth == 10000) {\n System.out.println(\"She already had a maximum health of \" + bosshealth + \" HP. So it didn't work.\");\n System.out.println(\"\\n\");\n }else if(bosshealth > 10000) {\n bosshealth = 10000;\n System.out.println(\"The boss currently now \" + bosshealth + \" HP.\");\n }else{\n System.out.println(\"The boss now has \" + bosshealth + \" HP.\");\n }\n }\n }\n //#lose-player loses all of HP \n if(playerhealth <= zero) { //in case player loses all of his/her health\n System.out.println(\"OH NO!!!\" + username + \" lost was defeated!\");\n System.out.println(\"Naga currently has \" + nagahealth + \" HP.\");\n System.out.println(\"Better luck next time...\");\n monsterisalive = false;\n replaybossfight();\n }\n //#lose-naga's HP is equal to or less than zero\n if(nagahealth <= zero) { // in case Naga loses all of his/her health\n System.out.println(\"OH NO!!! Naga lost all of his health and was defeated!\");\n System.out.println(username + \" currently has \" + playerhealth + \" HP.\");\n System.out.println(\"Better luck next time...\");\n monsterisalive = false;\n replaybossfight();\n }\n \n }\n \n }", "public void startTurn() {\n nMovesBeforeGrabbing = 1;\n nMovesBeforeShooting = 0;\n\n if (damages.size() > 2)\n nMovesBeforeGrabbing = 2;\n\n if (damages.size() > 5)\n nMovesBeforeShooting = 1;\n\n playerStatus.isActive = true;\n }", "public void battleSpider() {\n\n\t\tPlayer playern = this.playern;\n\t\tgiantSpider = new GiantSpider(\"Giant spider\", 35, 60); //Bad way to initiate with hp and exp, see new cyborgvampire\n\t\tSystem.out.println(\"*gosh* this monster is dangerous\");\n\t\tSystem.out.println(\"[press enter to fight]\");\n\t\tsc.nextLine();\n\n\t\twhile (true) {\n\t\t\tgiantSpider.takeDamage(playern.attack());\n\t\t\tif (!giantSpider.getisDead()) {\n\t\t\t\tSystem.out.println(\"You kill the Giant spider, earned \" + giantSpider.giveExp() + \" experience\");\n\t\t\t\tplayern.setExp(giantSpider.giveExp());\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\t//playern.restoreHpAfterBattle();\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tplayern.takeDamage(giantSpider.attack());\n\t\t\tif (!playern.getIsAlive()){\n\t\t\t\tSystem.out.println(\"You are killed\");\n\t\t\t\tSystem.out.println(\"You have lost the game\");\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\tbreak;\n\t\t\t\t//System.exit(0);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"* \" + playern.getName() + \": \" + playern.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"* \" + giantSpider.getName() + \": \" + giantSpider.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\ttopScore();\n\t}", "public void startGame() {\n message.openingWarVariation(gameVariation, iterations);\n setHands(player1, player2, player3, deck);\n while (versus(player1, player2, player3)) {\n }\n determineOutcome(gameVariation);\n }", "private void startUpPhase()\n\t{\n\t\tmap.distributeCountries(); /* Randomly split the countries between the players */\n\t\tArrayList<Player> remainingPlayers = new ArrayList<Player>(map.players);\n\t\t\n\t\tdo \n\t\t{\n\t\t\tIterator<Player> i = remainingPlayers.iterator();\n\t\t\t\n\t\t\twhile (i.hasNext()) \n\t\t\t{\n\t\t\t\tPlayer p = i.next();\n\t\t\t\tif(p.getArmies() == 0) \n\t\t\t\t{\n\t\t\t\t\ti.remove();\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tp.placeOneArmy();\n\t\t\t\t}\n\t\t\t}\n\t\t}while(remainingPlayers.size() != 0);\n\t}", "@Override\n public void attack() {\n\n }", "void defendAttack(IUnit attacker, int incomingDamage);", "void robPlayer(HexLocation location, int victimIndex);", "@Override\n\tpublic void attack() {\n\t\t\n\t}", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public static void battleStatus(){\n Program.terminal.println(\"________________TURN \"+ turn +\"________________\");\n Program.terminal.println(\"\");\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\" |Name:\"+ currentMonster.name);\n Program.terminal.println(\" |HP: \" + currentMonster.currentHp+\"/\"+currentMonster.hp);\n Program.terminal.println(\" |\" + barGauge(1));\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\"\");\n Program.terminal.println(\"My HP:\" + MainCharacter.hpNow +\"/\"+ MainCharacter.hpMax + \" \" + barGauge(2));\n Program.terminal.println(\"My MP:\" + MainCharacter.mpNow +\"/\"+ MainCharacter.mpMax + \" \" + barGauge(3));\n Program.terminal.println(\"\");\n askAction();\n }", "public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }", "public static void spawnEnemy(){\n RNG.D100();\n if(PlayerStats.LVL <= 2){\n if(RNG.num <= 90){\n enemy = \"imp\";\n }else{\n enemy = \"IMP LORD\";\n }\n }else if(PlayerStats.LVL > 2 && PlayerStats.LVL <= 3){\n if(RNG.num <= 20){\n enemy = \"imp\";\n }else if(RNG.num > 20 && RNG.num <= 90){\n enemy = \"toadman\";\n }else{\n enemy = \"IMP LORD\";\n }\n }else if(PlayerStats.LVL > 3 && PlayerStats.LVL <= 5){\n if(RNG.num <= 10){\n enemy = \"toadman\";\n }else if(RNG.num > 10 && RNG.num <= 90){\n enemy = \"giant spider\";\n }else{\n enemy = \"BROODMOTHER\";\n }\n }else if (PlayerStats.LVL > 5 && PlayerStats.LVL <= 8){\n if(RNG.num <= 30){\n enemy = \"goblin sorceror\";\n }else if(RNG.num > 30 && RNG.num <= 60){\n enemy = \"goblin warrior\";\n }else if(RNG.num >60 && RNG.num <= 90){\n enemy = \"goblin archer\";\n }else if(RNG.num > 90 && RNG.num <= 100){\n enemy = \"GOBLIN CHIEFTAN\"; \n }\n } \n }", "@Override\n\tpublic void attack() {\n\t}", "@Override\npublic Action actionChoosed(Player joueur) {\n WarPlayer player = this.castPlayer(joueur);\n int index = ((WarStrategy)(player.getStrategy())).skipOrDeploy();\n Action action = new SkipAction(player);\n if (index == 0) {\n Army army = this.inputArmy(player);\n Tile tile = ((WarStrategy)player.getStrategy()).inputTileStrategy();\n if(army != null && tile != null) {\n if (army.getArmySize() > 3 && tile.equals(new MountainTile(0, 0, 1, 0))) {\n System.out.println(\" Army of size \" + army.getArmySize() + \" can't be deployed on a mountain tile ! \");\n player.addWarrior(army.getArmySize());\n } else {\n action = new WarActionDeploy(player, this.board, tile.getPosX(), tile.getPosY(), army);\n }\n } else if (army != null && tile == null) {\n player.addWarrior(army.getArmySize());\n }\n }\n return action;\n}", "public War()\n {\n //create deck of cards\n deck.shuffle();\n \n //deal cards to two different hands\n while(!deck.isEmpty())\n {\n card=deck.dealCard();\n player1Hand.enqueue(card);\n \n card=deck.dealCard();\n player2Hand.enqueue(card);\n }\n \n }", "@Override\n\tpublic String fight() {\n\t\treturn \"Ready to fight!\";\n\t}", "@Override\r\n public void fromDeathToChase() {\r\n if (eaten()) {\r\n startChase();\r\n }\r\n }", "@Override\n public void onStart() {\n game = bwClient.getGame();\n self = game.self();\n intel = IntelligenceAgent.getInstance(game);\n combat = CombatAgent.getInstance(game);\n \n combat.addUnitTypeToModel(UnitClassification.MELEE);\n combat.addUnitTypeToModel(UnitClassification.RANGED);\n combat.loadModels();\n combat.setSkirmish(true);\n\n epoch = 14;\n frameCount = 0;\n Epoch_Cycles = 0;\n skirmVal = false;\n }", "@Override\n public void applyEffect(Battle battle, Cell cell, Account player, int activeTime) {\n /* if (activeTime != -1)\n return;\n ManaItemBuff manaItemBuff = new ManaItemBuff(player, 1);\n manaItemBuff.setTurnCounter(-5);\n manaItemBuff.castBuff();\n player.getOwnBuffs().add(manaItemBuff);*/\n }", "public void initialize() {\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\t\tif (AttackRateSeconds > 30)\n\t\t\tAttackRateSeconds = 30.0;\n\n\t\tif (sentryHealth < 0)\n\t\t\tsentryHealth = 0;\n\n\t\tif (sentryRange < 1)\n\t\t\tsentryRange = 1;\n\t\tif (sentryRange > 100)\n\t\t\tsentryRange = 100;\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\n\t\tif (RespawnDelaySeconds < -1)\n\t\t\tRespawnDelaySeconds = -1;\n\n\t\tif (Spawn == null)\n\t\t\tSpawn = myNPC.getBukkitEntity().getLocation();\n\n\n\t\t// defaultSpeed = myNPC.getNavigator().getSpeed();\n\n\t\t((CraftLivingEntity) myNPC.getBukkitEntity()).getHandle().setHealth(sentryHealth);\n\n\t\t_myDamamgers.clear();\n\n\t\tthis.sentryStatus = Status.isLOOKING;\n\t\tfaceForward();\n\n\t\tshootanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),1);\n\t\thealanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),6);\n\n\t\t//\tPacket derp = new net.minecraft.server.Packet15Place();\n\n\n\t\tmyNPC.getBukkitEntity().teleport(Spawn); //it should be there... but maybe not if the position was saved elsewhere.\n\n\t\t// plugin.getServer().broadcastMessage(\"NPC GUARDING!\");\n\n\t\tif (taskID == null) {\n\t\t\ttaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new SentryLogicRunnable(), 40, _logicTick);\n\t\t}\n\n\n\t}", "public void incrementAttack(Fighter f1, Fighter f2)\r\n {\r\n if(f1.getAttacking() == 1) //if the fighter is attacking\r\n {\r\n if(f1.getAttackT() == 5) //if 5 frames have passed\r\n {\r\n int[] i = new int[4]; \r\n i = attackHitBox(f1); //gets the x,y, height, and width of the attack\r\n \r\n //if the attack position overlapps the other fighter's position and the other fighter isn't blocking\r\n if (i[0] <= f2.getPos()[0] + f2.getSize() && i[0] + i[2] >= f2.getPos()[0] && i[1] <= f2.getPos()[1] + f2.getSize() && i[1] + i[3] >= f2.getPos()[1] && f2.getBlocking() != 1)\r\n {\r\n f2.setHealth(f2.getHealth() - f1.getAttack().getDamage()); //deal damage to the fighter\r\n if(f1.getRight() == true){ \r\n f2.setKnockBackVel(f1.getAttack().getKnockBack()[0],f1.getAttack().getKnockBack()[1]); //apply knockback going right\r\n }else\r\n {\r\n f2.setKnockBackVel(-f1.getAttack().getKnockBack()[0],f1.getAttack().getKnockBack()[1]); //apply knockback going left\r\n }\r\n }\r\n f1.setAttackT(0); //reset attack timer\r\n f1.setAttacking(2); //sets the fighter to cooldown\r\n }else\r\n {\r\n f1.setAttackT(f1.getAttackT() + 1); //increments timer\r\n }\r\n }\r\n\r\n if(f1.getAttacking() == 2) //if fighter is in cooldown\r\n {\r\n if(f1.getAttackT() == f1.getAttack().getTime()) //if the timer has waited the cooldown of the last attack\r\n {\r\n f1.setAttackT(0); //resets the timer\r\n f1.setAttacking(0); //sets the fighter to \"can attack\"\r\n }\r\n else\r\n {\r\n f1.setAttackT(f1.getAttackT() + 1); //increment timer\r\n }\r\n }\r\n }" ]
[ "0.7193198", "0.6824465", "0.66784674", "0.66617006", "0.6653865", "0.6612849", "0.65854836", "0.6534403", "0.6518777", "0.6504218", "0.6439674", "0.6425179", "0.6415702", "0.636352", "0.6343223", "0.6340772", "0.63355446", "0.6333062", "0.6303447", "0.6299343", "0.6290502", "0.6264969", "0.62594914", "0.624346", "0.624002", "0.62398386", "0.6239439", "0.62378365", "0.6233349", "0.62329644", "0.6232056", "0.6226477", "0.6216418", "0.62079227", "0.6197065", "0.61961746", "0.61916035", "0.6187534", "0.6183717", "0.6181957", "0.6167791", "0.6159364", "0.61561984", "0.6150467", "0.6142493", "0.6118146", "0.61074233", "0.61062455", "0.6102972", "0.6089274", "0.60865444", "0.6084032", "0.6044937", "0.6039234", "0.60353285", "0.6034115", "0.6032902", "0.60315555", "0.6017573", "0.6014286", "0.59867406", "0.5981016", "0.59786236", "0.59773934", "0.5973458", "0.5966487", "0.5956944", "0.5946464", "0.59414434", "0.5940029", "0.5935155", "0.59349823", "0.593469", "0.5932379", "0.59301466", "0.5920636", "0.5910438", "0.5900364", "0.58996385", "0.5899255", "0.58987856", "0.58986074", "0.5891114", "0.588295", "0.588036", "0.5880253", "0.5879501", "0.5871292", "0.58684105", "0.58636016", "0.5861147", "0.5853894", "0.58431536", "0.5831889", "0.5824323", "0.5822942", "0.5821456", "0.5820515", "0.58180773", "0.5805598", "0.58032596" ]
0.0
-1
end of ariFight This method determines if there is an item on the game board that can be equipped.
public boolean itemonfloor(){ int XI = 0; int YI = 0; int Xyou = 1; int Yyou = 1; for(int i = 0 ; i < this.Items.length;i++){ for(int p = 0; p < this.Items.length;p++){ if(this.Items[i][p] != null && this.position[i][p] == 1){ YI = i; XI = p; Yyou = i; Xyou = p; } } }//end of outter for if(YI==Yyou && XI==Xyou){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean canEquip(Item item,String target){\n\n\t\tif (! (item instanceof Equippable))return false;\n\t\tEquippable toEquip = (Equippable)item;\n\t\tswitch(toEquip.getEquipType()){\n\t\tcase HEAD:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.HEAD)) return true;\n\t\t\tbreak;\n\t\tcase CHEST:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.CHEST)) return true;\n\t\t\tbreak;\n\t\tcase WEAPON:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.WEAPON)) return true;\n\t\t\tbreak;\n\t\tcase LEGS:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.LEGS)) return true;\n\t\t\tbreak;\n\t\tcase NECK:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.NECK)) return true;\n\t\t\tbreak;\n\t\tcase BELT:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.BELT)) return true;\n\t\t\tbreak;\n\t\tcase BOOTS:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.BOOTS)) return true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean canAttackWithItem() {\n/* 253 */ return false;\n/* */ }", "public boolean canAttackWithItem() {\n/* 215 */ return false;\n/* */ }", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void checkItem() {\n Entity t = BombermanGame.checkCollisionItem(this.rectangle);\n if (t instanceof SpeedItem) {\n speed ++;\n ((SpeedItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof FlameItem) {\n flame = true;\n ((FlameItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof BombItem) {\n max_bomb ++;\n ((BombItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof Portal) {\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "@Override\n public boolean equipped() {\n\treturn this.equipped;\n }", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "public abstract boolean canAddItem(Player player, Item item, int slot);", "public Boolean canAddItem(ItemStack item, Player player){\n\t\tint freeSpace = 0;\n\t\tfor(ItemStack i : player.getInventory() ){\n\t\t\tif(i == null){\n\t\t\t\tfreeSpace += item.getType().getMaxStackSize();\n\t\t\t} else if (i.getType() == item.getType() ){\n\t\t\t\tfreeSpace += (i.getType().getMaxStackSize() - i.getAmount());\n\t\t\t}\n\t\t}\n\t\tdebugOut(\"Item has: \"+item.getAmount()+\" and freeSpace is: \"+freeSpace);\n\t\tif(item.getAmount() > freeSpace){\n\t\t\tdebugOut(\"There is not enough freeSpace in the inventory\");\n\t\t\treturn false;\n\t\t}else{\n\t\t\tdebugOut(\"There is enough freeSpace in the inventory\");\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }", "public boolean isAllowed(Player owner, Item item) {\r\n if (item.getValue() > 50000) {\r\n owner.getActionSender().sendMessage(\"This item is too valuable to trust to this familiar.\");\r\n return false;\r\n }\r\n if (!item.getDefinition().isTradeable()) {\r\n owner.getActionSender().sendMessage(\"You can't trade this item, not even to your familiar.\");\r\n return false;\r\n }\r\n if (!owner.getFamiliarManager().getFamiliar().getDefinition().getName().toLowerCase().contains(\"abyssal\")) {\r\n if (item.getId() == 1436 || item.getId() == 7936 || !item.getDefinition().getConfiguration(ItemConfiguration.BANKABLE, true)) {\r\n owner.getActionSender().sendMessage(\"You can't store \" + item.getName().toLowerCase() + \" in this familiar.\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean itemIsAllowed(int itemId) {\n\t\tswitch (itemId) {\n\t\tcase 15272: // Rocktail\n\t\tcase 7060: // Tuna potato\n\t\tcase 6685:\n\t\tcase 6687:\n\t\tcase 6689:\n\t\tcase 6691: // Saradomin brew\n\t\tcase 3024:\n\t\tcase 3026:\n\t\tcase 3028:\n\t\tcase 3030: // Super restore\n\t\tcase 391: // Manta Ray\n\t\tcase 385: // Shark\n\t\tcase 229: // Vial\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "public static boolean inspectItems(Player player) {\n boolean itemExists = false;\n System.out.println(\"You look for items.\");\n System.out.println(\"You see:\");\n ArrayList<Collectable> items = player.getCurrentRoom().getItems();\n if(items.size() > 0) {\n itemExists = true;\n for (int i = 0; i < items.size(); i++) {\n System.out.print(\"\\t(\" + i + \") \");\n System.out.println(items.get(i).toString());\n }\n System.out.println(\"Which item will you take? (-1 to not collect any items)\");\n } else System.out.println(\"Nothing in sight\");\n return itemExists;\n }", "public boolean hasItem(@NonNull Item item) {\n \t// if the item is invisible, then fool the player\n \tif (!item.isVisible()) {\n \treturn false;\n } else {\n \treturn items.contains(item);\n }\n }", "@Override\n public boolean canAddToItem(@Nonnull ItemStack stack, @Nonnull IDarkSteelItem item) {\n return (item.isForSlot(EntityEquipmentSlot.FEET) || item.isForSlot(EntityEquipmentSlot.LEGS) || item.isForSlot(EntityEquipmentSlot.CHEST)\n || item.isForSlot(EntityEquipmentSlot.HEAD)) && EnergyUpgradeManager.itemHasAnyPowerUpgrade(stack) && getUpgradeVariantLevel(stack) == variant - 1;\n }", "public abstract boolean attack(KillableItem i);", "public boolean isItemValid(ItemStack par1ItemStack)\n/* 23: */ {\n/* 24:20 */ if (isItemTwoHanded(par1ItemStack)) {\n/* 25:21 */ return false;\n/* 26: */ }\n/* 27:23 */ if ((this.rightHand.getHasStack()) && \n/* 28:24 */ (isItemTwoHanded(this.rightHand.getStack()))) {\n/* 29:25 */ return false;\n/* 30: */ }\n/* 31:27 */ return super.isItemValid(par1ItemStack);\n/* 32: */ }", "public boolean canPickItem(String itemName) {\n boolean canPick = true;\n Item item = currentRoom.getItem(itemName);\n if(item != null) {\n double totalWeight = items.getTotalWeight() + item.getWeight();\n if(totalWeight > maxWeight) {\n canPick = false;\n }\n }\n return canPick; \n }", "public boolean canReceiveItem(Player character) {\n boolean canPick = true;\n Item item = character.items.get(character.getItemOwned2().getName());\n double totalWeight = items.getTotalWeight() + item.getWeight();\n if(totalWeight > maxWeight) {\n canPick = false;\n }\n return canPick; \n }", "private void doItemVerification() {\n\t\tif (actor != null && !actor.attributes.getInventory().contains(Items.FISHING_ROD)) {\r\n\t\t\tactor.say(\"fishing.norod\", getAssigningPlayer());\r\n\t\t\treset();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tactor.setHeldItem(actor.attributes.getInventory()\r\n\t\t\t\t.getStackInSlot(actor.attributes.getInventory().getFirstSlotContainingItem(Items.FISHING_ROD))\r\n\t\t\t\t.getItem());\r\n\t}", "private boolean hasItem(Client c, int itemId, boolean inventory) {\r\n\t\treturn inventory ? c.getItems().playerHasItem(itemId) : c.getItems().playerHasItem(itemId) || c.playerEquipment[5] == itemId;\r\n\t}", "public static boolean useWrench (String item, Tile tile, Player player) {\n Validation v = new Validation();\n //If not holding wrench\n if (!v.validateInput(item, player.getInventory()).equalsIgnoreCase(\"wrench\")) {\n //If player on 2C\n if(tile.gettIntractable().equalsIgnoreCase(\"pipeline\")){\n System.out.println(\"If you had a tool you might be able to fix the pipe\");\n }else\n System.out.println(\"I'm not holding an item like that\");\n return false;\n }\n //If wrench is in inventory and on 2C\n else if(v.validateInput(item, player.getInventory()).equalsIgnoreCase(\"wrench\") && tile.gettIntractable().equalsIgnoreCase(\"pipeline\")) {\n System.out.println(\"You use the wrench to fix the pipe\");\n calculateDamage(player, tile);\n return true;\n }\n //If wrench is in inventory and not on 2C\n else if (v.validateInput(item, player.getInventory()).equalsIgnoreCase(\"wrench\") && !tile.gettIntractable().equalsIgnoreCase(\"pipeline\")){\n System.out.println(\"I'm not sure what I would use that for here\");\n return false;\n } else\n return false;\n }", "private void equipButtonClicked(final ShopItem shopItem) {\n shopItem.setState(ItemStatusID.EQUIPPED);\n if (shopItem instanceof Shovel) {\n for (Shovel shovel : SHOVELS) {\n if (shovel.equals(shopItem)) {\n continue;\n } else if (shovel.getState() == ItemStatusID.EQUIPPED) {\n shovel.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n } else if (shopItem instanceof Background) {\n for (Background background : BACKGROUNDS) {\n if (background.equals(shopItem)) {\n continue;\n } else if (background.getState() == ItemStatusID.EQUIPPED) {\n background.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n }\n updateUI();\n }", "public boolean isItemValid(ItemStack itemstack)\n {\n return itemstack.getItem() == Items.water_bucket;\n }", "public Boolean checkAvailability(Item item, Integer current) {\n \tif (item.getQuatity() + current > item.getAvailableQuatity()) {\r\n \t\tSystem.out.println(\"System is unable to add \"\r\n \t\t\t\t+ current + \" \" + item.getItemName() +\r\n \t\t\t\t\". System can only add \"\r\n \t\t\t\t+ item.getAvailableQuatity() + \" \" + item.getItemName() );\r\n \t\treturn false;\r\n \t}\r\n \telse return true;\r\n }", "@Override\r\n\tpublic boolean getIsRepairable(ItemStack itemToRepair, ItemStack resourceItem) {\r\n\t\tif (itemToRepair.isItemDamaged()) {\r\n\t\t\tif (resourceItem.getItem().getUnlocalizedName().equals(this.repairUnlocalizedName)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn false;\r\n }", "private boolean canSmelt()\n {\n ItemStack var1 = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);\n if (var1 == null) return false;\n if (this.furnaceItemStacks[2] == null) return true;\n if (!this.furnaceItemStacks[2].isItemEqual(var1)) return false;\n int result = furnaceItemStacks[2].stackSize + var1.stackSize;\n return (result <= getInventoryStackLimit() && result <= var1.getMaxStackSize());\n }", "boolean useItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n String nameOfItem = \"\";\n String useItem = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n useItem = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\") && inventory.getUseable(nameOfItem)) {\n\n System.out.println(\"You have dropped: \" + nameOfItem);\n inventory.removeItemInventory(nameOfItem);\n player.setEnergy(player.getEnergy() + 20);\n player.setHealth(player.getHealth() + 5);\n\n return true;\n }\n return false;\n }", "private boolean canGivePlayer(ItemStack item,EntityPlayer entityplayer){\n ItemStack itemstack3 = entityplayer.inventory.getItemStack();\n if(itemstack3 == null){\n \treturn true;\n }\n else if(NoppesUtilPlayer.compareItems(itemstack3, item, false, false)){\n int k1 = item.stackSize;\n if(k1 > 0 && k1 + itemstack3.stackSize <= itemstack3.getMaxStackSize())\n {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean inventory(Player player, Item item, int opcode) {\n\t\treturn false;\n// Clan channel = ClanRepository.get(player.clan);\n// if (channel == null) {\n// player.send(new SendMessage(\"You need to be in a clan to do this!\"));\n// return true;\n// }\n// player.inventory.remove(item);\n// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));\n// channel.showcaseItems.add(showcaseReward.getId());\n// player.send(new SendMessage(\"Inside the box you found \" + showcaseReward.getName() + \"! Showcase size: \" + channel.showcaseItems.size() + \"/28\", SendMessage.MessageColor.DARK_PURPLE));\n// return true;\n\t}", "public boolean grabItem(String item) {\n boolean canGrab = false;\n if(grabbedItems.size() < max_inventory){\n System.out.println(\"You have grabbed: \" + item + \"\\n\");\n grabbedItems.add(item);\n canGrab = true;\n }\n else{\n System.out.println(\"You have too many items! Try dropping one if you really need to grab \" + item);\n }\n return canGrab;\n }", "default boolean canEquip(@Nonnull ItemStack stack)\n {\n return stack.getCapability(ExtensionSlotItemCapability.INSTANCE, null)\n .map((extItem) -> IExtensionSlot.isAcceptableSlot(this, stack, extItem) && extItem.canEquip(stack, this)).orElse(false);\n }", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "public boolean setSlot(int debug1, ItemStack debug2) {\n/* */ EquipmentSlot debug3;\n/* 2048 */ if (debug1 >= 0 && debug1 < this.inventory.items.size()) {\n/* 2049 */ this.inventory.setItem(debug1, debug2);\n/* 2050 */ return true;\n/* */ } \n/* */ \n/* */ \n/* 2054 */ if (debug1 == 100 + EquipmentSlot.HEAD.getIndex()) {\n/* 2055 */ debug3 = EquipmentSlot.HEAD;\n/* 2056 */ } else if (debug1 == 100 + EquipmentSlot.CHEST.getIndex()) {\n/* 2057 */ debug3 = EquipmentSlot.CHEST;\n/* 2058 */ } else if (debug1 == 100 + EquipmentSlot.LEGS.getIndex()) {\n/* 2059 */ debug3 = EquipmentSlot.LEGS;\n/* 2060 */ } else if (debug1 == 100 + EquipmentSlot.FEET.getIndex()) {\n/* 2061 */ debug3 = EquipmentSlot.FEET;\n/* */ } else {\n/* 2063 */ debug3 = null;\n/* */ } \n/* */ \n/* 2066 */ if (debug1 == 98) {\n/* 2067 */ setItemSlot(EquipmentSlot.MAINHAND, debug2);\n/* 2068 */ return true;\n/* 2069 */ } if (debug1 == 99) {\n/* 2070 */ setItemSlot(EquipmentSlot.OFFHAND, debug2);\n/* 2071 */ return true;\n/* */ } \n/* */ \n/* 2074 */ if (debug3 != null) {\n/* 2075 */ if (!debug2.isEmpty()) {\n/* 2076 */ if (debug2.getItem() instanceof net.minecraft.world.item.ArmorItem || debug2.getItem() instanceof ElytraItem) {\n/* 2077 */ if (Mob.getEquipmentSlotForItem(debug2) != debug3) {\n/* 2078 */ return false;\n/* */ }\n/* 2080 */ } else if (debug3 != EquipmentSlot.HEAD) {\n/* 2081 */ return false;\n/* */ } \n/* */ }\n/* 2084 */ this.inventory.setItem(debug3.getIndex() + this.inventory.items.size(), debug2);\n/* 2085 */ return true;\n/* */ } \n/* 2087 */ int debug4 = debug1 - 200;\n/* 2088 */ if (debug4 >= 0 && debug4 < this.enderChestInventory.getContainerSize()) {\n/* 2089 */ this.enderChestInventory.setItem(debug4, debug2);\n/* 2090 */ return true;\n/* */ } \n/* 2092 */ return false;\n/* */ }", "public boolean isItemValid(ItemStack var1)\n {\n return canHoldPotion(var1);\n }", "public boolean enchantItem(EntityPlayer par1EntityPlayer, int par2)\r\n\t {\r\n\t\t ItemStack itemstack = this.tableInventory.getStackInSlot(0);\r\n\r\n\t\t if (this.enchantLevels[par2] > 0 && itemstack != null && (this.tileEntity.getPoint() >= this.enchantLevels[par2] || par1EntityPlayer.capabilities.isCreativeMode))\r\n\t\t {\r\n\t\t\t if (!this.worldPointer.isRemote)\r\n\t\t\t {\r\n\t\t\t\t List list = this.buildEnchantmentList(this.rand, itemstack, this.enchantLevels[par2] + this.Bonus);\r\n\t\t\t\t boolean flag = itemstack.itemID == Item.book.itemID;\r\n\r\n\t\t\t\t if (list != null)\r\n\t\t\t\t {\r\n//\t\t\t\t\t par1EntityPlayer.addExperienceLevel(-this.enchantLevels[par2]);\r\n\t\t\t\t\t this.tileEntity.removePoint(this.enchantLevels[par2]);\r\n\r\n\t\t\t\t\t if (flag)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t itemstack.itemID = Item.enchantedBook.itemID;\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t int j = flag ? this.rand.nextInt(list.size()) : -1;\r\n\r\n\t\t\t\t\t for (int k = 0; k < list.size(); ++k)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t EnchantmentData enchantmentdata = (EnchantmentData)list.get(k);\r\n\r\n\t\t\t\t\t\t if (!flag || k == j)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t if (flag)\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t Item.enchantedBook.func_92115_a(itemstack, enchantmentdata);\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t else\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t itemstack.addEnchantment(enchantmentdata.enchantmentobj, enchantmentdata.enchantmentLevel);\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t this.onCraftMatrixChanged(this.tableInventory);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t return false;\r\n\t\t }\r\n\t }", "@Override\n public boolean applyThis() {\n Unit source = (Unit) ref.getSourceObj();\n Ref REF = ref.getCopy();\n Condition conditions = new OrConditions(\n DC_ConditionMaster\n .getSelectiveTargetingTemplateConditions(SELECTIVE_TARGETING_TEMPLATES.MY_ITEM),\n DC_ConditionMaster\n .getSelectiveTargetingTemplateConditions(SELECTIVE_TARGETING_TEMPLATES.MY_WEAPON));\n if (!new SelectiveTargeting(conditions).select(REF)) {\n ref.getActive().setCancelled(true);\n return false;\n }\n HeroItem item = (HeroItem) REF.getTargetObj();\n conditions = new Conditions(\n // ++ Max distance?\n new DistanceCondition(ref.getActive().getIntParam(PARAMS.RANGE, false) + \"\"),\n // new NumericCondition(\"{match_c_n_of_actions}\", \"1\"),\n new CanActCondition(KEYS.MATCH),\n new NotCondition(ConditionMaster.getSelfFilterCondition()),\n DC_ConditionMaster\n .getSelectiveTargetingTemplateConditions(SELECTIVE_TARGETING_TEMPLATES.ANY_ALLY));\n // non-immobile, ++facing?\n if (!new SelectiveTargeting(conditions).select(REF)) {\n ref.getActive().setCancelled(true);\n return false;\n }\n\n Unit unit = (Unit) REF.getTargetObj();\n\n boolean result = roll(source, unit, item);\n if (item instanceof QuickItem) {\n QuickItem quickItem = (QuickItem) item;\n source.removeQuickItem(quickItem);\n if (result) {\n unit.addQuickItem(quickItem);\n } else {\n dropped(item, unit);\n }\n\n } else {\n source.unequip(item, null);\n if (result) {\n unit.addItemToInventory(item); // TODO equip in hand if\n }\n// possible? spend AP?\n else {\n dropped(item, unit);\n }\n\n }\n // ref.getObj(KEYS.ITEM);\n return true;\n }", "public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean active() {\n return !Inventory.isFull();\n }", "protected boolean isOccupied(int row, int column){\n return (!ships[row][column].getShipType().equals(\"empty\"));\n }", "public boolean canSmelt() {\n\t\tif (this.slots[0] == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(\n\t\t\t\t\tthis.slots[0]);\n\n\t\t\tif (itemstack == null)\n\t\t\t\treturn false;\n\t\t\tif (this.slots[1] == null)\n\t\t\t\treturn true;\n\t\t\tif (!this.slots[1].isItemEqual(itemstack))\n\t\t\t\treturn false;\n\n\t\t\tint result = slots[1].stackSize + itemstack.stackSize;\n\n\t\t\treturn result <= getInventoryStackLimit()\n\t\t\t\t\t&& result <= itemstack.getMaxStackSize();\n\t\t}\n\t}", "public boolean deployWeapon(int x, int y, Player opponent, Map attacked_map, Map current_player_map, Player current_player, int method_choice) {\n Ship temp_ship = new Minesweeper();\n //Catches if current player is trying to use a bomb on an underwater map or space map, returns false for not successful\n if (current_player.player_weapons.contains(this) && (attacked_map.getName().equals(\"UnderwaterMap\") || attacked_map.getName().equals(\"SpaceMap\"))) {\n bombOutputs(method_choice, 1, attacked_map, temp_ship, x, y);\n return false;\n }\n\n //Checks if coordinate is in bounds\n if (x > 10 || x < 0 || y > 10 || y < 0) {\n bombOutputs(method_choice, 2, attacked_map, temp_ship, x, y);\n return false;\n }\n\n int is_occupied = attacked_map.defensiveGrid.checkCellStatus(x,y);\n\n //Checks if there is a ship at the attacked location: 0 = no ship, 1 = ship exists, 2 = ship exists and already hit\n if (is_occupied == 0) {\n //no ship: miss!\n bombOutputs(method_choice, 3, attacked_map, temp_ship, x, y);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n } else if (is_occupied == 1) {\n //ship there: first time attacking!\n Ship attacked_ship = new Minesweeper();\n\n for (int i = 0; i < attacked_map.existing_ships.size(); i++){\n Ship shipy = attacked_map.existing_ships.get(i);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(shipy);\n for (Coordinate coordinate : coordsList) {\n if (coordinate.x == x && coordinate.y == y) {\n attacked_ship = shipy;\n break;\n }\n }\n }\n\n //Check if captain's quarters at location\n Coordinate capt_quart = attacked_map.captains_quarters.get(attacked_ship);\n if (capt_quart.x == x && capt_quart.y == y) {\n //Check for armoured captain's quarters\n if (attacked_ship instanceof ArmoredShip) {\n //Armoured!\n //Armoured captains quarters hasn't been hit before\n if (((ArmoredShip) attacked_ship).getHitCount() == 0) {\n //Prints out a miss - some sneaky captain's quarters here\n bombOutputs(method_choice, 4, attacked_map, attacked_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n //Armoured captains quarters has been hit before\n else if (((ArmoredShip) attacked_ship).getHitCount() == 1){\n //Destroys entire ship!\n bombOutputs(method_choice, 5, attacked_map, attacked_ship, x, y);\n bombOutputs(method_choice, 6, attacked_map, attacked_ship, x, y);\n\n attacked_map.sinkShip(attacked_ship);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n }\n //Hit a captain's quarters but not armoured\n else {\n //Destroy the ship!\n bombOutputs(method_choice, 7, attacked_map, attacked_ship, x, y);\n attacked_map.sinkShip(attacked_ship);\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n }\n }\n //Not a captain's quarters there\n else {\n //Attack and hit!\n int current_health = attacked_map.ship_health.get(attacked_ship);\n current_health -= 1;\n attacked_map.ship_health.replace(attacked_ship, current_health);\n\n bombOutputs(method_choice, 8, attacked_map, temp_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, x, y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, x, y);\n }\n } else if (method_choice == 2 || method_choice == 3) {\n //Already attacked, already hit a ship!\n bombOutputs(method_choice, 9, attacked_map, temp_ship, x, y);\n }\n\n return true;\n }", "private void pickItem() \n {\n if(currentRoom.getShortDescription() == \"in the campus pub\" && i.picked3 == false)\n {\n i.item3 = true;\n i.picked3 = true;\n System.out.println(\"You picked a redbull drink\");\n }\n else if(currentRoom.getShortDescription() == \"in th hallway\" && i.picked2 == false)\n {\n i.item2 = true;\n i.picked2 = true;\n System.out.println(\"You picked a torch\");\n }\n else if(currentRoom.getShortDescription() == \"in the office\" && i.picked1 == false)\n {\n i.item1 = true;\n i.picked1 = true;\n System.out.println(\"You picked a pair of scissors\");\n }\n else\n System.out.println(\"There is no items in the room!\");\n }", "public boolean checkForTreasure(){\n Object obj=charactersOccupiedTheLocation[3];\n if(obj!=null){return true;}\n return false; \n }", "public boolean canCarry(Item item) {\n\t\tif (rocketWeight + item.getWeight() <= maxWeight) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean check(ItemStack item) {\n return item != null && item.getType() == material && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(displayName);\n }", "boolean hasArmor();", "public boolean isQuestItem() {\n return questItem;\n }", "public abstract boolean canRemoveItem(Player player, Item item, int slot);", "boolean canReceiveManaFromItem(ItemStack otherStack);", "public boolean isInventoryFull()\n\t{\n\t\tif (myWorker.getLoadInInventory() >= getMyPlayer().getPlayerInfo()\n\t\t\t\t.getMaxCarryingLoadByWorker())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "boolean hasBonusItemDrop();", "public boolean isWeaponOf(int i, int j) {\n boolean bJudge;\n\n bJudge = false;\n\n //if j is a player\n if (scene.entityManager.hasComponent(j, Player.class)) {\n player = scene.entityManager.getEntityComponentInstance(j, Player.class);\n\n //inventory of the two weapons in selection of the playe\n Inventory inventory = scene.entityManager.getEntityComponentInstance(player.LRInventory, Inventory.class);\n if (inventory.slots.get(0) == i || inventory.slots.get(1) == i) {\n bJudge = true;\n }\n } //if j is an enemy\n else if (scene.entityManager.hasComponent(j, Enemy.class)) {\n Playable playable = scene.entityManager.getEntityComponentInstance(j, Playable.class);\n\n Inventory inventory = scene.entityManager.getEntityComponentInstance(playable.inventory, Inventory.class);\n\n if (inventory.slots.get(0) == i) {\n bJudge = true;\n }\n }\n\n return bJudge;\n }", "private boolean tryAttack(Tile fromTile) {\r\n\t\tint size = getBoard().getTiles().length;\r\n\r\n\t\t// if attacker is on power-up tile\r\n\t\tif (fromTile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.SHARK && fromTile.getTer().territoryName().equals(\"Shark\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.EAGLE && fromTile.getTer().territoryName().equals(\"Eagle\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t} else if (fromTile.getTer().territoryName().equals(\"Neutral\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// if the defender is on power-up tile\r\n\t\tif (tile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (tile.getPiece().getLEAGUE() == League.SHARK && tile.getTer().territoryName().equals(\"Shark\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (tile.getPiece().getLEAGUE() == League.EAGLE && tile.getTer().territoryName().equals(\"Eagle\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t} else if (tile.getTer().territoryName().equals(\"Neutral\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (fromTile.getPiece().getPower() >= tile.getPiece().getPower()) {\r\n\t\t\tif (tile.getPiece().getTYPE() == PieceType.FLAG) {\r\n\t\t\t\tfromTile.getPiece().setHasEnemyFlag(true);\r\n\t\t\t\tUtilities.infoAlert(\"Enemy Flag Captured!\", \"Get that piece with the flag back to your territory quickly!\");\r\n\t\t\t} else {\r\n\t\t\t\tif (tile.getPiece().getHasEnemyFlag() == true) {\r\n\t\t\t\t\tUtilities.infoAlert(\"Flag Recaptured!\", \"Enemy piece carrying your flag has been killed.\\nYour flag has respawned in your territory.\");\r\n\r\n\t\t\t\t\t// generate the dropped flag at its original position\r\n\t\t\t\t\t// or generate the dropped flag on first available tile on first or last row\r\n\t\t\t\t\t// if the default position has a piece on it\r\n\t\t\t\t\tif (tile.getPiece().getLEAGUE() == League.EAGLE) {\r\n\t\t\t\t\t\tif (getBoard().getTiles()[size - 1][(size / 2) - 1].getPiece() == null) {\r\n\t\t\t\t\t\t\tgetBoard().getTiles()[size - 1][(size / 2) - 1].setPiece(new SharkFlag());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int sharkCol = 0; sharkCol < getBoard().getTiles().length; sharkCol++) {\r\n\t\t\t\t\t\t\t\tif (getBoard().getTiles()[size - 1][sharkCol].getPiece() == null) {\r\n\t\t\t\t\t\t\t\t\tgetBoard().getTiles()[size - 1][sharkCol].setPiece(new SharkFlag());\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (getBoard().getTiles()[0][size / 2].getPiece() == null) {\r\n\t\t\t\t\t\t\tgetBoard().getTiles()[0][size / 2].setPiece(new EagleFlag());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int eagleCol = 0; eagleCol < getBoard().getTiles().length; eagleCol++) {\r\n\t\t\t\t\t\t\t\tif (getBoard().getTiles()[0][eagleCol].getPiece() == null) {\r\n\t\t\t\t\t\t\t\t\tgetBoard().getTiles()[0][eagleCol].setPiece(new EagleFlag());\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn movePiece(fromTile);\r\n\t\t} else {\r\n\t\t\tUtilities.infoAlert(\"Invalid action\", \"Enemy power level higher at level \" + tile.getPiece().getPower()\r\n\t\t\t\t\t+ \". \" + \"\\nYour current piece is not able to defeat it and has cowered back in fear.\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "default boolean canUnequip(@Nonnull ItemStack stack)\n {\n return stack.getCapability(ExtensionSlotItemCapability.INSTANCE, null)\n .map((extItem) -> extItem.canUnequip(stack, this) && EnchantmentHelper.getEnchantmentLevel(Enchantments.BINDING_CURSE, stack) <= 0).orElse(true);\n }", "@Override\n\tpublic boolean isBreedingItem(ItemStack item) {\n\t\treturn getBreed().getBreedingItem() == item.getItem();\n\t}", "private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMode() && \n (item.getName().equals(\"Helmet\")\n || item.getName().equals(\"Shield\")\n || item.getName().equals(\"Armour\"))){\n this.defenseNum = 0;\n System.out.println(\"This shop has 0 defensive item left.\");\n }\n if (item.getPrice() > gold) {\n System.out.println(\"You don't have enough money.\");\n }\n loadItem(item.getName());\n world.getCharacter().setGold(gold - item.getPrice());\n System.out.println(\"You have bought Item : \" + item.getName() + \".\");\n }", "public boolean isItem(ItemStack item){\n\t\tif(item == null) return false;\n\t\tif(material != item.getType()) return false;\n\t\tif(damage >= 0 && item.getDurability() != damage) return false;\n\t\t\n\t\t//early out if no name / lore:\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return true;\n\t\t\n\t\t//Problem fix for no Meta:\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return false;\n\t\t\n\t\t//Check for name:\n\t\tString name = meta.hasDisplayName() ? meta.getDisplayName() : \"\";\n\t\tif(!name.equals(itemName)) return false;\n\n\t\t//Check for display:\n\t\tif(!loreLine.isEmpty() && !meta.hasLore()) return false;\n\t\t\n\t\tboolean found = false;\n\t\tfor(String line : meta.getLore()){\n\t\t\tif(loreLine.equals(line)) found = true;\n\t\t}\n\t\t\n\t\tif(!found) return false;\n\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)\n {\n return par2ItemStack.itemID == repairItemID;\n }", "boolean canCarry(Item specifiedItem);", "private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }", "private boolean canAddBlueTile() {\n\t\tint soldierCount=0,queenCount=0;\n\n\n\t\tArrayList<Piece> playerPieces = Board.getInstance().getColorPieces(Game.getInstance().getCurrentPlayerColor());\n\t\tfor(Piece p:playerPieces)\n\t\t{\n\t\t\tif(p instanceof Soldier)\n\t\t\t{\n\t\t\t\tsoldierCount++;\n\t\t\t}\n\t\t\tif(p instanceof Queen)\n\t\t\t{\n\t\t\t\tqueenCount++;\n\t\t\t}\n\t\t}\n\t\treturn (soldierCount == 2 && queenCount == 1);\n\t}", "public boolean isOccupied(int i, int j) {\n\t\tint index = i * 3 + j;\n\t\tint all_moves = this.player1_moves | this.player2_moves;\n\n\t\tall_moves >>= index;\n\t\treturn (all_moves & 1) == 1;\n\t}", "boolean canCharge(ItemStack me);", "@Override\n public boolean isCorrectMachinePart(ItemStack itemStack) {\n return true;\n }", "public boolean dropItem(Items item)\n {\n boolean itemDropped = false;\n if(haveItem(item) && !currentRoom.haveItem(item)){ //if item in inventory not room\n \n Inventory.remove(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld --; //inventory tracker -1\n itemDropped = true;\n \n }\n return itemDropped;\n //if(haveItem(item))\n //Inventory.remove(item);\n //itemsHeld --; //inventory tracker -1\n \n }", "public boolean isOccupied(int x, int y){\r\n\t\tif(myBoard.carrier.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.battleship.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.cruiser.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.submarine.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.patrolboat.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean hitBy(Pweapon weapon, Tower tower) {\r\n\t\tif (!spawned)\r\n\t\t\treturn false;\r\n\r\n\t\t// System.out.println(\"Tir avec arme : \" + weapon.getNameWeapon());\r\n\t\tif (!tower.isControledByPlayer()) {\r\n\t\t\t// if (decideShootMiss(tower)) {\r\n\t\t\tthis.health -= weapon.getDamage();\r\n\t\t\t// }\r\n\t\t} else {\r\n\t\t\tthis.health -= weapon.getDamage();\r\n\t\t}\r\n\t\tif (this.health <= 0) {\r\n\t\t\tthis.health = 0;\r\n\t\t\tthis.spawned = false;\r\n\t\t}\r\n\t\treturn this.health == 0;\r\n\t}", "public boolean isValidItem() {\n return validItem;\n }", "public boolean isFuelAvailable()\n\t{\n\t\tInventory inv = getPowerSourceInventory();\n\t\tif (inv == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn getFuel().allIn(inv);\n\t\t}\n\t}", "private boolean shouldRush(GameInfo intel) {\n if (intel.getNumPlayers() > 2) {\n return false;\n }\n\n final GameMap gameMap = intel.getGamemap();\n final Map<Integer, Ship> myShips = gameMap.getMyPlayer().getShips();\n\n // get enemy player ships\n for (Player player : gameMap.getAllPlayers()) {\n if (player.getId() != gameMap.getMyPlayerId()) {\n for (Ship ship : player.getShips().values()) {\n for (Ship myShip : myShips.values()) {\n if (myShip.getDistanceTo(ship) < RUSH_MAX_DISTANCE) {\n return true;\n }\n }\n }\n }\n }\n\n return false;\n }", "public boolean execute(Command command){\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know what to pick up...\n System.out.println(\"Eat what?\");\n return false;\n }\n String goodItems = \"ChocolateCake,\";//, badItems = \"goo,\";\n String itemName = command.getSecondWord();\n Player currentPlayer = game.getCurrentPlayer();\n Item item = currentPlayer.getCurrentInventory().getItem(itemName);\n if(item != null){\n if(item.isEdible()){\n if(goodItems.indexOf(item.getItemName()) >=0){\n currentPlayer.changeMaxWeight(item.getWeight());\n currentPlayer.getCurrentInventory().removeItem(item);\n System.out.println(\"Your maximum weight capacity went up!: \" +\n currentPlayer.getMaxWeight());\n return false;\n }\n else{\n currentPlayer.changeMaxWeight(-item.getWeight());\n currentPlayer.getCurrentInventory().removeItem(item);\n System.out.println(\"Your maximum weight capacity went down!: \" +\n currentPlayer.getMaxWeight());\n return false;\n }\n }\n else{\n System.out.println(\"That's not edible!!\");\n return false;\n }\n }\n \n System.out.println(\"You don't have that item!\");\n return false;\n }", "public static boolean inventoryIsFull() {\n\t\treturn Inventory.getCount() == 28;\n\t}", "private boolean alreadyHasWeapon(Actor actor) {\n\t\tboolean hasWeapon = false;\n\t\t\n\t\tList<Item> inventory = actor.getInventory();\n\t\t\n\t\tfor (int x = 0; x < inventory.size(); x++) {\n\t\t\tif (inventory.get(x) instanceof Weapon) {\n\t\t\t\thasWeapon = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn hasWeapon;\n\t}", "public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}", "protected boolean isCanCheckDurability(Action action, Material heldItemType) {\n boolean canRun = false;\n if ((heldItemType.toString().contains(\"_HOE\")\n || heldItemType.toString().contains(\"_SPADE\"))\n && action == Action.RIGHT_CLICK_BLOCK) {\n canRun = true;\n } else if ((heldItemType.toString().contains(\"_AXE\")\n //Pickaxe\n || heldItemType.toString().contains(\"_PICKAXE\")\n\n //Hoe\n || heldItemType.toString().contains(\"_HOE\")\n\n //Spade\n || heldItemType.toString().contains(\"_SPADE\")\n\n //Sword\n || heldItemType.toString().contains(\"_SWORD\")) && (action == Action.LEFT_CLICK_BLOCK)) {\n canRun = true;\n }\n return canRun;\n }", "boolean canExportManaToItem(ItemStack otherStack);", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isCraftItemStack(final Object obj) {\n \t\treturn getCraftItemStackClass().isAssignableFrom(obj.getClass());\n \t}", "public static boolean isPickaxe(Item item) {\r\n \t\tif(item == null)\r\n \t\t\t\treturn false;\r\n \t\tif(item instanceof ItemPickaxe)\r\n \t\t\treturn true;\r\n \t\tString itemName = item.getUnlocalizedName().toLowerCase();\r\n \t\tif(itemName.contains(\"pickaxe\") && !itemName.contains(\"upgrade\"))\r\n \t\t\treturn true;\r\n \t\treturn false;\r\n \t}", "default boolean canFit(ItemStack stack) {\n return !InvTools.isEmpty(stack) && stream().anyMatch(inv -> {\n InventoryManipulator im = InventoryManipulator.get(inv);\n return im.canAddStack(stack);\n });\n }", "@Override\n\tpublic boolean canExtractItem(int i, ItemStack itemstack, int j)\n\t{\n\t\tif(i == 1 && j == 5 && itemstack.getItem().getDamage(getStackInSlot(1)) == getStackInSlot(1).getItem().getMaxDamage())\n\t\t\treturn true;\n\t\tif(i == 2 && j == 5)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean hasItem() {\n return null != item;\n }", "private void checkIfOccupied(int row, int col) {\n if (status == MotionStatus.DOWN || AIisAttacking) {\n\n// if (player && playerAttacks != null) {\n// // Ignore touch if player has previously committed an attack on that cell.\n// for (int i = 0; i < playerAttacks.size(); i++) {\n// if (playerAttacks.get(i).equals(row,col)) {\n// Log.i(\"for\", \"You Hit this Previously!\");\n// }\n// }\n// }\n\n for (int i = 0; i < occupiedCells.size(); i++) {\n if (occupiedCells.get(i).x == row && occupiedCells.get(i).y == col) {\n Point p = new Point(row, col);\n selectedShip = findWhichShip(p); //Touching View Updated\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n setHit(true);\n break;\n }\n }\n\n if (selectedShip == null) {\n setHit(false);\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n }\n\n } else if (status == MotionStatus.MOVE) {//MotionStatus.MOVE\n if (selectedShip != null) {//Need to make sure none of the current ship parts will overlap another.\n int rowHolder = selectedShip.getHeadCoordinatePoint().x;\n int colHolder = selectedShip.getHeadCoordinatePoint().y;\n int tempRow, tempCol;\n selectedShip.moveShipTo(row, col);\n for (Ship s : ships) {\n if (s != selectedShip) {\n\n for (int i = 0; i < selectedShip.getShipSize(); i++) {\n tempRow = selectedShip.getBodyLocationPoints()[i].x;\n tempCol = selectedShip.getBodyLocationPoints()[i].y;\n\n for (int j = 0; j < s.getShipSize(); j++) {\n if (tempRow == s.getBodyLocationPoints()[j].x && tempCol == s.getBodyLocationPoints()[j].y) {\n selectedShip.moveShipTo(rowHolder, colHolder);\n }\n }//for\n }//for\n }\n }//for\n }\n }//Move\n }", "public interface IAirCanister {\n\n /**\n * Return true if this stack can hold air. Not all items that implement IAirCanister\n * can actually hold air. For example, for a full hazmat suit only the chestpiece supports\n * air but all are the same item class\n * @param stack to check if we are the right item\n */\n boolean isActive(ItemStack stack);\n\n /**\n * Current air value\n */\n int getAir(ItemStack stack);\n\n /**\n * Maximum support air value\n */\n int getMaxAir(ItemStack stack);\n\n void setAir(ItemStack stack, int air);\n}", "public boolean isItemValid(ItemStack par1ItemStack)\n {\n return true;\n }", "public boolean hasItem() {\n return this.item != null;\n }", "public boolean gameIsOver() {return revealedShips >= 4;}", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "public boolean isItemTwoHanded(ItemStack is)\n/* 35: */ {\n/* 36:31 */ if (((is.getItem() instanceof ITwoHandedItem)) || ((is.getItem() instanceof ItemBaseSwordDefensive))) {\n/* 37:32 */ return true;\n/* 38: */ }\n/* 39:33 */ return false;\n/* 40: */ }", "boolean hasOpenedInventory(Player player);", "public boolean checkRequirements(PlayerBoard playerBoard);", "public boolean canExtractItem(int slot, ItemStack item, int side)\n {\n return this.getAccessibleSlotsFromSide(side)[0] == slot && item.getItem() == waterjetStacks[slot].getItem();\n }", "@Override\n public boolean isUsable(Game game) {\n// game.getCurrentPlayer().setInQue(true);\n availableSquare.clear();\n Boolean result = false;\n Worker worker = (Worker) game.getTargetInUse();\n if (game.getTargetSelected() != null) {\n game.getCurrentPlayer().setInQue(false);\n game.getController().setGoOn(true);\n return true;\n }\n // if(game.getTargetSelected().getSquare().getWorker()==null) {\n for (Square s : worker.getSquare().getAdjacentSquares()) {\n if (s.getLevel() < 4 && (s.getWorker() == null || s.getWorker().getC() != worker.getC()) && ((worker.getCanMoveUp() && worker.getSquare().getLevel() == s.getLevel() - 1) || (worker.getSquare().getLevel() > s.getLevel() - 1)))\n availableSquare.add(s);\n }\n result = true;\n List<SquareToJson> availableSquares = new ArrayList<>();\n for (Square s1 : availableSquare)\n availableSquares.add(new SquareToJson(s1.getLevel(), \"\", s1.getCoordinateX(), s1.getCoordinateY()));\n\n SquareToJson[][] map = game.squareToJsonArrayGenerator();\n\n ChooseTarget chooseTarget = new ChooseTarget(\"Where do you want to move?\", availableSquares, map);\n UpdateEvent event = new UpdateEvent(map);\n game.notifyObservers(event);\n game.notifyCurrent(chooseTarget);\n\n //}\n /*else{\n game.getCurrentPlayer().setInQue(false);\n game.getController().setGoOn(true);\n return true;\n }*/\n if (worker.getSquareNotAvailable() != null)\n availableSquare.remove(worker.getSquareNotAvailable());\n\n if (availableSquare.size() == 0) {\n game.getCurrentPlayer().setDefeat(true);\n result = false;\n game.getCurrentPlayer().setInQue(false);\n game.getController().setGoOn(false);\n return result;\n }\n worker.setCanBeMoved(result);\n game.getCurrentPlayer().setInQue(true);\n game.getController().setGoOn(true);\n return result;\n }", "protected void checkTakeAchievements(ItemStack debug1) {}" ]
[ "0.7238799", "0.7005665", "0.68964493", "0.6886309", "0.6822157", "0.6795174", "0.678564", "0.6767152", "0.67653865", "0.6702835", "0.66968644", "0.6633992", "0.6633808", "0.65976995", "0.6593606", "0.65929645", "0.6558456", "0.6483314", "0.64755225", "0.6435829", "0.6368426", "0.63622934", "0.6356871", "0.63453335", "0.6344203", "0.63299525", "0.63167965", "0.6282198", "0.62700695", "0.6242911", "0.62381816", "0.6227805", "0.62237", "0.6213205", "0.6192651", "0.6190309", "0.6189816", "0.61895627", "0.6186283", "0.6182667", "0.6175294", "0.6163261", "0.6158224", "0.6148485", "0.61422217", "0.61384046", "0.6137677", "0.6134774", "0.61227554", "0.6122065", "0.61118203", "0.6111056", "0.6108233", "0.609924", "0.6095471", "0.6088666", "0.60873014", "0.60868084", "0.6070704", "0.60515594", "0.60406095", "0.6040449", "0.6035025", "0.60342467", "0.6030375", "0.6022465", "0.60069823", "0.60004205", "0.5995877", "0.5984471", "0.5973646", "0.59716195", "0.5971158", "0.5949104", "0.59429216", "0.59326714", "0.5926723", "0.59099644", "0.5904796", "0.5895024", "0.589494", "0.5887427", "0.58784616", "0.58736336", "0.5870142", "0.58697885", "0.5869342", "0.58647424", "0.58545786", "0.5853578", "0.5846382", "0.58452386", "0.5835949", "0.58346146", "0.5829567", "0.58268005", "0.5822895", "0.58195466", "0.581797", "0.5817547" ]
0.61687714
41
holds variable that has list placment to make garret walk in pattern A method that makes Garret the enemy move throughout the board.
public void enemymoveGarret(){ int YEG = 0; int XEG = 0; int[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way for(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations for(int p = 0; p < this.Garret.length;p++){ if(this.Garret[i][p] == 1){ YEG = i; XEG = p; } } } int move = turns[count]; switch(move){//first block is up and down second block is left and right case 0: if(this.area[YEG][XEG-1] != "[ ]"){ this.Garret[YEG][XEG-1] = 1;//to turn left this.Garret[YEG][XEG] = 0; count++; if(count == 12){ count = 0; } } break; case 1: if(this.area[YEG][XEG+1] != "[ ]"){ this.Garret[YEG][XEG+1] = 1;//to turn right this.Garret[YEG][XEG] = 0; count++; if(count == 12){ count = 0; } } break; case 2: if(this.area[YEG-1][XEG] != "[ ]"){ this.Garret[YEG-1][XEG] = 1;//to turn up this.Garret[YEG][XEG] = 0; count++; if(count == 12){ count = 0; } } break; case 3: if(this.area[YEG+1][XEG] != "[ ]"){ this.Garret[YEG+1][XEG] = 1;//to turn down this.Garret[YEG][XEG] = 0; count++; if(count == 12){ count = 0; } } break; }//end of switch }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void animalMove(int x,int y, Living[][] map,int gridLength, int gridWidth){\r\n \r\n boolean age=map[x][y].getAge();\r\n boolean gender=map[x][y].getGender();\r\n boolean checkRight=false;\r\n boolean checkLeft=false;\r\n boolean checkUp=false;\r\n boolean checkDown=false;\r\n boolean up=false;\r\n boolean down=false;\r\n boolean right=false;\r\n boolean left=false;\r\n boolean baby=false;\r\n boolean turn=map[x][y].getMovement(); //Check to see if it moved before in the array\r\n \r\n double random=Math.random();\r\n \r\n \r\n \r\n \r\n //Checks to see if it is possible to even see to the left first\r\n if(y-1>=0){\r\n left=true;\r\n \r\n if(turn && (map[x][y-1] instanceof Plant) ){ //Check to see if there is plants and goes to plants\r\n map[x][y].gainHealth((map[x][y-1].getHealth()));\r\n map[x][y].setMovement(false); \r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n if(turn && (map[x][y-1] instanceof Sheep) && (age==map[x][y-1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y-1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y-1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){ \r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null)&& !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null)&& !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if((y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){\r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y-1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n //If it can move to the left need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y-2>=0){\r\n checkLeft=true;\r\n }\r\n }\r\n \r\n //Checks to see if it is possible to even see to the right first \r\n if(y+1<gridWidth){\r\n right=true;\r\n \r\n //Check to move on towards plants\r\n if(turn && (map[x][y+1] instanceof Plant)){\r\n map[x][y].gainHealth(map[x][y+1].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n \r\n if(turn && (map[x][y+1] instanceof Sheep && age==map[x][y+1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y+1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y+1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheeps will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y+1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y+1].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to the right need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y+2<gridWidth){ \r\n checkRight=true;\r\n }\r\n } \r\n \r\n //Check to see if it can go up\r\n if(x-1>=0){\r\n up=true;\r\n \r\n //Check for plant to go on to upwards \r\n if(turn && (map[x-1][y] instanceof Plant) ){\r\n map[x][y].gainHealth(map[x-1][y].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n }\r\n \r\n if(turn && (map[x-1][y] instanceof Sheep) && (age==map[x-1][y].getAge()) ){ \r\n //If the ages match age must be false to be adults and both be opposite genders and have more then 19 health\r\n if(turn && !age && !(gender==map[x-1][y].getGender()) &&map[x][y].getHealth()>19 &&map[x-1][y].getHealth()>19){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x-1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x-1][y].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to upwards need to check if it can foresee more incase there wasn't any place for it to go\r\n if(x-2>=0){\r\n checkUp=true; \r\n }\r\n } \r\n //Check to see where to go downwards\r\n if(x+1<gridLength){\r\n down=true; \r\n \r\n //Check to see if any plants are downwards\r\n if(turn && (map[x+1][y] instanceof Plant) ){\r\n map[x][y].gainHealth( (map[x+1][y].getHealth()));\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n } \r\n \r\n if(turn && (map[x+1][y] instanceof Sheep) && (age==map[x+1][y].getAge()) ){ \r\n \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x+1][y].getGender()) && (map[x][y].getHealth()>=20) && (map[x+1][y].getHealth()>=20) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (x-1>=0) && (map[x+1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x+1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n } \r\n if(x+2<gridLength){\r\n checkDown=true;\r\n }\r\n } \r\n \r\n //Movement towards plant only if no immediate sheep/plants are there to move to\r\n if(turn && checkRight && (map[x][y+2] instanceof Plant) ){\r\n if(map[x][y+1]==null){\r\n \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y+1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n if(turn && checkDown && (map[x+2][y] instanceof Plant) ){\r\n if(map[x+1][y]==null){\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n }\r\n } \r\n if(turn && checkUp && (map[x-2][y] instanceof Plant) ){\r\n if(map[x-1][y]==null){\r\n \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x-1][y].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n if(turn && checkLeft && (map[x][y-2] instanceof Plant) ){\r\n if(map[x][y-1]==null){\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n //Random Movement if there are no plants to move towards \r\n if(turn && right && (random<=0.2) ){\r\n if(map[x][y+1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null; \r\n }\r\n }\r\n if(turn && left && (random>0.2) && (random<=0.4) ){\r\n if(map[x][y-1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && up && (random>0.4) && (random<=0.6) ){\r\n if(map[x-1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && down && (random>0.6) && (random<=0.8) ){\r\n if(map[x+1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n }", "public void enemymoveAri(){\n\t\tint YEari = 0;\n\t\tint XEari = 0;\n\t\tfor(int i = 0 ; i < this.Ari.length;i++){\n\t\t\tfor(int p = 0; p < this.Ari.length;p++){\n\t\t\t\tif(this.Ari[i][p] == 1){\n\t\t\t\t\tYEari = i;\n\t\t\t\t\tXEari = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint move = fate.nextInt(4);// 0 is left, 1 is right , 2 is up , 3 is down\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEari][XEari-1] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari][XEari-1] = 1;//to turn left\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEari][XEari+1] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari][XEari+1] = 1;//to turn right\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak; \n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEari-1][XEari] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari-1][XEari] = 1;//to turn up\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEari+1][XEari] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari +1][XEari] = 1;//to turn down\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\n\t}", "private void enPassant(Board board, List<Move> moves) {\n int x = location.x;\n int y = location.y; \n \n if (this.color == Color.White && this.location.y == 3) {\n if(canCaptureEnPassant(board, new Point(x - 1, y)))\n moves.add(new Move(this, new Point(x - 1, y - 1),\n board.getPieceAt(new Point(x - 1, y))));\n if(canCaptureEnPassant(board, new Point(x + 1, y)))\n moves.add(new Move(this, new Point(x + 1, y - 1),\n board.getPieceAt(new Point(x + 1, y)))); \n }\n if (this.color == Color.Black && this.location.y == 4) {\n if(canCaptureEnPassant(board, new Point(x - 1, y)))\n moves.add(new Move(this, new Point(x - 1, y + 1),\n board.getPieceAt(new Point(x - 1, y))));\n if(canCaptureEnPassant(board, new Point(x + 1, y)))\n moves.add(new Move(this, new Point(x + 1, y + 1),\n board.getPieceAt(new Point(x + 1, y)))); \n }\n }", "public AgentAction getNextMove(GameTile [][] visibleMap) {\r\n\t\t//Possible things to add to your moves\r\n//\t\tnextMove = AgentAction.doNothing;\r\n//\t\tnextMove = AgentAction.moveDown;\r\n//\t\tnextMove = AgentAction.moveUp;\r\n//\t\tnextMove = AgentAction.moveUp;\r\n//\t\tnextMove = AgentAction.moveLeft;\r\n//\t\tnextMove = AgentAction.pickupSomething;\r\n//\t\tnextMove = AgentAction.declareVictory;\r\n//\r\n//\t\tnextMove = AgentAction.shootArrowNorth;\r\n//\t\tnextMove = AgentAction.shootArrowSouth;\r\n//\t\tnextMove = AgentAction.shootArrowEast;\r\n//\t\tnextMove = AgentAction.shootArrowWest;\r\n//\t\tnextMove = AgentAction.quit\r\n\t\t\r\n\t\t\r\n\r\n\t\t//Ideally you would remove all this code, but I left it in so the keylistener would work\r\n\t\tif(keyboardPlayOnly) {\r\n\t\t\tif(nextMove == null) {\r\n\t\t\t\treturn AgentAction.doNothing;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tAgentAction tmp = nextMove;\r\n\t\t\t\tnextMove = null;\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//This code plays 5 \"games\" and then quits\r\n\t\t\t//Just does random things\r\n\t\t\tif(numGamesPlayed > 19) {\r\n\t\t\t\treturn AgentAction.quit;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(nextMoves.isEmpty()) {\r\n\t\t\t\t\tsetStartingPosition(visibleMap);\r\n//\t\t\t\t\tfindWumpus(visibleMap);\r\n//\t\t\t\t\tfindWumpus(visibleMap);\r\n//\t\t\t\t\tWumpusState currentState = huntTheWumpus(visibleMap);\r\n//\t\t\t\t\tSystem.out.println(wumpusHunted);\r\n//\t\t\t\t\tif(wumpusHunted) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\t\taddToNextMoves(currentState);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//this is the code to collect the gold\r\n//\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\tcurrentState = findTheGold(currentState);\r\n//\t\t\t\t\tif(currentState.getGoldCollected()) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\t\taddToNextMoves(currentState);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tif(!goldCollected) {\r\n\t\t\t\t\t\twellItsDarkNow(visibleMap);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(goldCollected) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n\t\t\t\t\t\taddToNextMoves(visibleMap);\r\n//\t\t\t\t\t\tgoldCollected = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(!nextMoves.isEmpty()) {\r\n\t\t\t\t\tSystem.out.println(nextMoves.peek());\r\n\t\t\t\t\tsetNextMove(nextMoves.remove());\r\n//\t\t\t\t\tSystem.out.println(nextMove);\r\n//\t\t\t\t\treturn nextMove;\r\n\t\t\t\t}\r\n\t\t\t\treturn nextMove;\r\n//\t\t\t\tcurrentNumMoves++;\r\n//\t\t\t\tif(currentNumMoves < 20) {\r\n//\t\t\t\t\treturn AgentAction.randomAction();\r\n//\t\t\t\t}\r\n//\t\t\t\telse {\r\n//\t\t\t\t\treturn AgentAction.declareVictory;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void makeEnemyMove() { //all players after index 1 are enemies\n if (gameMode == EARTH_INVADERS) {//find leftmost and rightmost vehicle columns to see if we need to move down\n int leftMost = board[0].length;\n int rightMost = 0;\n int lowest = 0;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//find left-most, right-most and lowest most vehicles (non aircraft/train) to determine how formation should move\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster))\n continue;\n if (curr.getCol() < leftMost)\n leftMost = curr.getCol();\n if (curr.getCol() > rightMost)\n rightMost = curr.getCol();\n if (curr.getRow() > lowest)\n lowest = curr.getRow();\n curr.setHeadDirection(DOWN);\n }\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//***move aircraft and trains\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster)) {\n if (curr.isMoving())\n continue;\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int r = curr.getRow();\n int c = curr.getCol();\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n int rand = 0;\n if (dirs.size() > 0)\n rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying()) { //if aircraft is flying in the visible board, don't change direction\n if (r == 1 && (c == 0 || c == board[0].length - 1)) //we are in the first row but behind a border\n { //we only want aircraft to appear in row 1 in EARTH INVADERS (like the UFO in space invaders)\n if (bodyDir == LEFT || bodyDir == RIGHT) {\n rand = UP;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (c == 0)\n rand = RIGHT;\n else if (c == board[0].length - 1)\n rand = LEFT;\n else\n //if(dirs.contains(bodyDir))\n rand = bodyDir;\n } else if (r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) {\n rand = bodyDir;\n if (r == 0 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == 0 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == board.length - 1 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = UP;\n } else if (r == board.length - 1 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = UP;\n }\n } else if (/*dirs.contains(bodyDir) && */(r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1))\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n }\n }//***end aircraft/train movement\n if (leftMost == 1) //move vehicles down and start them moving right\n {\n if (EI_moving == LEFT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = RIGHT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n }\n }\n } else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n }//***end leftmost is first col\n else if (rightMost == board[0].length - 2) //move vehicles down and start them moving left\n {\n if (EI_moving == RIGHT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = LEFT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n }\n }\n } else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n }//***end rightmost is last col\n else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n return;\n }//***end EARTH INVADERS enemy movements\n for (int i = 2; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n String name = curr.getName();\n int r = curr.getRow();\n int c = curr.getCol();\n if (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1 && (curr instanceof Vehicle))\n ((Vehicle) (curr)).setOnField(true);\n\n if (curr.isFlying() && webs[panel].size() > 0) {\n int x = curr.findX(cellSize);\n int y = curr.findY(cellSize);\n for (int p = 0; p < webs[panel].size(); p++) {\n int[] ray = webs[panel].get(p);\n if (Utilities.isPointOnRay(x, y, ray[0], ray[1], ray[2], ray[3])) {\n explosions.add(new Explosion(\"BIG\", x, y, explosionImages, animation_delay));\n Ordinance.radiusDamage(-1, x, y, 25, panel, .5);\n Spawner.resetEnemy(i);\n webs[panel].remove(p);\n p--;\n Structure str1 = structures[ray[4]][ray[5]][panel];\n Structure str2 = structures[ray[6]][ray[7]][panel];\n if (str1 != null)\n str1.setWebValue(0);\n if (str2 != null)\n str2.setWebValue(0);\n Utilities.updateKillStats(curr);\n break;\n }\n }\n }\n //reset any ground vehicle that ended up in the water\n //reset any train not on tracks - we need this because a player might change panels as a vehicle spawns\n if (name.startsWith(\"TRAIN\")) {\n Structure str = structures[r][c][panel];\n if (str != null && str.getName().equals(\"hole\") && str.getHealth() != 0) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Utilities.updateKillStats(curr);\n Spawner.resetEnemy(i);\n continue;\n } else if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n } else if (!board[r][c][panel].startsWith(\"T\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //ground vehicles\n if (!curr.isFlying() && !curr.getName().startsWith(\"BOAT\") && (curr instanceof Vehicle)) {\n\n if (((Vehicle) (curr)).getStunTime() > numFrames) //ground unit might be stunned by WoeMantis shriek\n continue;\n if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //reset any water vehicle that ended up on land\n if (name.startsWith(\"BOAT\")) {\n if (!board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else if (curr.getHealth() <= 0) {\n Spawner.resetEnemy(i);\n continue;\n }\n\n //if a ground unit has been on the playable field and leaves it, respawn them\n if (!curr.isFlying() && !name.startsWith(\"TRAIN\") && (curr instanceof Vehicle)) {\n if ((r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) && ((Vehicle) (curr)).getOnField()) {\n ((Vehicle) (curr)).setOnField(false);\n Spawner.resetEnemy(i);\n continue;\n }\n }\n if (name.endsWith(\"nukebomber\")) {//for the nukebomber, set the detonation coordinates so nuke fires when the plane exits the field\n int dr = curr.getDetRow();\n int dc = curr.getDetCol();\n int bd = curr.getBodyDirection();\n int dd = curr.getDetDir();\n if (bd == dd && (((bd == LEFT || bd == RIGHT) && c == dc) || (bd == UP || bd == DOWN) && r == dr)) {\n Ordinance.nuke();\n curr.setDetRow(-1);\n curr.setDetCol(-1);\n }\n }\n\n if (curr.isMoving())\n continue;\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int[] target = isMonsterInSight(curr);\n int mDir = target[0]; //direction of the monster, -1 if none\n int monsterIndex = target[1]; //index of the monster in the players array, -1 if none\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n\n if (dirs.size() > 0) {\n if (curr instanceof Monster) {//***MONSTER AI*******************\n double headTurnProb = 0.25;\n double stompProb = 0.5;\n int vDir = isVehicleInSight(curr);\n if (vDir >= 0) {\n boolean airShot = false;\n int vD = vDir;\n if (vD >= 10) {\n airShot = true;\n vD -= 10;\n }\n if (curr.head360() || !Utilities.oppositeDirections(vD, curr.getHeadDirection())) {\n curr.setHeadDirection(vD);\n if ((curr.getName().startsWith(\"Gob\") || curr.getName().startsWith(\"Boo\")) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n Bullet temp = null;\n if (curr.getName().startsWith(\"Boo\")) {\n temp = new Bullet(curr.getName() + vD, curr.getX(), curr.getY(), 50, beamImages, SPEED, \"BEAM\", SPEED * 10, airShot, i, -1, -1);\n } else if (curr.getName().startsWith(\"Gob\")) {\n temp = new Bullet(\"flame\" + vD, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n }\n if (temp != null) {\n temp.setDirection(vD);\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else if (Math.random() < headTurnProb) {\n String hd = \"right\";\n if (Math.random() < .5)\n hd = \"left\";\n Utilities.turnHead(curr, hd);\n }\n Structure str = structures[r][c][panel];\n if (str != null && str.getHealth() > 0 && str.isDestroyable() && !str.getName().startsWith(\"FUEL\") && Math.random() < stompProb)\n playerMove(KeyEvent.VK_SPACE, i);\n else {\n int dir = dirs.get((int) (Math.random() * dirs.size()));\n if (dir == UP) {\n if (curr.getBodyDirection() != UP) {\n curr.setBodyDirection(UP);\n curr.setHeadDirection(UP);\n } else {\n if (!curr.isSwimmer() && board[r - 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r - 1 >= 1) {\n str = structures[r - 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_UP, i);\n }\n } else if (dir == DOWN) {\n if (curr.getBodyDirection() != DOWN) {\n curr.setBodyDirection(DOWN);\n curr.setHeadDirection(DOWN);\n } else {\n if (!curr.isSwimmer() && board[r + 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r + 1 <= structures.length - 1) {\n str = structures[r + 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_DOWN, i);\n }\n } else if (dir == LEFT) {\n if (curr.getBodyDirection() != LEFT) {\n curr.setBodyDirection(LEFT);\n curr.setHeadDirection(LEFT);\n } else {\n if (!curr.isSwimmer() && board[r][c - 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c - 1 >= 1) {\n str = structures[r][c - 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_LEFT, i);\n }\n } else if (dir == RIGHT) {\n if (curr.getBodyDirection() != RIGHT) {\n curr.setBodyDirection(RIGHT);\n curr.setHeadDirection(RIGHT);\n } else {\n if (!curr.isSwimmer() && board[r][c + 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c + 1 <= board[0].length - 1) {\n str = structures[r][c + 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_RIGHT, i);\n }\n }\n }\n continue;\n }//end monster AI movement\n else //shoot at a target\n if (name.endsWith(\"troops\") || name.endsWith(\"jeep\") || name.endsWith(\"police\") || name.startsWith(\"TANK\") || name.endsWith(\"coastguard\") || name.endsWith(\"destroyer\") || name.endsWith(\"fighter\") || name.equals(\"AIR bomber\")) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //we don't want vehicles to shoot each other\n {\n airShot = true;\n curr.setHeadDirection(DOWN);\n }\n if (monsterIndex >= 0 && monsterIndex < players.length && players[monsterIndex].isFlying())\n airShot = true;\n if (curr.getName().endsWith(\"fighter\"))\n curr.setDirection(bodyDir); //keep moving while shooting\n if (mDir != -1 && curr.getRow() > 0 && curr.getCol() > 0 && curr.getRow() < board.length - 1 && curr.getCol() < board[0].length - 1) { //don't shoot from off the visible board\n if ((mDir == bodyDir || ((curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\") || name.equals(\"AIR bomber\")) && (mDir == curr.getHeadDirection() || name.equals(\"AIR bomber\")))) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) { //AIR bomber needs to be able to drop bombs if they see the monster in front of them or behind them, so we need to check the name in two conditions\n Bullet temp;\n if (name.endsWith(\"jeep\") || name.endsWith(\"coastguard\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n temp = new Bullet(\"jeep\" + mDir, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"troops\") || name.endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + mDir, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"destroyer\") || name.endsWith(\"artillery\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"destroyer\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"fighter\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n temp = new Bullet(\"fighter\" + mDir, curr.getX(), curr.getY(), 30, rocketImages, SPEED, \"SHELL\", SPEED * 8, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"missile\")) {\n temp = new Bullet(\"missile\" + mDir, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.endsWith(\"flame\")) {\n temp = new Bullet(\"flame\" + mDir, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.equals(\"AIR bomber\")) {\n temp = null;\n if (!DISABLE_BOMBERS) {\n int mR = players[PLAYER1].getRow(); //main player row & col\n int mC = players[PLAYER1].getCol();\n int mR2 = -99; //possible 2nd monster row & col\n int mC2 = -99;\n if (p1partner) {\n mR2 = players[PLAYER2].getRow();\n mC2 = players[PLAYER2].getCol();\n }\n if (players[PLAYER1].getHealth() > 0 && (Math.abs(r - mR) <= 2 || Math.abs(c - mC) <= 2 || Math.abs(r - mR2) <= 2 || Math.abs(c - mC2) <= 2)) {//our bomber is in the same row & col as a monster + or - 1\n if (bodyDir == UP && r < board.length - 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() + (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() + (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == DOWN && r > 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() - (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() - (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == RIGHT && c < board[0].length - 1) {\n Ordinance.bigExplosion(curr.getX() - (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() - (cellSize * 2), curr.getY(), 50, panel, .25);\n } else if (bodyDir == LEFT && c > 1) {\n Ordinance.bigExplosion(curr.getX() + (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() + (cellSize * 2), curr.getY(), 50, panel, .25);\n }\n }\n }\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 5, airShot, i, -1, -1);\n }\n if (temp != null)\n temp.setDirection(mDir);\n\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") && Math.random() < .5) //make the police move towards the monster half the time\n {\n if (mDir == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol()))\n curr.setDirection(UP);\n else if (mDir == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol()))\n curr.setDirection(DOWN);\n else if (mDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1))\n curr.setDirection(LEFT);\n else if (mDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1))\n curr.setDirection(RIGHT);\n else\n curr.setDirection(-1);\n }\n if (temp != null && players[PLAYER1].getHealth() > 0) {\n if (gameMode == EARTH_INVADERS && !curr.isFlying()) {\n } else {\n if (numFrames >= ceaseFireTime + ceaseFireDuration || gameMode == EARTH_INVADERS) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else //change to face the monster to line up a shot\n {\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.endsWith(\"artillery\")) {\n curr.setDirection(-1); //stop to shoot\n curr.setBodyDirection(mDir);\n } else if (curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\"))\n curr.setHeadDirection(mDir);\n continue;\n }\n }\n }\n int rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying() && (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1)) {\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n\n continue;\n }\n //if no preferred direction, include the option to turn around\n //civilians should prefer to turn around rather than approach the monster\n if (name.endsWith(\"civilian\") || name.endsWith(\"bus\")) {\n if (bodyDir == mDir) //if we are facing the same direction as the monster, turn around\n {\n if (bodyDir == UP && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n } else if (bodyDir == DOWN && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n } else if (bodyDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n } else if (bodyDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n }\n }\n int rand = (int) (Math.random() * 4);\n if (rand == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n }\n if (rand == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n }\n if (rand == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n if (rand == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n }\n\n }\n }", "public void moveEnemy() {\n int moveDirection = randomGenerator(0, 3);\n int enemyAmount = snakeEnemyPartList.size();\n for(int i = 0; i < enemyAmount; i++) {\n\n int rowsNew = snakeEnemyPartList.get(i).getSnakeEnemyPartRowsNew();\n int collsNew = snakeEnemyPartList.get(i).getSnakeEnemyPartCollsNew();\n\n switch (moveDirection) {\n case 0:\n if(board[rowsNew-1][collsNew] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew-1][collsNew] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('w');\n } else {\n moveEnemy();\n }\n break;\n\n case 1:\n if(board[rowsNew][collsNew-1] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew][collsNew-1] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('a');\n }else {\n moveEnemy();\n }\n\n break;\n\n case 2:\n if(board[rowsNew+1][collsNew] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew+1][collsNew] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('s');\n }else {\n moveEnemy();\n }\n\n break;\n\n case 3:\n if(board[rowsNew][collsNew+1] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew][collsNew+1] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('d');\n }else {\n moveEnemy();\n }\n \n break;\n }\n }\n \n }", "private Point[] generateInstructions(){\n\t\tPoint[] movement = new Point[d];\n\t\tfor(int i = 0; i < d; i++){\n\t\t\tmovement[i] = new Point(dancers[i].next_pos.x-this.last_positions[i].x,dancers[i].next_pos.y-this.last_positions[i].y);\n\t\t\tif(movement[i].x * movement[i].x + movement[i].y * movement[i].y > 4){\n\t\t\t\tSystem.out.println(\"dancer \" + i + \" move too far\");\n\t\t\t\tSystem.out.println(\"soulmate: \" + dancers[i].soulmate);\n\t\t\t\tSystem.out.println(\"connected? \" + this.connected);\n\t\t\t\tmovement[i] = new Point(0,0);\n\t\t\t}\n\t\t}\n\t\treturn movement;\n\t}", "public ArrayList<Literal> lookAround(String agName){\r\n\t\tperceptModel = MapEnv.model;\r\n\t\tArrayList<Literal> lookArr = new ArrayList<Literal>();\r\n\t\tint \t id \t \t = perceptModel.getAgentID(agName);\r\n\t\tLocation lplayer \t = perceptModel.getAgPos(id); \r\n\t\tif(agName != null){\r\n\t\t\t/** Searching direct neighbours to the Agent's location*/\r\n\t\t\tfor(int y = -1; y <= 1; y++){\r\n\t\t\t\tfor(int x = -1; x <= 1; x++){\r\n\t\t\t\t\tif(!(x == 0 && y == 0)){\r\n\t\t\t\t\t\tLocation l = new Location(lplayer.x + x, lplayer.y + y);\r\n//\t\t\t\t\t\tSystem.out.println(\"Player 1 Loc: (\" + lplayer.x + \",\" + lplayer.y + \"):: See Loc (\" + l.x + \",\" + l.y + \")\");\r\n\t\t\t\t\t\tif(perceptModel.getAgAtPos(l) != -1){\r\n\t\t\t\t\t\t\tint agt = perceptModel.getAgAtPos(l);\r\n\t\t\t\t\t\t\tString plyr = perceptModel.getAgName(agt);\r\n\t\t\t\t\t\t\t/** Detects and adds nearby agents flagholder status perception */\r\n\t\t\t\t\t\t\tif(perceptModel.flag.agentCarrying == perceptModel.getAgentID(plyr)){\r\n\t\t\t\t\t\t\t\tLiteral nfh = Literal.parseLiteral(\"flagholder(\" + plyr + \")\");\r\n\t\t\t\t\t\t\t\tlookArr.add(nfh);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tLiteral np = Literal.parseLiteral(\"close(\" + plyr + \")\"); \r\n\t\t\t\t\t\t\t\tlookArr.add(np);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** Searching an single space further in the cardinal directions*/\r\n\t\t\tfor(int y = -2; y <= 2; y+=4){\r\n\t\t\t\tfor(int x = -2; x <= 2; x+=4){\r\n\t\t\t\t\tLocation l = new Location(lplayer.x + x, lplayer.y + y);\r\n\t//\t\t\t\tSystem.out.println(\"Player Loc: (\" + lplayer.x + \",\" + lplayer.y + \"):: See Loc (\" + l.x + \",\" + l.y + \")\");\r\n\t\t\t\t\tif(perceptModel.getAgAtPos(l) != -1 ){\r\n\t\t\t\t\t\tint \tagt = perceptModel.getAgAtPos(l);\r\n\t\t\t\t\t\tString plyr = perceptModel.getAgName(agt);\r\n\t\t\t\t\t\t/** Detects and adds nearby agents flagholder status perception */\r\n\t\t\t\t\t\tif(perceptModel.flag.agentCarrying == perceptModel.getAgentID(plyr)){\r\n\t\t\t\t\t\t\tLiteral nfh = Literal.parseLiteral(\"flagholder(\" + plyr + \")\");\r\n\t\t\t\t\t\t\tlookArr.add(nfh);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tLiteral np = Literal.parseLiteral(\"close\" + plyr + \")\"); \r\n\t\t\t\t\t\t\tlookArr.add(np);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** Returns completed ArrayList */ \r\n\t\t\treturn lookArr;\r\n\t\t} else return null;\r\n\t}", "public ArrayList<Pair<Coord,Coord>> returnMoves(Board b) {\r\n\t\t//copy Piece grid\r\n\t\tPiece[][] g = b.getGrid();\r\n\t\t\r\n\t\t//return array of all the possible moves\r\n\t\tArrayList<Pair<Coord,Coord>> possibleMoves = new ArrayList<Pair<Coord,Coord>>();\r\n\r\n\t\t//System.out.println(team + \": (\" + c.y + \", \" + c.x + \")\");\r\n\t\t//if the team is moving north (white team)\r\n\t\tif(team) {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y-1][c.x] == null && g[c.y-2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-2,c.x),null));\r\n\t\t\t\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y-1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y-1][c.x-1]!=null && (!g[c.y-1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y-1][c.x+1]!=null && (!g[c.y-1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==3 && g[c.y-1][c.x-1]==null && g[c.y][c.x-1]!=null && !g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==3 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && !g[c.y][c.x+1].team\r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t//if the team is moving south (black team)\r\n\t\t} else {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y+1][c.x] == null && g[c.y+2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+2,c.x),null));\r\n\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y+1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y+1][c.x-1]!=null && (g[c.y+1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y+1][c.x+1]!=null && (g[c.y+1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==4 && g[c.y+1][c.x-1]==null && g[c.y][c.x-1]!=null && g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==4 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && g[c.y][c.x+1].team \r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\treturn possibleMoves;\r\n\t}", "public void makeMove() {\n ArrayList<Field> myFields = new ArrayList<>();\n for (Field[] fieldsRow : fields) {\n for (Field field : fieldsRow) {\n if(field != null && this.equals(field.getPlayer())) {\n myFields.add(field);\n }\n }\n }\n bestMove[0] = myFields.get(0);\n bestMove[1] = myFields.get(0);\n\n Random rand = new Random();\n for(Field destination : destinationFields) {\n if(canMove()) break;\n destinationField = destination;\n for (Field origin : myFields) {\n for(int i = 0; i < origin.getNeighbours().length; ++i) {\n Field neighbour = origin.getNeighbours()[i];\n if(neighbour != null) {\n if(neighbour.getPlayer() == null) {\n if(valueOfMove(origin, neighbour) > valueOfMove(bestMove[0], bestMove[1])) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n } else if(valueOfMove(origin, neighbour) == valueOfMove(bestMove[0], bestMove[1])) {\n if(rand.nextBoolean()) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n }\n }\n } else {\n Field nextField = neighbour.getNeighbours()[i];\n if(nextField != null) {\n correctJumpPaths(origin,null, origin);\n }\n }\n }\n }\n }\n }\n }", "public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }", "List gen() {\n\tList ret = new ArrayList();\n\n\tlong emptySlots = ~(pieceBits[LIGHT] | pieceBits[DARK]);\n\tif (side == LIGHT) {\n\tlong moves = (pawnBits[LIGHT] >> 8) & emptySlots;\n\tlong keep = moves;\n\twhile (moves != 0) {////// bouger le pion d'une case\n\t\tint theMove = getLBit(moves);\n\t\tgenPush(ret, theMove + 8, theMove, 16);\n\t\tmoves &= (moves - 1);\n\t\t}\n\t\tmoves = ((keep & 0x0000ff0000000000L) >> 8) & emptySlots;// bouge le pion\n\t\twhile (moves != 0) {//bouger le pion de deux case\n\t\tint theMove = getLBit(moves);\n\t\tgenPush(ret, theMove + 16, theMove, 24);\n\t\tmoves &= (moves - 1);\n\t\t}\n\t\tmoves = ((pawnBits[LIGHT] & 0x00fefefefefefefeL) >> 9)\n\t\t& pieceBits[DARK];\n\t\twhile (moves != 0) {//pion qui mange un autre pion\n\t\tint theMove = getLBit(moves);\n\t\tgenPush(ret, theMove + 9, theMove, 17);\n\t\tmoves &= (moves - 1);\n\t\t}\n\t\tmoves = ((pawnBits[LIGHT] & 0x007f7f7f7f7f7f7fL) >> 7)\n\t\t& pieceBits[DARK];\n\t\twhile (moves != 0) {// manger a droite\n\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove + 7, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\t} else {\n\tlong moves = (pawnBits[DARK] << 8) & emptySlots;\n\tlong keep = moves;\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 8, theMove, 16);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((keep & 0xff0000L) << 8) & emptySlots;\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 16, theMove, 24);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((pawnBits[DARK] & 0x00fefefefefefefeL) << 7)\n\t& pieceBits[LIGHT];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 7, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((pawnBits[DARK] & 0x007f7f7f7f7f7f7fL) << 9)\n\t& pieceBits[LIGHT];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 9, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\t}\n\tlong pieces = pieceBits[side] ^ pawnBits[side];\n\twhile (pieces != 0) {\n\tint i = getLBit(pieces);\n\tint p = piece[i];\n\tfor (int j = 0; j < offsets[p]; ++j)\n\tfor (int n = i;;) {\n\tn = mailbox[mailbox64[n] + offset[p][j]];\n\tif (n == -1)\n\tbreak;\n\tif (color[n] != EMPTY) {\n\tif (color[n] == xside)\n\tgenPush(ret, i, n, 1);\n\tbreak;\n\t}\n\tgenPush(ret, i, n, 0);\n\tif (!slide[p])\n\tbreak;\n\t}\n\tpieces &= (pieces - 1);\n\t}\n\n\t/* petit rock */\n\tif (side == LIGHT) {\n\tif (((castle & 1) != 0) && (piece[F1] == EMPTY)\n\t&& (piece[G1] == EMPTY))\n\tgenPush(ret, E1, G1, 2);\n\tif (((castle & 2) != 0) && (piece[D1] == EMPTY)\n\t&& (piece[C1] == EMPTY) && (piece[B1] == EMPTY))\n\tgenPush(ret, E1, C1, 2);\n\t} else {\n\tif (((castle & 4) != 0) && (piece[F8] == EMPTY)\n\t&& (piece[G8] == EMPTY))\n\tgenPush(ret, E8, G8, 2);\n\tif (((castle & 8) != 0) && (piece[D8] == EMPTY)\n\t&& (piece[C8] == EMPTY) && (piece[B8] == EMPTY))\n\tgenPush(ret, E8, C8, 2);\n\t}\n\n\t/* generate en passant moves */\n\tif (ep != -1) {\n\tif (side == LIGHT) {\n\tif (COL(ep) != 0 && color[ep + 7] == LIGHT\n\t&& piece[ep + 7] == PAWN)\n\tgenPush(ret, ep + 7, ep, 21);\n\tif (COL(ep) != 7 && color[ep + 9] == LIGHT\n\t&& piece[ep + 9] == PAWN)\n\tgenPush(ret, ep + 9, ep, 21);\n\t} else {\n\tif (COL(ep) != 0 && color[ep - 9] == DARK\n\t&& piece[ep - 9] == PAWN)\n\tgenPush(ret, ep - 9, ep, 21);\n\tif (COL(ep) != 7 && color[ep - 7] == DARK\n\t&& piece[ep - 7] == PAWN)\n\tgenPush(ret, ep - 7, ep, 21);\n\t}\n\t}\n\treturn ret;\n\t}", "public void makeMove() {\n\t\tif (CheckForVictory(this)) {\n\t\t\t// System.out.println(\"VICTORY\");\n\t\t\tInterface.goalReached = true;\n\t\t\tfor (int i = 0; i < tmpStrings.length; i++) {\n\t\t\t\tif (moveOrder[i] == 0)\n\t\t\t\t\ttmpStrings[i] = \"turn left\";\n\t\t\t\telse if (moveOrder[i] == 1)\n\t\t\t\t\ttmpStrings[i] = \"turn right\";\n\t\t\t\telse\n\t\t\t\t\ttmpStrings[i] = \"go forward\";\n\n\t\t\t\tInterface.info.setText(\"Generation: \" + Parallel.generationNo + 1 + \" and closest distance to goal: \" + 0);\n\t\t\t}\n\t\t} else {\n\t\t\tmoveOrder[this.movesMade] = moves.remove();\n\t\t\tswitch (moveOrder[this.movesMade]) {\n\t\t\tcase (0):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 0)\n\t\t\t\t\tface = 3;\n\t\t\t\telse\n\t\t\t\t\tface--;\n\t\t\t\tbreak;\n\t\t\tcase (1):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 3)\n\t\t\t\t\tface = 0;\n\t\t\t\telse\n\t\t\t\t\tface++;\n\t\t\t\tbreak;\n\t\t\tcase (2):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 0 && Y - 1 >= 0)\n\t\t\t\t\tY--;\n\t\t\t\telse if (face == 1 && X + 1 <= map[0].length - 1)\n\t\t\t\t\tX++;\n\t\t\t\telse if (face == 2 && Y + 1 <= map.length - 1)\n\t\t\t\t\tY++;\n\t\t\t\telse if (face == 3 && X - 1 >= 0)\n\t\t\t\t\tX--;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Error making move :(\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void makeMove(Move m){\n int oldTurn = turn;\n turn = -turn;\n moves++;\n enPassant = -1;\n if (m.toY == 0){ // white rook space\n if (m.toX == 0){\n castles &= nWHITE_LONG;\n //castles[1] = false;\n }else if (m.toX == 7){\n castles &= nWHITE_SHORT;\n //castles[0] = false;\n }\n } else if (m.toY == 7){ // black rook space\n if (m.toX == 0){\n castles &= nBLACK_LONG;\n //castles[3] = false;\n }else if (m.toX == 7){\n castles &= nBLACK_SHORT;\n //castles[2] = false;\n }\n }\n if (m.piece == WHITE_ROOK && m.fromY == 0){\n if (m.fromX == 0){castles &= nWHITE_LONG;} //castles[1] = false;}\n else if (m.fromX == 7){castles &= nWHITE_SHORT;} //castles[0] = false;}\n } else if (m.piece == BLACK_ROOK && m.fromY == 7){\n if (m.fromX == 0){castles &= nBLACK_LONG;} //castles[3] = false;}\n else if (m.fromX == 7){castles &= nBLACK_SHORT;} //castles[2] = false;}\n }\n // castling\n if (m.piece % 6 == 0){\n if (oldTurn == WHITE){\n castles &= 0b1100;\n //castles[0] = false; castles[1] = false;\n } else {\n castles &= 0b11;\n //castles[2] = false; castles[3] = false;\n }\n if (m.toX - m.fromX == 2){ // short\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n // rook\n board[m.fromY][5] = board[m.fromY][7];\n board[m.fromY][7] = 0;\n return;\n } else if (m.toX - m.fromX == -2){ // long\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n // rook\n board[m.fromY][3] = board[m.fromY][0];\n board[m.fromY][0] = 0;\n return;\n }\n } else if (m.piece % 6 == 1) { // pawn move\n stalemateCountdown = 0; // resets on a pawn move\n // promotion\n if (m.toY % 7 == 0){\n board[m.toY][m.toX] = m.promoteTo;\n board[m.fromY][m.fromX] = 0;\n return;\n }\n // en passant\n else if (m.fromX != m.toX && board[m.toY][m.toX] == 0){\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n if (oldTurn == WHITE){\n board[4][m.toX] = 0;\n }else{\n board[3][m.toX] = 0;\n }\n return;\n } else if (m.toY - m.fromY == 2*oldTurn){\n enPassant = m.fromX;\n }\n }\n // regular\n if (board[m.toY][m.toX] != 0){\n stalemateCountdown = 0; // resets on a capture\n }\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n }", "public GridPosition run(){\n\t\t\n\t\tinstructions.forEach(i -> {\n\t\t\tGridPosition newPosition = i.nextPosition(position);\n\t\t\tlogger.fine(\"new position is \"+newPosition.toString());\n\t\t\tif(validator.validate(position, newPosition)){\n\t\t\t\tvalidator.addUsedCoordinate(newPosition);\n\t\t\t\tGridPosition oldPosition = position;\n\t\t\t\tposition = newPosition;\n\t\t\t\tvalidator.removeUnusedCoordinate(oldPosition);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tlogger.warning(\"The new position \"+newPosition.toString()+\" is not valid, the lawn mower remain on the current position\");\n\t\t\t\t//if position is not valid, mower keep at the current position and execute next instruction\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn position;\n\t}", "@Override\n\tpublic Lista<Coordenada> getNextMovements() {\n\n\t\tLista<Coordenada> lista = new Lista<Coordenada>();\n\n\t\taddCoordenada(posicion.up(), lista);\n\t\taddCoordenada(posicion.right(), lista);\n\t\taddCoordenada(posicion.down(), lista);\n\t\taddCoordenada(posicion.left(), lista);\n\t\taddCoordenada(posicion.diagonalUpRight(), lista);\n\t\taddCoordenada(posicion.diagonalUpLeft(), lista);\n\t\taddCoordenada(posicion.diagonalDownRight(), lista);\n\t\taddCoordenada(posicion.diagonalDownLeft(), lista);\n\n\t\treturn lista;\n\t}", "public void getMove(){\n\t\t\n\t}", "public void moverJugador(char letra) {\n switch (letra) {\n case 'w':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x,y+3,AnchoJugador,largoJugador))){//Comprobamos si en el array de rectangles hacer overlaps con nuestro jugador\n olision=true;//Si lo hace olision se vuelve true y no se movera\n break;\n }else{\n olision=false;//Si no lo hace olision de volvera false y se movera\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){//Comprobamos si nuestro personaje hace overlaps con alguna salida\n switch (colisiones.getObj2()[b].getName()){//Si colisiona este switch se encargara de ver con que salida estamos chocando mediante el nombre de los rectangulos(Esto se pone en el tiled)\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,10));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n break;\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n y=y+3;\n }else{\n\n }\n\n break;\n case 's':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x,y-3,AnchoJugador,largoJugador))){\n olision=true;\n break;\n }else{\n olision=false;\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){\n System.out.println(\"colisionando\");\n switch (colisiones.getObj2()[b].getName()){\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,140));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n break;\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n\n y=y-3;\n }\n break;\n case 'd':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x+3,y,AnchoJugador,largoJugador))){\n olision=true;\n break;\n }else{\n olision=false;\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){\n System.out.println(\"colisionando\");\n switch (colisiones.getObj2()[b].getName()){\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,140));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.getScreen().dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n x=x+3;\n }\n break;\n case 'a':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x-3,y,AnchoJugador,largoJugador))){\n olision=true;\n break;\n }else{\n olision=false;\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){\n System.out.println(\"colisionando\"+colisiones.getObj2()[b].getName());\n switch (colisiones.getObj2()[b].getName()){\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,140));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n x=x-3;\n }\n break;\n }\n }", "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "public boolean pacMan(List<List<Integer>> ghostList, List<Integer> target) {\n\n boolean didpacmanmakeIt = true;\n\n //set the array for the ghosts and pacman\n pacmanLocation();\n ghostLocation(ghostList.get(0).get(0),ghostList.get(0).get(1));\n\n //////do this for every ghost/////////\n //ghostLocation();\n ///////////////////////////\n\n\n\n //now we loop the number of moves that pacman makes\n\n int numOfMovesPAC = pacmanMoves(target);\n while(numOfMovesPAC>0 && didpacmanmakeIt==true) {\n int numOfMovesGhost = ghostMoves(pacmanLocay, ghostLocay);\n\n if (numOfMovesPAC < numOfMovesGhost) {\n numOfMovesPAC--;\n }else{\n didpacmanmakeIt=false;\n }\n\n }\n\n\n\n\n return didpacmanmakeIt;\n\n\n }", "public static boolean validMove(String move, Person p, Board building )\n {\n Room[][] map = building.getMap();\n move = move.toLowerCase().trim();\n switch (move) {\n case \"n\":\n if (p.getxLoc() > 0)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()-1][p.getyLoc()].getName());\n map[p.getxLoc()-1][p.getyLoc()].enterRoom(p,building);\n return true;\n }\n else\n {\n return false;\n }\n case \"e\":\n if (p.getyLoc()< map[p.getyLoc()].length -1)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()][p.getyLoc() + 1].getName());\n map[p.getxLoc()][p.getyLoc() + 1].enterRoom(p, building);\n return true;\n }\n else\n {\n return false;\n }\n\n case \"s\":\n if (p.getxLoc() < map.length - 1)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()+1][p.getyLoc()].getName());\n map[p.getxLoc()+1][p.getyLoc()].enterRoom(p, building);\n return true;\n }\n else\n {\n return false;\n }\n\n case \"w\":\n if (p.getyLoc() > 0)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()][p.getyLoc()-1].getName());\n map[p.getxLoc()][p.getyLoc()-1].enterRoom(p, building);\n return true;\n }\n else\n {\n return false;\n }\n default:\n break;\n\n }\n return true;\n }", "private void move(Board inputBoard) {\nSimulationHelper simHelp = new SimulationHelper();\nfor (int k = 0; k < inputBoard.getAntsOnBoard().size(); k++) {\nAnt ant = inputBoard.getAntsOnBoard().get(k);\nint antPosX = ant.getAntPosX();\nint antPosY = ant.getAntPosY();\nint fieldColor = inputBoard.getCellCordinates(antPosX, antPosY).getColor();\n\nswitch (fieldColor) {\ncase 0:\nsimHelp.moveleftNinty(inputBoard);\nbreak;\ncase 1:\nsimHelp.moveRightNinty(inputBoard);\nbreak;\ncase 2:\nsimHelp.moveLeftFourtyFive(inputBoard);\nbreak;\ncase 3:\nsimHelp.moveRightFourtyFive(inputBoard);\nbreak;\ncase 4:\nsimHelp.moveRightNinty(inputBoard);\nbreak;\ndefault: Terminal.printError(\"Invalid Color\");\n\n}\n}\n}", "static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }", "public static void main(String[] args) {\n final int NUM_OF_POSSIBLE_MOVES = 18;\n Move[] moves = new Move[NUM_OF_POSSIBLE_MOVES];\n\n //gives memory\n for(int i = 0; i < NUM_OF_POSSIBLE_MOVES; i++){\n moves[i] = new Move();\n }\n\n //sets the moves\n moves[0].setMove(0,1,3);\n moves[1].setMove(0,2,5);\n moves[2].setMove(1,3,6);\n moves[3].setMove(1,4,8);\n moves[4].setMove(2,4,7);\n moves[5].setMove(2,5,9);\n moves[6].setMove(3,6,10);\n moves[7].setMove(3,7,12);\n moves[8].setMove(4,7,11);\n moves[9].setMove(4,8,13);\n moves[10].setMove(5,8,12);\n moves[11].setMove(5,9,14);\n moves[12].setMove(3,4,5);\n moves[13].setMove(6,7,8);\n moves[14].setMove(7,8,9);\n moves[15].setMove(10,11,12);\n moves[16].setMove(11,12,13);\n moves[17].setMove(12,13,14);\n\n for(int i = 0; i < 5; i++){\n System.out.println(\" ===\" + i + \"===\");\n\n int[] cell = init(i);\n show(cell);\n\n System.out.println();\n }\n\n }", "public void movement()\n\t{\n\t\tballoonY = balloonY + speedBalloonY1;\n\t\tif(balloonY > 700)\n\t\t{\n\t\t\tballoonY = -50;\n\t\t\tballoonX = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon2Y = balloon2Y + speedBalloonY2;\n\t\tif(balloon2Y > 700)\n\t\t{\n\t\t\tballoon2Y = -50;\n\t\t\tballoon2X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon3Y = balloon3Y + speedBalloonY3;\n\t\tif(balloon3Y > 700)\n\t\t{\n\t\t\tballoon3Y = -50;\n\t\t\tballoon3X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon4Y = balloon4Y + speedBalloonY4;\n\t\tif(balloon4Y > 700)\n\t\t{\n\t\t\tballoon4Y = -50;\n\t\t\tballoon4X = (gen.nextInt(900)-75);\n\t\t}\n\t\t\n\t\tballoon5Y = balloon5Y + speedBalloonY5;\n\t\tif(balloon5Y > 700)\n\t\t{\n\t\t\tballoon5Y = -50;\n\t\t\tballoon5X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "public void Move(){\n for(int i = 0; i < moveList.length; i++){\n playerString = \"\";\n switch(moveList[i]) {\n case 1: {\n //TODO: Visited points to others\n System.out.println(\"Moving up!\");\n //Logic for fitness score might need to be moved\n if(!(game.mazeArray[game.playerPosition.getPlayerY() -1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() - 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 10;\n }\n game.moveUp();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 2: {\n System.out.println(\"Moving left!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() -1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() -1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveLeft();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 3: {\n System.out.println(\"Moving right!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() +1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() +1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveRight();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 4: {\n System.out.println(\"Moving down!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY() +1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n freedomPoints += 1;\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveDown();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n default: {\n System.out.println(\"End of line\");\n break;\n //You shouldn't be here mate.\n }\n }\n }\n\n }", "public LinkedList<Move> getPossibleMoves() {\n\t\tAIPossibleMoves.clear();\n\t\tint xOrigin = 0, yOrigin = 0, xMove1 = 0, xMove2 = 0, yMove1 = 0, yMove2 = 0;\n\t\tMove move = null;\t\n\t\t\tint type = 0;\n\t\t\tfor(Checker checker: model.whitePieces) {\n\t\t\t\t\n\t\t\t\txOrigin = checker.getCurrentXPosition();\n\t\t\t\tyOrigin = checker.getCurrentYPosition();\n\t\t\t\txMove1 = (checker.getCurrentXPosition() - 1);\n\t\t\t\txMove2 = (checker.getCurrentXPosition() + 1);\n\t\t\t\tyMove1 = (checker.getCurrentYPosition() - 1);\n\t\t\t\tyMove2 = (checker.getCurrentYPosition() + 1);\n\t\t\t\ttype = checker.getType();\n\t\t\t\tswitch(type) {\n\t\t\t\tcase 2:\n\n\t\t\t\t\tif((xMove1 < 0) || (yMove1 <0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t\t//System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t\t// System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t\t//Moving up and left isMovingRight,IsMovingDown\n\t\t\t\t\tif((xMove1 <0) || (yMove1 < 0)) {\n\t\t\t\t\t\t//continue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving up and right\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove1 < 0) || (yMove2 > 7)) {\n\t\t\t\t//\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving down and left isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove2, false, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove2, false, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove2 > 7)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t//moving down and right isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove2, true, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove2, true, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\n\t\t\treturn AIPossibleMoves;\n\t\t\t\n\t\t}", "public static int [] moveDecision (Species [][] map, int x , int y, int plantHealth) {\n \n // Directions: Up = 1, Down = 2, Left = 3, Right = 4\n // Last choice is random movement\n // Animals: sheep = 0, wolves = 1\n int [] directionChoice = new int [] {1 + (int)(Math.random() * 4), 1 + (int)(Math.random() * 4)};\n \n // Find any animals\n if ((map[y][x] != null) && (!(map[y][x] instanceof Plant))) {\n \n // Sheep decisions (sheep cannot decide whether or not to move away from wolves)\n if (map[y][x] instanceof Sheep) {\n \n // First choice is to eat\n if ((y > 0) && (map[y-1][x] instanceof Plant)) {\n directionChoice[0] = 1;\n } else if ((y < map[0].length - 2) && (map[y+1][x] instanceof Plant)) {\n directionChoice[0] = 2;\n } else if ((x > 0) &&(map[y][x-1] instanceof Plant)) {\n directionChoice[0] = 3;\n } else if ((x < map.length - 2) && (map[y][x+1] instanceof Plant)) {\n directionChoice[0] = 4;\n \n // Wolf decisions\n } else if (map[y][x] instanceof Wolf) {\n \n // First choice is to eat\n if ((y > 0) && (map[y-1][x] instanceof Sheep)) {\n directionChoice[1] = 1;\n } else if ((y < map[0].length - 2) && (map[y+1][x] instanceof Sheep)) {\n directionChoice[1] = 2;\n } else if ((x > 0) && (map[y][x-1] instanceof Sheep)) {\n directionChoice[1] = 3;\n } else if ((x < map.length - 2) && (map[y][x+1] instanceof Sheep)) {\n directionChoice[1] = 4;\n \n // Second choice is to fight a weaker wolf\n } else if ((y > 0) && (map[y-1][x] instanceof Wolf)) {\n directionChoice[1] = 1;\n } else if ((y < map[0].length - 2) && (map[y+1][x] instanceof Wolf)) {\n directionChoice[1] = 2;\n } else if ((x > 0) && (map[y][x-1] instanceof Wolf)) {\n directionChoice[1] = 3;\n } else if ((x < map.length - 2) && (map[y][x+1] instanceof Wolf)) {\n directionChoice[1] = 4;\n }\n }\n \n }\n }\n return directionChoice; // Return choice to allow animals to move\n }", "public void takeTurnsDebug() {\n boolean antFound = false;\n int gridPos = 0;\n while (antFound == false) {\n if (antGrid[gridPos] != null && antGrid[gridPos].getId() == 14) {\n antGrid[gridPos].moving = true;\n antFound = true;\n } else {\n gridPos++;\n }\n }\n \n takeTurn(antGrid[gridPos], gridPos);\n }", "private void wander(){\n\t\tmonster.moveRandom();\r\n\t\tsaveMove();\r\n\t}", "public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }", "public int[] move(){\n double inProb = Math.random();\n if (inProb < .25){\n y--;\n }\n else if (inProb < .5){\n y ++;\n }\n else if (inProb <.75){\n x--;\n }\n else {\n x++;\n }\n int[]loc = new int[2];\n loc[0] = x;\n loc[1] = y;\n \n return loc;\n }", "public void adjLocation(double l){this.PlayerLocation;}", "public void move() {\n\t\tsetHealth(getHealth() - 1);\n\t\t//status();\n\t\tint row = getPosition().getRow() ;\n\t\tint column = getPosition().getColumn();\n\t\tint randomInt = (int)((Math.random()*2) - 1);\n\t\t\n\t\tif(hunter == false && row < 33) {\n\t\t\tif(row == 32) {\n\t\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(row == 0) {\n\t\t\t\tgetPosition().setCoordinates(row + 1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 99) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column - 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 0) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column + 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t}\n\t\tif(hunter == false && row > 32) {\n\t\t\t//setHealth(100);\n\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\tsetPosition(getPosition()) ;\n\t\t}\n\t\telse {\n\t\t\tif(row < 65 && hunter == true) {\n\t\t\t\tgetPosition().setCoordinates(row + 1, column);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetPosition().setCoordinates(65, column);\n\t\t\t\tsetPosition(getPosition());\n\t\t\t\t//Check if there is a gazelle\n\t\t\t\tPair [][] range = {{Drawer.pairs[row+1][column-1],Drawer.pairs[row+1][column],\n\t\t\t\t\t\t\t Drawer.pairs[row+1][column+1]}, {\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column-1],\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column],Drawer.pairs[row+2][column+1]}};\n\t\t\t\t\n\t\t\t\tfor(Pair [] line: range) {\n\t\t\t\t\tfor(Pair prey: line) {\n\t\t\t\t\t\tif(prey.getAnimal() instanceof Gazelle ) {\n\t\t\t\t\t\t\tattack();\n\t\t\t\t\t\t\tprey.getAnimal().die();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static int[][] defensivePlayer(int[][] board, int player) {\r\n\t\t\r\n\t\tint [][] BasicMove = getAllBasicMoves (board,player);\r\n\t\tint [][] savedefensMove = new int [BasicMove.length][4]; /*arry had all the definding moves*/\r\n\t\tint[][] boardnow = new int [8][8];\r\n\t\tint numrandom = (int)((Math.random())*100);/*reciving varible random*/\r\n\t\tint sumdefensMove=0;/*varible that count defince moves*/\r\n\t\tint fromRow=0;\r\n\t\tint fromCol=0;\r\n\t\tint toRow=0;\r\n\t\tint toCol=0;\r\n\t\t\r\n\t\tif (canJump(board,player)){/*if ther jump choosed randomaly*/\r\n\t\t\tboard = randomPlayer(board,player);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//copieng the board \r\n\t\t\tfor (int line=0;line<8;line=line+1){\r\n\t\t\t\tfor (int column=0;column<8;column=column+1){\r\n\t\t\t\t\tboardnow [line][column] = board[line][column];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*running an all the posible moves */\r\n\t\t\tfor(int index=0;index<BasicMove.length;index=index+1){\r\n\t\t\t\tfromRow = BasicMove[index][0];\r\n\t\t\t\tfromCol = BasicMove[index][1];\r\n\t\t\t\ttoRow = BasicMove[index][2];\r\n\t\t\t\ttoCol = BasicMove[index][3];\r\n\t\t\t\tboard = playMove(board,player,fromRow,fromCol,toRow,toCol);\r\n\t\t\t\t/*if we can do eating in the next jump*/\r\n\t\t\t\tif (canJump(board,(player*(-1)))==false){\r\n\t\t\t\t\tsavedefensMove[sumdefensMove][0]=fromRow;\r\n\t\t\t\t\tsavedefensMove[sumdefensMove][1]=fromCol;\r\n\t\t\t\t\tsavedefensMove[sumdefensMove][2]=toRow;\r\n\t\t\t\t\tsavedefensMove[sumdefensMove][3]=toCol;\r\n\t\t\t\t\tsumdefensMove=sumdefensMove+1;\r\n\t\t\t\t}\r\n\t\t\t\t/*copieng the board*/\r\n\t\t\t\tfor (int line=0;line<8;line=line+1){\r\n\t\t\t\t\tfor (int column=0;column<8;column=column+1){\r\n\t\t\t\t\t\tboard[line][column] = boardnow[line][column];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*if there is posible defence move chose one randomaly */\r\n\t\t\tif (sumdefensMove>0){\r\n\t\t\t\tnumrandom = numrandom%sumdefensMove;\r\n\t\t\t\tfromRow = savedefensMove[numrandom][0];\r\n\t\t\t\tfromCol = savedefensMove[numrandom][1];\r\n\t\t\t\ttoRow = savedefensMove[numrandom][2];\r\n\t\t\t\ttoCol = savedefensMove[numrandom][3];\r\n\t\t\t\tboard=playMove(board,player,fromRow,fromCol,toRow,toCol);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse{/*if there is no posible defence move chose one randomaly*/\r\n\t\t\t\tboard=randomPlayer(boardnow,player);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\treturn board;\r\n\t}", "@Override\n public Collection<Move> calculateLegalMoves(Board board) {\n System.out.println(\"INSIDE Knight: calculateLegalMoves()\");\n System.out.println(\"------------------------------>\\n\");\n\n //ArrayList of moves used to store all possible legal moves.\n final List<Move> legalMoves = new ArrayList<>();\n\n //Iterate the constant class array of piece offsets.\n for(final int currentCandidate : CANDIDATE_MOVE_COORDS){\n //Add the current coordinate of the piece to each offset, storing as a destination coordinate.\n final int candidateDestinationCoord = this.piecePosition + currentCandidate;\n\n //If the destination coordinate is within legal board bounds (between 0 and 64)...\n if(BoardUtils.isValidCoord(candidateDestinationCoord)){\n //Check to see if the piece is in the first column and its destination would move it outside the board.\n if(isfirstColumnExclusion(this.piecePosition, currentCandidate) ||\n isSecondColumnExclusion(this.piecePosition, currentCandidate) ||\n isSeventhColumnExclusion(this.piecePosition, currentCandidate) ||\n isEighthColumnExclusion(this.piecePosition, currentCandidate)){\n continue; //Continue the loop if any of these methods return true\n }\n\n //Store the tile of the destination coordinate.\n final Tile candidateDestinationTile = board.getTile(candidateDestinationCoord);\n\n //If the tile is not marked as occupied by the Tile class...\n if(!candidateDestinationTile.isOccupied()){\n //Add the move to the list of legal moves as a non-attack move.\n legalMoves.add(new MajorMove(board, this, candidateDestinationCoord));\n }\n else{\n //Otherwise, get the type and alliance of the piece at the destination.\n final Piece pieceAtDestination = candidateDestinationTile.getPiece();\n final Alliance pieceAlliance = pieceAtDestination.getPieceAlliance();\n\n //If the piece at the occupied tile's alliance differs...\n if(this.pieceAlliance != pieceAlliance){\n //Add the move to the list of legal moves as an attack move.\n legalMoves.add(new MajorAttackMove(board, this, candidateDestinationCoord, pieceAtDestination));\n }\n }\n }\n }\n\n //Return the list of legal moves.\n return legalMoves;\n }", "public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}", "public Board createBoard(String inputFileName) {\nList<String> ants = new ArrayList<>();\n\nint rows = 0;\nrows = getMatrixSize(inputFileName);\n\nBoard b = new Board(rows, rows);\n\nants = findAnts(inputFileName);\nfor (int k = 0; k < ants.size(); k++) {\nString firstAnt = ants.get(k);\nString[] firstAntSplitted = firstAnt.split(\" \");\nString name = \"\";\nint posX = 0;\nint posY = 0;\n\nname = firstAntSplitted[2];\nposX = Integer.parseInt(firstAntSplitted[0]);\nposY = Integer.parseInt(firstAntSplitted[1]);\n\nAnt a = new Ant(name);\n\n\nb.placeAnt(posX, posY, a);\n}\nreturn b;\n}", "public void move() {\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].move();\n }\n }", "public int[] findMove(){\n int[] blackCheckerSpots = new int[12];\n int i =0;\n while(mCheckerBoard.indexOf(new Checker(1, false)) != -1){\n int startPosition = mCheckerBoard.indexOf(new Checker(1, false)); //need to override Checker equals method\n Checker current = mCheckerBoard.get(startPosition);\n int[] answer = jumpRight(startPosition, false, current);\n if(answer.length > 1)\n {\n //jumped right downwards\n return answer;\n }\n answer = jumpLeft(startPosition, false, current);\n if(answer.length > 1){\n //jumped left downwards\n return answer;\n }\n answer = moveDiagonalRight(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal right downwards\n return;\n }\n answer = moveDiagonalLeft(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal left downwards\n return;\n }\n\n //end of loop\n //these are the ones that need to be set back to black at the end\n current.setIsRed(true);\n blackCheckerSpots[i]=startPosition;\n i++;\n }\n\n for(int j =0; j<blackCheckerSpots.length; j++){\n Checker changed = mCheckerBoard.get(blackCheckerSpots[j]);\n changed.setIsRed(false);\n mCheckerBoard.set(blackCheckerSpots[j], changed);\n }\n\n }", "private void updateMoveList(Move m) {\n \t//first check for castling move\n \tif(m.getSource().getName().equals(\"King\")) {\n \tint sx = m.getSource().getLocation().getX();\n \tint dx = m.getDest().getLocation().getX();\n \t\n \t//castle king side\n \tif(dx - sx == 2) {\n \t\tmoveList.add(\"0-0\");\n \t\treturn;\n \t}\n \t//castle queen side\n \telse if(sx - dx == 2) {\n \t\tmoveList.add(\"0-0-0\");\n \t\treturn;\n \t}\n \t}\n \t\n \t//now do normal checks for moves\n \t//if no piece, normal notation\n \tif(m.getDest().getName().equals(\"None\")) {\n \t\t\n \t\t//check for en passant\n \t\tif(m.getSource().getName().equals(\"Pawn\")) {\n \t\t\t\n \t\t\t//it's only en passant if the pawn moves diagonally to an empty square \n \t\t\tif(m.getSource().getLocation().getX() != m.getDest().getLocation().getX()) {\n \t\t\t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tmoveList.add(m.getSource().getID() + m.getDest().getLocation().getNotation());\n \t}\n \t//add \"x\" for capturing\n \t//for pawn, it's a bit different\n \telse if(m.getSource().getName().equals(\"Pawn\")) {\n \t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t}\n \telse {\n \t\tmoveList.add(m.getSource().getID() + \"x\" + m.getDest().getLocation().getNotation());\n \t}\n }", "public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }", "private void getKingJumpPos(Point kingPoint, Orientation or, Movement m, JumpPosition jumpPosit,Color c, boolean b) throws CloneNotSupportedException {\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n Color oposite = c==Color.black?Color.red:Color.black;\n \n Point soldierPoint , nextPoint;\n for(OrientationMove orM:orientationMoveCombs){\n Point currentPoint = foo;\n for(int i=0;i<8;i++){\n if(i!=0) currentPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n if( !isValidSquare(currentPoint.x, currentPoint.y)) \n break;\n if( !isEmpty(new Soldier(currentPoint.x, currentPoint.y, Color.white), gamePieces)) \n break;\n //soldierPoint = getXandYgivenOrientation(currentPoint, or,m);\n\n soldierPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n nextPoint = getXandYgivenOrientation(soldierPoint, orM.or,orM.m);\n Soldier foe = new Soldier(soldierPoint.x, soldierPoint.y, oposite);\n if(isJumpable(soldierPoint, orM.or, orM.m, c , jumpPosit))\n addAllRelevantSquares(jumpPosit, foo, nextPoint, soldierPoint, orM.or, orM.m ,oposite );\n\n\n nextPoint = getXandYgivenOrientation(soldierPoint, or,m);\n if(!isEmpty(soldierPoint, gamePieces, jumpPosit.jumpPosition)\n &&!isEmpty(nextPoint, gamePieces, jumpPosit.jumpPosition)) break; \n }\n }\n \n \n \n //If it is, add it to the movement path\n// if(isJumpable(soldierPoint, or, m, c , jumpPositions)){ \n// addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n// }\n \n }", "private static void soldierCode() throws GameActionException {\n\t\tRobotInfo[] visibleEnemyArray = rc.senseHostileRobots(rc.getLocation(), 1000000);\n\t\tSignal[] incomingSignals = rc.emptySignalQueue();\n\t\tfor(Signal s:incomingSignals){\n\t\t\tint[] message = s.getMessage();\n\t\t\tif(s.getTeam()==rc.getTeam()){\n\t\t\t\tif(message!=null){\n\t\t\t\t\tif(message[0]%10==0){\n\t\t\t\t\t\tint x = message[1]/100000;\n\t\t\t\t\t\tint y = message[1]%100000;\n\t\t\t\t\t\tcenter= new MapLocation(x,y);\n\t\t\t\t\t\tint r = message[0]/10;\n\t\t\t\t\t\tradius=r;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint dist = rc.getLocation().distanceSquaredTo(center);\n\t\tif (visibleEnemyArray.length==0) {\n\t\t\tif (goal!=null&&(rc.senseRubble(goal)<100 || rc.senseRobotAtLocation(goal)!=null)) {\n\t\t\t\tgoal = null;\n\t\t\t\trc.setIndicatorString(0, \"done clearing\");\n\t\t\t}\t\n\t\t\tif(goal==null) {\n\t\t\t\tMapLocation[] locs = MapLocation.getAllMapLocationsWithinRadiusSq(rc.getLocation(), 8);\n\t\t\t\tArrayList<MapLocation> inside = new ArrayList<MapLocation>();\n\t\t\t\tfor(MapLocation loc: locs) {\n\t\t\t\t\tif (loc.distanceSquaredTo(center)<=1.5*radius) {\n\t\t\t\t\t\tinside.add(loc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(MapLocation l: inside) {\n\t\t\t\t\tif (rc.senseRubble(l)>99 && rc.senseRobotAtLocation(l)==null) {\n\t\t\t\t\t\tgoal = l;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tUtility.tryToMove(goal);\n\t\t\t}\n\t\t\t\n\t\t\tif (dist>radius && dist< 4*radius) { //Explore\n\t\t\t\tMapLocation travel = soldierFind();\n\t\t\t\tUtility.tryToMove(travel);\n\t\t\t}else{ //Move back\n\t\t\t\tMapLocation loc = center.add(center.directionTo(rc.getLocation()), (int)Math.pow(radius, 0.5)+1);\n\t\t\t\tUtility.tryToMove(loc);\n\t\t\t}\n\t\t} else { //Kite\n\t\t\tkite(visibleEnemyArray);\n\t\t}\n\t}", "private void enemyMove() {\n\t\tArrayList<EnemySprite> enemylist = this.model.getEnemy();\n\t\tfor(EnemySprite sp :enemylist) {\n\t\t\tif(sp instanceof NormalEnemySprite) {\n\t\t\t\t\n\t\t\t\t((NormalEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if(sp instanceof PatrollingEnemySprite) {\n\t\t\t\t\n\t\t\t\t((PatrollingEnemySprite) sp).move();\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\telse if (sp instanceof BigEnemySprite) {\n\t\t\t\t((BigEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof PatrollingBigEnemySprite) {\n\t\t\t\t((PatrollingBigEnemySprite) sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof CircleBigEnemySprite) {\n\t\t\t\t((CircleBigEnemySprite) sp).move();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t}", "private void moveRobots() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == Player.PlayerType.Robot) {\n\t\t\t\tPoint old = new Point(p.getX(), p.getY());\n\t\t\t\tPoint newPoint = new Point(p.getX(), p.getY());\n\t\t\t\t\n\t\t\t\toccupiedPositions.remove(old);\n\t\t\t\t\n\t\t\t\tint playerX = p.getPlayerToFollow().getX();\n\t\t\t\tint playerY = p.getPlayerToFollow().getY();\n\t\t\t\t\n\t\t\t\t//move towards the agent\n\t\t\t\tif(p.getX() < playerX)\n\t\t\t\t\tnewPoint.x += 1;\n\t\t\t\telse if(p.getX() > playerX)\n\t\t\t\t\tnewPoint.x -= 1;\n\t\t\t\t\n\t\t\t\tif(p.getY() < playerY)\n\t\t\t\t\tnewPoint.y += 1;\n\t\t\t\telse if(p.getY() > playerY)\n\t\t\t\t\tnewPoint.y -= 1;\n\t\t\t\t\n\t\t\t\tp.setPosition(newPoint);\n\t\t\t\t\n\t\t\t\t//check if the robot has moved on to something\n\t\t\t\tif(occupiedPositions.contains(newPoint)) { \t\t// check if the position is occupied\n\t\t\t\t\tfor(Player p2 : playerList) { \t\t\t\n\t\t\t\t\t\tif(!p.getName().equals(p2.getName())) {\t// check so it not is the robot itself\n\t\t\t\t\t\t\tif(newPoint.equals(p2.getPosition())) {\n\t\t\t\t\t\t\t\tif(p2.getType() == PlayerType.Robot) { // if it is a robot, both should be rubble\n\t\t\t\t\t\t\t\t\tp2.setType(PlayerType.Rubble);\n\t\t\t\t\t\t\t\t\tp2.getPlayerToFollow().decreaseRobotsFollowing();\n\t\t\t\t\t\t\t\t\tp.setType(PlayerType.Rubble);\n\t\t\t\t\t\t\t\t\tp.getPlayerToFollow().decreaseRobotsFollowing();\n\t\t\t\t\t\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.ChangedType, p.getName(), p2.getName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(p2.getType() == PlayerType.Rubble) { // if it is rubble\n\t\t\t\t\t\t\t\t\tp.setType(PlayerType.Rubble);\n\t\t\t\t\t\t\t\t\tp.getPlayerToFollow().decreaseRobotsFollowing();\n\t\t\t\t\t\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.ChangedType, p.getName(), p2.getName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if(p2.getType() == PlayerType.Agent) {\n\t\t\t\t\t\t\t\t\tString send = generateSendableHighscoreList();\n\t\t\t\t\t\t\t\t\tserver.sendMessageToClient(p2.getName(), \"@132@\" + highscore.size() + \"@\" + send);\n\t\t\t\t\t\t\t\t\tserver.addTextToLoggingWindow(\"Robot killed player (\" + p2.getName() + \")\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toccupiedPositions.add(newPoint);\n\t\t\t\tserver.broadcastToClient(p.getName(), SendSetting.PlayerMoved, old, newPoint);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t//send that it is agents turn again\n\t\tserver.broadcastToClient(null, SendSetting.AgentsTurnToMove, null, null);\n\t}", "void changepos(MouseEvent e, pieces chessPiece) \n { \n for(int beta : chessPiece.movnum)\n { \n if (chessPiece.color == 0 && e.getSource()== panel[beta-1 ]&& chessPiece.select == true && Checkerboard.allWhitePositions.contains(beta-1) == false)\n {\n if(this.getPiece(beta-1) != null)\n { \n getPiece(beta-1).alive = false;\n \n \n \n panel[beta-1].removeAll();/*getPiece(beta-1).position = 64;*/\n }\n chessPiece.position = beta-1;\n chessPiece.movnum.clear();\n chessPiece.mov.clear();\n chessPiece.select = false;\n chessPiece.timesMoved++;\n whiteToPlay = false;\n }\n else if (chessPiece.color == 1 && e.getSource()== panel[beta-1 ]&& chessPiece.select == true && Checkerboard.allBlackPositions.contains(beta-1) == false)\n {\n if(this.getPiece(beta-1) != null)\n { \n getPiece(beta-1).alive = false; \n panel[beta-1].removeAll();/*getPiece(beta-1).position = 64;*/}\n chessPiece.position = beta-1;\n chessPiece.movnum.clear();\n chessPiece.mov.clear();\n chessPiece.select = false;\n chessPiece.timesMoved++;\n whiteToPlay = true;\n }\n }//for ends\n \n }", "private static void GideonsMove() {\r\n\t\tPrint print = new Print();\r\n\t\tprint.board(game);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Prints the entire gameBoard.\r\n\t\t\r\n\t\tboolean flag = true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//true = Gideon's move | false = user's move\r\n\t\t\r\n\t\tArrayList<Integer> moves = MoveGenerator.Gen(flag, gamePieces);\t\t\t\t\t\t\t//returns all the legal moves possible to make by the player.\r\n\t\tPrint.moves(moves);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Prints all the moves returned by the Gen method.\r\n\t\t\r\n\t\t//System.out.println(\"\\n\\n Gideon will play......\" \r\n\t\t\t\t\t\t//+\"Feature coming soon, until then keep practicing\\n\");\r\n\t\t \r\n\t\tMiniMax minimax = new MiniMax(game, moves);\t\t\t\t\t\t\t\t\t\t\t\t//Declaring and initializing MiniMax object with parameters game and moves\r\n\r\n\t\tif(moves.size() < 6) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Will increment the MiniMax MAX_DEPTH size by 1 if the legal moves are less than 6\r\n\t\t\tminimax.incrementMAX_DEPTH();\r\n\t\t}\r\n\t\t\r\n\t\tlong start_time = System.nanoTime();\t\t\t\t\t\t\t\t\t\t\t\t\t//Time before starting MiniMax\r\n\t\t\r\n\t\tString gideonsMove = minimax.start();\t\t\t\t\t\t\t\t\t\t\t\t\t//Starting MiniMax\r\n\t\r\n\t\tdouble elapsed = System.nanoTime()-start_time;\t\t\t\t\t\t\t\t\t\t\t//Total time taken by MiniMax=Time after MiniMax is finished-Time before MiniMax was started\r\n\t elapsed=elapsed/1000000000;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Converting to seconds\r\n\t \r\n\t\tSystem.out.print(\"\\n\\n Gideon's move: \"+\r\n\t\t\t\tGideonsMoveConvertor.convert(gideonsMove)+\"\\n\\n\");\t\t\t\t\t\t\t\t//Changing GideonsMove to A1B2 format\r\n\t\t\r\n\t\tUpdateBoard boardUpdater = new UpdateBoard();\r\n\t\t\r\n\t\tgame = boardUpdater.playMove(gideonsMove, game, gamePieces, flag, false, true);\t\t\t//Executing the legal move on the gameBoard\r\n\t\tgamePieces = game.getGamePiecesArray();\t\t\t\t\t\t\t\t\t\t\t\t\t//Getting the updated copy of the Game Pieces Array\r\n\t\tgame.updateGameBoard();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Updating the String copy of the game board (required to print the updated gameBoard)\r\n\t\t\r\n\t\tSystem.out.println(\"Depth used for this iteration --> \"+minimax.getMAX_DEPTH());\t\t//Printing the MAX_DEPTH used by MiniMax to calculate the best move\r\n\t\tSystem.out.println(\"Time Taken for MiniMax --> \"+elapsed);\t\t\t\t\t\t\t\t//Printing time taken by MiniMax to calculate the best move\r\n\t\tSystem.out.println(\"\\n ========================\");\r\n\t\tplayersMove();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Player's turn to make a move\r\n\t\t\r\n\t}", "public void act(){\n\t\tTile[] possibleMoves = game.getAllNeighbours(currentPosition);\r\n\t\tTile targetTile = possibleMoves[rng.nextInt(4)];\r\n\t\tmove(targetTile);\r\n\t}", "public void movement2()\n\t{\n\t\tballoon6Y = balloon6Y + speedBalloonY1;\n\t\tif(balloon6Y > 700)\n\t\t{\n\t\t\tballoon6Y = -100;\n\t\t\tballoon6X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon7Y = balloon7Y + speedBalloonY2;\n\t\tif(balloon7Y > 700)\n\t\t{\n\t\t\tballoon7Y = -100;\n\t\t\tballoon7X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon8Y = balloon8Y + speedBalloonY3;\n\t\tif(balloon8Y > 700)\n\t\t{\n\t\t\tballoon8Y = -100;\n\t\t\tballoon8X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon9Y = balloon9Y + speedBalloonY4;\n\t\tif(balloon9Y > 700)\n\t\t{\n\t\t\tballoon9Y = -100;\n\t\t\tballoon9X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon10Y = balloon10Y + speedBalloonY5;\n\t\tif(balloon10Y > 700)\n\t\t{\n\t\t\tballoon10Y = -100;\n\t\t\tballoon10X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "private void capture(Board board, List<Move> moves) {\n int x = location.x;\n int y = location.y;\n \n Piece pc;\n Point pt;\n int move;\n \n if (color == Color.White)\n move = -1;\n else\n move = 1;\n \n pt = new Point(x - 1, y + move);\n if (board.validLocation(pt)) {\n pc = board.getPieceAt(pt); \n if (pc != null)\n if(this.color != pc.getColor())\n moves.add(new Move(this, pt, pc)); \n }\n pt = new Point(x + 1, y + move);\n if (board.validLocation(pt)) {\n pc = board.getPieceAt(pt); \n if (pc != null)\n if(this.color != pc.getColor())\n moves.add(new Move(this, pt, pc)); \n }\n }", "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }", "public void moverPlataformas(){\n\t\tfor ( int x=0 ; x < 2; x++){\n\t\t\tquitarPoder(x);\n\t\t\tgame.moverPersonaje(x);\n\t\t}\n\t}", "public void run() {\n if(_dest!=null) {\n approachDest();\n return;\n }\n if(Rand.d100(_frequency)) {\n MSpace m = in.b.getEnvironment().getMSpace();\n if(!m.isOccupied()) {\n Logger.global.severe(in.b+\" has come unstuck\");\n return;\n }\n MSpace[] sur = m.surrounding();\n int i = Rand.om.nextInt(sur.length);\n for(int j=0;j<sur.length;j++) {\n if(sur[i]!=null&&sur[i].isWalkable()&&accept(sur[i])) {\n in.b.getEnvironment().face(sur[i]);\n MSpace sp = in.b.getEnvironment().getMSpace().move(in.b.getEnvironment().getFacing());\n if(sp!=null&&(in.b.isBlind()||!sp.isOccupied())) {\n _move.setBot(in.b);\n _move.perform();\n }\n break;\n }\n if(++i==sur.length) {\n i = 0;\n }\n }\n }\n else if(_dest==null&&Rand.d100(_travel)) {\n _dest = findNewSpace();\n //System.err.println(in.b+\" DEST: \"+_dest);\n }\n }", "private String easyMove() {\n int randomHole = evaluate();\n while (!isValidMove(randomHole)) {\n randomHole = evaluate();\n }\n\n return super.makeAMove(randomHole);\n }", "private void busquets() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -25;\n\t\tint yInit = -10;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit *selfPerception.getSide().value());\n\t\t\n\t\twhile (commander.isActive()) {\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\tstate = State.ATTACKING;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\t//if(closer)\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void AIMakeMove() {\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint index = randomizer.nextInt(AIPossibleMoves.size());\n\t\tMove move = AIPossibleMoves.get(index);\n\t\tChecker checker = model.findChecker(move.getxOrigin(), move.getyOrigin());\n\t\tint xChange = (move.getxOrigin() - move.getxMove());\n\t\tint yChange = (move.getyOrigin() - move.getyMove());\n\t\t\n\t\tint xMoveNew = 0;\n\t\tint yMoveNew = 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(board.getBoard()[move.getyMove()][move.getxMove()] == 0) {\n\t\t\t//do nothing\n\t\t} else {\n\t\t\t//moving down\n\t\t\tif(yChange < 0) {\n\t\t\t\t//moving right\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//moving left\n\t\t\t\t\t\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//moving up\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\t//moving right\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t} else {\n\t\t\t\t\t//moving left \n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println(\"New Move is: \" + xMoveNew + \",\" + yMoveNew);\n\t\tif(canBeKing(checker, move)) {\n\t\t\tchecker = convertToKing(checker, move);\n\t\t\tmodel.updateChecker(move, checker, 2);\n\t\t\t\n\t\t\tprintBoard();\n\t\t\tmodel.moves.add(move);\n\t\t\treturn;\n\t\t}\n\t\tmodel.updateChecker(move, checker, 2);\n\t//\tSystem.out.println(\"AI - DEBUGGING\");\n\t//\tSystem.out.println(\"Origin Piece: \" + move.getxOrigin() + \",\" + move.getyOrigin());\n\t//\tSystem.out.println(\"Move Position: \" + move.getxMove() + \",\" + move.getyMove());\n\t\tupdateBoard(move);\n\t\tmodel.moves.add(move);\n\t\tprintBoard();\n\t\t\n\t}", "public synchronized void fullGamePath (Pacman pac, Fruit fru,int Index) { //this function take the path of every pacman and move the pucman to every fruit on uts path.\n\t\tdouble x,y,z; \n\t\tMyCoords coords=new MyCoords();\n\t\tdouble runTime=pac.getPath().get(Index).getRunTime(); //runTime\n\t\tdouble dist=coords.distance3d(pac.getPoint(),fru.getPoint()); //distance between the pacman and each fruit.\n\t\tPoint3D midvec=coords.vector3D(pac.getPoint(),fru.getPoint()); //the vector between pacman and fruit.\n\t\tif(runTime>0) { //check if the runTime is valid. \n\t\t\tx=midvec.x()/runTime; //Divide the vector lat, lon, and alt distance by the runTime to make a new distance unit.\n\t\t\ty=midvec.y()/runTime; \n\t\t\tz=midvec.z()/runTime; \n\t\t\twhile(dist>=pac.getRadius()) { //check if the distance is still bigger then the radius.\n\t\t\t\tmidvec=new Point3D(x,y,z); //this new vector is the pacman next step on the way to the fruit.\n\t\t\t\tpac.setPoint(coords.add(pac.getPoint(), midvec)); //we move the pacman to the vector coords after convert its to a GPS point.\n\t\t\t\tdist=coords.distance3d(pac.getPoint(), fru.getPoint()); //take the new distance\n\t\t\t\trunTime=dist/pac.getSpeed();//runtime -1 because we just make progress by one 1 second\n\t\t\t\tmidvec=coords.vector3D(pac.getPoint(), fru.getPoint()); //make new vector\n\t\t\t\tx=midvec.x()/runTime; //Divide the vector lat, lon, and alt distance by the runTime to make a new distance unit.\n\t\t\t\ty=midvec.y()/runTime;\n\t\t\t\tz=midvec.z()/runTime;\t\t\t\t\n\t\t\t\tMF.repaint();\n\t\t\t\trunTime--;\n\t\t\ttry {TimeUnit.MILLISECONDS.sleep(50);} \n\t\t\tcatch (InterruptedException e) {e.printStackTrace();}\n\t\t\t}\n\t\t}\n\t\tpac.addScore(pac.getPath().get(Index).getFruit().getWeight()); //the pacman arrived to the fruit and update its score\n\t}", "public int[][] Move(/*int []Start, int[]End, */Board B) {\r\n \tif(this.Status[1]=='X'||this.Position[0]<0||this.Position[1]<0) {\r\n \tSystem.out.println(\"This piece is eliminated, cannot move\");\r\n \treturn null;\t\r\n \t}\r\n \t/*\r\n \tif(this.Status[1]=='C'&&this.CMovesets==null) {\r\n \tSystem.out.println(\"This piece cannot save king in check, cannot move\");\r\n \treturn null;\t\r\n \t}\r\n \t*/\r\n \t/*\r\n \tif(Start==null||End==null) {\r\n \t\t\r\n \t\tSystem.out.println(\"Null Start or End Positions\");\r\n \t\t\r\n \t\treturn null;\r\n \t}\r\n \tif(Start.length!=2||End.length!=2) {\r\n \t\t\r\n \t\tSystem.out.println(\"Start or End Positions invalid size\");\r\n \t\t\r\n \t\treturn null;\r\n \t\t\r\n \t}\r\n \tif(Start[0]!=this.Position[0]||Start[1]!=this.Position[1]) {\r\n \t\tSystem.out.println(\"ERROR, Piece Not Synchronized with where it should be\");\r\n \t\tSystem.exit(-1);\r\n \t}\r\n \t*/\r\n \t\r\n \t///////////////////////////\r\n \tint [][]PathSeq = isAnyPath(/*Start,End,*/B);\r\n \t\r\n \tif(PathSeq==null) {\r\n \t\tSystem.out.println(\"No Path sequences possible for this piece\");\r\n \t//////////////////////////\r\n \t\t// IF PIECE IS KING, CHECK IF NO MOVES AVAILABLE to destroy enemy, \r\n \t\t//block enemy, or if king is only piece left, MOVE king, Then Checkmate!\r\n \t\r\n \t//////////////////////////\r\n \treturn null;\r\n \t}\r\n \t\r\n \t/*\r\n \tScanner reader = new Scanner(System.in);\r\n \tboolean ValidIn=false;\r\n \twhile(!ValidIn) {\r\n \t\tSystem.out.println(\"Enter Path seq to be taken\");\r\n \t\t\r\n \t\t\r\n \t}\r\n \t*/\r\n \treturn PathSeq;\r\n }", "public static void main(String[] args) {\n Elevator theElevator = new Elevator();\n\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(3);\n\n System.out.println(theElevator);\n\n for(int i=1;i<21;i++){\n theElevator.move();\n }\n \n\n \n\n }", "public int[] move(int num, boolean pr){\n int[]loc = new int[2];\n if(pr = false){\n loc = this.move(num);\n }\n else{\n for(int c= 0; c<num; c++){\n loc = this.move();\n System.out.println(\"Step \" + (c+1) + \", (\" + x + \", \" + y + \")\");\n }\n \n }\n return loc;\n }", "public Location computerMove()\n\t{\n\t\tArrayList<Location> possibleLocs = new ArrayList<Location>();\n\t\tfor (int row = 0; row < grid.length; row++)\n\t\t{\n\t\t\tfor (int col = 0; col < grid[0].length; col++)\n\t\t\t{\n\t\t\t\tLocation temp = new Location(row, col);\n\t\t\t\tif (!isOccupied(temp))\n\t\t\t\t\tpossibleLocs.add(temp);\n\t\t\t}\n\t\t}\n\t\tfor (int count = 0; count < possibleLocs.size(); count++)\n\t\t{\n\t\t\tif (checkWin(1, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t\telse if (checkWin(0, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t}\n\t\treturn possibleLocs.get((int) (Math.random() * possibleLocs.size()));\n\t}", "public void move(){\n\t\t\n\t}", "protected void wander() {\n\t\tfor(int i=3;i>0;){\n\t\t\tfindChest();\n\t\t\tint num = ((int) (Math.random()*100)) % 4;\n\t\t\tswitch (num+1){\n\t\t\t\tcase 1 :\n\t\t\t\t\tif(!(character.xOfFighter-1==game.getXofplayer()&&character.yOfFighter==game.getYofplayer())\n\t\t\t\t\t\t\t&&game.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter-1,character.yOfFighter)){\n\t\t\t\t\t\tcharacter.xOfFighter = character.xOfFighter-1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tif(!(character.xOfFighter==game.getXofplayer()&&character.yOfFighter-1==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter,character.yOfFighter-1)){\n\t\t\t\t\t\tcharacter.yOfFighter = character.yOfFighter-1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tif(!(character.xOfFighter+1==game.getXofplayer()&&character.yOfFighter==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter+1,character.yOfFighter)){\n\t\t\t\t\t\tcharacter.xOfFighter = character.xOfFighter+1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\t\tif(!(character.xOfFighter==game.getXofplayer()&&character.yOfFighter+1==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter,character.yOfFighter+1)){\n\t\t\t\t\t\tcharacter.yOfFighter = character.yOfFighter+1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfindChest();\n\t}", "public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}", "private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "public void backTrack (){\n LinkedList<Integer> v = new LinkedList<> (); //Lista de vecinos.\n boolean mover = false;\n int r = 0;\n while (!mover && v.size () < 4){\n r = rnd.nextInt (4);\n\t\t//Hay un vecino disponible.\n\t\t//Nos podemos mover.\n if (vecinoDisponible (r))\n\t\t mover = true;\n if (!v.contains (r))\n v.add (r);\n\t }\n\t if (mover){\n\t\t//Nos movemos a la siguiente dirección.\n\t\ttumbaMuros (r);\n\t\tmoverLaberinto (r);\n\t }else if (!p.empty ()){\n\t\t//Nos movemos a la celda previa\n\t\t//pues no hay vecnos a los que movernos\n\t\tCelda a = p.pop ();\n\t\tt.posY = a.celdaY;\n\t\tt.posX = a.celdaX; \n\t }\n \n terminado = p.isEmpty();\n\t}", "public int[] D2(Board B,int dist,boolean IgnoreAll,int []NPos) {\r\n \t//>\r\n \tSystem.out.println(\"Traverse UP RIGHT\");\r\n \tchar[][]Board = B.BoardC;\r\n \t\r\n \tint D = dist;\r\n \t\r\n \t//{[Start,End],....[Startn,Endn]}\r\n \tint [] All = new int[18];\r\n \tInitNeg(All);\r\n \t\r\n \t\r\n \tint[] Pos = null;\r\n \tif(NPos==null) {\r\n \tPos = this.Position.clone();\r\n \t}\r\n \telse {\r\n \t\tPos = NPos;\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"START:[%d,%d]\\n\", Pos[0],Pos[1]);\r\n\t\t\r\n \tint i=Pos[0];\r\n \tint j=Pos[1];\r\n\t\t\r\n\t\tif(dist<=0) {\r\n \t\t//No Limits on distance to traverse direction UP\r\n \t D = dist = 9;\r\n \t //All = new int[9];\r\n \t}\r\n \t\r\n \t//Get off of current piece position\r\n \t\r\n \tboolean Traversable = false;\r\n \tboolean EnemyFound = false;\r\n \t\r\n \tint AllPos = 0;\r\n \t\r\n \t\r\n \tfor(i=Pos[0]-1,j=Pos[1]+1;i>=0&&j<8&&dist>0;i--,j++,dist--) {\r\n\t\t\t//Change in Row UP RIGHT\r\n \t\tPlayer P = B.GetPlayer(i, j);\r\n\t\t\tif(P!=null&&!IgnoreAll) {\r\n\t\t\tif(Board[i][j]!='0') {\r\n\t\t\t\t//Either your piece or their piece, check if their piece\r\n\t\t\t\t\r\n\t\t\t\tif(P.Player==super.Player) {\r\n\t\t\t\t\t//Found your own piece, blocked, backtrace\r\n\t\t\t\t\tSystem.out.printf(\"Found YOUR Piece at:[%d,%d], backtracing prev\",i,j);\r\n\t\t\t\t\t//i++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t//Found enemy piece!\r\n\t\t\t\t\tTraversable = true;\r\n\t\t\t\t\tEnemyFound = true;\r\n\t\t\t\t\tSystem.out.printf(\"Found Enemy Piece at:[%d,%d]\\n\",i,j);\r\n\t\t\t\t\tAll[AllPos] = i;\r\n\t\t\t\t\tAll[AllPos+1] = j;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tAll[AllPos]=i;\r\n\t\t\t\tAll[AllPos+1]=j;\r\n\t\t\t\tAllPos = AllPos+2;\r\n\t\t\t\t\r\n\t\t\t\tTraversable = true;\r\n\t\t\t\tSystem.out.printf(\"Found Empty Position:[%d,%d]\\n\",i,j);\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n \tif(Traversable) {\r\n \t\tif(!EnemyFound) {\r\n \t\t\tAllPos=AllPos-2;\r\n \t\t\tSystem.out.printf(\"\\nCan Move > Before [%d,%d] %s times\\n\",i,j,D==9? \"UnFixed Traversal\":Integer.toString((AllPos+2)/2)); \r\n \t\t}\r\n \t\telse {\r\n \t\t\tSystem.out.printf(\"\\nCan Move > Before or ATTACK ENEMY @ [%d,%d] %s times\\n\",i,j,D==9? \"UnFixed Traversal\":Integer.toString((AllPos+2)/2)); \r\n \t\t}\r\n \t\t}\r\n \telse {\r\n \t\tSystem.out.printf(\"\\nCan Move > Before [%d,%d] 0 times\\n\",i,j); \r\n \t}\r\n \t\r\n \tSystem.out.printf(\"All Positions > for Piece:%c\",this.type);\r\n \tPrintAll(All,AllPos);\r\n \tSystem.out.println();\r\n\t\t\r\n \tif(All[0] == 0 && All[1] == 0 && All[2] == 0 && All[3] == 0 ) {\r\n \t\t\r\n \t\tAll=null;\r\n \t}\r\n \t\r\n \tif(this.type=='p') {\r\n \t\tif(!EnemyFound) {\r\n \t\t\t//No Enemy Found from pawn, CANT GO DIAGONAL\r\n \t\t\tSystem.out.printf(\"\\nNo Enemy Found for PAWN at Pos [%d,%d]\\n\",Pos[0],Pos[1]);\r\n \t\t\tAll=null;\r\n \t\t}\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \t\r\n \treturn All;\r\n }", "FloodItWorld() {\r\n this.board = new ArrayList<ACell>();\r\n this.currTurn = 0;\r\n this.maxTurn = Cnst.maxTurns;\r\n this.rand = new Random();\r\n this.loc = new ArrayList<Color>();\r\n this.blocks = Cnst.blocks;\r\n this.colors = Cnst.numOfColors;\r\n this.worklist = new ArrayList<ACell>();\r\n }", "public ArrayList<PentagoGame> nextPossibleMoves() {\n ArrayList<PentagoGame> children = new ArrayList<>();\n for(int i = 0; i < 6; i++) { // for each row I can place a piece\n for(int j = 0; j < 6; j++) { // for each column\n for(int k = 0; k < 4; k++ ) { // for each board to rotate\n for(int d = 0; d < 2; d ++) {// for each direction to rotate\n boolean leftRotate = false;\n if(d == 0) {\n leftRotate = true;\n }\n Move move = new Move(i, j, k, leftRotate);\n if(validMove(whosTurn(), move)) {\n PentagoGame tempGame = new PentagoGame(this);\n tempGame.playPiece(whosTurn(), move);\n tempGame.rotateBoard(whosTurn(), move);\n tempGame.turnOver();\n move.setGameState(tempGame);\n move.setUtility(calulateUtility(move));\n // todo\n children.add(tempGame);\n }\n }\n }\n }\n }\n\n return children;\n }", "public void makeMove(Location loc)\n {\n \tLocation curLoc = getLocation();\n \tint curDirection = getDirection();\n // get 2 left locations\n\t\tLocation leftNeighborLoc = curLoc.getAdjacentLocation(curDirection + Location.LEFT);\n Location leftNextNeighborLoc = leftNeighborLoc.getAdjacentLocation(curDirection + Location.LEFT);\n // get 2 right locations\n Location rightNeighborLoc = curLoc.getAdjacentLocation(curDirection + Location.RIGHT);\n Location rightNextNeighborLoc = rightNeighborLoc.getAdjacentLocation(curDirection + Location.RIGHT);\n // initial a null\n Actor leftNeighborActor = null;\n Actor leftNextNeighborActor = null;\n Actor rightNeighborActor = null;\n Actor rightNextNeighborActor = null;\n\n boolean isLeftValid = false;\n boolean isRightValid = false;\n\n Grid<Actor> grid = getGrid();\n // if left valid\n if (grid.isValid(leftNeighborLoc) && grid.isValid(leftNextNeighborLoc))\n {\n \tleftNeighborActor = grid.get(leftNeighborLoc);\n \tleftNextNeighborActor = grid.get(leftNextNeighborLoc);\n \t\n \tif (leftNeighborActor == null && leftNextNeighborActor == null) {\n \t\tisLeftValid = true;\n }\n }\n // if right valid\n if (grid.isValid(rightNeighborLoc) && grid.isValid(rightNextNeighborLoc))\n {\n \trightNeighborActor = grid.get(rightNeighborLoc);\n \trightNextNeighborActor = grid.get(rightNextNeighborLoc);\n\n \tif (rightNeighborActor == null && leftNextNeighborActor == null) {\n \t\tisRightValid = true;\n }\n }\n // if both valid\n if (isLeftValid && isRightValid)\n {\n\t // move ramdonly\n if (Math.random() < 0.5)\n\t {\n\t \tmoveTo(leftNextNeighborLoc);\n\t \n\t }\n\t else{\n\t \tmoveTo(rightNextNeighborLoc);\n\t }\n }\n // right valid only\n else if (isRightValid && !isLeftValid)\n {\n \tmoveTo(rightNextNeighborLoc);\n }\n // left valid only\n else if (!isRightValid && isLeftValid)\n {\n \tmoveTo(leftNextNeighborLoc);\n }\n else\n {\n \tsuper.makeMove(loc);\n }\n \n }", "private void advance(Board board, List<Move> moves) {\n int x = location.x;\n int y = location.y;\n \n Piece pc;\n Point pt;\n int move;\n \n if (color == Color.White)\n move = -1;\n else\n move = 1;\n \n pt = new Point(x, y + move);\n if (board.validLocation(pt)) {\n pc = board.getPieceAt(pt); \n if(pc == null) {\n moves.add(new Move(this, pt, pc)); \n \n pt = new Point(x, y + move * 2);\n if (board.validLocation(pt)) {\n pc = board.getPieceAt(pt);\n if(pc == null && numMoves == 0)\n moves.add(new Move(this, pt, pc));\n }\n } \n }\n }", "public MovePattern(ChessPiece owner){\n\t\tthis.owner= owner;\n\t\tcommandSequences = new ArrayList< MoveSequence>();\n\t\tdependentSpaces= new Stack<ChessSpace>();\n\t\tif(owner != null)\n\t\t\towner.addMoves(this);\n\t}", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "abstract public int[] makeMove();", "public MahjongSolitaireMove findMove()\n {\n // MAKE A MOVE TO FILL IN \n MahjongSolitaireMove move = new MahjongSolitaireMove();\n\n // GO THROUGH THE ENTIRE GRID TO FIND A MATCH BETWEEN AVAILABLE TILES\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[i][j];\n if (stack1.size() > 0)\n {\n // GET THE FIRST TILE\n MahjongSolitaireTile testTile1 = stack1.get(stack1.size()-1);\n for (int k = 0; k < gridColumns; k++)\n {\n for (int l = 0; l < gridRows; l++)\n {\n if (!((i == k) && (j == l)))\n { \n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[k][l];\n if (stack2.size() > 0) \n {\n // AND TEST IT AGAINST THE SECOND TILE\n MahjongSolitaireTile testTile2 = stack2.get(stack2.size()-1);\n \n // DO THEY MATCH\n if (testTile1.match(testTile2))\n {\n // YES, FILL IN THE MOVE AND RETURN IT\n move.col1 = i;\n move.row1 = j;\n move.col2 = k;\n move.row2 = l;\n return move;\n }\n }\n }\n }\n }\n }\n }\n }\n // WE'VE SEARCHED THE ENTIRE GRID AND THERE\n // ARE NO POSSIBLE MOVES REMAINING\n return null;\n }", "private void validPlayerMove(char moveType) {\n\n\t\t//Obtain X and Y of playerLocation\n\t\tint x = getPlayerLocation()[0];\n\t\tint y = getPlayerLocation()[1];\n\n\t\t//By default, set xOffset and yOffset to 0\n\t\tint xOffset = 0;\n\t\tint yOffset = 0;\n\n\t\t//Change xOffset and yOffset corresponding to each moveType\n\t\t//For example, RIGHT would set xOffset to +1\n\t\tswitch(moveType) {\n\t\tcase Legend.UP: \n\t\t\tyOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.UP_LEFT:\n\t\t\tyOffset = -1;\n\t\t\txOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.UP_RIGHT:\n\t\t\tyOffset = -1;\n\t\t\txOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.DOWN:\n\t\t\tyOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.DOWN_RIGHT:\n\t\t\tyOffset = 1;\n\t\t\txOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.DOWN_LEFT:\n\t\t\tyOffset = 1;\n\t\t\txOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.LEFT:\n\t\t\txOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.RIGHT:\n\t\t\txOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.JUMP:\n\n\t\t\t//Generate a random location of the jump\n\t\t\twhile (true) {\n\n\t\t\t\t//random x and y values (between 0-10)\n\t\t\t\tint randomX = 1+(int)(Math.random()*10);\n\t\t\t\tint randomY = 1+(int)(Math.random()*10);\n\n\t\t\t\t//If the new location is a BlankSpace, assign that as a Player, and assign a new move in moveList\n\t\t\t\tif(map[randomX][randomY] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[randomX][randomY] = new Player(x, y, board);\n\t\t\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\t\t\tmoveList[x][y] = moveType;\n\t\t\t\t\tmap[x][y].setJumpLocation(randomX, randomY);\n\t\t\t\t\tsetNewPlayerLocation(new int[] {randomX, randomY});\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\n\t\t\t\t//If the new location is a Mho, completely wipe the board of the player, and initiate a gameOver procedure\n\t\t\t\telse if(map[randomX][randomY] instanceof Mho) {\n\t\t\t\t\tnewMap[randomX][randomY] = new Mho(x, y, board);\n\t\t\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\t\t\tmoveList[x][y] = moveType;\n\t\t\t\t\tmap[x][y].setJumpLocation(randomX, randomY);\n\t\t\t\t\tsetNewPlayerLocation(new int[] {randomX, randomY});\n\t\t\t\t\tgameOver();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t//If the new location that the Player will move to will be a Player (in the case of Legend.SHRINK), or BlankSpace, change map and newMap, as well as moveList and the playerLocation \n\t\tif (map[x+xOffset][y+yOffset] instanceof BlankSpace || map[x+xOffset][y+yOffset] instanceof Player) {\n\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\tnewMap[x+xOffset][y+yOffset] = new Player(x+xOffset, y+yOffset, board);\n\t\t\tmoveList[x][y] = moveType;\n\t\t\tsetNewPlayerLocation(new int[] {x+xOffset, y+yOffset});\n\t\t\treturn;\n\t\t} \n\n\t\t//If the new location that the Player will move to will be a Fence, remove the player from the map and initiate the gameOver() process\n\t\telse {\n\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\tmoveList[x][y] = Legend.SHRINK;\n\t\t\tsetNewPlayerLocation(new int[] {x, y});\n\t\t\tgameOver();\n\t\t\treturn;\n\t\t}\n\n\t}", "static List<Move> generateLegalMoves(Position pos) {\n\t\tList<Move> moves = new ArrayList<>();\n\n\t\t// for (int square : pos.pieces) {\n\t\t// \tif (pos.pieces.size() > 32) {\n\t\t// \t\tSystem.out.println(\"problem\" + pos.pieces.size());\n\t\t// \t}\n\t\t// \tif (pos.at(square) != 0 && Piece.isColor(pos.at(square), pos.toMove)) {\n\t\t// \t\tint piece = pos.at(square);\n\t\t// \t\tint name = Piece.name(piece);\n\t\t// \t\tif (name == Piece.Pawn) {\n\t\t// \t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t// \t\t\tif (square + step >= 0 && square + step < 64) {\n\t\t// \t\t\t\t// 1 square\n\t\t// \t\t\t\tif (pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'q'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'b'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'n'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'r'));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step));\n\t\t// \t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// 2 squares\n\t\t// \t\t\t\tif ((square < 16 && pos.toMove == 'w') || square > 47 && pos.toMove == 'b') {\n\t\t// \t\t\t\t\tif (pos.board.squares[square + 2*step] == 0 && pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + 2*step));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t\t// capture\n\t\t// \t\t\t\t// right\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][3] > 0) {\n\t\t// \t\t\t\t\tint target = square + step + 1;\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t\telse {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t} \n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// left\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][2] > 0) {\n\t\t// \t\t\t\t\tint target = square + step - 1;\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t\telse {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\tfor (int offset : MoveData.KnightOffsets.get(square)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\tif (!Piece.isColor(pos.board.squares[square + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tMove move = new Move(square, square + offset);\n\t\t// \t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse {\n\t\t// \t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t// \t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t// \t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t// \t\t\t\tint maxDist = MoveData.DistanceToEdge[square][dir];\n\t\t// \t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\n\t\t// \t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t// \t\t\t\t\tint squareIdx = square + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, squareIdx));\n\t\t// \t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\t\t\t\t\t\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }\n\n\t\tfor (int i = 0; i < 64; i++) {\n\t\t\tif (pos.board.squares[i] != 0 && Piece.isColor(pos.board.squares[i], pos.toMove)) {\n\t\t\t\tint piece = pos.board.squares[i];\n\t\t\t\tint name = Piece.name(piece);\n\t\t\t\tif (name == Piece.Pawn) {\n\t\t\t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t\t\t\tif (i + step >= 0 && i + step < 64) {\n\t\t\t\t\t\t// 1 square\n\t\t\t\t\t\tif (pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'q'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'b'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'n'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'r'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step));\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2 squares\n\t\t\t\t\t\tif ((i < 16 && pos.toMove == 'w') || i > 47 && pos.toMove == 'b') {\n\t\t\t\t\t\t\tif (pos.board.squares[i + 2*step] == 0 && pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + 2*step));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// capture\n\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][3] > 0) {\n\t\t\t\t\t\t\tint target = i + step + 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// left\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][2] > 0) {\n\t\t\t\t\t\t\tint target = i + step - 1;\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tfor (int offset : MoveData.KnightOffsets.get(i)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[i + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMove move = new Move(i, i + offset);\n\t\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t\t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t\t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t\t\t\t\tint maxDist = MoveData.DistanceToEdge[i][dir];\n\t\t\t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\t\t\t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t\t\t\t\t\tint squareIdx = i + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, squareIdx));\n\t\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// castling\t\t\n\t\tif (pos.toMove == 'w' && !underAttack(pos, pos.whiteKing, 'b')) {\t\t\t\n\t\t\tif (pos.castlingRights.whiteKingSide && pos.at(Board.H1) == (Piece.Rook | Piece.White)) {\n\t\t\t\tif (pos.at(Board.F1) == Piece.Empty && pos.at(Board.G1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F1, 'b') && !underAttack(pos, Board.G1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.G1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif (pos.castlingRights.whiteQueenSide && pos.at(Board.A1) == (Piece.Rook | Piece.White)) {\t\t\t\t\n\t\t\t\tif (pos.at(Board.B1) == Piece.Empty && pos.at(Board.C1) == Piece.Empty && pos.at(Board.D1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D1, 'b') && !underAttack(pos, Board.C1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.C1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse if (pos.toMove == 'b' && !underAttack(pos, pos.blackKing, 'w')){\n\t\t\tif (pos.castlingRights.blackKingSide && pos.at(Board.H8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.F8) == Piece.Empty && pos.at(Board.G8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F8, 'w') && !underAttack(pos, Board.G8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.G8));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pos.castlingRights.blackQueenSide && pos.at(Board.A8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.B8) == Piece.Empty && pos.at(Board.C8) == Piece.Empty && pos.at(Board.D8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D8, 'w') && !underAttack(pos, Board.C8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.C8));\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filter illegal moves\n\t\tList<Move> legalMoves = new ArrayList<>();\n\t\tchar color = pos.toMove;\n\t\tfor (Move move : moves) {\n\t\t\tpos.makeMove(move);\n\t\t\tif (!kingInCheck(pos, color)) {\n\t\t\t\tlegalMoves.add(move);\n\t\t\t}\t\t\t\n\t\t\tpos.undoMove();\n\t\t}\n\n\t\treturn legalMoves;\n\t}", "public void trackAndFire() {\n \t \tdouble theta;\n double distanciaObjetivo = myPos.distance(objetivo.pos);\n //Hallar el proximo punto en un perímetro definido\n \t\t//(30,30) elimina bordes y despues el -60 para la longitud de los dados\n Rectangle2D.Double perimetro = new Rectangle2D.Double(30, 30, getBattleFieldWidth() - 60, getBattleFieldHeight() - 60);\n \n \n \n //if my cannon is locked and ready and i got some energy left fire with\n //appropiate energy to not get stuck, fire in the execute rather than now\n \n if(getGunTurnRemaining() == 0 && myEnergy > 1) {\n setFire( Math.min(Math.min(myEnergy/6.0, 1000/distanciaObjetivo), objetivo.energy/3.0) );\n }\n \n //any other case, ill get aim lock with this function\n //normalize sets between pi -pi\n setTurnGunRightRadians(Utils.normalRelativeAngle(angulo(objetivo.pos, myPos) - getGunHeadingRadians()));\n \n\n double distNextPunto = myPos.distance(futurePos);\n \n \n if(distNextPunto > 20) {\n \t//aun estamos lejos\n \n \t\t\n \t\t//theta es el angulo que hemos de cortar para ponernos \"encarando\" bien\n theta = angulo(futurePos, myPos) - getHeadingRadians();\n \n \n double sentido = 1;\n \n if(Math.cos(theta) < 0) {\n theta += Math.PI;\n sentido = -1;\n }\n \n setAhead(distNextPunto * sentido);\n theta = Utils.normalRelativeAngle(theta);\n setTurnRightRadians(theta);\n \n if(theta > 1)setMaxVelocity(0.0);\n else setMaxVelocity(8.0); // max\n \n \t\n \n } else {\n \t //ENTRO AQUI SI ME QUEDA POCO PARA LLEGAR, SMOOTH CORNERING\n\n \t\t\n //probar 1000 coordenadas\n int iterNum = 1000;\n Point2D.Double cand;\n for(int i =0; i < iterNum; i++){\n \n //i dont want it to be close to another bot, thats the meaning of distanciaObjetivo*0.8\n cand = hallarPunto(myPos, Math.min(distanciaObjetivo*0.8, 100 + iterNum*Math.random()), 2*Math.PI*Math.random());\n if(perimetro.contains(cand) && evalHeuristic(cand) < evalHeuristic(futurePos)) {\n futurePos = cand;\n }\n \n \n } \n \n prevPos = myPos;\n \n }\n }", "protected void meander(){\n if(currentDestination == null){\n getNewMeanderPoint();\n }\n if(stuckCounter > 30){\n\n getNewMeanderPoint();\n }\n //Check if we have reached the current destination\n if((this.x == currentDestination.x) && (this.y == currentDestination.y)){\n getNewMeanderPoint();\n\n isWaiting = true;\n Random random = new Random();\n waitValue = random.nextInt(maxWait - minWait) + minWait;\n\n\n }\n\n\n //System.out.printf(\"X:%d Y:%d gX:%d Gy:%d\\n\", x, y, currentDestination.x, currentDestination.y);\n double dist;\n if(!isWaiting) {\n if (this.x != currentDestination.x) {\n dist = currentDestination.x - this.x;\n //Counteracts the effect of speed being greater than the distance, cauing jitter\n if (Math.abs(dist) < speed) {\n dx = dist;\n } else {\n int direction = (int) (dist / Math.abs(dist));\n switch (direction) {\n case 1:\n moveRight();\n break;\n case -1:\n moveLeft();\n break;\n }\n }\n } else {\n dx = 0;\n }\n if (this.y != currentDestination.y) {\n dist = currentDestination.y - this.y;\n //Counteracts the effect of speed being greater than the distance, cauing jitter\n if (Math.abs(dist) < speed) {\n dy = dist;\n } else {\n int direction = (int)(dist / Math.abs(dist));\n switch (direction) {\n case 1:\n moveDown();\n break;\n case -1:\n moveUp();\n break;\n }\n }\n } else {\n dy = 0;\n }\n }\n\n }", "public ArrayList<Move> getPossibleMoves(int startx, int starty, Board b){//String startpos, Board b){\n\t\t//startpos is the position of the current piece,\n\t\t//so we know which one it is on the board\n\t\t\n\t\tArrayList<Move> moves = new ArrayList<Move>();\n\t\t\n\t\t\n\t\t\n\t\t//int startx = Main.converttoMove(String.valueOf(startpos.charAt(0)));\n\t\t//int starty = Integer.valueOf(String.valueOf(startpos.charAt(1)));\n\t\t\t\t\t\n\t\tPosition startpo = b.getElement(startx, starty);\n\t\tString startcol = startpo.getState().getColor();\n\t\tboolean color = true;//color: white is true, black if false\n\t\tif(startcol.equalsIgnoreCase(\"b\")) {\n\t\t\tcolor = false;\n\t\t}\n\t\t\n\t\t\n\t\t//go up and down\n\t\t//Number of spaces to move in X and Y direction\n //int numSpacesYUp = starty+1;//Not sure if this math is correct\n \n\t\tint numSpacesYUp = Math.abs(starty);\n int numSpacesYDown = Math.abs(8-(starty+1));//^\n\t\t\n \n //go left and right\n\t\tint numSpacesXLeft=Math.abs(startx);//TO DO: Add Math\n\t\t//int numSpacesXRight =Math.abs(8-(startx+1)); //old\n\t\tint numSpacesXRight =Math.abs(8-(startx+1));//new\n \n \n \n\t\t//go diagonal upper right\n \n\t\tint numtoTopRightCorner = Math.min(numSpacesXRight, numSpacesYUp);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoTopRightCorner;i++) {\n \tint endx = startx+i;\n \tint endy = starty-(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\t//System.out.println(\"\");\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n }\n\t\t\n\t\t\n\t\t\n\t\t//go diagonal upper left\n\t\tint numtoTopLeftCorner = Math.min(numSpacesXLeft, numSpacesYUp);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoTopLeftCorner;i++) {\n \tint endx = startx-(i);\n \tint endy = starty-(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n \t\n \t\n }\n \n \n \n\t\t//go diagonal lewer left\n\t\tint numtoLowerLeftCorner = Math.min(numSpacesXLeft, numSpacesYDown);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoLowerLeftCorner;i++) {\n \tint endx = startx-(i);\n \tint endy = starty+(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n }\n \n\t\t//go diagonal lower right\n\t\tint numtoLowerRightCorner = Math.min(numSpacesXRight, numSpacesYDown);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoLowerRightCorner;i++) {\n \tint endx = startx+(i);\n \tint endy = starty+(i);\n \t\n \t//System.out.println(\"num spaces x right:\" + numSpacesXRight);\n \t//System.out.println(\"num spaces y down:\" + numSpacesYDown);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;//should break cause you cant go more in that direction\n \t}\n \tbreak;//can't get any more in the lower right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n \t\n \t\n }\n\t\t\n\t\t\n\t\treturn moves;//Return all possible legal moves\n\t}", "@Override\r\n\tpublic boolean movement(BoardCells[][] chessBoard, Piece targetPiece, int fromX,int fromY,int toX,int toY) {\t\t\r\n\t\t//DEBUG -- System.out.println(\"\"+fromX+fromY+\" \"+toX+toY);\r\n\t\t\r\n\t\tif(fromY == toY){\t\t\t\r\n\t\t\tif(fromX > toX) {\r\n\t\t\t\tfor(int i = fromX-1; i>toX; i--) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} else if (fromX < toX) {\r\n\t\t\t\tfor(int i = fromX+1; i<toX; i++) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\tif(fromX == toX) {\t\t\t\t\r\n\t\t\tif(fromY > toY) {\t\r\n\t\t\t\tfor(int i = fromY-1; i>toY; i--) {\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} else if (fromY < toY) {\t\t\t\t\r\n\t\t\t\tfor(int i = fromY+1; i<toY; i++) {\t\t\t\t\t\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\treturn true;\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn false;\t\t\r\n\t}", "public void movement(){\n\t\t\n\t\tdelayCounter++;\n\t\t\n\t\tif(direction == Direction.RIGHT){\n\t\t\txCoor += 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[0] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[1];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[1] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[2];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[2] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == Direction.LEFT){\n\t\t\txCoor -= 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[3] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[4];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[4] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[5];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[5] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.UPWARD){\n\t\t\tyCoor += 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[10] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[11];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[11] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.DOWNWARD){\n\t\t\tyCoor -= 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\n\t\t\tif ( image == Assets.enemySprite[6] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[7];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[7] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[8];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[8] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tenemyWalk += 1;\n\t\t\n\t\t//This parts checks to see if the enemy has to turn or not.\n\t\tif(enemyWalk == screen.maps[screen.currentMap].path.getTileWidth()){\n\t\t\tint x = xCoor;\n\t\t\tint y = yCoor;\n\t\t\t\n\t\t\tif(direction == Direction.RIGHT){\n\t\t\t\tx = xCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.LEFT){\n\t\t\t\tx = xCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.UPWARD){\n\t\t\t\ty = yCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.DOWNWARD){\n\t\t\t\ty = yCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\t\n\t\t\tint tileBlockX = (int) (x/screen.maps[screen.currentMap].path.getTileWidth());\n\t\t\tint tileBlockY = (int) (y/screen.maps[screen.currentMap].path.getTileHeight());\n\t\t\t\n\t\t\t//As long as the enemy has not gone the opposite direction, the enemy will continue to move in the direction is was going originally.\n\t\t\tif(tileBlockX < screen.maps[screen.currentMap].path.getWidth()-1 && tileBlockX > 0){\n\t\t\t\tif(tileBlockY < screen.maps[screen.currentMap].path.getHeight()-1 && tileBlockY > 0){\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY + 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.DOWNWARD){\n\t\t\t\t\t\tdirection = Direction.UPWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY - 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.UPWARD){\n\t\t\t\t\t\tdirection = Direction.DOWNWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX + 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.LEFT){\n\t\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX - 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.RIGHT){\n\t\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the enemy makes it to the end, it is no longer in game.\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY).getTile().getProperties().containsKey(\"finish\") == true){\n\t\t\t\tinGame = false;\n\t\t\t\tscreen.playerHealth--;\n\t\t\t}\n\t\t\t\n\t\t\tenemyWalk = 0;\n\t\t}\n\t}", "protected void patrol(){\n Point currentDest = patrolPoints.get(pointIndex);\n //Check if we have reached the current destination\n if(this.x == currentDest.x && this.y == currentDest.y){\n nextPatrolPoint();\n }\n if(stuckCounter > 30){\n nextPatrolPoint();\n }\n\n double dist;\n if(this.x != currentDest.x){\n dist = currentDest.x - this.x;\n //Counteracts the effect of speed being greater than the distance, cauing jitter\n if(Math.abs(dist) < speed){\n dx = dist;\n }\n else {\n int direction = (int)(dist/Math.abs(dist));\n switch (direction){\n case 1:\n moveRight();\n break;\n case -1:\n moveLeft();\n break;\n }\n }\n }\n else{\n dx = 0;\n }\n if(this.y != currentDest.y){\n dist = currentDest.y - this.y;\n //Counteracts the effect of speed being greater than the distance, cauing jitter\n if(Math.abs(dist) < speed){\n dy = dist;\n }\n else {\n int direction = (int)(dist/Math.abs(dist));\n switch (direction){\n case 1:\n moveDown();\n break;\n case -1:\n moveUp();\n break;\n }\n }\n }\n else{\n dy = 0;\n }\n }", "public abstract ArrayList<Move> possibleMoves(Board board);", "public Location spread()\n {\n // plant needs to be alive, ready to reproduce (# of turns) \n // square needs to have fewer than 10 plants, BUT a tree can kill \n // a grass plant\n }", "public void calRightMove() {\n }", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public boolean move(int x, int y, CheckersBoard board) {\n if (whiteTurn == true && team == Constants.TeamId.team1Id) {\n return false;\n }\n if (whiteTurn == false && team == Constants.TeamId.team2Id) {\n return false;\n }\n /**\n * then change the x - y coords of the piece\n * update the UI to remove the highlighted squares then move the piece\n * if chess and shared square you take a piece\n * if checkers you jumped them you take the piece\n * return new x - y components\n *\n * if this is too high up in the tree you can override this implementation or update it\n * to fit specific pieces if its not working for some reason\n */\n if (possible(x, y, gameBoard)) {\n int changex = this.getX()-x;\n int changey = this.getY()-y;\n CheckersPiece temp = gameBoard.boardPositions[getX()][getY()];\n gameBoard.boardPositions[getX()][getY()] = null;\n gameBoard.boardPositions[x][y] = temp;\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] != null) {\n System.out.println(\"Here\");\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].team != this.team) {\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].imageView.setVisibility(View.GONE);\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] = null;\n }\n }\n this.setX(x);\n this.setY(y);/*\n if (Math.abs(changex) == 2) {\n gameBoard.boardPositions[x + (changex/2)][y + (changey/2)] = null;\n if (team == Constants.TeamId.team1Id) {\n board.numPieces1--;\n } else if (team == Constants.TeamId.team2Id) {\n board.numPieces0--;\n }\n }*/\n\n gameBoard.boardPositions[x][y].imageView.setX(142*x);\n gameBoard.boardPositions[x][y].imageView.setY(142*y);\n // flips after move is\n whiteTurn = !whiteTurn;\n gameBoard.startTimer();\n }\n //setUpUI(gameBoard);\n if (getY() == 7 && team == Constants.TeamId.team2Id) {\n board.crown(this);\n }\n if (getY() == 0 && team == Constants.TeamId.team1Id) {\n board.crown(this);\n }\n return possible(x, y, gameBoard);\n }", "public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }", "P applyMovement(M move);", "public void spawnAngels(final List<StandardAngel> angelsThisRound) {\n for (StandardAngel angel : angelsThisRound) {\n observer.updateAngelSpawn(angel);\n StandardPlayer p1;\n StandardPlayer p2;\n if (firstPlayerOnPos[angel.getPosR()][angel.getPosC()] != null\n && secondPlayerOnPos[angel.getPosR()][angel.getPosC()] != null) {\n if (firstPlayerOnPos[angel.getPosR()][angel.getPosC()].getId()\n < secondPlayerOnPos[angel.getPosR()][angel.getPosC()].getId()) {\n p1 = firstPlayerOnPos[angel.getPosR()][angel.getPosC()];\n p2 = secondPlayerOnPos[angel.getPosR()][angel.getPosC()];\n } else {\n p2 = firstPlayerOnPos[angel.getPosR()][angel.getPosC()];\n p1 = secondPlayerOnPos[angel.getPosR()][angel.getPosC()];\n }\n } else {\n p1 = firstPlayerOnPos[angel.getPosR()][angel.getPosC()];\n p2 = secondPlayerOnPos[angel.getPosR()][angel.getPosC()];\n }\n\n if (p1 != null) {\n if (angel.canInteract(p1)) {\n observer.updatePlayerInteraction(angel, p1);\n angel.applyEffect(angelEffects, p1);\n }\n }\n if (p2 != null) {\n if (angel.canInteract(p2)) {\n observer.updatePlayerInteraction(angel, p2);\n angel.applyEffect(angelEffects, p2);\n }\n }\n\n while (!deadPlayers[angel.getPosR()][angel.getPosC()].isEmpty()) {\n StandardPlayer deadPlayer = deadPlayers[angel.getPosR()][angel.getPosC()].peek();\n if (angel.canInteract(deadPlayer)) {\n deadPlayers[angel.getPosR()][angel.getPosC()].poll();\n observer.updatePlayerInteraction(angel, deadPlayer);\n angel.applyEffect(angelEffects, deadPlayer);\n } else {\n break;\n }\n }\n }\n }", "public void makeMove(Move m) {\n \tPieceColor moved = m.getSource().getColor();\n\n \t//before the move is made, record the move in the movelist\n \tupdateMoveList(m);\n \t\n \t//store locations\n \tint sx = m.getSource().getLocation().getX();\n \tint sy = m.getSource().getLocation().getY();\n \tint dx = m.getDest().getLocation().getX();\n \tint dy = m.getDest().getLocation().getY();\n \tString name_moved = m.getSource().getName();\n \t\n \t//store new king location if it moved\n \tif(name_moved.equals(\"King\")) {\n \t\tif(moved == PieceColor.White) {\n \t\t\twKing = m.getDest().getLocation();\n \t\t\t\n \t\t\t//remove castle rights on both sides\n \t\t\tcastle[0] = false;\n \t\t\tcastle[1] = false;\n \t\t}\n \t\telse if(moved == PieceColor.Black) {\n \t\t\tbKing = m.getDest().getLocation();\n \t\t\t\n \t\t\t//remove castle rights on both sides\n \t\t\tcastle[2] = false;\n \t\t\tcastle[3] = false;\n \t\t}\n \t\telse System.exit(0);\n \t}\n \t\n \t//rook check for castling rights\n \tif(name_moved.equals(\"Rook\")) {\n \t\tif(moved == PieceColor.White) {\n \t\t\tif(sx == 0 && sy == 0) removeCastle(moved, false);\n \t\t\tif(sx == 7 && sy == 0) removeCastle(moved, true);\n \t\t}\n \t\t\n \t\telse if(moved == PieceColor.Black) {\n \t\t\tif(sx == 0 && sy == 7) removeCastle(moved, false);\n \t\t\tif(sx == 7 && sy == 7) removeCastle(moved, true);\n \t\t}\n \t}\n \t\n \tPiece temp = getPiece(sx, sy);\n \t\n \tsetPiece(sx, sy, new NoPiece(sx, sy));\n \t\n \tif(temp.getName().equals(\"Pawn\") && ((Pawn)temp).getPromo() == dy) {\n \t\ttemp = new Queen(dx, dy, temp.getColor(), this);\n \t}\n \t\n \t\n \ttemp.setLocation(new Square(dx, dy));\n \t\n \t//check for en passant\n \tif(name_moved.equals(\"Pawn\")) {\n \t\tint loc = ((Pawn)temp).advance();\n \t\t((Pawn)temp).setMoved(moveList.size());\n \t\t\n \t\t//only a valid en passant move if the pawn moves diagonally\n \t\t//and the destination square is empty\n \t\tif(sx != dx && getPiece(dx, dy).getName().equals(\"None\")) {\n \t\t\tsetPiece(dx, dy-loc, new NoPiece(dx, dy-loc));\n \t\t}\n \t}\n \t\n \tsetPiece(dx, dy, temp);\n \t\n \tif(turn == PieceColor.White) turn = PieceColor.Black;\n \telse turn = PieceColor.White;\n \t\n \t//check if the move was a castle\n \tif(name_moved.equals(\"King\")) {\n \t\t\n \t\tif(moved == PieceColor.White) { \n\t \t\t//if king moved positive x, then moved king side\n\t \t\tif(dx - sx == 2) {\n\t \t\t\ttemp = getPiece(7, 0);\n\t \t\t\tsetPiece(7, 0, new NoPiece(7, 0));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(5,0));\n\t \t\t\tsetPiece(5, 0, temp);\n\t \t\t}\n\t \t\t\n\t \t\telse if(sx - dx == 2) {\n\t \t\t\ttemp = getPiece(0, 0);\n\t \t\t\tsetPiece(0, 0, new NoPiece(0, 0));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(3, 0));\n\t \t\t\tsetPiece(3, 0, temp);\n\t \t\t}\n \t\t}\n \t\t\n \t\tif(moved == PieceColor.Black) { \n\t \t\t//if king moved positive x, then moved king side\n\t \t\tif(dx - sx == 2) {\n\t \t\t\ttemp = getPiece(7, 7);\n\t \t\t\tsetPiece(7, 7, new NoPiece(7, 7));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(5, 7));\n\t \t\t\tsetPiece(5, 7, temp);\n\t \t\t}\n\t \t\t\n\t \t\telse if(sx - dx == 2) {\n\t \t\t\ttemp = getPiece(0, 7);\n\t \t\t\tsetPiece(0, 7, new NoPiece(0, 7));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(3, 7));\n\t \t\t\tsetPiece(3, 7, temp);\n\t \t\t}\n \t\t}\n \t}\n }", "protected ArrayList<Location> getMovesInDirection(int xIncr, int yIncr, Team sameTeam, Team oppositeTeam, ArrayList<Location>possibleMoves)\n\t{\n\t\tboolean canStillMove = true;\n\t\tLocation currLoc = new Location(l.getX(), l.getY());\n\t\twhile(canStillMove)\n\t\t{\n\t\t\tcurrLoc = new Location(currLoc.getX()+xIncr, currLoc.getY()+yIncr);\n\t\t\tif(!currLoc.isValid() || sameTeam.containsPieceOnLocation(currLoc))\n\t\t\t{\n\t\t\t\tcanStillMove = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpossibleMoves.add(currLoc);\n\t\t\t\tif(oppositeTeam.containsPieceOnLocation(currLoc))\n\t\t\t\t{\n\t\t\t\t\tcanStillMove = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn possibleMoves;\n\t}", "private List<int[]> generatePossibleMoveActions(LabyrinthGameState state) {\n List<Tile> tiles = new ArrayList<>();\n Tile orig = state.getPlayerLoc(Player.values()[playerNum]);\n tiles.add(orig);\n this.calculatePossibleMoves(orig, tiles);\n List<int[]> locations = new ArrayList<>();\n for (Tile spot : tiles) {\n int[] loc = new int[2];\n loc[0] = spot.getX();\n loc[1] = spot.getY();\n locations.add(loc);\n }\n return locations;\n }", "public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }", "private void nextPiece() {\n if (_c == M && _r <= M) {\n _c = 1;\n _r++;\n } else if (_r > M) {\n _move = null;\n } else {\n _c++;\n }\n }", "protected int getMove() \t\t\t\t{\treturn move;\t\t}" ]
[ "0.64536023", "0.6411624", "0.640115", "0.61510766", "0.61256546", "0.6125092", "0.60288894", "0.6021013", "0.59828246", "0.59543467", "0.59312344", "0.5927576", "0.58950126", "0.5879665", "0.58479995", "0.5820904", "0.58173764", "0.5805709", "0.57676715", "0.57595205", "0.57462436", "0.57460713", "0.5745647", "0.5742139", "0.5741553", "0.57372034", "0.5731512", "0.57284963", "0.5720957", "0.5712574", "0.57094574", "0.5701246", "0.5699917", "0.5697722", "0.5696673", "0.5695266", "0.5693304", "0.5689722", "0.5688315", "0.5681434", "0.56675506", "0.56574607", "0.5639626", "0.56393903", "0.5638508", "0.5634616", "0.56302255", "0.56245476", "0.5619638", "0.56175745", "0.5615827", "0.5611053", "0.5607212", "0.5589267", "0.55815595", "0.558058", "0.55772686", "0.5572098", "0.55712295", "0.5567839", "0.5565492", "0.556116", "0.5559062", "0.5558222", "0.55579656", "0.5555987", "0.5555935", "0.5553474", "0.5552033", "0.5549079", "0.55471927", "0.55467033", "0.55430263", "0.5540652", "0.553788", "0.55372465", "0.5537152", "0.55355334", "0.55328333", "0.5528338", "0.55281466", "0.5525789", "0.55242276", "0.5520784", "0.55195504", "0.5516127", "0.55153155", "0.55108345", "0.5510287", "0.550914", "0.55073893", "0.5500812", "0.5498413", "0.5496255", "0.54956543", "0.54955614", "0.5493605", "0.54907554", "0.54900753", "0.5488696" ]
0.7470192
0
end bracket for enemy move A method that makes Ari the enemy move throughout the gameboard.
public void enemymoveAri(){ int YEari = 0; int XEari = 0; for(int i = 0 ; i < this.Ari.length;i++){ for(int p = 0; p < this.Ari.length;p++){ if(this.Ari[i][p] == 1){ YEari = i; XEari = p; } } } int move = fate.nextInt(4);// 0 is left, 1 is right , 2 is up , 3 is down switch(move){//first block is up and down second block is left and right case 0: if(this.area[YEari][XEari-1] != "[ ]"){ this.Ari[YEari][XEari-1] = 1;//to turn left this.Ari[YEari][XEari] = 0; } break; case 1: if(this.area[YEari][XEari+1] != "[ ]"){ this.Ari[YEari][XEari+1] = 1;//to turn right this.Ari[YEari][XEari] = 0; } break; case 2: if(this.area[YEari-1][XEari] != "[ ]"){ this.Ari[YEari-1][XEari] = 1;//to turn up this.Ari[YEari][XEari] = 0; } break; case 3: if(this.area[YEari+1][XEari] != "[ ]"){ this.Ari[YEari +1][XEari] = 1;//to turn down this.Ari[YEari][XEari] = 0; } break; }//end of switch }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enemyMove() {\n\t\tArrayList<EnemySprite> enemylist = this.model.getEnemy();\n\t\tfor(EnemySprite sp :enemylist) {\n\t\t\tif(sp instanceof NormalEnemySprite) {\n\t\t\t\t\n\t\t\t\t((NormalEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if(sp instanceof PatrollingEnemySprite) {\n\t\t\t\t\n\t\t\t\t((PatrollingEnemySprite) sp).move();\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\telse if (sp instanceof BigEnemySprite) {\n\t\t\t\t((BigEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof PatrollingBigEnemySprite) {\n\t\t\t\t((PatrollingBigEnemySprite) sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof CircleBigEnemySprite) {\n\t\t\t\t((CircleBigEnemySprite) sp).move();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t}", "public static void makeEnemyMove() { //all players after index 1 are enemies\n if (gameMode == EARTH_INVADERS) {//find leftmost and rightmost vehicle columns to see if we need to move down\n int leftMost = board[0].length;\n int rightMost = 0;\n int lowest = 0;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//find left-most, right-most and lowest most vehicles (non aircraft/train) to determine how formation should move\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster))\n continue;\n if (curr.getCol() < leftMost)\n leftMost = curr.getCol();\n if (curr.getCol() > rightMost)\n rightMost = curr.getCol();\n if (curr.getRow() > lowest)\n lowest = curr.getRow();\n curr.setHeadDirection(DOWN);\n }\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//***move aircraft and trains\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster)) {\n if (curr.isMoving())\n continue;\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int r = curr.getRow();\n int c = curr.getCol();\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n int rand = 0;\n if (dirs.size() > 0)\n rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying()) { //if aircraft is flying in the visible board, don't change direction\n if (r == 1 && (c == 0 || c == board[0].length - 1)) //we are in the first row but behind a border\n { //we only want aircraft to appear in row 1 in EARTH INVADERS (like the UFO in space invaders)\n if (bodyDir == LEFT || bodyDir == RIGHT) {\n rand = UP;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (c == 0)\n rand = RIGHT;\n else if (c == board[0].length - 1)\n rand = LEFT;\n else\n //if(dirs.contains(bodyDir))\n rand = bodyDir;\n } else if (r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) {\n rand = bodyDir;\n if (r == 0 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == 0 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == board.length - 1 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = UP;\n } else if (r == board.length - 1 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = UP;\n }\n } else if (/*dirs.contains(bodyDir) && */(r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1))\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n }\n }//***end aircraft/train movement\n if (leftMost == 1) //move vehicles down and start them moving right\n {\n if (EI_moving == LEFT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = RIGHT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n }\n }\n } else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n }//***end leftmost is first col\n else if (rightMost == board[0].length - 2) //move vehicles down and start them moving left\n {\n if (EI_moving == RIGHT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = LEFT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n }\n }\n } else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n }//***end rightmost is last col\n else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n return;\n }//***end EARTH INVADERS enemy movements\n for (int i = 2; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n String name = curr.getName();\n int r = curr.getRow();\n int c = curr.getCol();\n if (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1 && (curr instanceof Vehicle))\n ((Vehicle) (curr)).setOnField(true);\n\n if (curr.isFlying() && webs[panel].size() > 0) {\n int x = curr.findX(cellSize);\n int y = curr.findY(cellSize);\n for (int p = 0; p < webs[panel].size(); p++) {\n int[] ray = webs[panel].get(p);\n if (Utilities.isPointOnRay(x, y, ray[0], ray[1], ray[2], ray[3])) {\n explosions.add(new Explosion(\"BIG\", x, y, explosionImages, animation_delay));\n Ordinance.radiusDamage(-1, x, y, 25, panel, .5);\n Spawner.resetEnemy(i);\n webs[panel].remove(p);\n p--;\n Structure str1 = structures[ray[4]][ray[5]][panel];\n Structure str2 = structures[ray[6]][ray[7]][panel];\n if (str1 != null)\n str1.setWebValue(0);\n if (str2 != null)\n str2.setWebValue(0);\n Utilities.updateKillStats(curr);\n break;\n }\n }\n }\n //reset any ground vehicle that ended up in the water\n //reset any train not on tracks - we need this because a player might change panels as a vehicle spawns\n if (name.startsWith(\"TRAIN\")) {\n Structure str = structures[r][c][panel];\n if (str != null && str.getName().equals(\"hole\") && str.getHealth() != 0) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Utilities.updateKillStats(curr);\n Spawner.resetEnemy(i);\n continue;\n } else if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n } else if (!board[r][c][panel].startsWith(\"T\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //ground vehicles\n if (!curr.isFlying() && !curr.getName().startsWith(\"BOAT\") && (curr instanceof Vehicle)) {\n\n if (((Vehicle) (curr)).getStunTime() > numFrames) //ground unit might be stunned by WoeMantis shriek\n continue;\n if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //reset any water vehicle that ended up on land\n if (name.startsWith(\"BOAT\")) {\n if (!board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else if (curr.getHealth() <= 0) {\n Spawner.resetEnemy(i);\n continue;\n }\n\n //if a ground unit has been on the playable field and leaves it, respawn them\n if (!curr.isFlying() && !name.startsWith(\"TRAIN\") && (curr instanceof Vehicle)) {\n if ((r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) && ((Vehicle) (curr)).getOnField()) {\n ((Vehicle) (curr)).setOnField(false);\n Spawner.resetEnemy(i);\n continue;\n }\n }\n if (name.endsWith(\"nukebomber\")) {//for the nukebomber, set the detonation coordinates so nuke fires when the plane exits the field\n int dr = curr.getDetRow();\n int dc = curr.getDetCol();\n int bd = curr.getBodyDirection();\n int dd = curr.getDetDir();\n if (bd == dd && (((bd == LEFT || bd == RIGHT) && c == dc) || (bd == UP || bd == DOWN) && r == dr)) {\n Ordinance.nuke();\n curr.setDetRow(-1);\n curr.setDetCol(-1);\n }\n }\n\n if (curr.isMoving())\n continue;\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int[] target = isMonsterInSight(curr);\n int mDir = target[0]; //direction of the monster, -1 if none\n int monsterIndex = target[1]; //index of the monster in the players array, -1 if none\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n\n if (dirs.size() > 0) {\n if (curr instanceof Monster) {//***MONSTER AI*******************\n double headTurnProb = 0.25;\n double stompProb = 0.5;\n int vDir = isVehicleInSight(curr);\n if (vDir >= 0) {\n boolean airShot = false;\n int vD = vDir;\n if (vD >= 10) {\n airShot = true;\n vD -= 10;\n }\n if (curr.head360() || !Utilities.oppositeDirections(vD, curr.getHeadDirection())) {\n curr.setHeadDirection(vD);\n if ((curr.getName().startsWith(\"Gob\") || curr.getName().startsWith(\"Boo\")) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n Bullet temp = null;\n if (curr.getName().startsWith(\"Boo\")) {\n temp = new Bullet(curr.getName() + vD, curr.getX(), curr.getY(), 50, beamImages, SPEED, \"BEAM\", SPEED * 10, airShot, i, -1, -1);\n } else if (curr.getName().startsWith(\"Gob\")) {\n temp = new Bullet(\"flame\" + vD, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n }\n if (temp != null) {\n temp.setDirection(vD);\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else if (Math.random() < headTurnProb) {\n String hd = \"right\";\n if (Math.random() < .5)\n hd = \"left\";\n Utilities.turnHead(curr, hd);\n }\n Structure str = structures[r][c][panel];\n if (str != null && str.getHealth() > 0 && str.isDestroyable() && !str.getName().startsWith(\"FUEL\") && Math.random() < stompProb)\n playerMove(KeyEvent.VK_SPACE, i);\n else {\n int dir = dirs.get((int) (Math.random() * dirs.size()));\n if (dir == UP) {\n if (curr.getBodyDirection() != UP) {\n curr.setBodyDirection(UP);\n curr.setHeadDirection(UP);\n } else {\n if (!curr.isSwimmer() && board[r - 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r - 1 >= 1) {\n str = structures[r - 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_UP, i);\n }\n } else if (dir == DOWN) {\n if (curr.getBodyDirection() != DOWN) {\n curr.setBodyDirection(DOWN);\n curr.setHeadDirection(DOWN);\n } else {\n if (!curr.isSwimmer() && board[r + 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r + 1 <= structures.length - 1) {\n str = structures[r + 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_DOWN, i);\n }\n } else if (dir == LEFT) {\n if (curr.getBodyDirection() != LEFT) {\n curr.setBodyDirection(LEFT);\n curr.setHeadDirection(LEFT);\n } else {\n if (!curr.isSwimmer() && board[r][c - 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c - 1 >= 1) {\n str = structures[r][c - 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_LEFT, i);\n }\n } else if (dir == RIGHT) {\n if (curr.getBodyDirection() != RIGHT) {\n curr.setBodyDirection(RIGHT);\n curr.setHeadDirection(RIGHT);\n } else {\n if (!curr.isSwimmer() && board[r][c + 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c + 1 <= board[0].length - 1) {\n str = structures[r][c + 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_RIGHT, i);\n }\n }\n }\n continue;\n }//end monster AI movement\n else //shoot at a target\n if (name.endsWith(\"troops\") || name.endsWith(\"jeep\") || name.endsWith(\"police\") || name.startsWith(\"TANK\") || name.endsWith(\"coastguard\") || name.endsWith(\"destroyer\") || name.endsWith(\"fighter\") || name.equals(\"AIR bomber\")) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //we don't want vehicles to shoot each other\n {\n airShot = true;\n curr.setHeadDirection(DOWN);\n }\n if (monsterIndex >= 0 && monsterIndex < players.length && players[monsterIndex].isFlying())\n airShot = true;\n if (curr.getName().endsWith(\"fighter\"))\n curr.setDirection(bodyDir); //keep moving while shooting\n if (mDir != -1 && curr.getRow() > 0 && curr.getCol() > 0 && curr.getRow() < board.length - 1 && curr.getCol() < board[0].length - 1) { //don't shoot from off the visible board\n if ((mDir == bodyDir || ((curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\") || name.equals(\"AIR bomber\")) && (mDir == curr.getHeadDirection() || name.equals(\"AIR bomber\")))) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) { //AIR bomber needs to be able to drop bombs if they see the monster in front of them or behind them, so we need to check the name in two conditions\n Bullet temp;\n if (name.endsWith(\"jeep\") || name.endsWith(\"coastguard\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n temp = new Bullet(\"jeep\" + mDir, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"troops\") || name.endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + mDir, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"destroyer\") || name.endsWith(\"artillery\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"destroyer\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"fighter\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n temp = new Bullet(\"fighter\" + mDir, curr.getX(), curr.getY(), 30, rocketImages, SPEED, \"SHELL\", SPEED * 8, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"missile\")) {\n temp = new Bullet(\"missile\" + mDir, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.endsWith(\"flame\")) {\n temp = new Bullet(\"flame\" + mDir, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.equals(\"AIR bomber\")) {\n temp = null;\n if (!DISABLE_BOMBERS) {\n int mR = players[PLAYER1].getRow(); //main player row & col\n int mC = players[PLAYER1].getCol();\n int mR2 = -99; //possible 2nd monster row & col\n int mC2 = -99;\n if (p1partner) {\n mR2 = players[PLAYER2].getRow();\n mC2 = players[PLAYER2].getCol();\n }\n if (players[PLAYER1].getHealth() > 0 && (Math.abs(r - mR) <= 2 || Math.abs(c - mC) <= 2 || Math.abs(r - mR2) <= 2 || Math.abs(c - mC2) <= 2)) {//our bomber is in the same row & col as a monster + or - 1\n if (bodyDir == UP && r < board.length - 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() + (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() + (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == DOWN && r > 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() - (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() - (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == RIGHT && c < board[0].length - 1) {\n Ordinance.bigExplosion(curr.getX() - (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() - (cellSize * 2), curr.getY(), 50, panel, .25);\n } else if (bodyDir == LEFT && c > 1) {\n Ordinance.bigExplosion(curr.getX() + (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() + (cellSize * 2), curr.getY(), 50, panel, .25);\n }\n }\n }\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 5, airShot, i, -1, -1);\n }\n if (temp != null)\n temp.setDirection(mDir);\n\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") && Math.random() < .5) //make the police move towards the monster half the time\n {\n if (mDir == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol()))\n curr.setDirection(UP);\n else if (mDir == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol()))\n curr.setDirection(DOWN);\n else if (mDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1))\n curr.setDirection(LEFT);\n else if (mDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1))\n curr.setDirection(RIGHT);\n else\n curr.setDirection(-1);\n }\n if (temp != null && players[PLAYER1].getHealth() > 0) {\n if (gameMode == EARTH_INVADERS && !curr.isFlying()) {\n } else {\n if (numFrames >= ceaseFireTime + ceaseFireDuration || gameMode == EARTH_INVADERS) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else //change to face the monster to line up a shot\n {\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.endsWith(\"artillery\")) {\n curr.setDirection(-1); //stop to shoot\n curr.setBodyDirection(mDir);\n } else if (curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\"))\n curr.setHeadDirection(mDir);\n continue;\n }\n }\n }\n int rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying() && (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1)) {\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n\n continue;\n }\n //if no preferred direction, include the option to turn around\n //civilians should prefer to turn around rather than approach the monster\n if (name.endsWith(\"civilian\") || name.endsWith(\"bus\")) {\n if (bodyDir == mDir) //if we are facing the same direction as the monster, turn around\n {\n if (bodyDir == UP && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n } else if (bodyDir == DOWN && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n } else if (bodyDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n } else if (bodyDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n }\n }\n int rand = (int) (Math.random() * 4);\n if (rand == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n }\n if (rand == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n }\n if (rand == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n if (rand == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n }\n\n }\n }", "private void moveEnemies(){\n \t\tdouble dirX = 0;\n\t\tdouble dirY = 0;\n \t\tdouble length = 99999;\n \t\tint speed = 2;\n\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tdirX = players[enemy[i][2]][1] - enemy[i][0];\n\t\t\tdirY = players[enemy[i][2]][2] - enemy[i][1];\n\t\t\tlength = Math.sqrt(dirX*dirX + dirY*dirY);\n\t\t\tdirX /= length;\n\t\t\tdirY /= length;\n\t\t\tdirX *= speed;\n\t\t\tdirY *= speed;\n\t\t\tenemy[i][0] += dirX;\n\t\t\tenemy[i][1] += dirY;\n\t\t\n\t\t}\n\t\n\t}", "public void move(){\n\t\t\n\t}", "public void move(FightCell cell);", "public void move() {\n\r\n\t}", "public void move() {\n\n }", "public void move()\r\n {\r\n if(goRight)\r\n {\r\n setLocation(getX()+10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }else\r\n {\r\n setLocation(getX()-10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }\r\n if(getY()>getWorld().getHeight())\r\n ((CaveWorld)(getWorld())).deleteAxe(this);\r\n }", "P applyMovement(M move);", "private void easyMove(Board board) {\n\t\t\r\n\t}", "public void move();", "public void move();", "public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}", "void move() {\r\n\t\tif (x + xa < 0){\r\n\t\t\txa = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (x + xa > game.getWidth() - diameter){\r\n\t\t\txa = -mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (y + ya < 0){\r\n\t\t\tya = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (y + ya > game.getHeight() - diameter){\r\n\t\t\tgame.gameOver();\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (colisionPalas()){\r\n\t\t\tya = -mov;\r\n\t\t}\r\n\t\telse if(colisionEstorbos()){\r\n\t\t\tgame.puntuacion+=2;\r\n\t\t}\r\n\t\t\r\n\t\tx = x + xa;\r\n\t\ty = y + ya;\r\n\t}", "public void moveActor();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}", "public void movement(){\n\t\t\n\t\tdelayCounter++;\n\t\t\n\t\tif(direction == Direction.RIGHT){\n\t\t\txCoor += 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[0] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[1];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[1] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[2];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[2] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == Direction.LEFT){\n\t\t\txCoor -= 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[3] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[4];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[4] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[5];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[5] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.UPWARD){\n\t\t\tyCoor += 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[10] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[11];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[11] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.DOWNWARD){\n\t\t\tyCoor -= 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\n\t\t\tif ( image == Assets.enemySprite[6] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[7];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[7] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[8];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[8] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tenemyWalk += 1;\n\t\t\n\t\t//This parts checks to see if the enemy has to turn or not.\n\t\tif(enemyWalk == screen.maps[screen.currentMap].path.getTileWidth()){\n\t\t\tint x = xCoor;\n\t\t\tint y = yCoor;\n\t\t\t\n\t\t\tif(direction == Direction.RIGHT){\n\t\t\t\tx = xCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.LEFT){\n\t\t\t\tx = xCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.UPWARD){\n\t\t\t\ty = yCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.DOWNWARD){\n\t\t\t\ty = yCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\t\n\t\t\tint tileBlockX = (int) (x/screen.maps[screen.currentMap].path.getTileWidth());\n\t\t\tint tileBlockY = (int) (y/screen.maps[screen.currentMap].path.getTileHeight());\n\t\t\t\n\t\t\t//As long as the enemy has not gone the opposite direction, the enemy will continue to move in the direction is was going originally.\n\t\t\tif(tileBlockX < screen.maps[screen.currentMap].path.getWidth()-1 && tileBlockX > 0){\n\t\t\t\tif(tileBlockY < screen.maps[screen.currentMap].path.getHeight()-1 && tileBlockY > 0){\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY + 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.DOWNWARD){\n\t\t\t\t\t\tdirection = Direction.UPWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY - 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.UPWARD){\n\t\t\t\t\t\tdirection = Direction.DOWNWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX + 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.LEFT){\n\t\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX - 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.RIGHT){\n\t\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the enemy makes it to the end, it is no longer in game.\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY).getTile().getProperties().containsKey(\"finish\") == true){\n\t\t\t\tinGame = false;\n\t\t\t\tscreen.playerHealth--;\n\t\t\t}\n\t\t\t\n\t\t\tenemyWalk = 0;\n\t\t}\n\t}", "@Override\n\tvoid move(int x, int y) {\n\n\t}", "private void moveEnemyArrows(){\n\t\tint i,j;\n\t\tfor(i=0;i<enemy_num;i++){\n\t\t\tfor(j=0;j<enemy_arrow_num[i];j++){\n\t\t\t\tenemy_arrows[i][j][0] = enemy_arrows[i][j][0]+enemy_arrows[i][j][2];\n\t\t\t\tenemy_arrows[i][j][1] = enemy_arrows[i][j][1]+enemy_arrows[i][j][3];\n\t\t\t}\n\t\t}\n\t}", "public void AIMakeMove() {\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint index = randomizer.nextInt(AIPossibleMoves.size());\n\t\tMove move = AIPossibleMoves.get(index);\n\t\tChecker checker = model.findChecker(move.getxOrigin(), move.getyOrigin());\n\t\tint xChange = (move.getxOrigin() - move.getxMove());\n\t\tint yChange = (move.getyOrigin() - move.getyMove());\n\t\t\n\t\tint xMoveNew = 0;\n\t\tint yMoveNew = 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(board.getBoard()[move.getyMove()][move.getxMove()] == 0) {\n\t\t\t//do nothing\n\t\t} else {\n\t\t\t//moving down\n\t\t\tif(yChange < 0) {\n\t\t\t\t//moving right\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//moving left\n\t\t\t\t\t\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//moving up\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\t//moving right\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t} else {\n\t\t\t\t\t//moving left \n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println(\"New Move is: \" + xMoveNew + \",\" + yMoveNew);\n\t\tif(canBeKing(checker, move)) {\n\t\t\tchecker = convertToKing(checker, move);\n\t\t\tmodel.updateChecker(move, checker, 2);\n\t\t\t\n\t\t\tprintBoard();\n\t\t\tmodel.moves.add(move);\n\t\t\treturn;\n\t\t}\n\t\tmodel.updateChecker(move, checker, 2);\n\t//\tSystem.out.println(\"AI - DEBUGGING\");\n\t//\tSystem.out.println(\"Origin Piece: \" + move.getxOrigin() + \",\" + move.getyOrigin());\n\t//\tSystem.out.println(\"Move Position: \" + move.getxMove() + \",\" + move.getyMove());\n\t\tupdateBoard(move);\n\t\tmodel.moves.add(move);\n\t\tprintBoard();\n\t\t\n\t}", "public void act() \r\n {\r\n move();\r\n }", "abstract void move();", "private void moveInvaders() {\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\ta.move();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (a.getVisibility()) {\n\t\t\t\t\t\n\t\t\t\t\tcheckLeftWall(a);\n\t\t\t\t\tcheckRightWall(a);\n\t\t\t\t\t\n\t\t\t\t\tif ((a.getY() + PLAYER_WIDTH) >= HEIGHT) {\n\t\t\t\t\t\trunning = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void move();", "public void moveEnemy() {\n int moveDirection = randomGenerator(0, 3);\n int enemyAmount = snakeEnemyPartList.size();\n for(int i = 0; i < enemyAmount; i++) {\n\n int rowsNew = snakeEnemyPartList.get(i).getSnakeEnemyPartRowsNew();\n int collsNew = snakeEnemyPartList.get(i).getSnakeEnemyPartCollsNew();\n\n switch (moveDirection) {\n case 0:\n if(board[rowsNew-1][collsNew] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew-1][collsNew] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('w');\n } else {\n moveEnemy();\n }\n break;\n\n case 1:\n if(board[rowsNew][collsNew-1] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew][collsNew-1] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('a');\n }else {\n moveEnemy();\n }\n\n break;\n\n case 2:\n if(board[rowsNew+1][collsNew] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew+1][collsNew] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('s');\n }else {\n moveEnemy();\n }\n\n break;\n\n case 3:\n if(board[rowsNew][collsNew+1] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew][collsNew+1] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('d');\n }else {\n moveEnemy();\n }\n \n break;\n }\n }\n \n }", "private void move(char moveLetter) throws VacuumException, SpriteException, LevelException{\r\n\t\t\r\n\t\tswitch(moveLetter) {\r\n\t\t\tcase 'a':\r\n\t\t\tcase 'A':\r\n\t\t\t\t\tgame.moveVacuum(0,-Movable.SPEED);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 'w':\r\n\t\t\tcase 'W':\r\n\t\t\t\t\tgame.moveVacuum(-Movable.SPEED,0);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 'd':\r\n\t\t\tcase 'D':\r\n\t\t\t\t\tgame.moveVacuum(0,Movable.SPEED);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 's':\r\n\t\t\tcase 'S':\r\n\t\t\t\t\tgame.moveVacuum(Movable.SPEED,0);\r\n\t\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tgame.update();\r\n\t}", "public void Move()\n {\n \n }", "private void enemyMove() {\n\n\t\tboolean goAgain = false;\n\n\t\tint x = (int) (Math.random() * 10);\n\t\tint y = (int) (Math.random() * 10);\n\n\t\t// Make sure the enemy hits in a checkerboard pattern.\n\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\tif (y % 2 == 0) {\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t\t}\n\t\t} else { // if x is odd, y should be even\n\t\t\tif (y % 2 == 1)\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t}\n\n\t\tif (enemyLastShotHit && getDifficulty() > 0) { // /if last shot was a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hit, enemy\n\t\t\t// will try to\n\t\t\t// check around it only run if difficulty is\n\t\t\t// normal or above\n\t\t\tx = enemyLastHitX;\n\t\t\ty = enemyLastHitY;\n\n\t\t\tif (getDifficulty() != 2) {\n\n\t\t\t\tif (conflictX == 4) {\n\t\t\t\t\tconflictX = 0;\n\t\t\t\t} else if (conflictY == 4) {\n\t\t\t\t\tconflictY = 0;\n\t\t\t\t\t// System.out.println(\"conflict has been reset \");\n\t\t\t\t}\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\t// System.out.println(\"checking down\");\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\n\t\t\t\t\tif (checkDirection == 0) // checks in each direction\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse if (checkDirection == 1)\n\t\t\t\t\t\tx--;\n\t\t\t\t\telse if (checkDirection == 2)\n\t\t\t\t\t\ty++;\n\t\t\t\t\telse if (checkDirection == 3) {\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x < 0) // making sure coordinates stay within bounds\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\telse if (x > 9)\n\t\t\t\t\t\tx = 9;\n\t\t\t\t\tif (y < 0)\n\t\t\t\t\t\ty = 0;\n\t\t\t\t\telse if (y > 9)\n\t\t\t\t\t\ty = 9;\n\t\t\t\t}\n\t\t\t} // medium diff\n\n\t\t\telse if (getDifficulty() == 2) {// hard difficulty\n\t\t\t\t// gives enemy unfair advantage\n\n\t\t\t\tif (conflictX == 4)\n\t\t\t\t\tconflictX = 0;\n\t\t\t\tif (conflictY == 4)\n\t\t\t\t\tconflictY = 0;\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\t\tif (y + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x][y + 1] == 1)// if y+1 is a hit and it is\n\t\t\t\t\t\t\t\t\t\t\t\t\t// within bounds, it will go\n\t\t\t\t\t\t\t\t\t\t\t\t\t// there\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x][y - 1] == 1)\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t\tif (x + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x + 1][y] == 1)\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t}\n\t\t\t\t\tif (x - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // hard diff\n\t\t\tcheckDirection++;\n\t\t} // lasthit\n\n\t\tint tryCount = 0;\n\t\twhile (egrid[x][y] == 3) { // makes sure enemy doesn't hit same spot\n\t\t\t\t\t\t\t\t\t// twice\n\t\t\tx = (int) (Math.random() * 10);\n\t\t\ty = (int) (Math.random() * 10);\n\t\t\tif (tryCount < 20 && getDifficulty() > 0) {\n\t\t\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\t\t\tif (y % 2 == 0) { // for checkerboard pattern\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t} else { // if x is odd, y should be even\n\t\t\t\t\tif (y % 2 == 1)\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttryCount++;\n\t\t}\n\n\t\tif (egrid[x][y] == 1) { // hit branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilehit.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a hit\");\n\t\t\tenemyLastShotHit = true; // starts ai\n\t\t\tcheckDirection = 0;\n\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\tenemyLastHitX = x; // stores x and y values\n\t\t\t\tenemyLastHitY = y;\n\t\t\t}\n\t\t\tehits--; // keeps score\n\t\t}\n\n\t\telse if (egrid[x][y] == 2) { // poweup branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilepower.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a PowerUp\");\n\t\t\tgoAgain = true;\n\t\t}\n\n\t\telse\n\t\t\t// miss branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilemiss.jpg\"));\n\n\t\tegrid[x][y] = 3;\n\n\t\tcheckEnemyWin();\n\n\t\tif (goAgain)\n\t\t\tenemyMove();\n\n\t}", "public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}", "public void move(){\n switch(image){\n case 0: // Case 0: Ant moves up/north. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] -= 1;\n if(this.position[0] < 0){\n this.position[0] = 19;\n }\n break;\n case 1: // Case 1: Ant moves right/east. If the ant hits the right border of the screen the ant will appear at the left border of it\n this.position[1] += 1;\n if(this.position[1] == 20){\n this.position[1] = 0;\n }\n break;\n case 2: // Case 2: Ant moves down/south. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] += 1;\n if(this.position[0] == 20){\n this.position[0] = 0;\n }\n break;\n case 3: // Case 3: Ant moves left/west. If the ant hits the left border of the screen the ant will appear at the right border of it\n this.position[1] -= 1;\n if(this.position[1] < 0){\n this.position[1] = 19;\n }\n break;\n default: // Default: This shouldn't happen on a normal run. It prints an error.\n System.err.println(\"Something went wrong while the ant was trying to move\");\n }\n }", "public void act() \n {\n moveTowardsPlayer(); \n }", "@Override\n\tpublic void move() {\n\t\t\n\t}", "protected abstract void defineEnemy();", "void movePiece() {\n\n }", "@Override\n\tpublic void move() {\n\n\t}", "public abstract void Move();", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}", "@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}", "public void move() {\n\t\tif ( board.getLevel() == 5 )\n\t\t\tmovementIndex = ( movementIndex + 1 ) % movement.length;\n\t}", "public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}", "abstract void move_elevator();", "@Override\r\n\tpublic void move() {\n\r\n\t}", "@Override\n\tpublic void move() {\n\t}", "public void move() {\n\tupdateSwapTime();\n\tupdateAttackTime();\n\n\tif (enemyNear) {\n\t if (moved) {\n\t\tstopMove();\n\t\tmoved = false;\n\t }\n\t} else {\n\t if (!moved) {\n\t\tcontinueMove();\n\t\tmoved = true;\n\t }\n\n\t x += dx;\n\t y += dy;\n\n\t if (x < speed) {\n\t\tx = speed;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y < speed) {\n\t\ty = speed;\n\t\tdy = (-1) * dy;\n\t }\n\n\t if (x > MapSize.getSIZE().getWidth() - 40) {\n\t\tx = MapSize.getSIZE().getWidth() - 40;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y > MapSize.getSIZE().getHeight() - 40) {\n\t\ty = MapSize.getSIZE().getHeight() - 40;\n\t\tdy = (-1) * dy;\n\t }\n\t}\n }", "public void act() \n {\n movement();\n }", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public abstract void move(int deltaX, int deltaY);", "void dealerMove() {\n\t}", "public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);", "public int move () {\n intMoveState = 0;\r\n int pixel1;\r\n int pixel2;\r\n \r\n if (blnUp) {\r\n pixel1 = getPixelRGB (X - 25, Y + 10, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 10, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y -= intSpeed;\r\n intMoveState -= 1;\r\n }\r\n }\r\n if (blnDown) {\r\n pixel1 = getPixelRGB (X - 25, Y + 46, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 46, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y += intSpeed;\r\n intMoveState += 1;\r\n }\r\n }\r\n if (blnLeft) {\r\n pixel1 = getPixelRGB (X - 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X - 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X -= intSpeed;\r\n intMoveState -= 2;\r\n }\r\n }\r\n if (blnRight) {\r\n pixel1 = getPixelRGB (X + 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X + 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X += intSpeed;\r\n intMoveState += 2;\r\n }\r\n }\r\n \r\n try {\r\n dblAngle = Math.atan2((MouseY - Y),(MouseX - X));\r\n if (dblAngle < - Math.PI/4) {\r\n dblAngle = 2 * Math.PI + dblAngle;\r\n }\r\n }catch (ArithmeticException e) {\r\n if (MouseY < Y) {\r\n dblAngle = 3 * Math.PI/2;\r\n }else {\r\n dblAngle = Math.PI/2;\r\n }\r\n }\r\n degreesAngle = (int) (Math.toDegrees(dblAngle)); \r\n \r\n if(intHealth < 0 && !UserInterface.deathScreenVisible){\r\n UserInterface.deathScreenVisible = true;\r\n deathTime = System.nanoTime();\r\n ClientMain.ssm.sendText(\"player,\" + ClientMain.intPlayerNumber + \",iamdeadlol\");\r\n }\r\n \r\n return getPixelRGB (X, Y + 46, \"g\");\r\n }", "public abstract void move(int newXPosition, int newYPosition, PiecePosition position) throws BoardException;", "@Override\n public void act()\n {\n Location loc = getLocation();\n int r = loc.getRow();\n int c = loc.getCol();\n int dir = getDirection();\n if(dir == Location.NORTH)\n {\n if(r - START_ROW + 1 > -2*(address & ADDRESS))\n {\n move();\n }\n else\n {\n setDirection(Location.WEST);\n }\n }\n else if(dir == Location.WEST)\n {\n if(c <= RETURN_COL)\n {\n setDirection(Location.SOUTH);\n }\n else\n {\n Bit b = null;\n Actor a = getGrid().get(loc.getAdjacentLocation(Location.SOUTH));\n if(a instanceof Bit) b = (Bit)a;\n if(b != null)\n {\n processBit(b,-c-1);\n }\n move();\n }\n }\n else if(dir == Location.SOUTH)\n {\n if(r == -1)\n {\n setDirection(Location.EAST);\n }\n else\n {\n move();\n }\n }\n else if(dir == Location.EAST)\n {\n move();\n }\n else\n {\n System.err.println(\"yer bus is on an angle bud\");\n }\n }", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "@Override\n public void move () {\n }", "public abstract void advanceBoard(float deltaTime);", "public abstract Piece movePiece(Move move);", "@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }", "public void runaway(ScannedRobotEvent e){\r\n if(didenemyshoot(e)){\r\n //moves away from the enemy\r\n setTurnRight(5 * turndir);\r\n setAhead(e.getVelocity() * movedir);\r\n //tell where it is heading\r\n movedir *= -1;\r\n }\r\n }", "public void calRightMove() {\n }", "public abstract int makeMove();", "void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }", "@Override\n public void action(){\n\n Position move=this.findWeed();\n if(move.getX()==0 && move.getY()==0){\n super.action();\n }\n else{\n System.out.println(this.getClass().getSimpleName());\n int actualX = this.position.getX();\n int actualY = this.position.getY();\n int xAction = actualX+move.getX();\n int yAction = actualY+move.getY();\n Organism tmpOrganism = this.WORLD.getOrganism(xAction, yAction);\n if(tmpOrganism==null){\n this.move(move.getX(), move.getY());\n this.WORLD.erasePosition(actualX,actualY);\n }\n else{\n tmpOrganism.collision(this, actualX, actualY, move);\n }\n }\n }", "public abstract void move(Position position);", "public abstract void move(int row, int col) throws IllegalMoveException;", "public void move()\n\t{\n\t\tVector v = ship.v;\n\t\tb = b.getLocation().add(v).getBlock();\n\t\tif(triangle != null) triangle.move();\n\t\tif(rear != null) rear.move();\n\t\tif(foreAndAft != null) foreAndAft.move();\n\t\tif(sails != null) for(int i = 0; i < sails.size(); i++)\n\t\t{\n\t\t\tSail sail = sails.get(i);\n\t\t\tsail.move();\n\t\t}\n\t}", "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public void act() \n {\n move(4); \n collision();\n \n \n }", "@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}", "public void act() \n {\n move(5);\n turn(4);\n }", "protected void makeAmove(Board b, Player p){\r\n\t\tthis.setMove(0);\t\t\r\n\t\tif (this.winnable(b) != 0)\r\n\t\t\tthis.setMove(this.winnable(b));\r\n\t\telse if (p.winnable(b) != 0)\r\n\t\t\tthis.setMove(p.winnable(b));\r\n\t\telse if (b.getTile(5) == ' ')\r\n\t\t\tthis.setMove(5);\r\n\t\telse{\r\n\t\t\tRandom tile = new Random();\r\n\t\t\tdo{\r\n\t\t\t\tthis.move = (tile.nextInt(9) + 1);\r\n\t\t\t\t// int 0-8 inclusive and adding 1 makes it 1-9 incl\r\n\t\t\t}while ((b.getTile(this.getMove())=='O') || \r\n\t\t\t\t\t(b.getTile(this.getMove())=='X'));\r\n\t\t\t// just checks to see if it's is a valid move\r\n\t\t\t// empty and within the bounds of 1-9\r\n\t\t}\r\n\t\tb.setTile(this.getMove(), this.getSymbol());\r\n\t\tSystem.out.println(\"Player \"+this.ID+\" (computer) chooses position \"+this.getMove());\r\n\t}", "@Override\n public void move(double xa, double ya) {\n if (alive) {\n y += ya;\n x += xa;\n }\n }", "private void move() throws Exception{\r\n\t switch (direction) {\r\n\t case Constants.DIRECTION_NORTH:\r\n\t y += 1;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t x += 1;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t y -= 1;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t x -= 1;\r\n\t break;\r\n\t }\r\n\t if(!verifyBounds()){\r\n\t throw new Exception(\"Rover exceeding range!!!\");\r\n\t }\r\n\t }", "public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }", "public abstract void move(int p_index) ;", "public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }", "boolean doMove();", "private void advanceInvaders() {\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader i : row) {\n\t\t\t\ti.setY(i.getY() + 4);\n\t\t\t}\n\t\t}\n\t}", "public abstract void move(int elapsedTime);", "public void move(){\n x+=xDirection;\n y+=yDirection;\n }", "void move(Tile t);", "public void move() {\n if (!canMove) {\n return;\n }\n int moveX = currDirection == EAST ? PACE : currDirection == WEST ? -PACE : 0;\n int moveY = currDirection == NORTH ? PACE : currDirection == SOUTH ? -PACE : 0;\n if (grid == null || grid.isOutside(currX + moveX, currY + moveY)) {\n return;\n }\n currX += moveX;\n currY += moveY;\n }", "public void act(){\n\t\tTile[] possibleMoves = game.getAllNeighbours(currentPosition);\r\n\t\tTile targetTile = possibleMoves[rng.nextInt(4)];\r\n\t\tmove(targetTile);\r\n\t}", "@Override\n\tpublic void move(int xPos, int yPos) {\n\t}", "public abstract void move( char direction );", "public abstract void turnToLiving(int x, int y);", "void onMove();", "public void move()\r\n\t{\r\n\t\ty-=8;\r\n\t}", "public void aiMove(int turn)\n\t{\n\t\tint row = 0;\n\t\tint col = 0;\n\t\tint choice = 0;\n\t\t/*\n\t\t * Picks a random move on the first turn\n\t\t */\n\t\tif (turn == 0 )\n\t\t{\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\trow = (int) (Math.random() * 3);\n\t\t\t\tcol = (int) (Math.random() * 3);\n\t\t\t\tchoice = (int) (Math.random() * (ai.size()-1));\n\t\t\t\tif (board[row][col] == 0) \n\t\t\t\t{\t\t// valid move (empty slot)\n\t\t\t\t\tboard[row][col] = ai.get(choice);\n\t\t\t\t\tdraw.drawMove(col, row,ai.get(choice));\n\t\t\t\t\tai.remove(choice);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * Otherwise checks every number, and every square for a winning move\n\t\t */\n\t\telse\n\t\t{\n\t\t\tboolean madeMove = false;\n\t\t\twhile (true) \t\t\t\t\t\t\t\t\t\n\t\t\t{\n\t\t\t\tif (madeMove == true)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfor (int a = 0; a <ai.size(); a++)\n\t\t\t\t{\n\t\t\t \t\tfor (int x = 0; x < 3; x++)\t\t\t\t\t//loops through all squares and checks if free\n\t\t\t \t\t{\n\t\t\t \t\t\tfor ( int y = 0; y < 3; y++)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\tif (madeMove == false)\n\t\t\t \t\t\t\t{\n\t\t\t\t \t\t\t\tif( board[x][y] == 0)\n\t\t\t\t \t\t\t\t{\n\t\t\t\t \t\t\t\t\tif (((x == 0 && y == 0)\t\t\t\t\t//checks for first diagonal and then if it is the winning move\n\t\t\t\t \t\t\t\t\t\t|| (x == 1 && y == 1) \n\t\t\t\t \t\t\t\t\t\t|| (x == 2 && y == 2)))\n\t\t\t\t \t\t\t\t\t{\n\t\t\t\t \t\t\t\t\t\tif (Math.abs(board[0][0] + board[1][1] + board[2][2]) + ai.get(a) == 15)\n\t\t\t\t \t\t\t\t\t\t{\n\t\t\t\t \t\t\t\t\t\t\trow = x;\n\t\t\t\t \t\t\t\t\t\t\tcol = y;\n\t\t\t\t \t\t\t\t\t\t\tboard[x][y] = ai.get(a);\n\t\t\t\t \t\t\t\t\t\t\tmadeMove = true;\n\t\t\t\t \t\t\t\t\t\t\tdraw.drawMove(col, row, ai.get(a));\n\t\t\t\t \t\t\t\t\t\t\tai.remove(a);\n\t\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t\t \t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\t}\n\t\t\t\t \t\t\t\t\tif (((x == 0 && y == 2) \t\t\t//checks second diagonal for winning move\n\t\t\t\t\t \t\t\t\t\t\t|| (x == 1 && y == 1) \n\t\t\t\t\t \t\t\t\t\t\t|| (x == 2 && y == 0)))\n\t\t\t\t\t \t\t\t\t{\n\t\t\t\t \t\t\t\t\t\tif (Math.abs(board[0][2] + board[1][1] + board[2][0]) + ai.get(a) == 15)\n\t\t\t\t \t\t\t\t\t\t{\n\t\t\t\t \t\t\t\t\t\t\trow = x;\n\t\t\t\t \t\t\t\t\t\t\tcol = y;\n\t\t\t\t \t\t\t\t\t\t\tboard[x][y] = ai.get(a);\n\t\t\t\t \t\t\t\t\t\t\tmadeMove = true;\n\t\t\t\t \t\t\t\t\t\t\tdraw.drawMove(col, row, ai.get(a));\n\t\t\t\t \t\t\t\t\t\t\tai.remove(a);\n\t\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t\t \t\t\t\t\t\t}\n\t\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\t\telse if ((Math.abs(board[x][0] + board[x][1] + board[x][2]) + ai.get(a) == 15))\t//checks for winning row\n\t\t\t\t \t\t\t\t\t{\n\t\t\t\t \t\t\t\t\t\trow = x;\n\t\t\t \t\t\t\t\t\t\tcol = y;\n\t\t\t \t\t\t\t\t\t\tboard[x][y] = ai.get(a);\n\t\t\t \t\t\t\t\t\t\tmadeMove = true;\n\t\t\t \t\t\t\t\t\t\tdraw.drawMove(col, row, ai.get(a));\n\t\t\t \t\t\t\t\t\t\tai.remove(a);\n\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t\t \t\t\t\t\t}\n\t\t\t\t \t\t\t\t\telse if ((Math.abs(board[0][y] + board[1][y] + board[2][y]) + ai.get(a) == 15)) //checks for winning column\n\t\t\t\t \t\t\t\t\t{\n\t\t\t\t \t\t\t\t\t\trow = x;\n\t\t\t \t\t\t\t\t\t\tcol = y;\n\t\t\t \t\t\t\t\t\t\tboard[x][y] = ai.get(a);\n\t\t\t \t\t\t\t\t\t\tmadeMove = true;\n\t\t\t \t\t\t\t\t\t\tdraw.drawMove(col, row, ai.get(a));\n\t\t\t \t\t\t\t\t\t\tai.remove(a);\n\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t\t \t\t\t\t\t}\n\t\t\t\t \t\t\t\t}\n\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t}\n\t\t\t \t\tif (madeMove == false)\t\t\t\t\t\t//if a winning move can't be found, a random one is made\n\t \t\t\t\t{\n\t\t\t\t\t\tchoice = (int) (Math.random() * (ai.size()-1));\n\t \t\t\t\t\trow = (int) (Math.random() * 3);\n\t \t\t\t\t\tcol = (int) (Math.random() * 3);\n\t \t\t\t\t\tif (board[row][col] == 0) \n\t \t\t\t\t\t{\t\t\t// valid move (empty slot)\n\t \t\t\t\t\t\tboard[row][col] = ai.get(choice);\n\t \t\t\t\t\t\tdraw.drawMove(col, row, ai.get(choice));\n\t \t\t\t\t\t\tai.remove(choice);\n\t \t\t\t\t\t\tmadeMove = true;\n\t \t\t\t\t\t\tbreak;\n\t \t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \t\telse\n\t\t\t \t\t{\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void movePiece(Coordinate from, Coordinate to);", "void doneMoving();" ]
[ "0.73920935", "0.7004827", "0.6792384", "0.6791495", "0.6790173", "0.6737995", "0.67105114", "0.67102283", "0.6704631", "0.65676373", "0.65588254", "0.65588254", "0.6555812", "0.65452576", "0.65305626", "0.6529224", "0.6523818", "0.6523818", "0.6523818", "0.6523818", "0.6523818", "0.6523818", "0.6523818", "0.6510028", "0.65059566", "0.64786196", "0.6477762", "0.6468721", "0.6468096", "0.6467747", "0.6449987", "0.6443655", "0.64402086", "0.64377797", "0.64258903", "0.6423314", "0.6419401", "0.6398105", "0.6387692", "0.63677216", "0.6355383", "0.6345929", "0.63335866", "0.6325064", "0.6315068", "0.63104415", "0.6298132", "0.62923354", "0.6292162", "0.6288742", "0.628612", "0.6279411", "0.62692845", "0.62573284", "0.62490106", "0.62308854", "0.62282604", "0.62148213", "0.6209658", "0.6204982", "0.620273", "0.6199534", "0.6193947", "0.61932147", "0.6189415", "0.61785", "0.6177316", "0.6176671", "0.61748064", "0.6166156", "0.61630803", "0.61587185", "0.6154614", "0.6148356", "0.61461604", "0.61435837", "0.61430496", "0.6140428", "0.6137733", "0.61325693", "0.6130515", "0.6129805", "0.61162436", "0.61089647", "0.61007386", "0.6088326", "0.60847473", "0.6076216", "0.60758156", "0.60755455", "0.6073993", "0.6071223", "0.6071093", "0.60596824", "0.6054666", "0.6054094", "0.60531336", "0.60506874", "0.60488534", "0.6036774" ]
0.76146054
0
end of anemy move ari A method that picks up an item from the game board.
public Item pickup(){ for(int i= 0; i< this.Items.length;i++){ for(int p = 0; p < this.Items.length; p++){ if(this.Items[i][p] != null && this.position[i][p] == 1){ Item loot = Items[i][p]; Items[i][p] = null; return loot; } } } return new Item(ItemType.other, "dust", 0,0,0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void grab() {\r\n\t\tString item = mapContents[currentPlayer.getCurrentRoom()];\r\n\t\tif (item == null) return;\r\n\t\t\r\n\t\t// If artifact, make sure has room or backpack\r\n\t\tif (item.startsWith(\"Artifact\")) {\r\n\t\t\tif (currentPlayer.count(\"Artifact\") <= currentPlayer.count(\"Backpack\")) {\r\n\t\t\t\tcurrentPlayer.pickup(item);\r\n\t\t\t\tattackLevel++;\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` picked up an Artifact **\"+item.substring(8)+\"** :star:\",true);\r\n\t\t\t\taddHistory(\"ARTIFACT \"+item.substring(8));\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = null;\r\n\t\t\t}\r\n\t\t// If monkey idol, make sure didn't already pick one up this turn\r\n\t\t} else if (item.startsWith(\"MonkeyIdol\") && !currentPlayer.getAlreadyPickedUpMonkeyIdol()) {\r\n\t\t\tcurrentPlayer.pickup(item);\r\n\t\t\tcurrentPlayer.setAlreadyPickedUpMonkeyIdol(true);\r\n\t\t\tint num = Integer.parseInt(item.substring(10));\r\n\t\t\tnum--;\r\n\t\t\tif (num == 0) {\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = null;\r\n\t\t\t} else {\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = \"MonkeyIdol\"+num;\r\n\t\t\t}\r\n\t\t\taddEvent(\"``\"+currentName+\"`` picked up a Monkey Idol **5** :star:\",true);\r\n\t\t\taddHistory(\"IDOL \"+item.substring(8));\r\n\t\t}\r\n\t\tupdateReactionsInfo();\r\n\t\tupdatePlayArea(currentPlayer, false);\r\n\t\tupdateMarketAndTreasures(false);\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }", "@Override\r\n\tpublic void execute() throws InstructionExecutionException {\r\n\t\tif (id != null && robotContainer.containsItem(id))\r\n\t\t\tif (!navigation.findItemAtCurrentPlace(id)) {\r\n\t\t\t\tnavigation.dropItemAtCurrentPlace(robotContainer.pickItem(id));\r\n\t\t\t\tnavigation.updatePlace();\r\n\t\t\t} else\r\n\t\t\t\tthrow new InstructionExecutionException(PLACE_REPEAT_ITEM + id);\r\n\t\telse\r\n\t\t\tthrow new InstructionExecutionException(CONTAINER_NO_ITEM + id\r\n\t\t\t\t\t+ \".\");\r\n\t\t\t\t\r\n\r\n\t}", "private void takeItem(Command command) \n { \n if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What are you trying to take?\"); \n return; \n } \n \n String itemName = command.getSecondWord();\n String secondName = itemName + \"2\";\n \n Item thisItem = currentRoom.getItem(itemName);\n Item secondItem = currentRoom.getItem(secondName);\n \n if (thisItem == null) {\n Logger.Log(\"There isn't a \" + itemName + \"in here!\");\n }\n else if (player.inventory.containsKey(itemName)){\n Logger.Log(\"You take another \" + itemName + \" and put it in your backpack.\");\n player.addItem(secondName, secondItem); \n }\n else if (player.inventory.containsKey(itemName)&&(player.inventory.containsKey(secondName))){\n Logger.Log(\"You don't need any more \" + itemName + \"s!\");\n }\n else { \n Logger.Log(\"You take the \" + itemName + \" and put it in your backpack.\");\n player.addItem(itemName, thisItem);\n } \n \n }", "@Override\n public void pickItem(int position) {\n setProductPicked(-1, position);\n }", "private void grabItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryAdd(itemFound, currentRoom);\n }\n }", "private void pickItem() \n {\n if(currentRoom.getShortDescription() == \"in the campus pub\" && i.picked3 == false)\n {\n i.item3 = true;\n i.picked3 = true;\n System.out.println(\"You picked a redbull drink\");\n }\n else if(currentRoom.getShortDescription() == \"in th hallway\" && i.picked2 == false)\n {\n i.item2 = true;\n i.picked2 = true;\n System.out.println(\"You picked a torch\");\n }\n else if(currentRoom.getShortDescription() == \"in the office\" && i.picked1 == false)\n {\n i.item1 = true;\n i.picked1 = true;\n System.out.println(\"You picked a pair of scissors\");\n }\n else\n System.out.println(\"There is no items in the room!\");\n }", "void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }", "protected void pickItem(int x ){\r\n this.level -=x;\r\n }", "@Test\n\tpublic void testPickUpItem() {\n\t\tSquare square = new Square();\n\t\tItem item = new LightGrenade();\n\t\t\n\t\tsquare.addItem(item);\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tassertEquals(0, player.getAllItems().size());\n\t\tassertFalse(player.hasItem(item));\n\t\t\n\t\tplayer.pickUp(item);\n\t\tassertTrue(player.hasItem(item));\n\t}", "public void AIMakeMove() {\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint index = randomizer.nextInt(AIPossibleMoves.size());\n\t\tMove move = AIPossibleMoves.get(index);\n\t\tChecker checker = model.findChecker(move.getxOrigin(), move.getyOrigin());\n\t\tint xChange = (move.getxOrigin() - move.getxMove());\n\t\tint yChange = (move.getyOrigin() - move.getyMove());\n\t\t\n\t\tint xMoveNew = 0;\n\t\tint yMoveNew = 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(board.getBoard()[move.getyMove()][move.getxMove()] == 0) {\n\t\t\t//do nothing\n\t\t} else {\n\t\t\t//moving down\n\t\t\tif(yChange < 0) {\n\t\t\t\t//moving right\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//moving left\n\t\t\t\t\t\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//moving up\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\t//moving right\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t} else {\n\t\t\t\t\t//moving left \n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println(\"New Move is: \" + xMoveNew + \",\" + yMoveNew);\n\t\tif(canBeKing(checker, move)) {\n\t\t\tchecker = convertToKing(checker, move);\n\t\t\tmodel.updateChecker(move, checker, 2);\n\t\t\t\n\t\t\tprintBoard();\n\t\t\tmodel.moves.add(move);\n\t\t\treturn;\n\t\t}\n\t\tmodel.updateChecker(move, checker, 2);\n\t//\tSystem.out.println(\"AI - DEBUGGING\");\n\t//\tSystem.out.println(\"Origin Piece: \" + move.getxOrigin() + \",\" + move.getyOrigin());\n\t//\tSystem.out.println(\"Move Position: \" + move.getxMove() + \",\" + move.getyMove());\n\t\tupdateBoard(move);\n\t\tmodel.moves.add(move);\n\t\tprintBoard();\n\t\t\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tOptional<Piece> p = null;\n\t\t\n\t\tp = sq.processMousePress(e);\n\t\tp.ifPresent(item->{\n\t\t\titem.setScale(AnimalQueue.PieceScale);\n\t\t\titem.getMyQueue().addPiece(item, 0);\n\t\t\titem.draw();\n\t\t//\tsq.draw();\n\t\t\t});\n\t\tfor(int i=0; i<this.BOARD_SIZE; i++)\n\t\t{\n\t\t\tAnimalQueue aq = this.TheBoard[i];\n\t\t\tif(aq.contains(e.getPoint()))\n\t\t\t{\n\t\t\t\taq.getTop().ifPresent(item->{\n\t\t\t\t\tif(sq.isValidMove(item))\n\t\t\t\t\t{\n\t\t\t\t\t\taq.removePiece()\n\t\t\t\t\t\t.ifPresent(item2->{\n\t\t\t\t\t\t\tSystem.out.println(item2);\n\t\t\t\t\t\t\titem2.setScale(SolutionQueue.PieceScale);\n\t\t\t\t\t\t\tsq.addPiece(item2);\n\t\t\t\t\t\t\titem2.draw();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\tSystem.out.println(\"Not a valie move\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t/*\n\t\t\t\tp = aq.processMousePress(e);\n\t\t\t\tp.ifPresent(item->{\n\t\t//\t\t\tSystem.out.println(\"\\t aq contents =\"+ aq.myQueue);\n\t\t\t\t\tPiece tempP = aq.removePiece();\n\t\t\t\t\ttempP.setScale(SolutionQueue.PieceScale);\n\t\t\t\t\tsq.addPiece(tempP);\n\t\t//\t\t\tSystem.out.println(\"\\t Peek =\"+ aq.removePiece());\n\t\t//\t\t\tSystem.out.println(\"\\t PieceCode removed =\"+ tempP);\n\t\t//\t\t\tSystem.out.println(\"\\t aq contents =\"+ aq.myQueue);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t*/\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdraw();\n\t\trepaint();\n\t}", "public void throwItem() {\n this.curItem.setState(Item.THROWING);\n this.curItem.setX((int)(this.x));\n this.curItem.setY((int)(this.y));\n this.curItem.setXVel(Item.X_SPEED*this.dir);\n if (this.curItem instanceof PickupableWeaponHolder) {\n this.weapon = this.fist;\n }\n this.curItem = null;\n }", "public void takeItem(String name, Player player)\n {\n int i=items.size()-1;\n while(i>=0){\n if(items.get(i).getName().equals(name))\n {\n player.addItem(items.get(i));\n System.out.println(\"You take the \"+items.get(i).getName()+\"!\");\n items.remove(i);\n return;\n }\n i--;\n }\n System.out.println(\"Action failed. Review your input and try again!\");\n }", "@Override\r\n\tpublic void undo() throws InstructionExecutionException {\n\t\ttry\r\n\t\t{\r\n\t\t\tthis.robotContainer.pickItem(id);\r\n\t\t\tthis.robotContainer.addItem(lastItem);\r\n\t\t\tthis.engine.addFuel(lastFuel-this.engine.getFuel());\r\n\t\t\tthis.engine.addRecycledMaterial(lastRecycledMaterial-this.engine.getRecycledMaterial());\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tthrow new InstructionExecutionException();\r\n\t\t}\r\n\t}", "@Override\n public void doPickupItem(final GameObject object) {\n if (!object.isItem()) {\n _log.warn(\"trying to pickup wrong target.\" + getTarget());\n return;\n }\n\n sendActionFailed();\n stopMove();\n\n final ItemInstance item = (ItemInstance) object;\n\n synchronized (item) {\n if (!item.isVisible()) {\n return;\n }\n\n // Check if me not owner of item and, if in party, not in owner party and nonowner pickup delay still active\n if (!ItemFunctions.checkIfCanPickup(this, item)) {\n final SystemMessage sm;\n if (item.getItemId() == ItemTemplate.ITEM_ID_ADENA) {\n sm = new SystemMessage(SystemMsg.YOU_HAVE_FAILED_TO_PICK_UP_S1_ADENA);\n sm.addNumber(item.getCount());\n } else {\n sm = new SystemMessage(SystemMsg.YOU_HAVE_FAILED_TO_PICK_UP_S1);\n sm.addItemName(item.getItemId());\n }\n sendPacket(sm);\n return;\n }\n\n // Herbs\n if (item.isHerb()) {\n final SkillEntry[] skills = item.getTemplate().getAttachedSkills();\n if (skills.length > 0) {\n for (final SkillEntry skill : skills) {\n altUseSkill(skill, this);\n if (getServitor() != null && getServitor().isSummon() && !getServitor().isDead()) {\n getServitor().altUseSkill(skill, getServitor());\n }\n }\n }\n\n broadcastPacket(new GetItem(item, getObjectId()));\n item.deleteMe();\n return;\n }\n\n final FlagItemAttachment attachment = item.getAttachment() instanceof FlagItemAttachment ? (FlagItemAttachment) item.getAttachment() : null;\n\n if (!isInParty() || attachment != null) {\n if (pickupItem(item, Log.Pickup)) {\n broadcastPacket(new GetItem(item, getObjectId()));\n broadcastPickUpMsg(item);\n item.pickupMe();\n }\n } else {\n getParty().distributeItem(this, item, null);\n }\n }\n }", "@Override\r\n\tpublic void execute() throws InstructionExecutionException {\r\n\t\tif (id != null && robotContainer.containsItem(id))\r\n\t\t\tif (!navigation.findItemAtCurrentPlace(id)) {\r\n\t\t\t\tnavigation.getCurrentPlace().addItem(\r\n\t\t\t\t\t\trobotContainer.pickItem(id));\r\n\t\t\t\tSystem.out.println(PLACE_ITEM + id);\r\n\t\t\t} else\r\n\t\t\t\tthrow new InstructionExecutionException(PLACE_REPEAT_ITEM + id);\r\n\t\telse\r\n\t\t\tthrow new InstructionExecutionException(CONTAINER_NO_ITEM + id\r\n\t\t\t\t\t+ \".\");\r\n\t}", "private void useItem(Command command) \n { \n if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What are you trying to use?\"); \n return; \n } \n \n String itemUsed = command.getSecondWord();\n String secondUsed = itemUsed + \"2\";\n \n Item thisItem = player.getItem(itemUsed);\n Item secondItem = player.getItem(secondUsed);\n \n Creature thisFriend = player.getCompanion(itemUsed);\n \n //Tries to retrieve which item or creature to use. If not, an error message is returned \n if (thisItem == null&&secondItem == null&&thisFriend == null) {\n Logger.Log(\"You don't have a \" + itemUsed);\n }\n else if (player.inventory.containsKey(itemUsed)) { \n player.removeItem(itemUsed); //The item is removed from inventory\n thisItem.UseItem(this);\n }\n else if (player.inventory.containsKey(secondUsed)) {\n player.removeItem(secondUsed); //The item is removed from inventory\n secondItem.UseItem(this);\n }\n else if (player.friends.containsKey(itemUsed)){ \n thisFriend.UseCompanion(this);\n if (thisFriend.flees){\n player.removeCompanion(itemUsed); //Companions do not get removed from inventory unless the flees boolean has been set to true.\n }\n } \n }", "public Item pickUpItem(String itemName) {\n Item item = currentRoom.removeItem(itemName);\n if(item != null) {\n items.put(item.getName(), item);\n }\n return item;\n }", "public void act(){\n\t\tTile[] possibleMoves = game.getAllNeighbours(currentPosition);\r\n\t\tTile targetTile = possibleMoves[rng.nextInt(4)];\r\n\t\tmove(targetTile);\r\n\t}", "protected abstract void chooseSprite();", "public void takeSomething()\r\n {\r\n \tThing item = room.getRandomThing();\r\n \tif (item != null)\r\n \t\ttake(item);\r\n }", "public void tick() {\r\n assert (ic != null);\r\n \r\n Iterator<Item> it = items.iterator();\r\n while (it.hasNext()) {\r\n ic.setItem(it.next());\r\n ic.tick();\r\n if (ic.isItemPickedUp()) {\r\n it.remove();\r\n }\r\n }\r\n }", "public void act() \n {\n if(Greenfoot.mouseClicked(this)){\n storeMenu.getLastPressed(this,item,cost);\n changeImage();\n } \n }", "@Override // see item.java\n\tpublic void pickUp() {\n\n\t}", "public void selectTile(MahjongSolitaireTile selectTile)\n {\n // IF IT'S ALREADY THE SELECTED TILE, DESELECT IT\n if (selectTile == selectedTile)\n {\n selectedTile = null;\n selectTile.setState(VISIBLE_STATE);\n return;\n }\n \n // IF THE TILE IS NOT AT THE TOP OF ITS STACK, DO NOTHING\n int col = selectTile.getGridColumn();\n int row = selectTile.getGridRow();\n int index = tileGrid[col][row].indexOf(selectTile);\n if (index != (tileGrid[col][row].size() - 1))\n return;\n \n // IF THE TILE IS NOT FREE, DO NOTHING, BUT MAKE SURE WE GIVE FEEDBACK\n if ((col > 0) && (col < (gridColumns - 1)))\n {\n int leftZ = tileGrid[col-1][row].size();\n int z = tileGrid[col][row].size();\n int rightZ = tileGrid[col+1][row].size();\n if ((z <= leftZ) && (z <= rightZ))\n {\n // IF IT'S ALREADY INCORRECTLY SELECTED, DEACTIVATE THE FEEDBACK\n if (selectTile.getState().equals(INCORRECTLY_SELECTED_STATE))\n {\n selectTile.setState(VISIBLE_STATE);\n redTile = null;\n return;\n }\n else if(selectTile.getState().equals(VISIBLE_STATE))\n {\n //check if there's another red tile\n if(redTile != null)\n {\n //then make previous red tile visible instead\n redTile.setState(VISIBLE_STATE);\n redTile = null;\n }\n //make it red and give it audio\n selectTile.setState(INCORRECTLY_SELECTED_STATE);\n miniGame.getAudio().play(MahjongSolitairePropertyType.BLOCKED_TILE_AUDIO_CUE.toString(), false);\n redTile = selectTile;\n return;\n }\n }\n }\n\n // IT'S FREE\n if (selectedTile == null)\n {\n selectedTile = selectTile;\n selectedTile.setState(SELECTED_STATE);\n miniGame.getAudio().play(MahjongSolitairePropertyType.SELECT_AUDIO_CUE.toString(), false);\n }\n //they match\n else if(selectedTile.match(selectTile))\n {\n //remove\n MahjongSolitaireMove move = new MahjongSolitaireMove();\n move.col1 = selectedTile.getGridColumn();\n move.row1 = selectedTile.getGridRow();\n move.col2 = selectTile.getGridColumn();\n move.row2 = selectTile.getGridRow();\n processMove(move);\n redTile.setState(VISIBLE_STATE);\n redTile = null;\n }\n // THEY DON'T MATCH, GIVE SOME AUDIO FEEDBACK\n else\n {\n miniGame.getAudio().play(MahjongSolitairePropertyType.NO_MATCH_AUDIO_CUE.toString(), false); \n }\n }", "public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }", "public boolean attempItemUseTarget(ItemPart itemPart, ItemStack itemStack, World world, BlockPos pos, EnumFacing sideHit);", "private void dropItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryDel(itemFound);\n }\n }", "@Override\n\tpublic void nextTurn()\n\t{\n\t\tif (isInventoryFull())\n\t\t{\n\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\"[THE INVENTORY OF \" + myWorker.getId()\n\t\t\t\t\t\t\t+ \" IS FULL AND IS GONNA UNLOAD]\");\n\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\tBuilding unloadBuilding = null;\n\t\t\tif (getMyPlayer().getStockpiles().size() > 0)\n\t\t\t{\n\t\t\t\tRandom random = new Random(100);\n\t\t\t\tint chosenStockpile = random.nextInt(getMyPlayer()\n\t\t\t\t\t\t.getStockpiles().size());\n\n\t\t\t\tunloadBuilding = getMyPlayer().getStockpiles().get(\n\t\t\t\t\t\tchosenStockpile);\n\t\t\t} else if (getMyPlayer().getMainBuildings().size() > 0)\n\t\t\t{\n\t\t\t\tunloadBuilding = getMyPlayer().getMainBuildings().get(0);\n\t\t\t}\n\n\t\t\tif (doIMoveToBuilding(unloadBuilding))\n\t\t\t{\n\t\t\t\tMoveAction move;\n\t\t\t\tPoint dest = getMoveDestination(unloadBuilding);\n\t\t\t\tif (dest != null)\n\t\t\t\t{\n\t\t\t\t\tmove = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\t\tmove.doAction();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADDED \"\n\t\t\t\t\t\t\t\t+ myWorker.getLoadInInventory()\n\t\t\t\t\t\t\t\t+ \" TO RESOURCES]\");\n\t\t\t\tif (destBuilding instanceof Farm)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getFoodInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof StoneMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getStoneInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof GoldMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getGoldInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof WoodCamp)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getLumberInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\tmyWorker.setOccupationType(OccupationType.IDLE);\n\t\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\t\tmyWorker.setLoadInInventory(0);\n\t\t\t\tmyWorker.setActionController(null);\n\t\t\t}\n\t\t} else if (doIMoveToBuilding(destBuilding))\n\t\t{\n\t\t\tPoint dest = getMoveDestination(destBuilding);\n\t\t\tif (dest == null)\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"BuildController class:nextTurn(): dest is null! do something!!!!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tMoveAction move = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\tmove.doAction();\n\t\t\t}\n\t\t} else if (!isInventoryFull())\n\t\t{\n\t\t\tdestBuilding.getWorkersInside().add(myWorker);\n\t\t\tint collectResourcePerTurn = 0;\n\t\t\tif (destBuilding instanceof Farm)\n\t\t\t{\n\t\t\t\tmyWorker.setFoodCollectingExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getFood();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getFoodProductionRate()));\n\t\t\t} else if (destBuilding instanceof GoldMine)\n\t\t\t{\n\t\t\t\tmyWorker.setGoldMiningExperience(myWorker\n\t\t\t\t\t\t.getGoldMiningExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getGold();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getGoldMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getGoldProductionRate()));\n\t\t\t} else if (destBuilding instanceof StoneMine)\n\t\t\t{\n\t\t\t\tmyWorker.setStoneMiningExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getStone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getStoneMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getStoneProductionRate()));\n\n\t\t\t} else if (destBuilding instanceof WoodCamp)\n\t\t\t{\n\t\t\t\tmyWorker.setWoodCampExperience(myWorker.getWoodCampExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()]\n\t\t\t\t\t\t\t\t.getLumber();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getWoodCampExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getWoodProductionRate()));\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADD \"\n\t\t\t\t\t\t\t\t+ collectResourcePerTurn\n\t\t\t\t\t\t\t\t+ \" OF RESOURCE THIS TURN]\");\n\t\t\t}\n\n\t\t\tmyWorker.setLoadInInventory(collectResourcePerTurn\n\t\t\t\t\t+ myWorker.getLoadInInventory());\n\t\t}\n\t}", "void use(ATile clickedTile, GodSim g);", "public void pickUp(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (roomItems.contains(item)) {\n\t\t\tif (checkCapacity(item)) {\n\t\t\t\tsuper.addItem(item);\n\t\t\t\troom.removeItem(item);\n\t\t\t\tSystem.out.println(\"Picked up \" + item);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Not enough capacity.\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"No item '\" + itemName + \"' in the room.\");\n\t\t}\n\t}", "public void makesHereBack(){this.piece.affect();}", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}", "@Override\n\t\t\tpublic void execute() {\n\t\t\t\tif (Math.abs(player.getPosition().getX() - x) > 25 || Math.abs(player.getPosition().getY() - y) > 25) {\n\t\t\t\t\tplayer.getMovementQueue().reset();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Get ground item..\n\t\t\t\tOptional<ItemOnGround> item = ItemOnGroundManager.getGroundItem(Optional.of(player.getUsername()), itemId, position);\n\t\t\t\tif(item.isPresent()) {\n\t\t\t\t\t//Handle it..\n\t\t\t\t\t\n\t\t\t\t\t/** FIREMAKING **/\n\t\t\t\t\tOptional<LightableLog> log = LightableLog.getForItem(item.get().getItem().getId());\n\t\t\t\t\tif(log.isPresent()) {\n\t\t\t\t\t\tplayer.getSkillManager().startSkillable(new Firemaking(log.get(), item.get()));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private void dropDown() {\n int newY = curY;\n\n while (newY > 0) {\n\n if (!tryMove(curPiece, curX, newY - 1)) {\n \n break;\n }\n \n --newY;\n }\n\n pieceDropped();\n }", "public final Item pickUp(Area area){\r\n Item ret = pop();\r\n if(isEmpty()) area.removeReceptacle(this);\r\n return ret;\r\n }", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "private void sellItem(ShopItem item) {\n if (!world.ifHasItem(item.getName())) {\n System.out.println(\"You don't have Item : \" + item.getName());\n return;\n }\n world.removeItem(item.getName());\n int gold = world.getCharacter().getGold().get();\n world.getCharacter().setGold(gold + item.getPrice());\n System.out.println(\"You have sold Item : \" + item.getName());\n }", "public void toggleSelected(){\n if(!selected) {\n this.graphicsGroup.toFront();\n// System.out.println(\"selecting\");\n transparentBoxImages = new Image[(int)this.getWidth()/32][(int) this.getHeight()/32];\n //add the box to the proper position for each row this world addition covers\n for(int x = 0; x< this.getWidth() / game.BLOCK_SIZE; x++){\n for(int y = 0; y<this.getHeight()/game.BLOCK_SIZE;y++){\n Image nextImage = new Image(new TextureRegion(game.atlas.findRegion(\"GreenTransparent\")));\n nextImage.setSize(game.BLOCK_SIZE, game.BLOCK_SIZE);\n nextImage.setPosition(this.getX() + (x * game.BLOCK_SIZE), this.getY() + (y * game.BLOCK_SIZE));\n\n graphicsGroup.addActorBefore(this, nextImage);\n transparentBoxImages[x][y]= nextImage;\n\n }\n }\n\n //pick the item up\n this.setY(this.getY() + 10);\n selected = true;\n }\n else{\n\n //put the item back down\n this.setY(this.getY() - 10);\n\n for(int x = 0; x< this.getWidth() / game.BLOCK_SIZE; x++){\n for(int y = 0; y<this.getHeight()/game.BLOCK_SIZE;y++){\n graphicsGroup.removeActor(transparentBoxImages[x][y]);\n\n }\n }\n\n\n selected = false;\n\n //if we can't place it there, then we will just run everything again\n if(!game.placeable){\n Timer.schedule(new Timer.Task(){\n @Override\n public void run() {\n game.selectEnemy(worldAddition);\n }\n }, 0.1f);\n }\n\n\n }\n }", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "public void playerMove(SharedConstants.PlayableItem playitem){\n\t\tboolean isValidInput = false;\n\t\tint col;\n\t\tString AICoordinates;\n\t\tdo {\n\t\t\tif(currentPlayer == SharedConstants.PlayableItem.BLACK) {\n\t\t\t\tSystem.out.print(\"What column do you wish to put your piece in player Black?\\n\"); \n\t\t\t\tint[] parsed = consoleParser(playerMove,false);\n\t\t\t\tcol = parsed[0];\n\t\t\t\tif(col == -2){\n\t\t\t\t\tSystem.out.println(\"Redo\");\n\t\t\t\t\tredoBoard();\n\t\t\t\t}\n\t\t\t\telse if(col == -3){\n\t\t\t\t\tSystem.out.println(\"Undo\");\n\t\t\t\t\tundoBoard();\n\t\t\t\t}\n\t\t\t\telse if(col == -4){\n\t\t\t\t\tSystem.out.println(\"Save\");\n\t\t\t\t\tsaveMove();\n\t\t\t\t}\n\t\t\t\telse if(col == -5){\n\t\t\t\t\tSystem.out.println(\"Load\");\n\t\t\t\t\tloadMove();\n\t\t\t\t}\n\t\t\t\tif(validMove(col)){\n\t\t\t\t\tgameStateModel.getUndoBoard().add(board.makeDeepCopy());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.print(\"AI \" + aiPlayer.getAIType() + \" move \\n\");\n\t\t\t\tAICoordinates = aiPlayer.makeMove(this);\n\t\t\t\tcol = Integer.parseInt(AICoordinates.split(\",\")[1]);\n\t\t\t}\n\t if(validMove(col)){\n\t \t\tint row = 5;\n\t \t\tint substituteLevel = (currentPlayer.equals(SharedConstants.PlayableItem.BLACK) ? -2:-1);\n\t \t\tmoveSet(row,col,substituteLevel);\n\t\t \tisValidInput = true;\n\t }\n\t else if(col < -1){\n\t \tSystem.out.println(\"Action\");\n\t }\n\t else\n\t\t\t\tSystem.out.println(\"Invalid move\"); \t\n\t\t} while(!isValidInput);\t\n\t\tif(isGameOver()){\n\t\t\tcurrentState = SharedConstants.GameStatus.GAME_END;\n\t\t}\n\t}", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "private Item chooseValidItem()\n {\n\n // Sets the intial random value.\n int numberRandom = random.nextInt(items.size());\n\n while (trackItems.contains(items.get(numberRandom).getName())){\n numberRandom = random.nextInt(items.size());\n }\n\n // Loops until a unused value is assigned to numberRandom,\n // within the array list size.\n \n trackItems.push(items.get(numberRandom).getName());\n\n return items.get(numberRandom);\n }", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "public void take(String secondWord) //Item second word of the command)\n {\n // if there is no second word, we don't know what to take...\n if(secondWord == null){\n System.out.println(\"Take what?\");\n }\n else{\n //if there are items in the rooms\n if(currentRoom.emptyRoom() == false){\n Item itemTaken = currentRoom.getItemRoom(secondWord);\n if(itemTaken != null){\n if(itemTaken.canBePickedUp() == true){\n if((inventoryWeight + itemTaken.getItemWeight()) <= maxWeight){\n //take current item\n inventory.add(itemTaken);\n inventoryWeight += itemTaken.getItemWeight();\n currentRoom.removeItem(itemTaken.getId());\n System.out.println(\"You have taken the item: \" + itemTaken.getId() + \".\");\n }\n else{\n System.out.println(\"You canīt get over the max weight.\");\n }\n }\n else{\n System.out.println(\"This item canīt be taken.\");\n }\n }\n else{\n System.out.println(\"This item donīt exist.\");\n }\n }\n else{\n System.out.println(\"There are no items to take in this room.\");\n }\n }\n }", "public void sell() throws UnavailableObjectException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.increaseBudget(getSellValue());\r\n\t\tgame.getInventory().take(id);\r\n\t}", "private void randomMove() {\n }", "TileItem getCurrentTile();", "public void take(GameObject obj)\n {\n if(obj.isTakeable())\n {\n getInventory().add(obj);\n\n int objIndex = -1;\n for(int i = 0; i<getRoom().getList().size(); i++)\n {\n if(getRoom().getList().get(i) == obj)\n {\n objIndex = i;\n }\n }\n\n if(!getRoom().getList().get(objIndex).getIsContained())\n {\n getRoom().getList().remove(getRoom().getList().get(objIndex));\n }\n else {\n getRoom().getList().get(objIndex).getContainer().removeObject(obj);\n getRoom().getList().remove(getRoom().getList().get(objIndex));\n }\n //System.out.println(\"You took the \" + obj.getName());\n }\n else\n {\n //System.out.println(\"You cannot take that\");\n throw new ArithmeticException(\"NPCs can't have that, something's wrong with the code!\");\n }\n }", "@Override\n public void execute(final Player pPlayer)\n {\n if( ! hasSecondWord())\n {\n GameEngine.aGui.println(\"What Item do tou want to drop ?\");\n }\n else\n {\n String vC = getSecondWord();\n Item vItemInv = pPlayer.getInventaire().get(vC);\n\n if( vItemInv == null)\n {\n GameEngine.aGui.println(\"You don't have this Item in you're possession\");\n }\n else\n {\n pPlayer.removeInventaire(vC);\n pPlayer.getCurrentRoom().getItems().put(vItemInv);\n GameEngine.aGui.println(\"You droped this \" + vItemInv.getName());\n }\n }\n }", "private void pickObject(UsableActor actor) {\n \n System.out.println(\"USABLEACTORCONTAINER.Picking object\");\n //Reset the object that the actor currently is using\n UsableActor currentObject = actor.getOwner().getCurrentObject();\n if (currentObject != null){\n currentObject.resetPosition();\n if (currentObject instanceof Cookie){\n this.cookies.add((Cookie) currentObject);\n }\n else if (currentObject instanceof Whistle){\n this.whistles.add((Whistle) currentObject);\n }\n }\n \n //Give the given actor to the owner\n actor.resetPosition();\n actor.getOwner().selectObject(actor);\n if (actor.getOwner() instanceof MousePlayer){\n ((MousePlayer) actor.getOwner()).setIsDraggingObject(true);\n }\n \n //Remove the object from the usable actor container\n removeObjectFromContainer(actor);\n }", "private void doItemVerification() {\n\t\tif (actor != null && !actor.attributes.getInventory().contains(Items.FISHING_ROD)) {\r\n\t\t\tactor.say(\"fishing.norod\", getAssigningPlayer());\r\n\t\t\treset();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tactor.setHeldItem(actor.attributes.getInventory()\r\n\t\t\t\t.getStackInSlot(actor.attributes.getInventory().getFirstSlotContainingItem(Items.FISHING_ROD))\r\n\t\t\t\t.getItem());\r\n\t}", "void movePiece() {\n\n }", "private static void hold(int piece){\n\t\tholdPiece = piece;\n\t\tMain.hold();\n\t}", "public void dropItem(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Drop what?\");\n }\n else{\n if(!inventory.isEmpty()){\n boolean found = false;\n for(int i = 0; i < inventory.size() && !found; i++){\n Item itemToDrop = inventory.get(i);\n if(itemToDrop.getId().equals(secondWord)){\n if(itemToDrop.getId().equals(\"wheelchair\")){\n maxWeight = 5;\n for(Item patient : inventory){\n if(patient.getId().equals(\"patient\")){\n patient.changePickUpItem(false);\n }\n }\n }\n if(itemToDrop.getId().equals(\"patient\")){\n itemToDrop.changePickUpItem(false);\n } \n currentRoom.addItem(itemToDrop);\n inventoryWeight -= itemToDrop.getItemWeight();\n inventory.remove(itemToDrop);\n found = true;\n System.out.println(\"You have droped the item: \" + itemToDrop.getId() + \".\");\n }\n }\n }\n else{\n System.out.println(\"Your inventory is empty.\");\n }\n }\n }", "public boolean dropItem(Items item)\n {\n boolean itemDropped = false;\n if(haveItem(item) && !currentRoom.haveItem(item)){ //if item in inventory not room\n \n Inventory.remove(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld --; //inventory tracker -1\n itemDropped = true;\n \n }\n return itemDropped;\n //if(haveItem(item))\n //Inventory.remove(item);\n //itemsHeld --; //inventory tracker -1\n \n }", "public synchronized void clientPickup(int playerID) throws CommandException {\n\t\tassertPlayerExists(playerID);\n\t\tensureNoWinner();\n\t\tassertPlayersTurn(playerID);\n\t\tassertPlayerAP(playerID);\n\n\t\tfinal Player player = this.players.get(playerID);\n\n\t\tfinal Tile playersTile = this.map.getMapCell(player.getLocation());\n\n\t\t// Check that there is something to pick up\n\t\tif (!playersTile.hasItem()) {\n\t\t\tthrow new CommandException(\"nothing to pick up\");\n\t\t}\n\n\t\t// Get the item\n\t\tfinal GameItem item = playersTile.getItem();\n\n\t\tif (player.hasItem(item)) {\n\t\t\tthrow new CommandException(\"already have item\");\n\t\t}\n\n\t\tplayer.giveItem(item);\n\t\tplayersTile.removeItem();\n\n\t\tadvanceTurn(playerID);\n\t}", "void gameTied(Piece piece);", "public abstract Piece movePiece(Move move);", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "@Override\n\tpublic Item getItemDropped(int par1, Random par2Random, int par3) {\n\t\treturn Item.getItemFromBlock(this);\n\t}", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "boolean useItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n String nameOfItem = \"\";\n String useItem = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n useItem = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\") && inventory.getUseable(nameOfItem)) {\n\n System.out.println(\"You have dropped: \" + nameOfItem);\n inventory.removeItemInventory(nameOfItem);\n player.setEnergy(player.getEnergy() + 20);\n player.setHealth(player.getHealth() + 5);\n\n return true;\n }\n return false;\n }", "public void mousePressed(MouseEvent e) {\n //transpose the coordinates to the gameboard (each tile is 100x100 px)\n int x = (int)(e.getX() * 0.01 );\n int y = (int)(e.getY() * 0.01 );\n //if the ai isn't moving and the move is valid\n if( !timer.isRunning() && attemptMove( x, y ) ) {\n //move there\n gamepieces[x][y] = currentPlayer;\n gameFrame.repaint();\n //switch to the ai\n currentPlayer = Color.BLACK;\n timer.start();\n //the player could move\n canLastPlayerMove = true;\n }\n }", "private void moveTile()\n {\n int[] moveIndices = null;\n \n int sourceRow = moveIndices[0];\n int sourceCol = moveIndices[1];\n int destRow = moveIndices[2] - 1;\n int destCol = moveIndices[3];\n \n if (sourceRow == 0) \n {\n try\n {\n game.playTileFromHand(sourceCol, destRow, destCol);\n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n else\n {\n sourceRow--;\n try\n {\n game.moveTileInBoard(sourceRow, sourceCol, destRow, destCol); \n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n }", "private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void attack(int x, int y, int xx, int yy) {\n int result = ((MovablePiece)(controller.getBoard().getPiece(x, y))).attack(controller.getBoard().getPiece(xx,yy));\n int player;\n \n if(result < 4) {\n mc.playMusic(\"sounds\\\\Bomb.wav\");\n }\n \n if(result == 1) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getBoard().setPiece(controller.getBoard().getPiece(x, y), xx, yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(new ImageIcon(\"pieces\\\\\" + this.getName()));\n } else if(result == 2) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(xx,yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(null);\n Cell[xx][yy].setBackground(Color.white);\n } else if(result == 3){\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(x, y);\n } else if(result == 5) {\n mc.playMusic(\"sounds\\\\Sorceress.wav\");\n try {\n Thread.sleep(4000);\n } catch (InterruptedException ex) {\n Logger.getLogger(Graphics.class.getName()).log(Level.SEVERE, null, ex);\n }\n piece = controller.getBoard().getTable()[xx][yy];\n if(piece.getLevel()< controller.getBoard().getPiece(x, y).getLevel() && piece.getLevel() != 0 ) {\n if(piece.getColour() == 'R') {\n piece.setColour('B');\n piece.setName(piece.getName().replace(\"R\", \"B\"));\n } else {\n piece.setColour('R');\n piece.setName(piece.getName().replace(\"B\", \"R\"));\n }\n piece.setIcon(piece.getName());\n }\n } else {\n /* NOTHING IS CHARGED */\n }\n Cell[x][y].setIcon(null);\n Cell[x][y].setBackground(Color.white);\n for(int i = 0; i < 12; i++) {\n RGrave[i].setToolTipText(controller.getPlayer(2).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('R')).getQuantity(i));\n BGrave[i].setToolTipText(controller.getPlayer(1).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('B')).getQuantity(i));\n }\n }", "public void clickAddTopping(int itemIndex, ItemCart item);", "@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}", "private void selectItem(int position) {\n\t\t\tTinyDB tb = new TinyDB(this.getApplicationContext());\n\n \t\tString play_url;\n\t\tswitch (position) {\n\t\tcase 0:\n\t\t\t\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t play_url = tb.getString(\"play_url\");\n\t\t\t\tif (play_url.isEmpty()) {\n\t\t\t\t\tToast toast = Toast.makeText(this.getApplicationContext(), getString(R.string.no_brocast),\n\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\ttoast.show();\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tIntent it = new Intent(this,MusicUi.class);\n\t\t\t\t\tstartActivity(it);\n\t\t\t\t}\n\t\t\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t\n\t\t\t play_url = tb.getString(\"play_url\");\n\t\t\t\tif (play_url.isEmpty()) {\n\t\t\t\t\tToast toast = Toast.makeText(this.getApplicationContext(), getString(R.string.no_brocast),\n\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\ttoast.show();\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tsleeptimer();\n\t\t\t\t}\n\t\t\t\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3:\n\t\t\t\n\t\t\t\n\t\t\t\t\treportError();\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tbreak;\n\t \t}\n \t}", "public void mouseMoved(MouseEvent e) {\r\n\t\tif(Game.gameState != Game.STATE.Battle) changeScreens();\r\n\t\tint mx = e.getX();\r\n\t\tint my = e.getY();\r\n\t\tif(Game.gameState == Game.STATE.Paused) {\r\n\t\t\tif(pauseState == PauseState.Regular) {\r\n\t\t\t\t//player progress\r\n\t\t\t\tif(mouseOver(mx, my, 500, 261, 278, 64)) {\r\n\t\t\t\t\toption1 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toption1 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//allies\r\n\t\t\t\tif(mouseOver(mx, my, 500, 348, 278, 64)) {\r\n\t\t\t\t\toption2 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toption2 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//items\r\n\t\t\t\tif(mouseOver(mx, my, 500, 435, 278, 64)) {\r\n\t\t\t\t\toption3 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toption3 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//attire\r\n\t\t\t\tif(mouseOver(mx, my, 500, 522, 278, 64)) {\r\n\t\t\t\t\toption5 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toption5 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//x out\r\n\t\t\t\tif(mouseOver(mx, my, 820, 88, 33, 34)) {\r\n\t\t\t\t\toption4 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toption4 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(!option1 && !option2 && !option3 && !option4 && !option5) {\r\n\t\t\t\t\tnone = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tnone = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.ItemScreen) {\r\n\t\t\t\tif(mouseOver(mx, my, 112, 78, 36, 36)) {\r\n\t\t\t\t\tbackToRegFromItem = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbackToRegFromItem = false;\r\n\t\t\t\t}\r\n\t\t\t\tint yItemP = 198;\r\n\t\t\t\t//System.out.println(Game.itemPouch.getItemAmnt());\r\n\t\t\t\tfor(int i = 0; i < Game.itemPouch.getItemAmnt(); i++) {\r\n\t\t\t\t\tif(mouseOver(mx, my, 164, yItemP, 320, 78)) {\r\n\t\t\t\t\t\toverItem = true;\r\n\t\t\t\t\t\toverItemY = yItemP;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\toverItem = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tyItemP += 82;\r\n\t\t\t\t}\r\n\t\t\t\tint num = (overItemY - 198) / 82;\r\n\t\t\t\tcurItemOver = Game.itemPouch.getItem(num);\r\n\t\t\t}\r\n\t\t\telse if(pauseState == PauseState.ItemUse) {\r\n\t\t\t\tif(mouseOver(mx, my, 516, 496, 114, 38)) {\r\n\t\t\t\t\toverYes = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverYes = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(mouseOver(mx, my, 650, 496, 114, 38)) {\r\n\t\t\t\t\toverNo = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverNo = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.ProgressScreen) {\r\n\t\t\t\tif(mouseOver(mx, my, 53, 82, 36, 36)) {\r\n\t\t\t\t\tgoBackFromProg = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgoBackFromProg = false;\r\n\t\t\t\t}\r\n\t\t\t\tif(mouseOver(mx, my, 142, 429, 96, 67)) {\r\n\t\t\t\t\toverHealth = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverHealth = false;\r\n\t\t\t\t}\r\n\t\t\t\tif(mouseOver(mx, my, 142, 499, 96, 67)) {\r\n\t\t\t\t\toverAlly = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverAlly = false;\r\n\t\t\t\t}\r\n\t\t\t\tif(mouseOver(mx, my, 142, 569, 96, 67)) {\r\n\t\t\t\t\toverPummel = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverPummel = false;\r\n\t\t\t\t}\r\n\t\t\t\tif(mouseOver(mx, my, 142, 639, 96, 67)) {\r\n\t\t\t\t\toverLaser = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverLaser = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.AllyScreen) {\r\n\t\t\t\tif(mouseOver(mx, my, 53, 82, 36, 36)) {\r\n\t\t\t\t\tgoBackFromAlly = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgoBackFromAlly = false;\r\n\t\t\t\t}\r\n\t\t\t\tint xAlly = 182;\r\n\t\t\t\tfor(int i = 0; i < Game.allies.allies.size(); i++) {\r\n\t\t\t\t\tif(mouseOver(mx, my, xAlly, 300, 208, 208)) {\r\n\t\t\t\t\t\toverAnAlly = true;\r\n\t\t\t\t\t\txValForDrawingAlly = xAlly;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\toverAnAlly = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\txAlly += 232;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.AttireScreen) {\r\n\t\t\t\tif(mouseOver(mx, my, 53, 82, 36, 36)) {\r\n\t\t\t\t\tgoBackFromAttire = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgoBackFromAttire = false;\r\n\t\t\t\t}\r\n\t\t\t\tint xAttire = 182;\r\n\t\t\t\tfor(int i = 0; i < Game.costumePouch.costumes.size(); i++) {\r\n\t\t\t\t\tif(mouseOver(mx, my, xAttire, 300, 208, 208)) {\r\n\t\t\t\t\t\toverAnOutfit = true;\r\n\t\t\t\t\t\txValForDrawingAttire = xAttire;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\toverAnOutfit = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\txAttire += 232;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(Game.gameState == Game.STATE.Battle) {\r\n\t\t\tif(Battle.itemSelected) {\r\n\t\t\t\tif(itemSelect == false) {\r\n\t\t\t\t\tif(mouseOver(mx, my, 430, 78, 36, 36)) {\r\n\t\t\t\t\t\tbackToRegFromItem = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tbackToRegFromItem = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint yItemP = 198;\r\n\t\t\t\t\t//System.out.println(Game.itemPouch.getItemAmnt());\r\n\t\t\t\t\tfor(int i = 0; i < Game.itemPouch.getItemAmnt(); i++) {\r\n\t\t\t\t\t\tif(mouseOver(mx, my, 482, yItemP, 320, 78)) {\r\n\t\t\t\t\t\t\toverItem = true;\r\n\t\t\t\t\t\t\toverItemY = yItemP;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\toverItem = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tyItemP += 82;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint num = (yItemP - 198) / 82;\r\n\t\t\t\t\tcurItemOver = Game.itemPouch.getItem(num);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(mouseOver(mx, my, 516, 496, 114, 38)) {\r\n\t\t\t\t\t\toverYes = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\toverYes = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(mouseOver(mx, my, 650, 496, 114, 38)) {\r\n\t\t\t\t\t\toverNo = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\toverNo = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(Battle.allySelected) {\r\n\t\t\t\tif(mouseOver(mx, my, 53, 82, 36, 36)) {\r\n\t\t\t\t\tgoBackFromAlly = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tgoBackFromAlly = false;\r\n\t\t\t\t}\r\n\t\t\t\tint xAlly = 182;\r\n\t\t\t\t//System.out.println(Game.itemPouch.getItemAmnt());\r\n\t\t\t\tfor(int i = 0; i < Game.allies.allies.size(); i++) {\r\n\t\t\t\t\tif(mouseOver(mx, my, xAlly, 300, 208, 208)) {\r\n\t\t\t\t\t\toverAnAlly = true;\r\n\t\t\t\t\t\txValForDrawingAlly = xAlly;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\toverAnAlly = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\txAlly += 232;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(Game.gameState == Game.STATE.PostBattle) {\r\n\t\t\tif(ExperienceBar.levelUp != true && Battle.expToBeAdded == 0) {\r\n\t\t\t\tif(mouseOver(mx, my, 483, 716, 278, 64)) {\r\n\t\t\t\t\toverNext = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\toverNext = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(mouseOver(mx, my, 142, 429, 96, 67)) {\r\n\t\t\t\toverHealth = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\toverHealth = false;\r\n\t\t\t}\r\n\t\t\tif(mouseOver(mx, my, 142, 499, 96, 67)) {\r\n\t\t\t\toverAlly = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\toverAlly = false;\r\n\t\t\t}\r\n\t\t\tif(mouseOver(mx, my, 142, 569, 96, 67)) {\r\n\t\t\t\toverPummel = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\toverPummel = false;\r\n\t\t\t}\r\n\t\t\tif(mouseOver(mx, my, 142, 639, 96, 67)) {\r\n\t\t\t\toverLaser = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\toverLaser = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void playerUseItem(Player player, Item item) {\n\t\tif (item instanceof FloatingDevice) {\n\t\t\tplayer.setHasFloatingDevice(!player.getHasFloatingDevice());\n\t\t} else if (item instanceof Teleporter) {\n\t\t\tplayer.getTile().setGameObject(null);\n\t\t\tplayer.setLocation(0);\n\t\t\tTile t;\n\t\t\tif (!(player.getLocation().getTileAtPosition(new Position(5, 5)).getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(5, 5)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t} else if (!(player.getLocation().getTileAtPosition(new Position(4, 5))\n\t\t\t\t\t.getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(4, 5)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t} else if (!(player.getLocation().getTileAtPosition(new Position(4, 4))\n\t\t\t\t\t.getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(4, 4)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t} else if (!(player.getLocation().getTileAtPosition(new Position(5, 4))\n\t\t\t\t\t.getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(5, 4)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t}\n\t\t\tplayer.getInventory().remove(item);\n\n\t\t} else if (item instanceof FishingRod) {\n\t\t\tif (player.getLocation().getTileInDirection(player.getTile().getPos(),\n\t\t\t\t\tplayer.getFacing()) instanceof WaterTile) {\n\t\t\t\tif (player.inventoryIsFull()) {\n\t\t\t\t\tserverController.broadcastPlayerMessage(\"You can't fish now, you have no room for the spoils\",\n\t\t\t\t\t\t\tplayer);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint randy = (int) (Math.random() * 5);\n\t\t\t\tif (randy == 0) {\n\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\"You caught a fish against all odds, sadly your rod was lost in the process\", player);\n\t\t\t\t\tplayer.getInventory().remove(item);\n\t\t\t\t\tplayer.pickUpItem(new Fish(\"Fish\"));\n\t\t\t\t} else {\n\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\"A nibble felt, however sometimes we just aren't that lucky\", player);\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"Harambe is disgusted with you incompetence, you can't fish on land fool!\", player);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "int chooseMove();", "public void toSelectingWeapon() {\n }", "private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMode() && \n (item.getName().equals(\"Helmet\")\n || item.getName().equals(\"Shield\")\n || item.getName().equals(\"Armour\"))){\n this.defenseNum = 0;\n System.out.println(\"This shop has 0 defensive item left.\");\n }\n if (item.getPrice() > gold) {\n System.out.println(\"You don't have enough money.\");\n }\n loadItem(item.getName());\n world.getCharacter().setGold(gold - item.getPrice());\n System.out.println(\"You have bought Item : \" + item.getName() + \".\");\n }", "public void pickUp(Creature c, FloorCrate r){\r\n Item i = r.pickUp(c.area);\r\n if(!c.inventory.add(i)){\r\n c.area.plop(i, c.x, c.y);\r\n }\r\n }", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 51: */ {\r\n/* 52:67 */ return ItemList.ap;\r\n/* 53: */ }", "public void moveItemY(MovingItem movingItem) {\n\n\t\tint speed = movingItem.getYVelocity();\n\t\tboolean movingDown = speed > 0;\n\t\tboolean isMC = movingItem instanceof MainCharacter;\n\n\t\tfor (int i = 0; i < Math.abs(speed); i++) {\n\t\t\tfor (int k = 0; k < currentScene.getItems().size(); k++) {\n\t\t\t\tLevelItem item = currentScene.getItems().get(k);\n\t\t\t\tList<Node> collidedComponents[] = collision(movingItem, item);\n\t\t\t\tif (item instanceof Structure) {\n\t\t\t\t\t// If the item model touches the bricks.\n\t\t\t\t\tfor (int j = 0; j < collidedComponents[0].size(); j++) {\n\t\t\t\t\t\tNode component1 = collidedComponents[0].get(j);\n\t\t\t\t\t\tNode component2 = collidedComponents[1].get(j);\n\n\t\t\t\t\t\tif (movingDown) {\n\t\t\t\t\t\t\tif (component1.getTranslateY() + getHeight(component1) == component2.getTranslateY()) {\n\t\t\t\t\t\t\t\t// Keep the object separated from the bricks.\n\t\t\t\t\t\t\t\tmovingItem.moveYpixel(false);\n\t\t\t\t\t\t\t\t// At this time, the object model touches the ground, make it can jump again.\n\t\t\t\t\t\t\t\tmovingItem.setCanJump(true);\n\t\t\t\t\t\t\t\tif (movingItem instanceof Projectile) itemsToDelete.add(movingItem);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If the object model hits a block, stop going up.\n\t\t\t\t\t\t\tif (component1.getTranslateY() == component2.getTranslateY() + getHeight(component2)) {\n\t\t\t\t\t\t\t\tif (movingItem instanceof Projectile) itemsToDelete.add(movingItem);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isMC) { // effects for the player\n\t\t\t\t\tif (item instanceof Collectable) {\n\t\t\t\t\t\tif (collidedComponents[0].size() != 0) {// collectable has been touched\n\t\t\t\t\t\t\t((Collectable) item).applyEffect((MainCharacter) movingItem);\n\t\t\t\t\t\t\titemsToDelete.add(item);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (item instanceof Portal) {\n\t\t\t\t\t\tif (collidedComponents[0].size() != 0) {\n\t\t\t\t\t\t\tnextScene = ((Portal) item).getNextScene();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (item instanceof Enemy) {\n\t\t\t\t\t\tif (collidedComponents[0].size() != 0) { // enemy has been hit, apply damage\n\t\t\t\t\t\t\tMainCharacter player = (MainCharacter) movingItem;\n\t\t\t\t\t\t\tif (!player.isInvincible()) {\n\t\t\t\t\t\t\t\tplayer.setHealth(player.getHealth() - ((Enemy) item).getDamage()); // apply damage\n\t\t\t\t\t\t\t\tplayer.resetInvincibility();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Make a movement by one pixel.\n\t\t\tmovingItem.setCanJump(false);\n\t\t\tmovingItem.moveYpixel(movingDown);\n\t\t}\n\t}", "@Override\n public void poll() {\n if( state == State.attacking ) {\n if( !ctx.movement.running() && ctx.movement.energyLevel() >= 75) {\n stateText = \"Setting running\";\n ctx.movement.running(true);\n }\n stateText = \"\";\n if( isAttacking() ) {\n stateText = \"Attacking\";\n Item ammo = inventory.getFirst(ammoUsed);\n if( ammo != null && ammo.valid() ){\n inventory.clickItem(ammo);\n sleep(100);\n }\n } else {//TODO find out why it stops picking up arrows after some time\n if (!inventory.full() && (targetBone == null || !targetBone.valid() || !misc.pointOnScreen(targetBone.centerPoint())) ) {\n targetBone = getNextGroundBone();\n clickedGroundItem = false;\n }\n if (!inventory.full() && targetBone != null && targetBone.valid() && misc.pointOnScreen(targetBone.centerPoint())) {\n stateText = \"Picking up bones\";\n if( !ctx.players.local().inMotion() )\n clickedGroundItem = false;\n if (!clickedGroundItem ) {\n clickedGroundItem = groundItems.pickup(targetBone);\n }\n } else if( inventory.full() && inventory.contains(bones) ) {\n state = State.burying;\n } else {\n if( !clickedMonster || !target.valid() || target.health() <= 0 || target.interacting() != ctx.players.local() ) {\n target = getNextTarget();\n clickedMonster = false;\n }\n if (!misc.pointOnScreen(target.centerPoint())) {\n if (target.tile().matrix(ctx).onMap()) {\n stateText = \"Walking to monster\";\n movement.walkTile(target.tile());\n }\n } else {\n stateText = \"Attacking monster\";\n if( !clickedMonster ) {\n clickedMonster = npcs.attackMonster(target);\n }\n }\n }\n }\n }else if( state == State.burying){\n Item invBones = inventory.getFirst(bones);\n if( invBones!= null && invBones.valid()) {\n stateText = \"Clicking bones\";\n inventory.clickItem(invBones);\n }else {\n state = State.attacking;\n }\n }\n checkIfBeingAttacked();\n }", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "public void moveEnemy() {\n int moveDirection = randomGenerator(0, 3);\n int enemyAmount = snakeEnemyPartList.size();\n for(int i = 0; i < enemyAmount; i++) {\n\n int rowsNew = snakeEnemyPartList.get(i).getSnakeEnemyPartRowsNew();\n int collsNew = snakeEnemyPartList.get(i).getSnakeEnemyPartCollsNew();\n\n switch (moveDirection) {\n case 0:\n if(board[rowsNew-1][collsNew] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew-1][collsNew] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('w');\n } else {\n moveEnemy();\n }\n break;\n\n case 1:\n if(board[rowsNew][collsNew-1] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew][collsNew-1] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('a');\n }else {\n moveEnemy();\n }\n\n break;\n\n case 2:\n if(board[rowsNew+1][collsNew] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew+1][collsNew] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('s');\n }else {\n moveEnemy();\n }\n\n break;\n\n case 3:\n if(board[rowsNew][collsNew+1] == 'S'){\n keepMoving = false;\n System.out.println(\"ENEMY HAS EATEN YOU!\");\n }\n else if(board[rowsNew][collsNew+1] == ' '){\n snakeEnemyPartList.get(i).moveEnemy('d');\n }else {\n moveEnemy();\n }\n \n break;\n }\n }\n \n }", "private void dropped(HeroItem item, Unit unit) {\n if (ItemMaster.isBreakable(item)) {\n item.broken(); // remove from game?\n if (item instanceof QuickItem) {\n QuickItem quickItemObj = (QuickItem) item;\n if (quickItemObj.isConcoction()) {\n quickItemObj.activate(Ref.getSelfTargetingRefCopy(unit)); // setForceTarget(true)\n }\n }\n } else {\n unit.getGame().getDroppedItemManager().itemFalls(unit.getCoordinates(), item);\n }\n }", "public void moveItem(Item item, float newPosX, float newPosY, float newPosZ, float newRot, boolean surf, float oldPosZ) {\n/* 5033 */ float diffX = newPosX - item.getPosX();\n/* 5034 */ float diffY = newPosY - item.getPosY();\n/* 5035 */ if (diffX != 0.0F || diffY != 0.0F) {\n/* */ \n/* 5037 */ int newTileX = (int)newPosX >> 2;\n/* 5038 */ int newTileY = (int)newPosY >> 2;\n/* 5039 */ long newBridgeId = item.getBridgeId();\n/* 5040 */ long oldBridgeId = item.getBridgeId();\n/* */ \n/* 5042 */ if (newTileX != this.tilex || newTileY != this.tiley || surf != isOnSurface()) {\n/* */ \n/* 5044 */ VolaTile dt = Zones.getTileOrNull(Zones.safeTileX(newTileX), Zones.safeTileY(newTileY), surf);\n/* 5045 */ if (item.onBridge() == -10L && dt != null && dt.getStructure() != null && dt.getStructure().isTypeBridge()) {\n/* */ \n/* */ \n/* 5048 */ if (item.getBridgeId() == -10L) {\n/* */ \n/* */ \n/* 5051 */ BridgePart bp = Zones.getBridgePartFor(newTileX, newTileY, surf);\n/* 5052 */ if (bp != null && bp.isFinished() && bp.hasAnExit())\n/* */ {\n/* 5054 */ if (Servers.isThisATestServer() && item.isWagonerWagon())\n/* */ {\n/* */ \n/* 5057 */ Players.getInstance().sendGmMessage(null, \"System\", \"Debug: Wagon \" + item.getName() + \" bid:\" + oldBridgeId + \" z:\" + item\n/* 5058 */ .getPosZ() + \" fl:\" + item.getFloorLevel() + \" bp:\" + bp\n/* 5059 */ .getStructureId() + \" N:\" + bp.getNorthExit() + \" E:\" + bp.getEastExit() + \" S:\" + bp\n/* 5060 */ .getSouthExit() + \" W:\" + bp.getWestExit() + \" @\" + item\n/* 5061 */ .getTileX() + \",\" + item.getTileY() + \" to \" + newTileX + \",\" + newTileY + \",\" + surf, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 5066 */ if (newTileY < item.getTileY() && bp.getSouthExitFloorLevel() == item.getFloorLevel()) {\n/* 5067 */ newBridgeId = bp.getStructureId();\n/* */ }\n/* 5069 */ else if (newTileX > item.getTileX() && bp.getWestExitFloorLevel() == item.getFloorLevel()) {\n/* 5070 */ newBridgeId = bp.getStructureId();\n/* */ }\n/* 5072 */ else if (newTileY > item.getTileY() && bp.getNorthExitFloorLevel() == item.getFloorLevel()) {\n/* 5073 */ newBridgeId = bp.getStructureId();\n/* */ }\n/* 5075 */ else if (newTileX < item.getTileX() && bp.getEastExitFloorLevel() == item.getFloorLevel()) {\n/* 5076 */ newBridgeId = bp.getStructureId();\n/* */ } \n/* 5078 */ if (Servers.isThisATestServer() && newBridgeId != oldBridgeId)\n/* */ {\n/* 5080 */ Players.getInstance().sendGmMessage(null, \"System\", \"Debug: Wagon \" + item.getName() + \" obid:\" + oldBridgeId + \" z:\" + item\n/* 5081 */ .getPosZ() + \" fl:\" + item.getFloorLevel() + \" nbid:\" + newBridgeId + \" N:\" + bp\n/* 5082 */ .getNorthExit() + \" E:\" + bp.getEastExit() + \" S:\" + bp.getSouthExit() + \" W:\" + bp.getWestExit() + \" @\" + item\n/* 5083 */ .getTileX() + \",\" + item.getTileY() + \" to \" + newTileX + \",\" + newTileY + \",\" + surf, false);\n/* */ \n/* */ }\n/* */ }\n/* */ else\n/* */ {\n/* 5089 */ newBridgeId = -10L;\n/* 5090 */ item.setOnBridge(-10L);\n/* 5091 */ sendSetBridgeId(item, -10L);\n/* 5092 */ item.calculatePosZ(dt, null);\n/* */ }\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 5098 */ BridgePart bp = Zones.getBridgePartFor(newTileX, newTileY, surf);\n/* 5099 */ if (bp == null) {\n/* */ \n/* */ \n/* 5102 */ newBridgeId = -10L;\n/* 5103 */ item.setOnBridge(-10L);\n/* 5104 */ sendSetBridgeId(item, -10L);\n/* 5105 */ item.calculatePosZ(dt, null);\n/* */ } \n/* */ } \n/* */ \n/* 5109 */ if (item.onBridge() != newBridgeId) {\n/* */ \n/* 5111 */ float nz = Zones.calculatePosZ(newPosX, newPosY, dt, isOnSurface(), false, oldPosZ, null, newBridgeId);\n/* */ \n/* */ \n/* 5114 */ if (Servers.isThisATestServer() && item.isWagonerWagon()) {\n/* 5115 */ Players.getInstance().sendGmMessage(null, \"System\", \"Debug: Wagon \" + item.getName() + \" moving onto, or off, a bridge from bid:\" + oldBridgeId + \" z:\" + item\n/* */ \n/* 5117 */ .getPosZ() + \" fl:\" + item.getFloorLevel() + \" to bp:\" + newBridgeId + \" newZ:\" + nz + \" @\" + item\n/* */ \n/* 5119 */ .getTileX() + \",\" + item.getTileY() + \" to \" + newTileX + \",\" + newTileY + \",\" + surf, false);\n/* */ }\n/* */ \n/* 5122 */ if (Math.abs(oldPosZ - nz) < 10.0F)\n/* */ {\n/* */ \n/* 5125 */ if (!item.isBoat())\n/* */ {\n/* 5127 */ item.setOnBridge(newBridgeId);\n/* */ \n/* 5129 */ newPosZ = nz;\n/* */ \n/* 5131 */ sendSetBridgeId(item, newBridgeId);\n/* */ }\n/* */ \n/* */ }\n/* */ } \n/* 5136 */ } else if (item.onBridge() > 0L && (dt == null || dt\n/* 5137 */ .getStructure() == null || dt.getStructure().getWurmId() != item.onBridge())) {\n/* */ \n/* 5139 */ boolean leave = true;\n/* 5140 */ BridgePart bp = Zones.getBridgePartFor(newTileX, newTileY, surf);\n/* 5141 */ if (bp != null && bp.isFinished())\n/* */ {\n/* */ \n/* 5144 */ if (bp.getDir() == 0 || bp.getDir() == 4) {\n/* */ \n/* 5146 */ if (getTileX() != newTileX)\n/* */ {\n/* 5148 */ leave = false;\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 5153 */ else if (getTileY() != newTileY) {\n/* */ \n/* 5155 */ leave = false;\n/* */ } \n/* */ }\n/* */ \n/* 5159 */ if (leave) {\n/* */ \n/* 5161 */ newBridgeId = -10L;\n/* 5162 */ item.setOnBridge(-10L);\n/* 5163 */ sendSetBridgeId(item, -10L);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 5174 */ if (surf != isOnSurface())\n/* */ {\n/* 5176 */ item.newLayer = (byte)(isOnSurface() ? -1 : 0);\n/* */ }\n/* 5178 */ removeItem(item, true);\n/* */ \n/* 5180 */ if (diffX != 0.0F && diffY != 0.0F) {\n/* */ \n/* 5182 */ item.setPosXYZRotation(newPosX, newPosY, newPosZ, newRot);\n/* */ }\n/* */ else {\n/* */ \n/* 5186 */ item.setRotation(newRot);\n/* 5187 */ if (diffX != 0.0F)\n/* 5188 */ item.setPosX(newPosX); \n/* 5189 */ if (diffY != 0.0F)\n/* 5190 */ item.setPosY(newPosY); \n/* 5191 */ item.setPosZ(newPosZ);\n/* */ } \n/* */ \n/* */ try {\n/* 5195 */ Zone _zone = Zones.getZone((int)newPosX >> 2, (int)newPosY >> 2, surf);\n/* 5196 */ _zone.addItem(item, true, (surf != isOnSurface()), false);\n/* */ }\n/* 5198 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 5200 */ logger.log(Level.WARNING, item.getName() + \", \" + nsz.getMessage(), (Throwable)nsz);\n/* */ } \n/* 5202 */ if (surf != isOnSurface()) {\n/* 5203 */ item.newLayer = Byte.MIN_VALUE;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* 5216 */ if (diffX != 0.0F)\n/* 5217 */ item.setTempXPosition(newPosX); \n/* 5218 */ if (diffY != 0.0F)\n/* 5219 */ item.setTempYPosition(newPosY); \n/* 5220 */ item.setTempZandRot(newPosZ, newRot);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 5225 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5229 */ if (vz.isVisible(item, this)) {\n/* */ \n/* 5231 */ if (item.getFloorLevel() <= 0 && item.onBridge() <= 0L) {\n/* */ \n/* 5233 */ if (Structure.isGroundFloorAtPosition(newPosX, newPosY, item.isOnSurface()))\n/* */ {\n/* 5235 */ vz.sendMoveMovingItemAndSetZ(item.getWurmId(), item.getPosX(), item.getPosY(), item\n/* 5236 */ .getPosZ(), (int)(newRot * 256.0F / 360.0F));\n/* */ }\n/* */ else\n/* */ {\n/* 5240 */ vz.sendMoveMovingItem(item.getWurmId(), item.getPosX(), item.getPosY(), (int)(newRot * 256.0F / 360.0F));\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 5245 */ vz.sendMoveMovingItemAndSetZ(item.getWurmId(), item.getPosX(), item.getPosY(), item\n/* 5246 */ .getPosZ(), (int)(newRot * 256.0F / 360.0F));\n/* */ } \n/* */ } else {\n/* 5249 */ vz.removeItem(item);\n/* */ } \n/* 5251 */ } catch (Exception e) {\n/* */ \n/* 5253 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* */ }", "Piece askMove(Player J, Piece[] Board, MovingPiece movingPiece, ChessGame G);", "public void pickUp(Player player) {\n player.setBox(this);\n }", "public static Action pull() {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof Movable && b instanceof DestructibleActor) {\n DestructibleActor c = (DestructibleActor) b;\n a.setDirection(a.getDirection() + 180);\n c.setDirection(a.getDirection());\n if(c.canMove()) {\n a.move();\n c.move();\n a.setDirection(a.getDirection() + 180);\n a.energy = a.energy - getCost();\n }\n }\n }\n }\n\n @Override\n public int getCost() {\n return 10;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"Pull()\";\n }\n };\n }", "public void act() \n {\n setLocation(getX(),getY()+1);\n givePower();\n delete();\n }", "private void newPiece() {\n curPiece.setRandomShape();\n//compute the initial curX and curY values \n curX = BOARD_WIDTH / 2 + 1;\n curY = BOARD_HEIGHT - 1 + curPiece.minY();\n//if a piece reaches the top and cannot drop any more piece\n if (!tryMove(curPiece, curX, curY)) {\n//cancel timer and display game over\n curPiece.setShape(Tetrominoe.NoShape);\n timer.cancel();\n isStarted = false;\n statusbar.setText(\"Game over\");\n }\n }", "void move(Tile t);", "private void useItem(String itemToUse) {\n if (itemToUse.equalsIgnoreCase(\"\") || itemToUse.equalsIgnoreCase(\"use\")) {\n System.out.println(\"Use what?\");\n return;\n }\n\n // Get a reference to the item\n Item item = player.getItemFromInventory(itemToUse);\n\n // If the reference is not null (i.e., the Item exists)\n if (item != null) {\n // Display a message\n System.out.println(\"You use the \" + item.getName());\n\n // Check if using the item will destroy a creature\n if (currentRoom.getCreature() != null && currentRoom.getCreature().getItemToDestroy() != null && currentRoom.getCreature().getItemToDestroy() == item) {\n // Display the text for defeating the creature. \n System.out.println(currentRoom.getCreature().getDefeatedText());\n currentRoom.setCreature(null);\n\n // Remove the item from the Player's inventory.\n player.removeItemFromInventory(item);\n }\n } // The player does not have the specified item\n else {\n System.out.println(\"There is no \" + itemToUse + \" in your inventory.\");\n }\n }", "public void dropItemAtCurrentPlace(Item it)\r\n\t{\r\n\t\tthis.currentPlace.addItem(it);\r\n\t}", "public String dropItem(String item){\n if(hasGrabbedItem(item)){\n grabbedItems.remove(item);\n return \"You have dropped: \" + item;\n }else{\n return \"You don't have one to drop.\";\n }\n }" ]
[ "0.66447127", "0.65394276", "0.6412183", "0.6392832", "0.6378676", "0.636495", "0.62842095", "0.6242005", "0.6199231", "0.619037", "0.61467063", "0.614615", "0.6138021", "0.6109512", "0.6101114", "0.6097899", "0.60762763", "0.6040799", "0.6032408", "0.599229", "0.5965838", "0.596451", "0.5955005", "0.5952113", "0.5943", "0.59316176", "0.5912627", "0.589204", "0.58891076", "0.58869153", "0.5876509", "0.5871827", "0.58512163", "0.5846953", "0.5841748", "0.5838674", "0.5838559", "0.5830376", "0.5829547", "0.58234006", "0.5818836", "0.5814212", "0.5811251", "0.58011806", "0.5801128", "0.57955456", "0.5786587", "0.5776496", "0.57657427", "0.5762071", "0.5761583", "0.5744698", "0.57376236", "0.5726452", "0.5719969", "0.5696079", "0.5694316", "0.5689758", "0.5689564", "0.56808335", "0.5677875", "0.5673989", "0.56711775", "0.56653416", "0.5662714", "0.5655927", "0.56534624", "0.5651476", "0.56507427", "0.5650308", "0.5644975", "0.5642465", "0.5640009", "0.5639533", "0.5635276", "0.56345344", "0.5634255", "0.563269", "0.56274396", "0.5626248", "0.5624746", "0.5612227", "0.56117606", "0.56114036", "0.5607198", "0.560588", "0.56037694", "0.56011295", "0.5594396", "0.55942893", "0.5593871", "0.5593264", "0.5592879", "0.5588675", "0.55837625", "0.5583392", "0.5572651", "0.55716705", "0.55689144", "0.5567573" ]
0.5931842
25
end of pickup This method makes it so the player can move throughout the board.
public void MOVE(String input){ int YM=0; int XM=0; for(int i = 0; i<this.position.length;i++){ for(int p =0; p<this.position.length;p++){ if(this.position[i][p] == 1){ YM = i; XM = p; } } } switch(input){//first block is up and down second block is left and right case "a": if(this.area[YM][XM-1] != "[ ]"){ this.position[YM][XM-1] = 1;//to turn left this.position[YM][XM] = 0; } break; case "d": if(this.area[YM][XM+1] != "[ ]"){ this.position[YM][XM+1] = 1;//to turn right this.position[YM][XM] = 0; } break; case "w": if(this.area[YM-1][XM] != "[ ]"){ this.position[YM-1][XM] = 1;//to turn up this.position[YM][XM] = 0; } break; case "s": if(this.area[YM+1][XM] != "[ ]"){ this.position[YM+1][XM] = 1;//to turn down this.position[YM][XM] = 0; } break; }//end of switch }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void end() {\n \tif (waitForMovement) Robot.intake.setHopperTracker(deploy ? Status.deployed : Status.stowed);\n }", "protected void end() {\n \tRobotMap.gearIntakeRoller.set(0);\n }", "public void endTurn() {\n\t\tturnEnd = false;\n\t\tmadeMove = false;\n\t\tcurrentPlayer.resetUndos();\n\t\tif (currentPlayer == player1) {\n\t\t\tcurrentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player1;\n\t\t}\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "public void endMove()\n\t{\n\t\tBMTron.delayed += 50;\n\t\tif (delayed == 2000)\n\t\t{\n\t\t\tfor (int i = 0; i < 5; i++) \n\t\t\t{\n\t\t\t\tif (players[i].exist)\n\t\t\t\t{\n\t\t\t\t\tmove[i].interrupt();\n\t\t\t\t}\n\t\t\t}\n\t\t\trepaint.interrupt();\n\t\t\tBMTron.frame.setVisible(false);\n\t\t\tSelection.frame.setVisible(true);\n\t\t\tdelayed = 0;\n\t\t}\n\t}", "protected void end() {\n\t\tRobot.elevator.setCurrentPosition(newPosition);\n\t}", "@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }", "public void endTurn() {\n \tselectedX = -1;\n \tselectedY = -1;\n \tmoveToX = -1;\n \tmoveToY = -1;\n \toneMove = false;\n \thasMoved = false;\n\t\tplayer = 0 - player;\n\t\tfor (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n \tif (pieces[i][j]) {\n \t\tboardPieces[i][j].doneCapturing();\n \t}\n }\n\t\t}\n\t}", "protected void end() {\n \tnew GearCommand().start();\n \t/*if(!didZach){\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < currentTime + .5){\n \t\t\tDrive.setLeft(0);\n \t\t\tDrive.setRight(0);\n \t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < currentTime + 1.5){\n \t\t\tDrive.setLeft(-.5);\n \t\t\tDrive.setRight(-.5);\n \t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < (currentTime + .6)){\n\t\t\t\tDrive.setLeft(.5);\n\t\t\t\tDrive.setRight(-.5);\n\t\t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < currentTime + 1.5){\n \t\t\tDrive.setLeft(.5);\n \t\t\tDrive.setRight(.5);\n \t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < (currentTime + .6)){\n\t\t\t\tDrive.setLeft(-.5);\n\t\t\t\tDrive.setRight(.5);\n\t\t\t}\n \t\twhile(time.get() < currentTime + 1.5){\n \t\t\tDrive.setLeft(.5);\n \t\t\tDrive.setRight(.5);\n \t\t}\n \t}*/\n }", "protected void end() {\n \tRobot.gearIntake.setIsDown(false);\n \tRobot.gearIntake.setGearRollerSpeed(0);\n }", "public void endMove(Game game) {\n game.nextMove();\n }", "public void respawnPlayer() {\n \tboard.swapTile(board.getTile(player.getPos()), board.getTile(new Point(8,0)));\n player.setPlayerPos(new Point(8,0));\n resetAmmo();\n }", "public void endRound() {\n if (!myTurn()) {\n return;\n }\n if (this.board.getWinners().size() > 0 && this.playerId == board.getPlayers().get(board.getPlayers().size() - 1).playerId) {\n this.board.setRunning(false);\n }\n // currentPlayerNumber = (currentPlayerNumber + 1) % players.size();\n // current = players.get(currentPlayerNumber);\n this.removableBlockades = new ArrayList<>();\n coins = (float) 0;\n bought = false;\n specialAction.setDraw(0);\n specialAction.setRemove(0);\n specialAction.setSteal(0);\n history = new ArrayList<>();\n //for (int i = tmpDiscardPile.size(); i > 0; i--){\n // discardPile.add(tmpDiscardPile.remove(0));\n //}\n discardPile.addAll(tmpDiscardPile);\n tmpDiscardPile = new ArrayList<Card>();\n draw();\n board.endRound();\n }", "private void HandleOnMoveEnd(Board board, Piece turn, boolean success){\n\t}", "protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }", "protected void end() {\r\n Robot.feeder.retractArm();\r\n Robot.feeder.setFeederIntakeSpeed(0);\r\n Robot.chassis.driveMecanumNormalized(0, 0, 0);\r\n Robot.shooter.setShootingMotors(0, 0);\r\n }", "public void endOfTurn();", "public void finalizeMove() {\n return;\n }", "protected void end() {\n \tRobot.hand.setWrist(0.0);\n }", "@Override\n protected void end() {\n Robot.SCISSOR.extendLift(0);\n }", "private void dropDown() {\n int newY = curY;\n\n while (newY > 0) {\n\n if (!tryMove(curPiece, curX, newY - 1)) {\n \n break;\n }\n \n --newY;\n }\n\n pieceDropped();\n }", "@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "@Override\n protected void end() {\n Robot.shooter.setShooterSpeed(0);\n Robot.elevator.elevatorUp(0);\n Robot.hopper.hopperOut(0);\n Robot.intake.enableIntake(0);\n\n\n }", "private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }", "public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }", "public void giveUp() {\n if (!finished)\n player.kill();\n }", "public void endTurn(MapPanel caller) {\n\t\tlog.log(\"Ending turn for \" + toMove);\n\t\ts.unexamine(caller);\n\t\ttoMove = Alignment.opposing(toMove);\n\t\tif(toMove == Alignment.FRIENDLY)\n\t\t\tcaller.setGameStatus(GameState.PLAYER_MOVING);\n\t\telse\n\t\t\tcaller.setGameStatus(GameState.ENEMY_TURN);\n\t\tstartTurn(caller);\n\t}", "public void dealerOut() {\n\t\tview.writeLog(\"Dealer: \"+PointCounter.countPoint(dealer.clientCards)+\", DEALER OUT!\");\n\t\tint dealerLosingStack = 0;\n\t\tfor(ClientThread player:players) {\n\t\t\tif(player != dealer) {\n\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"The dealer's points is over 21. You win a stack!\"));\n\t\t\t\tplayer.send(new Package(\"END\",1));\n\t\t\t\tdealerLosingStack++;\n\t\t\t}\n\t\t}\n\t\tint dealerStackChange = losers - dealerLosingStack;\n\t\tdealer.send(new Package(\"MESSAGE\",\"Over 21! You lose \"+dealerLosingStack+\" stacks. \"));\t\n\t\tdealer.send(new Package(\"END\",dealerStackChange+1));\t\n\t\tendGame();\n\t}", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}", "protected void end() {\n\t\t// we are ending the, stop moving the robot\n\t\tRobot.driveSubsystem.arcadeDrive(0, 0);\n\t}", "public void endOfTurn() {\n if (playerInTurn.equals(Player.RED)) {\n playerInTurn = Player.BLUE;\n observers.turnEnds(playerInTurn, age);\n controlStrategy.playRound(this);\n return;\n }\n\n // If blue is in turn, change player in turn to red and do end-of-round processing.\n playerInTurn = Player.RED;\n\n // Calculate the age of the game in the next round.\n age = ageStrategy.calculateAge(age);\n\n // Restore the move count of all the units.\n for (Position p : world.getUnitPositions()) {\n world.getUnitAt(p).restoreMoveCount();\n }\n\n // For each city, add 6 to the current amount of production, and produce as many units as it can afford.\n for (Position p : world.getCityPositions()) {\n ModifiableCity city = world.getCityAt(p);\n\n workForceStrategy.gatherFoodAndProduction(world, p);\n\n populationStrategy.populationGrowth(world, p);\n\n // produce units!\n city.produceUnits(world, p, observers);\n }\n // Add to the counter of rounds played in the game.\n roundsPlayed++;\n\n observers.turnEnds(playerInTurn, age);\n\n controlStrategy.playRound(this);\n\n }", "@Override\n protected void end() {\n switch (Intake.intakeState) {\n case 2:\n// if (Robot.intake.bannerIR.get()) {\n// Timer.delay(0.25);\n// Robot.wrist.setAbsolutePosition(RobotMap.WRIST_RETRACTED_CARGO_ANGLE);\n//// Timer.delay(0.1);\n//// Robot.intake.setCargoIntakeOutput(RobotMap.CARGO_HOLD_SPEED);\n// } else {\n// Robot.intake.setCargoIntakeOutput(0);\n// }\n break;\n case 1:\n Robot.intake.setHatchIntakeOutput(RobotMap.HATCH_GROUND_HOLD_SPEED);\n break;\n case 0:\n default:\n //Robot.intake.setHarpoonSecure(true);\n Timer.delay(0.25);\n Robot.intake.setHatchIntakeOutput(0);\n break;\n }\n\n Intake.overridePassive = false;\n }", "public void endTurn() {\n suggestionMade = false;\n locAtTurnStart = currentPlayersTurn.getPiece().getLocation();\n accusationChoices = new CardChoice();\n suggestionChoices = new CardChoice();\n turnIndicator = (turnIndicator + 1) % playerOrder.size();\n currentPlayersTurn = playerOrder.get(turnIndicator).getKey();\n currentPlayersSteps = 0;\n }", "protected void end() {\r\n \tSystem.out.println(\"Finished MoveToHeight\");\r\n \tmanipulator.moveElevator(0);\r\n }", "public void endGame() {\n\t\twaitingPlayers.addAll(players);\n\t\tplayers.clear();\n\t\tfor(ClientThread player: waitingPlayers) {\n\t\t\tplayer.points = 0;\n\t\t\tplayer.clientCards.clear();\n\t\t}\n\t\twinners = 0;\n\t\tlosers = 0;\n\t\tpassCounter = 0;\n\t\tdeck.init();\n\t\tview.changeInAndWait(players.size(), waitingPlayers.size());\n\t\tview.writeLog(\"-------------GAME END--------------\");\n\t\tstatus = \"waiting\";\n\t\tstatusCheck();\n\t}", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "public void animatingDone() {\n\n\t\t//assign newMap to map\n\t\tupdateMap();\n\n\t\t//assign newPlayerLocation to playerLocation\n\t\tsetPlayerLocation(getNewPlayerLocation());\n\n\t\t//Check if the game has reached game over requirements\n\t\tif(gameOver) {\n\t\t\tif(win) {\n\n\t\t\t\t//show the winning message\n\t\t\t\tMain.showEndMessage(1, 0);\n\t\t\t} else {\n\n\t\t\t\t//show losing message with Mho in the context\n\t\t\t\tif (newMap[getNewPlayerLocation()[0]][getPlayerLocation()[1]] instanceof Mho) {\n\t\t\t\t\tMain.showEndMessage(-1, -1);\n\t\t\t\t} \n\n\t\t\t\t//show losing message with Fence in the context\n\t\t\t\telse {\n\t\t\t\t\tMain.showEndMessage(-1, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}", "private void pieceDropped() {\n for (int i = 0; i < 4; ++i) {\n\n int x = curX + curPiece.x(i);\n int y = curY - curPiece.y(i);\n board[(y * BOARD_WIDTH) + x] = curPiece.getShape();\n }\n//check if any lines can be removed\n removeFullLines();\n//creates a new piece when a piece finished falling\n if (!isFallingFinished) {\n newPiece();\n }\n }", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Override\n public void notifyEndMove() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyEndMove();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending end move error\");\n }\n }", "protected void end() {\n drivebase.setArcade(0, 0);\n drivebase.disableTurnController();\n }", "void completeTurn() {\n\n\t\tremoveNotification();\n\n\t\tString matchId = match.getMatchId();// The Id for our match\n\t\tString pendingParticipant = GPGHelper.getOpponentId(\n\t\t\t\tgameHelper.getApiClient(), match);// We set who's turn it\n\t\t// is next since\n\t\t// we're done,\n\t\t// should always be\n\t\t// opponents turn\n\t\t// for us.\n\t\tbyte[] gameState = writeGameState(match);// We build the game state\n\t\t\t\t\t\t\t\t\t\t\t\t\t// bytes from the current\n\t\t\t\t\t\t\t\t\t\t\t\t\t// game state.\n\n\t\t// This actually tries to send our data to Google.\n\t\tGames.TurnBasedMultiplayer.takeTurn(gameHelper.getApiClient(), matchId,\n\t\t\t\tgameState, pendingParticipant).setResultCallback(\n\t\t\t\tnew ResultCallback<TurnBasedMultiplayer.UpdateMatchResult>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResult(UpdateMatchResult result) {\n\t\t\t\t\t\tturnUsed = true;\n\n\t\t\t\t\t\t// TODO:Handle this better\n\t\t\t\t\t\tif (!GooglePlayGameFragment.this.checkStatusCode(match,\n\t\t\t\t\t\t\t\tresult.getStatus().getStatusCode())) {\n\t\t\t\t\t\t\tLog.d(\"test\", result.getStatus().getStatusCode()\n\t\t\t\t\t\t\t\t\t+ \" Something went wrong\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t}", "protected void end() {\n \tRobot.drivetrain.leftDrive1.set(0); \n \tRobot.drivetrain.leftDrive2.set(0);\n \tRobot.drivetrain.leftDrive3.set(0);\n \t\n \tRobot.drivetrain.rightDrive1.set(0);\n \tRobot.drivetrain.rightDrive2.set(0);\n \tRobot.drivetrain.rightDrive3.set(0);\n \tRobot.twoGearAngle = Robot.drivetrain.gyro.getYaw();\n }", "@Override\n public void endGame(){\n gameOver = true;\n }", "protected void end() {\n \tintake.setLeftPower(0.0);\n\t\tintake.setRightPower(0.0);\n }", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "public void endGame() {\n for (Player player : this.players.values()) {\n if (player.getBankroll() == this.playerAmount * DEFAULT_BANKROLL) {\n this.doPokerEnds = true;\n break;\n }\n }\n this.startingGamePlayer = ++this.startingGamePlayer % this.playerAmount;\n }", "boolean endOfGame() {\n return false;\n }", "protected void end() {\n \tlogger.info(\"Ending AutoMoveLiftUp Command, encoder inches = {}\", Robot.liftSubsystem.readEncoderInInches());\n \t\n }", "void dealerMove() {\n\t}", "private void checkEndGame() {\n if (field.getStackSize() == (field.getPegCount() - 1)) {\n endGame = true;\n }\n }", "private StateNode finishDrop() {\n // Remove getHeld card from gameState\n gs.dropHeld();\n // tell the pyramid it's not getting that card back\n gs.getUserPyramid().confirmRemoval();\n\n // Add to statistics tracking\n GameManager.getStatisticsTracking().addToMinionsPlayed(1);\n\n // Create new animation state\n AnimatingNode state = new AnimatingNode(match, stateCallback);\n\n //Check if the pyramid needs a refill\n if (gs.getUserPyramid().isEmpty() && !gs.getUserMatchDeck().isEmpty()) {\n state.refillPyramid();\n } else if (!gs.getUserPyramid().getFlipCards().isEmpty()) {\n state.flipCard();\n } else {\n int count = 0;\n for (MatchCard card : gs.getUserPyramid()) {\n if (gs.getUserDuckDust().isPlayable(card.getCost())) {\n count++;\n }\n }\n if (count == 0 && gs.getUserDuckDust().getGround()) {\n stateCallback.turnOver();\n }\n return new Idle(match, stateCallback);\n }\n return state;\n }", "protected void end() {\n \t\n \tlift.liftStop();\n }", "public void endTurn() throws ClientException{\n\t\t\thasRolled = false;\n\t\t\tplayedDevCard = false;\n\t\t\toldDevCards.setMonopoly(oldDevCards.getMonopoly()+newDevCards.getMonopoly());\n\t\t\toldDevCards.setSoldier(oldDevCards.getSoldier()+newDevCards.getSoldier());\n\t\t\toldDevCards.setYearOfPlenty(oldDevCards.getYearOfPlenty()+newDevCards.getYearOfPlenty());\n\t\t\toldDevCards.setRoadBuilding(oldDevCards.getRoadBuilding()+newDevCards.getRoadBuilding());\n\t\t\toldDevCards.setMonument(oldDevCards.getMonument()+newDevCards.getMonument());\n\t\t\n\t}", "private void playerMoveDown()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() + 1);\n if (this.getCurrentY() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "private void oneLineDown() {\n if (!tryMove(curPiece, curX, curY - 1)) {\n \n pieceDropped();\n }\n }", "public void step(){\n if (this.jobs.contains(this.currentFloor)){ //we arrived at our destination\n this.openDoor();\n this.leavePeople();\n this.deleteJob(this.currentFloor);\n } else {\n this.closeDoor();\n this.changeState();\n this.move();\n }\n }", "public void endGame() {\n\r\n\t\tplaying = false;\r\n\t\tstopShip();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t}", "@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }", "private void exitCombatPlayerDefeat(){\n\t\tCheckpoint.load();\r\n\t\t//GlobalGameState.setActiveGameState(GameStates.DEFEAT);\r\n\t\tGSTransition.getInstace().prepareTransition( GameStates.DEFEAT );\r\n\t\tGlobalGameState.setActiveGameState(GameStates.TRANSITION);\r\n\t}", "public void endTurn() {\r\n\t\tcontraband.clear();\r\n\t\tactions = 1;\r\n\t\tbuys = 1;\r\n\t\tif(treasure > 0) treasure = 0;\r\n\t\tpotion = 0;\r\n\t\tcoppersmith = 0;\r\n\t\tbridge = 0;\r\n\t\tquarry = 0;\r\n\t\tdeck.cleanUp();\r\n\t\taccess.log(getPlayerName() + \"'s Deck: \" + deck.toString());\r\n\t\taccess.log(getPlayerName() + \"'s turn ended\");\r\n\t\tnotifyObservers();\r\n\t}", "protected void end()\n\t{\n\t\t//\t\tdouble intakeSpeed[] = { 0.0, 0.0 };\n\t\t//\t\tRobot.intake.setSpeed(intakeSpeed);\n\t}", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "protected void end() {\n \tRobot.drive.brake();\n }", "public void endRound() {\n\t\tif (roundNumber>maxRounds) {\n\t\t\tSystem.out.println(\"hae �etta er MAX ROUNDS! LEIKUR �TTI A� VERA B�INN\");\n\t\t\tendGame();\n\t\t} else {\n\t\t\tSystem.out.println(\"�ETTA er r�tt leikur er ekki b�inn round: \"+ getCurrentRound());\n\t\t\tmatchResults = core.simulateNextRound();\n\t\t\tSystem.out.println(\"B�INN A� SIMULATA ROUND \");\n\t\t\tFootballPlayer[] players = core.getAllFootballPlayers();\n\t\t\tfor (int i = 0; i<players.length; i++) {\n\t\t\t\tStatistics[] stats = players[i].getStats();\n\t\t\t\tSystem.out.println(players[i].getName() + \" \" + stats[1].getGoals());\n\t\t\t}\n\t\t\tcalculatePoints();\n\t\t\troundNumber++;\n\t\t}\n\t\tusers.get(0).setTransferFinished(false);\n\t\tusers.get(1).setTransferFinished(false);\n\t}", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "public void endGame()\r\n {\r\n for (Cell c : gameBoard.bombList)\r\n {\r\n if (c.isBomb())\r\n {\r\n if (c.getText() == \"X\")\r\n {\r\n c.setId(\"correctFlag\");\r\n }\r\n else\r\n {\r\n c.setId(\"bombClicked\");\r\n }\r\n }\r\n else if (c.getText() == \"X\")\r\n {\r\n c.setId(\"incorrectFlag\");\r\n }\r\n c.setDisable(true);\r\n }\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n win();\r\n }\r\n else\r\n {\r\n lose();\r\n }\r\n System.out.println(\"Game Over...\");\r\n scoreBoard.resetBtn.setDisable(false);\r\n }", "protected void end() {\n \tRobot.vision_.stopGearLiftTracker();\n }", "public void endTurn() {\n \t\t// add new cards to the set of usable cards\n \t\tfor (int i = 0; i < newCards.size(); i++)\n \t\t\tcards[newCards.get(i).ordinal()] += 1;\n \n \t\tnewCards.clear();\n \t\tusedCard = false;\n \n \t\tappendAction(R.string.player_ended_turn);\n \t}", "public void performCheckAfterPlayerMove() {\n\t\tagentsMoved += 1;\n\t\t\n\t\tif(agentsMoved == agents) {\n\t\t\troundsPlayed += 1;\n\t\t\tmoveRobots();\n\t\t\tagentsMoved = 0;\n\t\t\t\n\t\t\t//restart game at new level after the robots has moved\n\t\t\tif(roundsPlayed > server.getRoundsPerLevel()) {\n\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.NextLevel, server, null);\n\t\t\t\troundsPlayed = 0;\n\t\t\t}\n\t\t}\n\t}", "protected void end() {\n Robot.arm.moveArm(0, 1);\n }", "private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }", "public void endUserTurn() {\n\t\tupdateUserTeam();\n\n\t\tusers.get(userTurn).setTransferFinished(true);\n\t\tPlayRound.endUserTurn();\n\t\tMainGui.showCardLayout(\"panelPlayRound\");\n\n\t}", "public void battleComplete() {\n\t}", "private MovementProgressEnum performEndOfMovement(Entity mover, MoveComponent moveCompo, Room room) {\n\t\tmoveCompo.arrivedOnTile = true;\n\t\t\n\t\tint costOfMovementForTilePos = TileUtil.getCostOfMovementForTilePos(moveCompo.currentMoveDestinationTilePos, mover, room);\n\t\tmoveCompo.setMoveRemaining(moveCompo.getMoveRemaining() - costOfMovementForTilePos);\n\t\t\n\t\tOptional<Entity> chasm = TileUtil.getEntityWithComponentOnTile(moveCompo.currentMoveDestinationTilePos, ChasmComponent.class, room);\n\t\tif (!chasm.isPresent()) {\n\t\t\tmoveCompo.setLastWalkableTile(moveCompo.currentMoveDestinationTilePos);\n\t\t}\n\t\t\n\t\tMappers.gridPositionComponent.get(mover).coord(mover, moveCompo.currentMoveDestinationTilePos, room);\n\t\tfor (Component c : mover.getComponents()) {\n\t\t\tif (c instanceof MovableInterface) {\n\t\t\t\t((MovableInterface) c).endMovement(moveCompo.currentMoveDestinationTilePos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tAlterationReceiverComponent alterationReceiverComponent = Mappers.alterationReceiverComponent.get(mover);\n\t\tif (alterationReceiverComponent != null) {\n\t\t\talterationReceiverComponent.onArriveOnTile(moveCompo.currentMoveDestinationTilePos, mover, room);\n\t\t}\n\t\t\n\t\t\n\t\t// Creep\n\t\tOptional<Entity> creep = TileUtil.getEntityWithComponentOnTile(moveCompo.currentMoveDestinationTilePos, CreepComponent.class,room);\n\t\tif (creep.isPresent()) {\n\t\t\tDestructibleComponent destructibleComponent = Mappers.destructibleComponent.get(creep.get());\n\t\t\tif (destructibleComponent == null || !destructibleComponent.isDestroyed()) {\n\t\t\t\t// There is creep on this tile, play its effect\n\t\t\t\tMappers.creepComponent.get(creep.get()).onWalk(mover, creep.get(), room);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Leave creep\n\t\tif (Mappers.creepEmitterComponent.has(mover)) {\n\t\t\tMappers.creepEmitterComponent.get(mover).emit(mover, moveCompo.currentMoveDestinationTilePos, room);\n\t\t}\n\t\t\n\t\t// Things that only the player can do, such as go through a door\n\t\tPlayerComponent playerCompo = Mappers.playerComponent.get(mover);\n\t\tif (playerCompo != null) {\n\t\t\t// Doors\n\t\t\tEntity doorEntity = TileUtil.getDoorEntityOnTile(moveCompo.currentMoveDestinationTilePos, room);\n\t\t\tif (doorEntity != null) {\n\t\t\t\tDoorComponent doorCompo = Mappers.doorComponent.get(doorEntity);\n\t\t\t\tif (doorCompo != null && doorCompo.isOpened() && doorCompo.getTargetedRoom() != null) {\n\t\t\t\t\tmoveCompo.clearSelectedTileFromPreviousTurn();\n\t\t\t\t\t//Change room !!!\n\t\t\t\t\tfinishRealMovement(mover, room);\n\t\t\t\t\tmoveCompo.clearMovableTiles();\n\t\t\t\t\t\n\t\t\t\t\troom.setNextRoom(doorCompo.getTargetedRoom());\n//\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\n\t\tboolean movementOver = moveCompo.currentMoveDestinationIndex >= moveCompo.getWayPoints().size();\n\t\tmoveCompo.incrementCurrentMoveDestinationIndex();\n\t\tif (movementOver) {\n\t\t\treturn MovementProgressEnum.MOVEMENT_OVER;\n\t\t}\n\n\t\tif (moveCompo.playerMovementCompo && moveCompo.getMoveRemaining() <= 0 && !moveCompo.isFrozen()) {\n\t\t\tmoveCompo.setEndTurnTile(TileUtil.getTileAtGridPos(moveCompo.currentMoveDestinationTilePos, room));\n\t\t\tVector2 selectedTile = Mappers.gridPositionComponent.get(moveCompo.getSelectedTile()).coord();\n\t\t\tmoveCompo.setSelectedTileFromPreviousTurn(TileUtil.getTileAtGridPos(selectedTile, room));\n\t\t\t\n\t\t\tmoveCompo.removeFirstWaypoints(moveCompo.currentMoveDestinationIndex);\n\t\t\t\n\t\t\treturn MovementProgressEnum.TURN_OVER;\n\t\t}\n\t\t\n\t\treturn MovementProgressEnum.IN_PROGRESS;\n\t}", "private void cleaningBallot() {\n\t\tturnLeft();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t\tturnAround();\n\t\tmove();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t}", "private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}", "public void endTurn() {\r\n\t\tint num = this.hand.size();\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tthis.discard.add(this.hand.remove(0));\r\n\t\t}\r\n\t\tint gemHeight = (int) this.totalGemValue() / 3;\r\n\t\tthis.drawFromBag(5 + gemHeight);\r\n\t}", "protected void end() {\n\t\tPickup.setRollers(0);\n\t}", "@Override\n\tpublic void endGame() {\n\t\tsuper.endGame();\n\t}", "protected void end() {\n\t\tdrive.setBoth(0);\n\t}", "@Override\n\tpublic void movePlayerUp() {\n\t\tpacman.changeNextDirection(Direction.up);\n //movePacman();\n\t}", "public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "public void endTurn() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Started endTurn() for player \"+currentPlayer.getNumber());\r\n\t\tturnIsEnding = true;\r\n\r\n\t\t// End turn restrictions\r\n\t\tif (!currentPlayer.isDead() && !currentPlayer.isFree() && !currentPlayer.hasQuit()) {\r\n\t\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all cards in play area are played\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustChoose.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all choices are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustTrash.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all trashes are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Don't need to discard\r\n\t\t}\r\n\t\t\r\n\t\t// Mass deletes\r\n\t\tclearMessages();\r\n\t\t\r\n\t\t// If just escaped, send message after clearing\r\n\t\tif (currentPlayer.getCurrentRoom() == 0 && currentPlayer.getPiece().getX() == GlobalVars.playerCoordsPerRoom[39][0]) {\r\n\t\t\t// Update room\r\n\t\t\tcurrentPlayer.setCurrentRoom(39);\r\n\t\t\tif (firstEscapee == currentPlayer) {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** was the first to escape! They received a **20** :star: **Mastery Token**\\n:skull: Only **4** turn(s) left!\").queue();\r\n\t\t\t} else {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** escaped in time! They received a **20** :star: **Mastery Token**\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set cards in PlayArea to not played for next time, Undos the Discarded tag\r\n\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\tcurrentPlayer.getPlayArea().getCard(i).setPlayed(false);\r\n\t\t\tif (currentPlayer.getPlayArea().getCard(i).toStringHand().contentEquals(\"*[Discarded]*\")) currentPlayer.getPlayArea().getCard(i).setStringInHand();\r\n\t\t}\r\n\t\t\r\n\t\t// Clear swords, skill, boots, etc\r\n\t\tcurrentPlayer.endOfTurnReset();\r\n\t\tmustDiscard.clear();\r\n\t\t\r\n\t\t// Replaces cards in dungeon row. Only one attack per turn\r\n\t\tif (!status.contentEquals(\"over\")) {\r\n\t\t\tboolean hasAttackedThisTurn = false;\r\n\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t// Checks to see if it should replace card\r\n\t\t\t\tif (dungeonRow[i].isBought()) {\r\n\t\t\t\t\tdungeonRow[i] = mainDeck.getNext();\r\n\t\t\t\t\tif (dungeonRow[i].isDragonAttack() && !hasAttackedThisTurn) {\r\n\t\t\t\t\t\tdragonAttack(cubesPerLevel[attackLevel]);\r\n\t\t\t\t\t\thasAttackedThisTurn = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (dungeonRow[i].isHasArrive()) {\r\n\t\t\t\t\t\tdoArriveEffect(dungeonRow[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmainDeck.removeTop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Instantly go on to next player if no dragon attack\r\n\t\t\tif (!hasAttackedThisTurn) {\r\n\t\t\t\tdetermineNextPlayer();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void endTurn() {\n }", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "public void endGame()\n\t{\n\t\tthis.opponent = null;\n\t\tthis.haveGame = false;\n\t\tthis.isTurn = false;\n\t\tfor(int i = 0; i < 3; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < 3; j++)\n\t\t\t{\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "public void drop(RotatableGrid piece) {\r\n \tif (!hasFalling()) {\r\n\t Point centro = new Point(width / 2, height-1);\r\n\t falling = new FallingPiece(piece).moveTo(centro);\r\n\t if(conflictsWithBoard(falling)){\r\n\t \tgameOver = true;\r\n\t \tfalling = null;\r\n\t } else{\r\n\t\t if(isGhostActivated())\r\n\t\t \tgenerateGhost();\r\n\t }\r\n\t triggerBlockListeners();\r\n \t}\r\n \r\n }", "@Override\r\n public void tick() {\n playerNextTo();\r\n if (playerContact() && isCollisioned()) {\r\n if (!((GameState) game.getGameState()).getWorld().getTile((int) (x + xMove), (int) (y + yMove)).isSolid()\r\n && isValidMove(xMove, yMove)) {\r\n x += xMove;\r\n y += yMove;\r\n }\r\n }\r\n }", "public final void respawn() {\r\n World.submit(new Pulse(getRespawnRate()) {\r\n\r\n @Override\r\n public boolean pulse() {\r\n GroundItemManager.create(GroundSpawn.this);\r\n return true;\r\n }\r\n });\r\n }", "private void endGame() {\r\n\r\n m_state.setState(State.ENDING_GAME);\r\n\r\n /* find winner */\r\n for(KimTeam team : m_survivingTeams) {\r\n if(team != null) {\r\n if(!team.isOut()) {\r\n m_winner = team;\r\n }\r\n\r\n //remove survivors from m_teams so not to duplicate stats\r\n m_teams[team.m_freq] = null;\r\n }\r\n }\r\n\r\n /* end poll */\r\n if(m_poll != null) {\r\n m_poll.endPoll(m_winner, m_connectionName);\r\n m_poll = null;\r\n }\r\n\r\n /* display scoresheet */\r\n m_botAction.sendArenaMessage(\"--------Base1--------W--L --------Base2--------W--L --------Base3--------W--L --------Base4--------W--L\");\r\n\r\n if(!m_skipFirstRound) {\r\n printFormattedTeams(m_teams, m_numTeams);\r\n m_botAction.sendArenaMessage(\"------------------------- ------------------------- ------------------------- -------------------------\");\r\n }\r\n\r\n printFormattedTeams(m_survivingTeams, 4);\r\n m_botAction.sendArenaMessage(\"-------------------------------------------------------------------------------------------------------\");\r\n\r\n if(m_winner != null) {\r\n m_botAction.sendArenaMessage(\"Winner: \" + m_winner.toString(), 5);\r\n\r\n for(KimPlayer kp : m_winner) {\r\n Player p = m_botAction.getPlayer(kp.m_name);\r\n\r\n if(p != null && p.isPlaying()) {\r\n m_botAction.warpTo(p.getPlayerID(), 512, 277);\r\n }\r\n }\r\n } else {\r\n m_botAction.sendArenaMessage(\"No winner.\");\r\n }\r\n\r\n updateDB();\r\n\r\n /* announce mvp and clean up */\r\n m_botAction.scheduleTask(new TimerTask() {\r\n public void run() {\r\n m_botAction.sendArenaMessage(\"MVP: \" + m_mvp.m_name, 7);\r\n //refreshScoreboard();\r\n cleanUp();\r\n resetArena();\r\n m_state.setState(State.STOPPED);\r\n }\r\n }, 4000);\r\n }", "protected void pickupFood() {\r\n\t\tif(this.food > 0){\r\n\t\t\tthis.food--;\r\n\t\t}\r\n\t}", "public void dropItLikeItsHot(){\n\t\tint score_increment = 0;\n\t\tPoint test_location = new Point(pieceOrigin);\n\t\twhile(true){\n\t\t\ttest_location.y += 1;\n\t\t\tif(!collides(test_location, currentPiece)){\n\t\t\t\tpieceOrigin.y += 1;\n\t\t\t\tscore_increment += 1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscore += score_increment*100;\n\t\tgossipGirl();\n\t\trepaint();\n\t}", "public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }", "@Override\n\tprotected void end() {\n\t\tRobot.chassis.setLeft(0);\n\t\tRobot.chassis.setRight(0);\n\t}", "public boolean endOfBoard() {\n\t return (y == 0 || y == Board.SIZE - 1);\n\t}", "private void newPiece() {\n curPiece.setRandomShape();\n//compute the initial curX and curY values \n curX = BOARD_WIDTH / 2 + 1;\n curY = BOARD_HEIGHT - 1 + curPiece.minY();\n//if a piece reaches the top and cannot drop any more piece\n if (!tryMove(curPiece, curX, curY)) {\n//cancel timer and display game over\n curPiece.setShape(Tetrominoe.NoShape);\n timer.cancel();\n isStarted = false;\n statusbar.setText(\"Game over\");\n }\n }", "@Override\n public void run() {\n if (time == 0) {\n // wait has ended time to teleport\n if (!Utils.homeExists(homeOwner, homeName)) {\n // the has since been deleted whilst waiting\n p.sendMessage(\"There was an error teleporting you.\");\n cancel();\n return;\n }\n Utils.teleportPlayer((Player) sender, homeOwner, homeName);\n sender.sendMessage(Utils.chat(plugin.getConfig().getString(\"teleport-color\") + plugin.getConfig().getString(\"teleport-message\")));\n cancel();\n return;\n }\n Location currentLocation = ((Player) sender).getLocation();\n if (initialLocation.getX() != currentLocation.getX() ||\n initialLocation.getY() != currentLocation.getY() ||\n initialLocation.getZ() != currentLocation.getZ()) {\n // they've moved and the config says to cancel on move\n sender.sendMessage(Utils.chat(plugin.getConfig().getString(\"move-cancel-message\")));\n cancel();\n }\n else {\n sender.sendMessage(Utils.chat(plugin.getConfig().getString(\"countdown-message\").replace(\"<time>\", Integer.toString(time))));\n time--;\n }\n }" ]
[ "0.68072057", "0.6520627", "0.6490814", "0.64823955", "0.6476333", "0.64622533", "0.6414615", "0.639873", "0.63979805", "0.6397892", "0.6396805", "0.6377071", "0.6374788", "0.6363279", "0.6347982", "0.63219875", "0.6312895", "0.62974226", "0.6292399", "0.62780297", "0.6250989", "0.62390226", "0.6227248", "0.62011486", "0.6200379", "0.61990154", "0.61883724", "0.6157217", "0.61387396", "0.6136453", "0.611496", "0.6113976", "0.6112536", "0.611096", "0.6109119", "0.6092538", "0.60909665", "0.6087676", "0.6087346", "0.6087326", "0.6062838", "0.6062809", "0.6044675", "0.6041904", "0.6038825", "0.6029017", "0.6024636", "0.60124403", "0.6007326", "0.60052985", "0.5998912", "0.5997509", "0.5996421", "0.5983457", "0.59765", "0.5974645", "0.59733415", "0.59681225", "0.5965231", "0.59543604", "0.5950457", "0.5949129", "0.59470767", "0.5944081", "0.59423625", "0.59402245", "0.5937722", "0.5935356", "0.5932967", "0.593151", "0.5930852", "0.59297293", "0.59197986", "0.5917549", "0.59026587", "0.5895061", "0.58941245", "0.5881966", "0.5881851", "0.58818394", "0.58801866", "0.58759487", "0.5868656", "0.58642817", "0.58633214", "0.58615756", "0.5859013", "0.5857883", "0.5856021", "0.58526915", "0.58512545", "0.58511746", "0.58419275", "0.58391875", "0.5831322", "0.5831115", "0.58304125", "0.581891", "0.5818237", "0.58160514", "0.5814474" ]
0.0
-1
end of move This methods makes it so that Garret is represented by a :(, the empty space represented by +, items represented by $, door, represented by D, and stairs represented by S.
public void printG(){ for(int i = 0; i < this.area.length;i++){ System.out.println(" "); System.out.print(" "); for(int p = 0 ; p < this.area.length; p++){ if(this.Garret[i][p] == 1){ System.out.print(":( "); } else if(this.position[i][p] ==1){ System.out.print(" + "); } else if(this.Items[i][p] != null){ System.out.print("<$>"); } else if(this.Door[i][p] ==1){ System.out.print(" D "); } else if(this.Stairs[i][p] ==1){ System.out.print(" S "); } else{ System.out.print(this.area[i][p]); } }//end of inner for print }//end of outter for print }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}", "protected void end() {\n \tnew GearCommand().start();\n \t/*if(!didZach){\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < currentTime + .5){\n \t\t\tDrive.setLeft(0);\n \t\t\tDrive.setRight(0);\n \t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < currentTime + 1.5){\n \t\t\tDrive.setLeft(-.5);\n \t\t\tDrive.setRight(-.5);\n \t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < (currentTime + .6)){\n\t\t\t\tDrive.setLeft(.5);\n\t\t\t\tDrive.setRight(-.5);\n\t\t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < currentTime + 1.5){\n \t\t\tDrive.setLeft(.5);\n \t\t\tDrive.setRight(.5);\n \t\t}\n \t\tcurrentTime = time.get();\n \t\twhile(time.get() < (currentTime + .6)){\n\t\t\t\tDrive.setLeft(-.5);\n\t\t\t\tDrive.setRight(.5);\n\t\t\t}\n \t\twhile(time.get() < currentTime + 1.5){\n \t\t\tDrive.setLeft(.5);\n \t\t\tDrive.setRight(.5);\n \t\t}\n \t}*/\n }", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "public void moveEnd(\n )\n {moveLast(); moveNext();}", "void dealerMove() {\n\t}", "protected void end() {\n \tRobot.hand.setWrist(0.0);\n }", "protected void end() {\n \twrist.rotateWrist(0);\n }", "@Override\n\tpublic String move() {\n\t\treturn null;\n\t}", "public void moveRight() {\n\t\t\n\t}", "public void endMove(Game game) {\n game.nextMove();\n }", "public void finalizeMove() {\n return;\n }", "private String hardMove() {\n return super.makeAMove(getBestMoveForBlack(FORESEEN_MOVES * 2));\n }", "public void move()\r\n {\r\n if(goRight)\r\n {\r\n setLocation(getX()+10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }else\r\n {\r\n setLocation(getX()-10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }\r\n if(getY()>getWorld().getHeight())\r\n ((CaveWorld)(getWorld())).deleteAxe(this);\r\n }", "public void moveSpaceShipRight() {\n\t\tSpaceship sp = getTheSpaceship();\n\t\tsp.moveRight();\n\t}", "public void move() {\n\t\t\tar.setAhead(10 * fahrtrichtung);\n\n\t\t\t// Wie schnell sich der Roboter drehen soll\n\t\t\tar.setTurnRight(45 * drehrichtung);\n\t\t\tar.execute();\n\t\t\tfarbschema = farbschema * (-1);\n\t\t}", "public void move() {\n\t\tsetHealth(getHealth() - 1);\n\t\t//status();\n\t\tint row = getPosition().getRow() ;\n\t\tint column = getPosition().getColumn();\n\t\tint randomInt = (int)((Math.random()*2) - 1);\n\t\t\n\t\tif(hunter == false && row < 33) {\n\t\t\tif(row == 32) {\n\t\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(row == 0) {\n\t\t\t\tgetPosition().setCoordinates(row + 1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 99) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column - 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 0) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column + 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t}\n\t\tif(hunter == false && row > 32) {\n\t\t\t//setHealth(100);\n\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\tsetPosition(getPosition()) ;\n\t\t}\n\t\telse {\n\t\t\tif(row < 65 && hunter == true) {\n\t\t\t\tgetPosition().setCoordinates(row + 1, column);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetPosition().setCoordinates(65, column);\n\t\t\t\tsetPosition(getPosition());\n\t\t\t\t//Check if there is a gazelle\n\t\t\t\tPair [][] range = {{Drawer.pairs[row+1][column-1],Drawer.pairs[row+1][column],\n\t\t\t\t\t\t\t Drawer.pairs[row+1][column+1]}, {\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column-1],\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column],Drawer.pairs[row+2][column+1]}};\n\t\t\t\t\n\t\t\t\tfor(Pair [] line: range) {\n\t\t\t\t\tfor(Pair prey: line) {\n\t\t\t\t\t\tif(prey.getAnimal() instanceof Gazelle ) {\n\t\t\t\t\t\t\tattack();\n\t\t\t\t\t\t\tprey.getAnimal().die();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void end() {\n \tintake.setLeftPower(0.0);\n\t\tintake.setRightPower(0.0);\n }", "public void moveOut(){\n int index=Planet.findPlanet(currPlanet.getName(),planets);\n if(index==planets.size()-1){\n ////If the spaceship is already at the last planet(planets.size()-1) in the planet list\n System.out.println(\"The spaceship \"+this.name+\" couldn't move out. No planet is farther out\");\n }else{\n ////move farther out of the solar system means the index+1 in the ArrayList of planets\n Planet moveToPlanet=planets.get(index+1);\n moveTo(moveToPlanet.getName());\n }\n }", "@Override\r\n\tpublic String moveRight() {\n\t\tif((0<=x && x<50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((40<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "void moveRight();", "public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}", "public void move() {\n energy -= 0.03;\n if (energy < 0) {\n energy = 0;\n }\n }", "private void cleaningBallot() {\n\t\tturnLeft();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t\tturnAround();\n\t\tmove();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t}", "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "private String easyMove() {\n int randomHole = evaluate();\n while (!isValidMove(randomHole)) {\n randomHole = evaluate();\n }\n\n return super.makeAMove(randomHole);\n }", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"하늘을 날다\");\n\t}", "public void move(){\n\t\t\n\t}", "protected void end() {\n Robot.arm.moveArm(0, 1);\n }", "public void act(){\n food = theWorld.getCloseFood(this);\n queenAnt = theWorld.getCloseQueen(this);\n if(getF){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n start = false;\n hunger += 50;\n hasFood = false;\n //eat the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving up\");\n setDirection(Location.NORTH);\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n System.out.println(\"moving up left\");\n setDirection(Location.NORTH_WEST);\n //go up left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving left\");\n setDirection(Location.WEST);\n //go left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down left\");\n setDirection(Location.SOUTH_WEST);\n //go down left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() + 1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving down\");\n setDirection(Location.SOUTH);\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down right\");\n setDirection(Location.SOUTH_EAST);\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving right\");\n setDirection(Location.EAST);\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n System.out.println(\"moving up right\");\n setDirection(Location.NORTH_EAST);\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n //get the food\n start = false;\n getF = false;\n food.giveFood(this);\n }\n }else if(getQ){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n food.giveFood(this);\n start = false;\n //get the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n if(getLocation().isSameLocation(queenAnt.getLocation())){\n giveQueenFood(queenAnt);\n //give the queen the food\n }else{\n if(getLocation().getY() > queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(),this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() > queenAnt.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }\n }else{\n if(hunger > 30){\n getQ = true;\n start = true;\n //assign closest queen location\n }else{\n getF = true;\n start = true;\n //assign closest food location\n }\n }\n }", "@Override\n\tprotected void end() {\n\t\tmyLowerArm.set(0.0);\n\t}", "@Override\n public void move() {\n System.out.println(\"I like to burrow around in the ground and avoid rocky areas.\");\n }", "public void moveRight() {\n locX = locX + 1;\n }", "public void calRightMove() {\n }", "private void gameEnd(String loser) {\n }", "public void move()\n\t{\n\t\tVector v = ship.v;\n\t\tb = b.getLocation().add(v).getBlock();\n\t\tif(triangle != null) triangle.move();\n\t\tif(rear != null) rear.move();\n\t\tif(foreAndAft != null) foreAndAft.move();\n\t\tif(sails != null) for(int i = 0; i < sails.size(); i++)\n\t\t{\n\t\t\tSail sail = sails.get(i);\n\t\t\tsail.move();\n\t\t}\n\t}", "protected void end() {\r\n \tSystem.out.println(\"Finished MoveToHeight\");\r\n \tmanipulator.moveElevator(0);\r\n }", "public void move() {\n\r\n\t}", "public void setLastMove(SymbolType move){\n this.lastMove = move;\n }", "public void moveRight()\n\t{\n\t\tx = x + STEP_SIZE;\n\t}", "@Override\r\n\tpublic String moveForth() {\n\t\tif((0<=x && x<=50) && (0<=y && y<=10) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (40<=y && y<=50) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<=y && y<=50) && (0<z && z<=10))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=10) && (0<=y && y<=50) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<=y && y<=50) && (40<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((40<=x && x<=50) && (0<=y && y<=50) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "private void wander(){\n\t\tmonster.moveRandom();\r\n\t\tsaveMove();\r\n\t}", "public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "protected void end() {\n \tRobot.gearIntake.setIsDown(false);\n \tRobot.gearIntake.setGearRollerSpeed(0);\n }", "private StateNode finishDrop() {\n // Remove getHeld card from gameState\n gs.dropHeld();\n // tell the pyramid it's not getting that card back\n gs.getUserPyramid().confirmRemoval();\n\n // Add to statistics tracking\n GameManager.getStatisticsTracking().addToMinionsPlayed(1);\n\n // Create new animation state\n AnimatingNode state = new AnimatingNode(match, stateCallback);\n\n //Check if the pyramid needs a refill\n if (gs.getUserPyramid().isEmpty() && !gs.getUserMatchDeck().isEmpty()) {\n state.refillPyramid();\n } else if (!gs.getUserPyramid().getFlipCards().isEmpty()) {\n state.flipCard();\n } else {\n int count = 0;\n for (MatchCard card : gs.getUserPyramid()) {\n if (gs.getUserDuckDust().isPlayable(card.getCost())) {\n count++;\n }\n }\n if (count == 0 && gs.getUserDuckDust().getGround()) {\n stateCallback.turnOver();\n }\n return new Idle(match, stateCallback);\n }\n return state;\n }", "@Override\n\tpublic void move() {\n\t\t\n\t}", "protected void end() {\n \tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorRightOne.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.PercentVbus);\n \tRobotMap.motorLeftOne.set(0);\n \tRobotMap.motorRightOne.set(0);\n \tRobotMap.motorLeftTwo.set(0);\n \tRobotMap.motorRightTwo.set(0);\n \tSystem.out.println(this.startAngle- RobotMap.navx.getAngle());\n\n\n \t\n }", "public static void roundEnd()\n\t{\n\t\tdealerVal.setText(String.valueOf(calculateHand(dealersCards)));\n\t\tdealersMove();\n\t\tfor(int i=1;i<dealersCards.size();i++)\n\t\t{\n\t\t\tdealerCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(dealersCards.get(i)))));\n\t\t}\n\t\tint result=calculateHands(dealersCards, playersCards);\n\t\tswitch(result)\n\t\t{\n\t\tcase 0:\n\t\t\twin();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tlose();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpush();\n\t\t\tbreak;\n\t\t}\n\t\tclearHands();\n\t\tHome.writetoFile();\n\t\tif(!Game.isComplete())\n\t\t{\n\t\t\tbetting();\n\t\t}\n\t}", "@Override\r\n\tpublic void move(char c) {\r\n\t\tswitch(this.state) {\r\n\t\tcase WALK:\r\n\t\t\tif(c == 'a') {\r\n\t\t\t\tthis.speed = -30;\r\n\t\t\t\tthis.dir = directionState.LEFT;\r\n\t\t\t}\r\n\t\t\tif(c == 'd') {\r\n\t\t\t\tthis.speed = 30;\r\n\t\t\t\tthis.dir = directionState.RIGHT;\r\n\t\t\t}\r\n\t\t\tif(c == 'f') {\r\n\t\t\t\tthis.state = slugState.ATTACK;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tif(c == 'o') {\r\n\t\t\t\tthis.speed = 0;\r\n\t\t\t\tthis.decrementHitpoints();\r\n\t\t\t\tthis.state = slugState.DAMAGE;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase ATTACK:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase DAMAGE:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}", "protected void end() {\n \tRobotMap.gearIntakeRoller.set(0);\n }", "public Direction moveClyde(Ghost g);", "@Override\n\tpublic void move() {\n\t\tCoordinate currPos = new Coordinate(control.getPosition());\n\t\t\n\t\t// if we have enough packages head to the exit\n\t\tif (control.numParcels() <= control.numParcelsFound()) {\n\t\t\t// if we don't have a path to the exit\n\t\t\tif (control.currentPath == null || !control.isHeadingToFinish) {\t\n\t\t\t\t// find path to exit\n\t\t\t\tArrayList<Coordinate> tempPath = null;\n\t\t\t\t// See if there's a path without needing to go through hazards\n\t\t\t\ttempPath = control.findPath(currPos, control.finish.get(0), control.hazardsMap.keySet());\n\t\t\t\tSet<Coordinate> tempHazards = new HashSet<>(control.hazardsMap.keySet());\n\t\t\t\t// If no path without going through hazards, just go through them\n\t\t\t\tif (tempPath == null || tempPath.size() == 0) {\n\t\t\t\t\tfor (Coordinate coord : control.hazardsMap.keySet()) {\n\t\t\t\t\t\ttempHazards.remove(coord);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If it's a valid map, there should be a path now\n\t\t\t\tcontrol.setPath(control.findPath(currPos, control.finish.get(0), tempHazards));\n\t\n\t\t\t\tcontrol.isHeadingToFinish = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\theadTowardsPackages(currPos);\n\t\t\n\t\texploreUnseenMap(currPos);\n\t\t\n\t\tMapTile currTile = control.getView().get(currPos);\n\t\tboolean isHealth = false;\n\t\tif (currTile.getType() == MapTile.Type.TRAP) {\n\t\t\tTrapTile trap = (TrapTile) currTile;\n\t\t\tif (trap.getTrap().equals(\"health\")) {\n\t\t\t\tisHealth = true;\n\t\t\t}\n\t\t}\n\t\tif (isHealth && (control.getHealth() < HEALTH_TRAP_THRESHOLD)) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t} else {\n\t\t\tisHealth = false;\n\t\t\tcontrol.moveTowards(control.dest);\n\t\t}\n\t\t\n\t}", "public abstract void move( char direction );", "@Override\n\tprotected void end() {\n\t\tRobot.chassis.setLeft(0);\n\t\tRobot.chassis.setRight(0);\n\t}", "@Override\n\tpublic void move() {\n\n\t}", "public void moveDeckWaste() {\n\t}", "public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }", "@Override\n protected void end() {\n Robot.SCISSOR.extendLift(0);\n }", "public void move(int tick) {\n moveMade = true;\n Location newTail;\n if (grow) {\n\n switch (body.getLast().direction) {\n case RIGHT:\n newTail = new Location(body.getLast().locX - GraphicsBounds.spriteSize,\n body.getLast().locY, body.getLast().direction);\n break;\n case LEFT:\n newTail = new Location(body.getLast().locX + GraphicsBounds.spriteSize,\n body.getLast().locY, body.getLast().direction);\n break;\n case UP:\n newTail = new Location(body.getLast().locX, body.getLast().locY\n + GraphicsBounds.spriteSize, body.getLast().direction);\n break;\n case DOWN:\n newTail = new Location(body.getLast().locX, body.getLast().locY\n - GraphicsBounds.spriteSize, body.getLast().direction);\n break;\n default:\n newTail = new Location(0,0);\n break;\n\n }\n\n\n body.addLast(newTail);\n }\n\n for (int i = body.size() - 1; i > 0; i--) {\n body.get(i).direction = body.get(i - 1).direction;\n }\n\n switch (direction) {\n case RIGHT:\n body.getFirst().direction = Direction.RIGHT;\n break;\n case LEFT:\n body.getFirst().direction = Direction.LEFT;\n break;\n case UP:\n body.getFirst().direction = Direction.UP;\n break;\n case DOWN:\n body.getFirst().direction = Direction.DOWN;\n break;\n default:\n break;\n }\n\n\n\n for (int i = body.size() - 1; i >= 0; i--) {\n Direction dir = body.get(i).direction;\n Location segment = body.get(i);\n switch (dir) {\n case RIGHT:\n segment.locX += snakeSpeed;\n break;\n case LEFT:\n segment.locX -= snakeSpeed;\n break;\n case UP:\n segment.locY -= snakeSpeed;\n break;\n case DOWN:\n segment.locY += snakeSpeed;\n break;\n default:\n break;\n }\n }\n\n\n\n grow = false;\n }", "@Override\n protected void end() {\n Robot.shooter.setShooterSpeed(0);\n Robot.elevator.elevatorUp(0);\n Robot.hopper.hopperOut(0);\n Robot.intake.enableIntake(0);\n\n\n }", "private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }", "public void endTurn() {\r\n\t\tint num = this.hand.size();\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tthis.discard.add(this.hand.remove(0));\r\n\t\t}\r\n\t\tint gemHeight = (int) this.totalGemValue() / 3;\r\n\t\tthis.drawFromBag(5 + gemHeight);\r\n\t}", "protected void end() {\r\n Robot.feeder.retractArm();\r\n Robot.feeder.setFeederIntakeSpeed(0);\r\n Robot.chassis.driveMecanumNormalized(0, 0, 0);\r\n Robot.shooter.setShootingMotors(0, 0);\r\n }", "public void move() {\n char move;\n\n do {\n System.out.println(\"Move snake: (wasd)\");\n move = scan.nextLine().charAt(0);\n } while(move != 'a' && move != 'w' && move != 's' && move != 'd');\n \n\n switch (move) {\n case 'w':\n if(board[snakePartList.get(0).getSnakePartRowsOld()-1][snakePartList.get(0).getSnakePartCollsOld()] != '*' ) {\n if(board[snakePartList.get(0).getSnakePartRowsOld()-1][snakePartList.get(0).getSnakePartCollsOld()] == '@') {\n eatApple();\n }\n\n if(board[snakePartList.get(0).getSnakePartRowsOld()-1][snakePartList.get(0).getSnakePartCollsOld()] == 'S') {\n keepMoving = false;\n }\n\n for(int i = 0; i < snakePartList.size(); i++) {\n if(i != 0) {\n snakePartList.get(i).setSnakePartRowsNew(snakePartList.get(i-1).getSnakePartRowsOld());\n snakePartList.get(i).setSnakePartCollsNew(snakePartList.get(i-1).getSnakePartCollsOld());\n } else {\n snakePartList.get(i).setSnakePartRowsNew(snakePartList.get(i).getSnakePartRowsOld()-1);\n }\n }\n\n updateBoard();\n\n for(int i = 0; i < snakePartList.size(); i++) {\n snakePartList.get(i).updateOldPlace();\n }\n \n \n } else {\n keepMoving = false;\n }\n break;\n\n case 'a':\n if(board[snakePartList.get(0).getSnakePartRowsOld()][snakePartList.get(0).getSnakePartCollsOld()-1] != '*' ) {\n if( board[snakePartList.get(0).getSnakePartRowsOld()][snakePartList.get(0).getSnakePartCollsOld()-1] == '@') {\n eatApple();\n }\n if( board[snakePartList.get(0).getSnakePartRowsOld()][snakePartList.get(0).getSnakePartCollsOld()-1] == 'S') {\n keepMoving = false;\n }\n for(int i = 0; i < snakePartList.size(); i++) {\n if(i != 0) {\n snakePartList.get(i).setSnakePartCollsNew(snakePartList.get(i-1).getSnakePartCollsOld());\n snakePartList.get(i).setSnakePartRowsNew(snakePartList.get(i-1).getSnakePartRowsOld());\n } else {\n snakePartList.get(i).setSnakePartCollsNew(snakePartList.get(i).getSnakePartCollsOld()-1);\n }\n }\n updateBoard();\n\n for(int i = 0; i < snakePartList.size(); i++) {\n snakePartList.get(i).updateOldPlace();\n }\n\n \n } else {\n keepMoving = false;\n }\n break;\n\n case 's':\n if(board[snakePartList.get(0).getSnakePartRowsOld()+1][snakePartList.get(0).getSnakePartCollsOld()] != '*') {\n if( board[snakePartList.get(0).getSnakePartRowsOld()+1][snakePartList.get(0).getSnakePartCollsOld()] == '@') {\n eatApple();\n }\n if( board[snakePartList.get(0).getSnakePartRowsOld()+1][snakePartList.get(0).getSnakePartCollsOld()] == 'S') {\n keepMoving = false;\n }\n for(int i = 0; i < snakePartList.size(); i++) {\n if(i != 0) {\n snakePartList.get(i).setSnakePartRowsNew(snakePartList.get(i-1).getSnakePartRowsOld());\n snakePartList.get(i).setSnakePartCollsNew(snakePartList.get(i-1).getSnakePartCollsOld());\n } else {\n snakePartList.get(i).setSnakePartRowsNew(snakePartList.get(i).getSnakePartRowsOld()+1);\n }\n }\n updateBoard();\n\n for(int i = 0; i < snakePartList.size(); i++) {\n snakePartList.get(i).updateOldPlace();\n }\n\n \n } else {\n keepMoving = false;\n }\n break;\n\n case 'd':\n if(board[snakePartList.get(0).getSnakePartRowsOld()][snakePartList.get(0).getSnakePartCollsOld()+1] != '*') {\n if(board[snakePartList.get(0).getSnakePartRowsOld()][snakePartList.get(0).getSnakePartCollsOld()+1] == '@') {\n eatApple();\n }\n if(board[snakePartList.get(0).getSnakePartRowsOld()][snakePartList.get(0).getSnakePartCollsOld()+1] == 'S') {\n keepMoving = false;\n }\n for(int i = 0; i < snakePartList.size(); i++) {\n if(i != 0) {\n snakePartList.get(i).setSnakePartCollsNew(snakePartList.get(i-1).getSnakePartCollsOld());\n snakePartList.get(i).setSnakePartRowsNew(snakePartList.get(i-1).getSnakePartRowsOld());\n } else {\n snakePartList.get(i).setSnakePartCollsNew(snakePartList.get(i).getSnakePartCollsOld()+1);\n }\n }\n updateBoard();\n \n for(int i = 0; i < snakePartList.size(); i++) {\n snakePartList.get(i).updateOldPlace();\n }\n\n \n } else {\n keepMoving = false;\n }\n break;\n }\n }", "private void disparo()\n {\n switch(this.posicion){\n case 0:\n setLocation(getX(),getY()-this.velocidadDisparo);\n break;\n case 1:\n setLocation(getX(),getY()+this.velocidadDisparo);\n break;\n case 2:\n setLocation(getX()+this.velocidadDisparo,getY());\n break;\n case 3:\n setLocation(getX()-this.velocidadDisparo,getY());\n break;\n }\n }", "public void endOfTurn();", "@Override\r\n public void moveSoldier(int previousLocationX, int previousLocationY, int newLocationX, int newLocationY) {\r\n\r\n // delete soldier representation from previous location \r\n // then render soldier representation in new location \r\n }", "static void moving() throws GameActionException {\n\n\t\tcheckLumberjack();\n\n\t\trc.setIndicatorLine(myLocation, myLocation.add(robotDirection), 0, 0, 0);\n\n\t\tif (rc.canBuildRobot(RobotType.SCOUT, robotDirection)\n\t\t\t\t&& rc.readBroadcast(Channels.COUNT_SCOUT) < Constants.MAX_COUNT_SCOUT) {\n\t\t\trc.buildRobot(RobotType.SCOUT, robotDirection);\n\t\t\tCommunication.countMe(RobotType.SCOUT);\n\t\t\treturn;\n\t\t}\n\t\t// } else if (rc.canBuildRobot(RobotType.SOLDIER, buildDirection) &&\n\t\t// rc.readBroadcast(Channels.COUNT_SOLDIER) <\n\t\t// Constants.MAX_COUNT_SOLDIER) {\n\t\t// rc.buildRobot(RobotType.SOLDIER, buildDirection);\n\t\t// Communication.countMe(RobotType.SOLDIER);\n\t\t// return;\n\t\t// }\n\n\t}", "@Override\n\tpublic void movment() {\n\t\tif(ghost.shot && fired) {\n\t\t\tif(direction == RIGHT)\n\t\t\t\tmove(RIGHT);\n\t\t\telse if(direction == LEFT)\n\t\t\t\tmove(LEFT);\n\t\t\telse if(direction == UP)\n\t\t\t\tmove(UP);\n\t\t\telse if(direction == DOWN)\n\t\t\t\tmove(DOWN);\n\t\t}\n\t}", "@Override\n public DirType getMove(GameState state) {\n if (print) System.out.println(\"\\n\\n\");\n this.gb.update(state); // Must be done every turn\n this.findEnemySnake(); // Update Enemy Snake's head Location\n this.markDangerTiles(); // Mark tiles the Enemy Snake can reach and filled\n if (print) this.gb.printBoard();\n if (print) System.out.println(\"DIVEBOMB ENTER -> Us_X: \" + this.us_head_x + \", Us_Y: \" + this.us_head_y + \" -> \" + this.us_num);\n Tile target = this.diveBomb();\n if (print) System.out.print(\"DIVEBOMB EXIT -> Target_X: \" + target.getX() + \" Target_Y: \" + target.getY());\n DirType retVal = getDir(target);\n if (print) System.out.println(\" Dir: \" + retVal);\n\n\n if (this.us_num == 0) {\n System.out.println(\"\\n\\n\\n\");\n GameBoard gb= new GameBoard(state, 1,0);\n gb.update(state);\n float val = USuckUnless.grade(state, this.us_num, DirType.South);\n System.out.println(val);\n this.gb.printBoard();\n }\n return retVal;\n }", "protected void end() {\n \tRobot.shooter.speed(0.0);\n }", "public void InvalidMove();", "protected void end() {\n\t\tRobot.elevator.setCurrentPosition(newPosition);\n\t}", "@Override\n public State doMove(State otherState) {\n\tWaterJugState state = (WaterJugState) otherState;\n \n if(this.getMoveName().equals(\"Fill Jug X\")){\n //if water jug X has room to add to \n if(state.getJugX() < 3){\n nextState = new WaterJugState(3, state.getJugY());\n } //else water jug x is full =3\n else {\n nextState = null;\n }\n }\n else if(this.getMoveName().equals(\"Fill Jug Y\")){\n if(state.getJugY()<4){\n nextState = new WaterJugState(state.getJugX(),4);\n }\n else{\n nextState=null;\n }\n }\n else if(this.getMoveName().equals(\"Empty Jug X\")){\n if(state.getJugX()>0){\n nextState = new WaterJugState(0,state.getJugY());\n }\n else{\n nextState=null;\n }\n }\n else if(this.getMoveName().equals(\"Empty Jug Y\")){\n if(state.getJugY()>0){\n nextState = new WaterJugState(state.getJugX(),0); \n }\n else{\n nextState= null;\n }\n }\n else if(this.getMoveName().equals(\"Transfer Jug X to Jug Y\")){\n if(state.getJugX()>0 && state.getJugY()<4){\n int Ycount=state.getJugY();\n int Xcount=state.getJugX();\n int total=Ycount+Xcount;\n if(total<=4){\n nextState = new WaterJugState(0,state.getJugX()+state.getJugY()); \n }\n else if(total>4){\n nextState= new WaterJugState((state.getJugX()+state.getJugY()-4),(state.getJugX()+state.getJugY())-(state.getJugX()+state.getJugY()-4)); \n }\n }\n else{\n nextState= null;\n }\n }\n else if(this.getMoveName().equals(\"Transfer Jug Y to Jug X\")){\n if(state.getJugY()>0 && state.getJugX()<3){\n int Ycount=state.getJugY();\n int Xcount=state.getJugX();\n int total=Ycount+Xcount;\n if(total<=3){\n nextState = new WaterJugState(state.getJugX()+state.getJugY(),0); \n }\n else if(total>3){\n nextState= new WaterJugState((state.getJugX()+state.getJugY())-(state.getJugX()+state.getJugY()-3),(state.getJugX()+state.getJugY()-3)); \n }\n }\n else{\n nextState= null;\n } \n }\n \n return nextState; \n }", "@Override\n\tpublic void move() {\n\t}", "public boolean move() {\n\t double[] movePre = movePreProcessing();\n\n double dxbak=movePre[0], dybak=movePre[1], dthetabak=movePre[2];\n boolean collision = false;\n\t\t\n\t\tif (hasGrown!=0 || dx!=0 || dy!=0 || dtheta!=0) {\n\t\t\thasMoved = true;\n\t\t\t// Check it is inside the world\n\t\t\tcollision = !isInsideWorld();\n\t\t\t// Collision detection with biological corridors\n\t\t\tif (alive) {\n\t\t\t\tOutCorridor c = _world.checkHitCorridor(this);\n\t\t\t\tif (c != null && c.canSendOrganism()) {\n\t\t\t\t\tif (c.sendOrganism(this))\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Collision detection with other organisms.\n Organism otherOrganism = _world.checkHit(this);\n\t\t\tif (otherOrganism != null) {\n\t\t\t if (this.contact(otherOrganism)) {\n collision = true;\n }\n }\n\n\n\t\t\t// If there is a collision, undo movement.\n\t\t\tif (collision) {\n\t\t\t\thasMoved = false;\n\t\t\t\toffset(-dxbak,-dybak,-dthetabak);\n\t\t\t\tif (hasGrown!=0) {\n\t\t\t\t\t_growthRatio+=hasGrown;\n\t\t\t\t\tsymmetric();\n\t\t\t\t}\n\t\t\t\tcalculateBounds(hasGrown!=0);\n\t\t\t}\n\t\t}\n\t\t// Substract one to the time needed to reproduce\n\t\tif (_timeToReproduce > 0)\n\t\t\t_timeToReproduce--;\n\t\t// Check if it can reproduce: it needs enough energy and to be adult\n\t\tif (_energy > _geneticCode.getReproduceEnergy() + Utils.YELLOW_ENERGY_CONSUMPTION*(_nChildren-1)\n\t\t\t\t&& _growthRatio==1 && _timeToReproduce==0 && alive)\n\t\t\treproduce();\n\t\t// Check that it don't exceed the maximum chemical energy\n\t\tif (_energy > _geneticCode.getReproduceEnergy()) {\n\t\t\tif (_energy > 2*_geneticCode.getReproduceEnergy()) {\n\t\t\t\tuseEnergy(_energy - 2*_geneticCode.getReproduceEnergy());\n\t\t\t} else {\n\t\t\t useEnergy((_energy - _geneticCode.getReproduceEnergy()) / 300);\n\t\t\t}\n\t\t}\n\t\t// Maintenance\n\t\tbreath();\n\t\t// Check that the organism has energy after this frame\n\t\treturn _energy > Utils.tol;\n\t}", "public void moveFromHandToEndOfWord() {\n\t\t//check letters in hand \n\t\tif(hand.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// remove letter from hand\n\t\tLetter temp = hand.leftmost;\n\t\thand.remove();\n\t\ttemp.next = null;\n\n\t\t// add letter to end of word\n\t\tword.addToEnd(temp);\n\t}", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public void gerak() \n {\n setLocation(getX(),getY()-5);\n if(getY()<20){\n getWorld().removeObject(this);\n }else\n cek_kena();\n \n }", "@Override\n\tpublic void moveRight()\n\t{\n\t\tif (!isAtEnd()) left.push(right.pop());\n\t}", "public void move()\n {\n universe.erase(this);\n \n // compute new position\n \n yPosition += ySpeed;\n xPosition += xSpeed;\n\n // check if it has hit the ground\n if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {\n yPosition = groundPosition - diameter;\n ySpeed = -ySpeed; \n }\n // check if top\n if(yPosition <= 0 && ySpeed < 0){\n ySpeed = -ySpeed; \n }\n //check right\n if(xPosition >= (universe.getLength() - diameter) && xSpeed >0){\n xSpeed = -xSpeed;\n }\n //check left\n if(xPosition <= 0 && xSpeed < 0){\n xSpeed = -xSpeed;\n }\n \n // draw again at new position\n universe.draw(this);\n }", "public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "public void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}", "public void makeMove(Move m) {\n \tPieceColor moved = m.getSource().getColor();\n\n \t//before the move is made, record the move in the movelist\n \tupdateMoveList(m);\n \t\n \t//store locations\n \tint sx = m.getSource().getLocation().getX();\n \tint sy = m.getSource().getLocation().getY();\n \tint dx = m.getDest().getLocation().getX();\n \tint dy = m.getDest().getLocation().getY();\n \tString name_moved = m.getSource().getName();\n \t\n \t//store new king location if it moved\n \tif(name_moved.equals(\"King\")) {\n \t\tif(moved == PieceColor.White) {\n \t\t\twKing = m.getDest().getLocation();\n \t\t\t\n \t\t\t//remove castle rights on both sides\n \t\t\tcastle[0] = false;\n \t\t\tcastle[1] = false;\n \t\t}\n \t\telse if(moved == PieceColor.Black) {\n \t\t\tbKing = m.getDest().getLocation();\n \t\t\t\n \t\t\t//remove castle rights on both sides\n \t\t\tcastle[2] = false;\n \t\t\tcastle[3] = false;\n \t\t}\n \t\telse System.exit(0);\n \t}\n \t\n \t//rook check for castling rights\n \tif(name_moved.equals(\"Rook\")) {\n \t\tif(moved == PieceColor.White) {\n \t\t\tif(sx == 0 && sy == 0) removeCastle(moved, false);\n \t\t\tif(sx == 7 && sy == 0) removeCastle(moved, true);\n \t\t}\n \t\t\n \t\telse if(moved == PieceColor.Black) {\n \t\t\tif(sx == 0 && sy == 7) removeCastle(moved, false);\n \t\t\tif(sx == 7 && sy == 7) removeCastle(moved, true);\n \t\t}\n \t}\n \t\n \tPiece temp = getPiece(sx, sy);\n \t\n \tsetPiece(sx, sy, new NoPiece(sx, sy));\n \t\n \tif(temp.getName().equals(\"Pawn\") && ((Pawn)temp).getPromo() == dy) {\n \t\ttemp = new Queen(dx, dy, temp.getColor(), this);\n \t}\n \t\n \t\n \ttemp.setLocation(new Square(dx, dy));\n \t\n \t//check for en passant\n \tif(name_moved.equals(\"Pawn\")) {\n \t\tint loc = ((Pawn)temp).advance();\n \t\t((Pawn)temp).setMoved(moveList.size());\n \t\t\n \t\t//only a valid en passant move if the pawn moves diagonally\n \t\t//and the destination square is empty\n \t\tif(sx != dx && getPiece(dx, dy).getName().equals(\"None\")) {\n \t\t\tsetPiece(dx, dy-loc, new NoPiece(dx, dy-loc));\n \t\t}\n \t}\n \t\n \tsetPiece(dx, dy, temp);\n \t\n \tif(turn == PieceColor.White) turn = PieceColor.Black;\n \telse turn = PieceColor.White;\n \t\n \t//check if the move was a castle\n \tif(name_moved.equals(\"King\")) {\n \t\t\n \t\tif(moved == PieceColor.White) { \n\t \t\t//if king moved positive x, then moved king side\n\t \t\tif(dx - sx == 2) {\n\t \t\t\ttemp = getPiece(7, 0);\n\t \t\t\tsetPiece(7, 0, new NoPiece(7, 0));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(5,0));\n\t \t\t\tsetPiece(5, 0, temp);\n\t \t\t}\n\t \t\t\n\t \t\telse if(sx - dx == 2) {\n\t \t\t\ttemp = getPiece(0, 0);\n\t \t\t\tsetPiece(0, 0, new NoPiece(0, 0));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(3, 0));\n\t \t\t\tsetPiece(3, 0, temp);\n\t \t\t}\n \t\t}\n \t\t\n \t\tif(moved == PieceColor.Black) { \n\t \t\t//if king moved positive x, then moved king side\n\t \t\tif(dx - sx == 2) {\n\t \t\t\ttemp = getPiece(7, 7);\n\t \t\t\tsetPiece(7, 7, new NoPiece(7, 7));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(5, 7));\n\t \t\t\tsetPiece(5, 7, temp);\n\t \t\t}\n\t \t\t\n\t \t\telse if(sx - dx == 2) {\n\t \t\t\ttemp = getPiece(0, 7);\n\t \t\t\tsetPiece(0, 7, new NoPiece(0, 7));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(3, 7));\n\t \t\t\tsetPiece(3, 7, temp);\n\t \t\t}\n \t\t}\n \t}\n }", "protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }", "public void goldDropPoint()\r\n {\r\n System.out.println(\"goldDropPoint\");\r\n setManual(false);\r\n if (isCollectionPlane)\r\n {\r\n savePreviousPosition();\r\n setIsCollectionPlane(false);\r\n }\r\n if (motorJ1.getCurrentPosition() > GOLD_DROP_J1)\r\n {\r\n j1Power = -J1_POWER;\r\n }\r\n else if (motorJ1.getCurrentPosition() < GOLD_DROP_J1)\r\n {\r\n j1Power = J1_POWER;\r\n }\r\n\r\n if (motorJ2.getCurrentPosition() > GOLD_DROP_J2)\r\n {\r\n j2Power = -J2_POWER;\r\n }\r\n else if (motorJ2.getCurrentPosition() < GOLD_DROP_J2)\r\n {\r\n j2Power = J2_POWER;\r\n }\r\n\r\n if (motorJ3.getCurrentPosition() > GOLD_DROP_J3)\r\n {\r\n j3Power = -UP_POWER_J3;\r\n }\r\n else if (motorJ3.getCurrentPosition() < GOLD_DROP_J3)\r\n {\r\n j3Power = UP_POWER_J3;\r\n }\r\n toPosition(j1Power, j2Power, j3Power, GOLD_DROP_J1, GOLD_DROP_J2, GOLD_DROP_J3);\r\n j1Power = 0;\r\n j2Power = 0;\r\n j3Power = 0;\r\n }", "protected void end() {\r\n lang.nextStep();\r\n int total = seen + failed;\r\n\r\n hideAll();\r\n SourceCode end = lang.newSourceCode(new Offset(0, 50, pMap.get(\"hRect\"),\r\n \"SW\"), \"end\", null, sourceCodeProperties);\r\n end.addCodeLine(\r\n \"Das h\\u00F6chste Ergebnis, dass der Spieler bei einem optimal spielenden Gegner erzielen kann, ist \"\r\n + result + \".\", \"end\", 0, null);\r\n if (seen == 1) {\r\n end.addCodeLine(\"Von den insgesamt \" + nodesTotal + \" Knoten wurde \"\r\n + seen + \" nur Knoten untersucht.\", \"end\", 0, null);\r\n } else {\r\n end.addCodeLine(\"Von den insgesamt \" + nodesTotal + \" Knoten wurden \"\r\n + seen + \" verschiedene Knoten untersucht.\", \"end\", 0, null);\r\n }\r\n if (pruned == 1) {\r\n end.addCodeLine(\"Es wurde \" + pruned + \" Knoten gepruned.\", \"end\", 0,\r\n null);\r\n } else {\r\n end.addCodeLine(\"Es wurde \" + pruned + \" Knoten gepruned.\", \"end\", 0,\r\n null);\r\n }\r\n if (failed == 1) {\r\n end.addCodeLine(\"Allerdings musste auch \" + failed\r\n + \" Knoten erneut untersucht werden, weil es zum Fail High kam.\",\r\n \"end\", 0, null);\r\n } else {\r\n end.addCodeLine(\"Allerdings mussten auch \" + failed\r\n + \" Knoten erneut untersucht werden, weil es zum Fail High kam.\",\r\n \"end\", 0, null);\r\n }\r\n end.addCodeLine(\"Damit wurde der Algorithmus insgesamt \" + total\r\n + \" Mal aufgerufen.\", \"end\", 0, null);\r\n end.addCodeLine(\r\n \"Im Vergleich dazu h\\u00E4tte der Minimax-Algorithmus alle \"\r\n + nodesTotal + \" Knoten einmal untersucht.\", \"end\", 0, null);\r\n end.addCodeLine(\"\", \"end\", 0, null);\r\n end.addCodeLine(\r\n \"Da der Algorithmus annimmt, dass jeweils der erste Kindknoten der beste ist \",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"und danach mit einem Nullwindow arbeitet, ist die Reihenfolge der Knoten sehr wichtig, \",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"damit m\\u00F6glichst viele Knoten gepruned werden und m\\u00F6glichst wenige erneut untersucht werden m\\u00FCssen.\",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"Es kann sich sogar zeitlich lohnen, die Knoten vorzusortieren.\",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"Bei unsortierten Knoten ist der Negascout-Algorithmus langsamer als das Alpha-Beta-Pruning,\",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"bei dem zwar weniger Knoten nicht untersucht werden, daf\\u00FCr aber auch keine erneut untersucht werden m\\u00FCssen.\",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"Die Komplexit\\u00E4t von Negascout betr\\u00E4gt O(b^d) in der Landau-Notation,\",\r\n \"end\", 0, null);\r\n end.addCodeLine(\r\n \"wobei b f\\u00FCr den Verzweigungsfaktor (branching factor) und d f\\u00FCr die Baumtiefe (depth) steht\",\r\n \"end\", 0, null);\r\n lang.nextStep(\"Conclusion\");\r\n }", "@Override\n public void action(){\n\n Position move=this.findWeed();\n if(move.getX()==0 && move.getY()==0){\n super.action();\n }\n else{\n System.out.println(this.getClass().getSimpleName());\n int actualX = this.position.getX();\n int actualY = this.position.getY();\n int xAction = actualX+move.getX();\n int yAction = actualY+move.getY();\n Organism tmpOrganism = this.WORLD.getOrganism(xAction, yAction);\n if(tmpOrganism==null){\n this.move(move.getX(), move.getY());\n this.WORLD.erasePosition(actualX,actualY);\n }\n else{\n tmpOrganism.collision(this, actualX, actualY, move);\n }\n }\n }", "void doneMoving();", "private MovementProgressEnum performEndOfMovement(Entity mover, MoveComponent moveCompo, Room room) {\n\t\tmoveCompo.arrivedOnTile = true;\n\t\t\n\t\tint costOfMovementForTilePos = TileUtil.getCostOfMovementForTilePos(moveCompo.currentMoveDestinationTilePos, mover, room);\n\t\tmoveCompo.setMoveRemaining(moveCompo.getMoveRemaining() - costOfMovementForTilePos);\n\t\t\n\t\tOptional<Entity> chasm = TileUtil.getEntityWithComponentOnTile(moveCompo.currentMoveDestinationTilePos, ChasmComponent.class, room);\n\t\tif (!chasm.isPresent()) {\n\t\t\tmoveCompo.setLastWalkableTile(moveCompo.currentMoveDestinationTilePos);\n\t\t}\n\t\t\n\t\tMappers.gridPositionComponent.get(mover).coord(mover, moveCompo.currentMoveDestinationTilePos, room);\n\t\tfor (Component c : mover.getComponents()) {\n\t\t\tif (c instanceof MovableInterface) {\n\t\t\t\t((MovableInterface) c).endMovement(moveCompo.currentMoveDestinationTilePos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tAlterationReceiverComponent alterationReceiverComponent = Mappers.alterationReceiverComponent.get(mover);\n\t\tif (alterationReceiverComponent != null) {\n\t\t\talterationReceiverComponent.onArriveOnTile(moveCompo.currentMoveDestinationTilePos, mover, room);\n\t\t}\n\t\t\n\t\t\n\t\t// Creep\n\t\tOptional<Entity> creep = TileUtil.getEntityWithComponentOnTile(moveCompo.currentMoveDestinationTilePos, CreepComponent.class,room);\n\t\tif (creep.isPresent()) {\n\t\t\tDestructibleComponent destructibleComponent = Mappers.destructibleComponent.get(creep.get());\n\t\t\tif (destructibleComponent == null || !destructibleComponent.isDestroyed()) {\n\t\t\t\t// There is creep on this tile, play its effect\n\t\t\t\tMappers.creepComponent.get(creep.get()).onWalk(mover, creep.get(), room);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Leave creep\n\t\tif (Mappers.creepEmitterComponent.has(mover)) {\n\t\t\tMappers.creepEmitterComponent.get(mover).emit(mover, moveCompo.currentMoveDestinationTilePos, room);\n\t\t}\n\t\t\n\t\t// Things that only the player can do, such as go through a door\n\t\tPlayerComponent playerCompo = Mappers.playerComponent.get(mover);\n\t\tif (playerCompo != null) {\n\t\t\t// Doors\n\t\t\tEntity doorEntity = TileUtil.getDoorEntityOnTile(moveCompo.currentMoveDestinationTilePos, room);\n\t\t\tif (doorEntity != null) {\n\t\t\t\tDoorComponent doorCompo = Mappers.doorComponent.get(doorEntity);\n\t\t\t\tif (doorCompo != null && doorCompo.isOpened() && doorCompo.getTargetedRoom() != null) {\n\t\t\t\t\tmoveCompo.clearSelectedTileFromPreviousTurn();\n\t\t\t\t\t//Change room !!!\n\t\t\t\t\tfinishRealMovement(mover, room);\n\t\t\t\t\tmoveCompo.clearMovableTiles();\n\t\t\t\t\t\n\t\t\t\t\troom.setNextRoom(doorCompo.getTargetedRoom());\n//\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\n\t\tboolean movementOver = moveCompo.currentMoveDestinationIndex >= moveCompo.getWayPoints().size();\n\t\tmoveCompo.incrementCurrentMoveDestinationIndex();\n\t\tif (movementOver) {\n\t\t\treturn MovementProgressEnum.MOVEMENT_OVER;\n\t\t}\n\n\t\tif (moveCompo.playerMovementCompo && moveCompo.getMoveRemaining() <= 0 && !moveCompo.isFrozen()) {\n\t\t\tmoveCompo.setEndTurnTile(TileUtil.getTileAtGridPos(moveCompo.currentMoveDestinationTilePos, room));\n\t\t\tVector2 selectedTile = Mappers.gridPositionComponent.get(moveCompo.getSelectedTile()).coord();\n\t\t\tmoveCompo.setSelectedTileFromPreviousTurn(TileUtil.getTileAtGridPos(selectedTile, room));\n\t\t\t\n\t\t\tmoveCompo.removeFirstWaypoints(moveCompo.currentMoveDestinationIndex);\n\t\t\t\n\t\t\treturn MovementProgressEnum.TURN_OVER;\n\t\t}\n\t\t\n\t\treturn MovementProgressEnum.IN_PROGRESS;\n\t}", "protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }", "@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }", "public static String printEndOfGame() {\n return \"Your game of Memory is over. You uncovered all pairs.\" +\n \" Hope you have had a lot of fun and come back soon\";\n }", "public void endTurn() {\r\n\t\tcontraband.clear();\r\n\t\tactions = 1;\r\n\t\tbuys = 1;\r\n\t\tif(treasure > 0) treasure = 0;\r\n\t\tpotion = 0;\r\n\t\tcoppersmith = 0;\r\n\t\tbridge = 0;\r\n\t\tquarry = 0;\r\n\t\tdeck.cleanUp();\r\n\t\taccess.log(getPlayerName() + \"'s Deck: \" + deck.toString());\r\n\t\taccess.log(getPlayerName() + \"'s turn ended\");\r\n\t\tnotifyObservers();\r\n\t}", "private String defendRow() {\r\n for (int i = 0; i < gameHeight; i++) {\r\n if (!enLaneInfo.get(i).get(0).isEmpty() && myLaneInfo.get(i).get(1).isEmpty()) {\r\n return DEFENSE.buildCommand(7,i);\r\n }\r\n }\r\n return buildTurret();\r\n }", "void DropFood(){\r\n if (plateau[this.x][this.y]!='0' && this.charge!='0'){\r\n this.plateau[this.x][this.y]+=this.charge;\r\n this.charge=0;\r\n \r\n } \r\n }", "@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) \n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n //remove energy from the player everytime he switches rooms\n p.energy -= 10;\n System.out.println(\"Energy: \" + p.energy);\n \n \n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n \n }\n }" ]
[ "0.60659057", "0.6030503", "0.599835", "0.5975266", "0.5968493", "0.5945316", "0.59361184", "0.59173465", "0.5893091", "0.58913994", "0.5874987", "0.58557093", "0.5816824", "0.58148545", "0.5786613", "0.5773583", "0.57568264", "0.57155156", "0.5698548", "0.5668519", "0.56384313", "0.5637288", "0.56343895", "0.5627301", "0.56095535", "0.56027627", "0.5600511", "0.55910635", "0.55829334", "0.5575831", "0.55670947", "0.55595106", "0.55515766", "0.55469537", "0.554298", "0.55429745", "0.5539982", "0.5525933", "0.55257976", "0.55223244", "0.5519711", "0.5518635", "0.55163", "0.5503431", "0.54945695", "0.548933", "0.54891926", "0.5481999", "0.5474783", "0.54622865", "0.5461282", "0.54579633", "0.5456416", "0.54533815", "0.54514974", "0.54504687", "0.54489326", "0.5443676", "0.5437383", "0.5431538", "0.5429112", "0.54262435", "0.5424634", "0.54200226", "0.5419982", "0.5418702", "0.54165435", "0.54059005", "0.5403701", "0.5398318", "0.539144", "0.539125", "0.5380801", "0.5378969", "0.53783244", "0.53776723", "0.5373128", "0.5368426", "0.53668505", "0.5363579", "0.536274", "0.53617436", "0.53616345", "0.5358419", "0.5349673", "0.53493613", "0.53413194", "0.5341294", "0.53409964", "0.53406113", "0.5338636", "0.5333369", "0.53304887", "0.5328405", "0.53266746", "0.53187925", "0.5317854", "0.5317439", "0.53133863", "0.5312008" ]
0.5374925
76
This methods makes it so that Ari is represented by a ?, the empty space represented by +, items represente d by $, door, represented by D, and stairs represented by S.
public void printA(){ for(int i = 0; i < this.area.length;i++){ System.out.println(" "); System.out.print(" "); for(int p = 0 ; p < this.area.length; p++){ if(this.Ari[i][p] ==1){ System.out.print(" ? "); } else if(this.position[i][p] ==1){ System.out.print(" + "); } else if(this.Items[i][p] != null){ System.out.print("<$>"); } else if(this.Door[i][p] ==1){ System.out.print(" D "); } else if(this.Stairs[i][p] ==1){ System.out.print(" S "); } else{ System.out.print(this.area[i][p]); } }//end of inner for print }//end of outter for print }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Arbre residuelSousArbre(char c){\n\t\tArbre g, d;\n\t\tif(this.symbole == '.'){\n\t\t\tif(gauche.contientMotVide){\n\t\t\t\tg = gauche.residuelSousArbre(c);\n\t\t\t\td = droit.clone();\n\t\t\t\tif(g == null || d == null) g = null;\n\t\t\t\telse g = new Binaire('.', g, d);\n\t\t\t\td = droit.residuelSousArbre(c);\n\t\t\t\tif(g == null && d == null) return null;\n\t\t\t\tif(g == null) return d;\n\t\t\t\tif(d == null) return g;\n\t\t\t\treturn new Binaire('+', g, d);\n\t\t\t}\n\t\t\tg = gauche.residuelSousArbre(c);\n\t\t\td = droit.clone();\n\t\t\tif(g == null || d == null) return null;\n\t\t\treturn new Binaire('.', g, d);\n\t\t}else{\n\t\t\tg = gauche.residuelSousArbre(c);\n\t\t\td = droit.residuelSousArbre(c);\n\t\t\tif(g == null && d == null) return null;\n\t\t\tif(g == null) return d;\n\t\t\tif(d == null) return g;\n\t\t\treturn new Binaire('+', g, d);\n\t\t}\n\t}", "public Army(String a){\n\t\tint[] stat = new int[6];\n\t\tString name=\"\";\n\t\tint cnt=0;\n\t\twhile(a.length()>0){\n\t\t\twhile(a.indexOf(\"**\")>a.indexOf(\"*\")){\n\t\t\t\tif(a.indexOf(\" \")<a.indexOf(\"*\")&&a.indexOf(\" \")!=-1){\n\t\t\t\t\tname=a.substring(0,a.indexOf(\"*\"));\n\t\t\t\t\ta=a.substring(a.indexOf(\"*\"));\n\t\t\t\t}\n\t\t\t\ta=a.substring(1);\n\t\t\t\tstat[cnt]=Integer.parseInt(a.substring(0,a.indexOf(\"*\")));\n\t\t\t\ta=a.substring(a.substring(0,a.indexOf(\"*\")).length());\n\t\t\t\tcnt++;\t\t\t\t\t\n\t\t\t}\n\t\t\tcnt=0;\n\t\t\ta=a.substring(2);\n\t\t\tarmy.add(new Soldier(name,stat));\n\t\t\tstat=new int[6];\n\t\t}\n\t}", "@Override\n\tpublic String visitArExpr(ArExprContext ctx) {\n\t\tint chNo=ctx.children.size();\n\t\tif(chNo == 3){\n\t\t\tParseTree cur = ctx.getChild(1);\n\t\t\tif(cur==ctx.MULT() || cur==ctx.DIV()|| cur==ctx.PLUS() || cur==ctx.MINUS()){\n\t\t\t\tString left = visit(ctx.getChild(0));\n\t\t\t\tString right = visit(ctx.getChild(2));\n\t\t\t\tif(!(right.equals(left) && right.equals(\"int\")) ){throw new RuntimeException(\"Arithmetic operations only with integers\");}\n\t\t\t\treturn(\"int\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(visit(cur));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tParseTree cur=ctx.getChild(0);\n\t\t\tif (cur instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (cur==ctx.INTEG()) return \"int\";\n\t\t\t\telse if (cur==ctx.CH()) return \"char\";\n\t\t\t\telse if(cur==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "private Item parseItem(int xPos, int yPos, char itemKey) {\n\t\tchar key = itemKey;\n\t\tif (Character.isAlphabetic(itemKey)) {\n\t\t\tkey = Character.toLowerCase(itemKey);\n\t\t}\n\t\tItem item = null;\n\t\tif (key == 'a' || key == 'c' || key == 'd') {\n\t\t\titem = new Key(key - 97, xPos * TILE_SIZE * SCALE, yPos * TILE_SIZE\n\t\t\t\t\t* SCALE);\n\t\t} else if (key == '*') {\n\t\t\titem = new Terminal(xPos * TILE_SIZE * SCALE, yPos * TILE_SIZE\n\t\t\t\t\t* SCALE);\n\t\t}\n\t\treturn item;\n\t}", "@Override\r\n \tpublic String toString() {\n \t\tString itemString = \"\" + item.getTypeId() + ( item.getData().getData() != 0 ? \":\" + item.getData().getData() : \"\" );\r\n \t\t\r\n \t\t//saving the item price\r\n \t\tif ( !listenPattern )\r\n \t\t\titemString += \" p:\" + new DecimalFormat(\"#.##\").format(price);\r\n \t\t\r\n \t\t//saving the item slot\r\n \t\titemString += \" s:\" + slot;\r\n \t\t\r\n \t\t//saving the item slot\r\n \t\titemString += \" d:\" + item.getDurability();\r\n \t\t\r\n \t\t//saving the item amounts\r\n \t\titemString += \" a:\";\r\n \t\tfor ( int i = 0 ; i < amouts.size() ; ++i )\r\n \t\t\titemString += amouts.get(i) + ( i + 1 < amouts.size() ? \",\" : \"\" );\r\n \t\t\r\n \t\t//saving the item global limits\r\n \t\tif ( limit.hasLimit() ) \r\n \t\t\titemString += \" gl:\" + limit.toString();\r\n \t\t\r\n \t\t//saving the item global limits\r\n \t\tif ( limit.hasPlayerLimit() ) \r\n \t\t\titemString += \" pl:\" + limit.playerLimitToString();\r\n \t\t\r\n \t\t//saving enchantment's\r\n \t\tif ( !item.getEnchantments().isEmpty() ) {\r\n \t\t\titemString += \" e:\";\r\n \t\t\tfor ( int i = 0 ; i < item.getEnchantments().size() ; ++i ) {\r\n \t\t\t\tEnchantment e = (Enchantment) item.getEnchantments().keySet().toArray()[i];\r\n \t\t\t\titemString += e.getId() + \"/\" + item.getEnchantmentLevel(e) + ( i + 1 < item.getEnchantments().size() ? \",\" : \"\" );\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t//saving additional configurations\r\n \t\tif ( stackPrice )\r\n \t\t\titemString += \" sp\";\r\n \t\tif ( listenPattern )\r\n \t\t\titemString += \" pat\";\r\n \t\t\r\n \t\treturn itemString;\r\n \t}", "void Hrana(String start,String cil, char druh){\n\t\tint iStart = index(start);\n\t\tint iCil = index(cil);\n\t\t\n\t\tif(iStart == -1)\n\t\t\treturn;\n\t\tif(iCil == -1)\n\t\t\treturn;\n\t\t//orientovana hrana\n\t\tif(druh == '-' || druh == '>'){\n\t\t\tmatice[iStart][iCil] = 1;\n\t\t\tvrchP[iStart].pocetSousedu = vrchP[iStart].pocetSousedu +1;\n\t\t}\n\t\t\n\t\t//neorientovana\n\t\tif(druh == '-'){\n\t\t\tmatice[iCil][iStart] = 1;\n\t\t\tvrchP[iCil].pocetSousedu = vrchP[iCil].pocetSousedu +1;\t\n\t\t}\n\t\t\n\t\tHrana pom = new Hrana(start,cil,'W',druh);\n\t\thrana[pocetHr] = pom;\n\t\tpocetHr++;\n\t\t\n\t\t\n\t}", "public Binaire(char symbole, Arbre gauche, Arbre droit){\n\t\tthis.id = Arbre.ID_COMPT++;\n\t\tthis.symbole = symbole;\n\t\tthis.gauche = gauche;\n\t\tthis.droit = droit;\n\t\tthis.premiers = new HashSet<Feuille>();\n\t\tthis.derniers = new HashSet<Feuille>();\n\t\t\n\t\tif(symbole == '.'){\n\t\t\tthis.contientMotVide = gauche.contientMotVide && droit.contientMotVide;\n\t\t\t\n\t\t\tthis.premiers.addAll(gauche.premiers);\n\t\t\tif(gauche.contientMotVide) this.premiers.addAll(droit.premiers);\n\t\t\t\n\t\t\tthis.derniers.addAll(droit.derniers);\n\t\t\tif(droit.contientMotVide) this.derniers.addAll(gauche.derniers);\n\t\t}else{\n\t\t\tthis.contientMotVide = gauche.contientMotVide || droit.contientMotVide;\n\t\t\t\n\t\t\tthis.premiers.addAll(gauche.premiers);\n\t\t\tthis.premiers.addAll(droit.premiers);\n\n\t\t\tthis.derniers.addAll(gauche.derniers);\n\t\t\tthis.derniers.addAll(droit.derniers);\n\t\t}\n\t}", "private String S() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase '(':\n\t\t\t\t// S -> ERS\n\t\t\t\tString er = E();\n\t\t\t\tint r = R();\n\t\t\t\tString e=\"\";\n\t\t\t\tfor (int i=0; i<r; i++){\n\t\t\t\t\te += er;\n\t\t\t\t}\n\t\t\t\te+= S();\n\t\t\t\treturn (e);\n\t\t\tcase ')':\n\t\t\tcase END_MARKER:\n\t\t\t\t// S -> epsilon\n\t\t\t\treturn \"\";\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}", "@Override\n public String toString() {\n if (bombe) {\n return \"/\";\n } else if (bombeNaboer == 0) {\n return \" \";\n }\n return \"\" + bombeNaboer;\n }", "@Override\r\n \tpublic String toString() {\r\n \t\tStringBuilder result = new StringBuilder();\r\n \t\tresult.append('[');\r\n \t\tif(numItems > 0) {\r\n \t\t\tresult.append(items[0].toString());\r\n \t\t\t// We want number of spaces to be equal to numItems - 1\r\n \t\t\tfor(int i=1; i<numItems; i++) {\r\n \t\t\t\tresult.append(' ');\r\n \t\t\t\tresult.append(items[i].toString());\r\n \t\t\t}\r\n \t\t}\r\n \t\tresult.append(']');\r\n \t\treturn result.toString();\r\n \t}", "public Army(int i,String a){\n\t\tswitch(a){\n\t\t\tcase(\"Soldier\"):\t\t\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Soldier());\n\t\t\t\tbreak;\n\t\t\tcase(\"Goblin\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Goblin());\n\t\t\t\tbreak;\n\t\t\tcase(\"Orc\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Orc());\n\t\t\t\tbreak;\n\t\t\tcase(\"Ogre\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Ogre());\n\t\t\t\tbreak;\n\t\t\tcase(\"Greenskins\"):\n\t\t\t\tfor(int n=0;n<5;n++)\n\t\t\t\t\tarmy.add(new Ogre());\n\t\t\t\tfor(int n=0;n<20;n++)\n\t\t\t\t\tarmy.add(new Orc());\n\t\t\t\tfor(int n=0;n<75;n++)\n\t\t\t\t\tarmy.add(new Goblin());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Soldier());\n\t\t\t\tbreak;\n\t\t}\n\t}", "public String parseItemChoice() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Equip/Unequip Weapon\\t(W)\");\n\t\tSystem.out.println(\"Equip/Unequip Armor\\t(A)\");\n\t\tSystem.out.println(\"Use Potion\\t(P)\");\n\t\tSystem.out.println(\"Back\\t(B)\");\n\t\tString res = parseString().toUpperCase();\n\t\tboolean isValid = false;\n\t\twhile(!isValid) {\n\t\t\tswitch(res) {\n\t\t\tcase \"W\":\n\t\t\tcase \"A\":\n\t\t\tcase \"P\":\n\t\t\tcase \"B\":\n\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tprintErrorParse();\n\t\t\t\tres = parseString().toUpperCase();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn res;\n\t\t\n\t}", "@Override\n\tpublic String toInfixNotation() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\t\t\treturn EMPTY + num;\n\t\t}\n\t\tcatch(NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\t\n\t\t\treturn OPEN_PAREN + left.toInfixNotation() + SPACE + getValue() \n\t\t\t\t\t+ SPACE + right.toInfixNotation() + CLOSED_PAREN;\n\t\t}\n\t}", "public String corrector () {\n String aux = tabla_lexica.peek();\n \n if (aux.equals(\"$\") || aux.equals(\".\") || aux.equals(\"(\") || aux.equals(\")\") || aux.equals(\",\") || aux.equals(\"'\") || aux.equals(\"+\") || aux.equals(\"-\") || aux.equals(\"*\") || aux.equals(\"/\") || aux.equals(\"r\") || aux.equals(\"i\") || aux.equals(\"d\") || aux.equals(\"a\")) {\n return aux;\n } \n \n Pattern p1 = Pattern.compile(\"(([>\\\\<])+([=])|[(\\\\)\\\\;\\\\+\\\\-\\\\–\\\\*\\\\/\\\\'\\\\’\\\\‘\\\\,\\\\.\\\\>\\\\<\\\\=]|([@0-9A-Za-z]*)+([#\\\\.\\\\%\\\\_\\\\-]*)?[0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)\"\n + \"|([@A-Za-z]*)+([#\\\\%\\\\_\\\\-]*)?[A-Za-z0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)|[!\\\\$\\\\%\\\\&\\\\?\\\\¿\\\\¡\\\\_]|[a-zA-Z])\");\n \n Matcher m2 = p1.matcher(aux);\n while (m2.find()) {\n if(m2.group().matches(\"SELECT|FROM|WHERE|IN|AND|OR|CREATE|TABLE|CHAR|NUMERIC|NOT|NULL|CONSTARINT|KEY|PRIMARY|FOREIGN|REFERENCES|INSERT|INTO|VALUES|GO|CREATE|PROCEDURE|VARCHAR\"\n + \"|AS|IF|EXISTS|BEGIN|PRINT|END|ELSE\")) //Palabras reservadas\n {\n String pal = m2.group();\n switch (pal) {\n case \"SELECT\": aux = \"s\";\n auxLinea = m2.group();\n break;\n case \"FROM\": aux = \"f\";\n auxLinea = m2.group();\n break;\n case \"WHERE\": aux = \"w\";\n auxLinea = m2.group();\n break;\n case \"IN\": aux = \"n\";\n auxLinea = m2.group();\n break;\n case \"AND\": aux = \"y\";\n auxLinea = m2.group();\n break;\n case \"OR\": aux = \"o\";\n auxLinea = m2.group();\n break;\n case \"CREATE\": aux = \"c\";\n auxLinea = m2.group();\n break;\n case \"TABLE\": aux = \"t\";\n auxLinea = m2.group();\n break;\n case \"CHAR\": aux = \"h\";\n auxLinea = m2.group();\n break;\n case \"NUMERIC\": aux = \"u\";\n auxLinea = m2.group();\n break;\n case \"NOT\": aux = \"e\";\n auxLinea = m2.group();\n break;\n case \"NULL\": aux = \"g\";\n auxLinea = m2.group();\n break;\n case \"CONSTRAINT\": aux = \"b\";\n auxLinea = m2.group();\n break;\n case \"KEY\": aux = \"k\";\n auxLinea = m2.group();\n break;\n case \"PRIMARY\": aux = \"p\";\n auxLinea = m2.group();\n break;\n case \"FOREIGN\": aux = \"j\";\n auxLinea = m2.group();\n break;\n case \"REFERENCES\": aux = \"l\";\n auxLinea = m2.group();\n break;\n case \"INSERT\": aux = \"m\";\n auxLinea = m2.group();\n break;\n case \"INTO\": aux = \"q\";\n auxLinea = m2.group();\n break;\n case \"VALUES\": aux = \"v\";\n auxLinea = m2.group();\n break;\n }\n } else {\n \n }\n }\n return aux;\n }", "private void make_extended() {\n Iterator it = this.getIncreased_grammar().getGrammar().iterator();\n C_Production tmp_pr;\n C_Symbol searcher_symbol; \n \n while(it.hasNext()) {\n tmp_pr = (C_Production)it.next();\n searcher_symbol = new C_Symbol(String.valueOf((char)176));\n tmp_pr.getRight().add(0, searcher_symbol);\n }\n }", "public String toString(){\n return super.toString() + \" (perishable)\"; // String representation of the PerishableItem\n\n }", "static void imprimirNodo( NodoBase raiz )\n{\n\tif(\traiz instanceof NodoRepeat\n\t\t||\traiz instanceof NodoLeer\n\t\t||\traiz instanceof NodoEscribir ){\n\t\tSystem.out.println(\"palabra reservada: \"+ raiz.getClass().getName());\n\t}\n\t\n\tif(\traiz instanceof NodoAsignacion )\n\t\tSystem.out.println(\":=\");\n\t\n\tif(\traiz instanceof NodoOperacion ){\n\t\ttipoOp sel=((NodoOperacion) raiz).getOperacion();\n\t\tif(sel==tipoOp.menor)\n\t\t\tSystem.out.println(\"<\"); \n\t\tif(sel==tipoOp.igual)\n\t\t\tSystem.out.println(\"=\");\n\t\tif(sel==tipoOp.mas)\n\t\t\tSystem.out.println(\"+\");\n\t\tif(sel==tipoOp.menos)\n\t\t\tSystem.out.println(\"-\");\n\t\tif(sel==tipoOp.por)\n\t\t\tSystem.out.println(\"*\");\n\t\tif(sel==tipoOp.entre)\n\t\t\tSystem.out.println(\"/\");\n if(sel==tipoOp.mayor)\n\t\t\tSystem.out.println(\">\");\n if(sel==tipoOp.mayorigual)\n\t\t\tSystem.out.println(\">=\");\n if(sel==tipoOp.menorigual)\n\t\t\tSystem.out.println(\"<=\");\n if(sel==tipoOp.diferente)\n\t\t\tSystem.out.println(\"!=\");\n if(sel==tipoOp.and)\n\t\t\tSystem.out.println(\"AND\");\n if(sel==tipoOp.or)\n\t\t\tSystem.out.println(\"OR\");\n \n\t}\n\n\tif(\traiz instanceof NodoValor ){\n if(((NodoValor)raiz).getVint() != null)\n System.out.println(\"NUM, val= \"+ ((NodoValor)raiz).getVint());\n if(((NodoValor)raiz).isVbol()!= null)\n System.out.println(\"BOL, val= \"+ ((NodoValor)raiz).isVbol());\n\t}\n\n\tif(\traiz instanceof NodoIdentificador ){\n\t\tSystem.out.println(\"ID, nombre= \"+ ((NodoIdentificador)raiz).getNombre());\n\t}\n\n}", "private CategoriaLexica simbolo(String palabra) {\n\t\t\n\t if (palabra.equals(\":=\"))\n\t {\n\t return CategoriaLexica.OpAsignConst;\n\t }\n\t else if (palabra.equals(\"'\"))\n\t {\n\t return CategoriaLexica.ComillaSimple;\n\t }\n \t\telse if (palabra.equals(\",\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Coma;\n\t\t\t}\n \t\telse if (palabra.equals(\";\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.PuntoComa;\n\t\t\t}\n\t\telse if (palabra.equals(\"(\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.AbreParentesis;\n\t\t\t}\n\t\telse if (palabra.equals(\")\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CierraParentesis;\n\t\t\t}\n\t\telse if (palabra.equals(\"{\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.AbreLlave;\n\t\t\t}\n\t\telse if (palabra.equals(\"}\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CierraLlave;\n\t\t\t}\n\t\telse if (palabra.equals(\"[\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.AbreCorchete;\n\t\t\t}\n\t\t\t\telse if (palabra.equals(\"]\"))\n\t\t\t{\n\t\t\treturn CategoriaLexica.CierraCorchete;\n\t\t\t}\n\t\telse if (palabra.equals(\".\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Punto;\n\t\t\t}\n\t\telse if (palabra.equals(\":\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.DosPuntos;\n\t\t\t}\n\t\telse if (palabra.equals(\"=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.OpAsignVar;\n\t\t\t}\n\t\telse if (palabra.equals(\"+\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Mas;\n\t\t\t}\n\t\telse if (palabra.equals(\"-\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Menos;\n\t\t\t}\n\t\telse if (palabra.equals(\"*\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Por;\n\t\t\t}\n\t\telse if (palabra.equals(\"/\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Divide;\n\t\t\t}\n\t\telse if (palabra.equals(\"%\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Modulo;\n\t\t\t}\n\t\telse if (palabra.equals(\"<<\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.DesplazIz;\n\t\t\t}\n\t\telse if (palabra.equals(\">>\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.DesplazDer;\n\t\t\t}\n\t\telse if (palabra.equals(\">\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Mayor;\n\t\t\t}\n\t\telse if (palabra.equals(\"<\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Menor;\n\t\t\t}\n\t\telse if (palabra.equals(\">=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.MayorIgual;\n\t\t\t}\n\t\telse if (palabra.equals(\"<=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.MenorIgual;\n\t\t\t}\n\t\telse if (palabra.equals(\"!=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Distinto;\n\t\t\t}\n\t\telse if (palabra.equals(\"==\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Igual;\n\t\t\t}\n\t\telse if (palabra.equals(\"_\"))\n\t\t{\n\t\t\treturn CategoriaLexica.BarraBaja;\n\t\t}\n\t\telse if (palabra.equals(\"(integer)\") || palabra.equals(\"(int)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingEntero;\n\t\t\t}\n\t\telse if (palabra.equals(\"(natural)\") || palabra.equals(\"(nat)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingNatural;\n\t\t\t}\n\t\telse if (palabra.equals(\"(float)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingDecimal;\n\t\t\t}\n\t\telse if (palabra.equals(\"(character)\") || palabra.equals(\"(char)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingCaracter;\n\t\t\t}\n\t\telse \n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "public void setAsteroid(char newChar) {\r\n\t\tthis.asteroid = newChar;\r\n\t}", "public FormatInteger asteriskFill(){\n fillCharacter = ASTERISK_CHAR;\n return this;\n }", "private void manual() {\n State q1 = new State(\"q1\", \"ID\");\n State q2 = new State(\"q2\", \"IF\");\n State q3 = new State(\"q3\", \"ID\");\n State q4 = new State(\"q4\", \"CONSTANTE\");\n State q5 = new State(\"q5\", \"ABRE_PARENTESES\");\n State q6 = new State(\"q6\", \"FECHA_PARENTESES\");\n State q7 = new State(\"q7\", \"OPERADOR_MAIOR\");\n State q8 = new State(\"q8\", \"OPERADOR_MENOR\");\n State q9 = new State(\"q9\", \"OPERADOR_DIFERENTE\");\n State q10 = new State(\"q10\", \"ID\");\n State q11 = new State(\"q11\", \"ID\");\n State q12 = new State(\"q12\", \"ID\");\n State q13 = new State(\"q13\", \"ID\");\n State q14 = new State(\"q14\", \"BEGIN\");\n State q15 = new State(\"q15\", \"ID\");\n State q16 = new State(\"q16\", \"ID\");\n State q17 = new State(\"q17\", \"END\");\n State q18 = new State(\"q18\", \"ESPACO\");\n State q19 = new State(\"q19\", \"ID\");\n State q20 = new State(\"q20\", \"ID\");\n State q21 = new State(\"q21\", \"ELSE\");\n\n // IF\n q0.put(\"[i]\", q1);\n q1.put(\"[f]\", q2);\n q1.put(\"[^\\\\Wf]\", q3);\n q2.put(\"[\\\\w]\", q3);\n\n // ID\n q0.put(\"[^\\\\Wbei0-9_]\", q3);\n q3.put(\"[\\\\w]\", q3);\n\n // CONSTANTE\n q0.put(\"[\\\\d]\", q4);\n q4.put(\"[\\\\d]\", q4);\n\n // ABRE_PARENTESES\n q0.put(\"[(]\", q5);\n\n // ABRE_PARENTESES\n q0.put(\"[)]\", q6);\n\n // OPERADOR_MAIOR\n q0.put(\"[>]\", q7);\n\n // OPERADOR_MENOR\n q0.put(\"[<]\", q8);\n\n // OPERADOR_DIFERENTE\n q0.put(\"[#]\", q9);\n\n // BEGIN\n q0.put(\"[b]\", q10);\n q10.put(\"[e]\", q11);\n q11.put(\"[g]\", q12);\n q12.put(\"[i]\", q13);\n q13.put(\"[n]\", q14);\n q10.put(\"[^\\\\We]\", q3);\n q11.put(\"[^\\\\Wg]\", q3);\n q12.put(\"[^\\\\Wi]\", q3);\n q13.put(\"[^\\\\Wn]\", q3);\n q14.put(\"[\\\\w]\", q3);\n\n // END\n q0.put(\"[e]\", q15);\n q15.put(\"[n]\", q16);\n q16.put(\"[d]\", q17);\n q15.put(\"[^\\\\Wnl]\", q3);\n q16.put(\"[^\\\\Wd]\", q3);\n q17.put(\"[\\\\w]\", q3);\n\n // ELSE\n q15.put(\"[l]\", q19);\n q19.put(\"[s]\", q20);\n q20.put(\"[e]\", q21);\n q19.put(\"[^\\\\Ws]\", q3);\n q20.put(\"[^\\\\We]\", q3);\n q21.put(\"[\\\\w]\", q3);\n\n // ESPACO\n q0.put(\"[\\\\s]\", q18);\n }", "public Arbol_BB( String raiz ) {\r\n this.raiz = ( raiz ); \r\n subABizq = null;\r\n subABder = null;\r\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "@Override\n\tpublic String toString() {\n\t\tif (this.imag == 0) {\n\t\t\tif (this.reell == 0) {\n\t\t\t\treturn \"\" + 0;\n\t\t\t} else {\n\t\t\t\treturn \"\" + reell;\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.reell == 0) {\n\t\t\t\tif (this.imag > 0) {\n\t\t\t\t\treturn \"+\" + imag + \"i\";\n\t\t\t\t} else {\n\t\t\t\t\treturn \"-\" + imag * (-1) + \"i\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.imag > 0) {\n\t\t\treturn \"\" + reell + \" + i*\" + imag;\n\t\t} else {\n\t\t\treturn \"\" + reell + \" -\" + imag * (-1) + \"i\";\n\t\t}\n\t}", "private static void craftStair(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addRecipe(output, new Object[] { \"# \", \"## \", \"###\", '#', input });\r\n\t}", "public char toChar() {\r\n//\t\t//Ant\r\n//\t\tif(hasAnt()){\r\n//\t\t\tif(this.ant.getColour() == 0){\r\n//\t\t\t\treturn '=';\r\n//\t\t\t}\r\n//\t\t\tif(this.ant.getColour() == 1){\r\n//\t\t\t\treturn '|';\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t//Rock\r\n\t\tif(this.rocky){\r\n\t\t\treturn '#';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Food\r\n\t\tif(this.food > 0){\r\n\t\t\t//Prints the food value,\r\n\t\t\t//if it is > 9, prints 9 instead\r\n\t\t\tif(this.anthill == 0){ //0 to 9\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn 48 + 9;\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (this.food + 48);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Otherwise, food must be in an anthill\r\n\t\t\t//so give unique char value that acknowledges this\r\n\t\t\t//Greek isn't recognised by Notepad or the console (prints '?' instead)\r\n\t\t\t//Minimum food value is 1, so -1 from ascii codes\r\n\t\t\tif(this.anthill == 1){ //Upper case, 65 for Latin, 913 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (64 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (64 + this.food);\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){ //Lower case, 97 for Latin, 945 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (96 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (96 + this.food);\r\n\t\t\t}\r\n\t\t\t//Else error, cannot be less than 0 or more than 2 anthills\r\n\t\t\tLogger.log(new WarningEvent(\"Cell anthill value not 0, 1 or 2\"));\r\n\t\t\treturn 0;\t//Null char value\r\n\t\t}\r\n\t\t\r\n\t\t//Anthill\r\n\t\tif(this.anthill > 0){\r\n\t\t\tif(this.anthill == 1){\r\n\t\t\t\treturn '+';\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){\r\n\t\t\t\treturn '-';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\t//Markers\r\n//\t\tfor(int i = 0; i < this.markers.length; i++){\r\n//\t\t\tfor(boolean marker : this.markers[i]){\r\n//\t\t\t\tif(marker){\r\n//\t\t\t\t\tif(i == 0){\r\n//\t\t\t\t\t\treturn '[';\r\n//\t\t\t\t\t}else if(i == 1){\r\n//\t\t\t\t\t\treturn ']';\r\n//\t\t\t\t\t}else{\r\n//\t\t\t\t\t\treturn '?';\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\t\t\r\n//\t\t}\r\n\t\t\r\n\t\treturn '.';\r\n\t}", "@Override \n\tpublic void caseAOpExpr(AOpExpr node){\n\t\tExpressionType expType = (ExpressionType) nodeTypes.get(node.getOp()); \n\t\tswitch (expType){\n\t\t\tcase AND :\n\t\t\tcreateShortCircuitAnd(node);\n\t\t\t\tbreak;\n\t\t\tcase OR :\n\t\t\tcreateShortCircuiteOR(node);\n\t\t\t\tbreak;\n\t\t\tcase ADD :\n\t\t\t\tType left = nodeTypes.get(node.getLeft()); \n\t\t\t\tif (left == Type.STRING_TYPE){\n\t\t\t\t\tthis.createStringConcat(node);\n\t\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\tdefault : \n\t\t\t\tsuper.caseAOpExpr(node); \n\t\t}\n\t}", "private JMenuItem getItemSair() {\r\n\t\tif (itemSair == null) {\r\n\t\t\titemSair = new JMenuItem(\"Sair\");\r\n\t\t}\r\n\t\treturn itemSair;\r\n\t}", "public Arbol_BB() {\r\n raiz = \"\";\r\n subABizq = null;\r\n subABder = null;\r\n }", "protected abstract void composeSnare(final Phrase snare);", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public abstract void ataca(String inamic);", "@Override\n public void Insert(Ship ship, String start,String end){\n if(start.charAt(0)==end.charAt(0)){\n for(int i = 0;i < ship.getSize(); i++){\n grid[start.charAt(1)+i-'0'][start.charAt(0)-'A'] = \"[\"+ ship.getType() +\"]\";\n ship.updateCoordlist(start.charAt(1)+i-'0',start.charAt(0)-'A');\n }\n }\n else{\n for(int i = 0;i < ship.getSize(); i++){\n grid[start.charAt(1)-'0'][start.charAt(0)-'A'+i] = \"[\"+ ship.getType() +\"]\";\n ship.updateCoordlist(start.charAt(1)-'0',start.charAt(0)-'A'+i);\n\n }\n }\n }", "@Override\n public void imprime(){\n System.out.println(\" ----- Arbol Splay ----- \");\n imprimeAS(super.getRaiz());\n }", "private void toRent() {\n }", "public void ParcoursInfixe(ArrayList<Item> items) {\r\n// Item[] listeItem= new Item[this.taille()];\r\n if (getGauche() != null) {\r\n getGauche().ParcoursInfixe(items);\r\n }\r\n items.add((Item) getElement());\r\n if (getDroite() != null) {\r\n getDroite().ParcoursInfixe(items);\r\n }\r\n// return listeItem;\r\n }", "public String toString(){\r\n\t\tif (modifiers == 1) return \"O-O (w)\";\r\n\t\telse if (modifiers == 2) return \"O-O (b)\";\r\n\t\telse if (modifiers == 3) return \"O-O-O (w)\";\r\n\t\telse if (modifiers == 4) return \"O-O-O (b)\";\r\n\t\tString st = \"\";\r\n\t\tst += x88ToString(start_sq);\r\n\t\tst += x88ToString(end_sq);\r\n\t\tif (modifiers == 5) st += \"e.p.\";\r\n\t\telse if (modifiers == 6) st += \"=R\";\r\n\t\telse if (modifiers == 7) st += \"=N\";\r\n\t\telse if (modifiers == 8) st += \"=B\";\r\n\t\telse if (modifiers == 9) st += \"=Q\";\r\n\t\treturn st;\r\n\t}", "private String insertCommand(Object item)\n\t{\n\t\tif(item instanceof Road)\n\t\t{\n\t\t\tRoad tmp = (Road) item;\n\t\t\treturn \"INSERT INTO \" + DBContract.RoadTable.TABLE_NAME + \" (\" +\n\t\t\t\tDBContract.RoadTable.ROADNAME[0] + \" ,\" +\n\t\t\t\tDBContract.RoadTable.LENGTH[0] + \" ,\" +\n\t\t\t\tDBContract.RoadTable.DURATION[0] + \" ,\" +\n\t\t\t\tDBContract.RoadTable.PRICE[0] + \") VALUES (\" +\n\t\t\t\t\"\\\"\" + tmp.getName() + \"\\\"\" + \" ,\" + tmp.getLength() + \" ,\" +\n\t\t\t\ttmp.getDuration() + \" ,\" + tmp.getPrice() + \")\";\n \t\t}\n\t\telse if(item instanceof Contact)\n\t\t{\n\t\t\tContact tmp = (Contact) item;\n\t\t\treturn \"INSERT INTO \" + DBContract.ContactTable.TABLE_NAME + \" (\" +\n\t\t\t\t\tDBContract.ContactTable.NAME[0] + \" ,\" +\n\t\t\t\t\tDBContract.ContactTable.SURNAME[0] + \" ,\" +\n\t\t\t\t\tDBContract.ContactTable.BILL[0] + \") VALUES (\" +\n\t\t\t\t\t\"\\\"\" + tmp.getName() + \"\\\"\" + \" ,\" + \"\\\"\" + tmp.getFirstName() + \"\\\"\" +\n\t\t\t\t\t\" ,\" + tmp.getbill() + \")\";\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t}", "private static String getItemRarity(String[] itemSlot){\r\n String rarity = \"\";\r\n if(itemSlot[0].equals(\"Leather Helmet\")){\r\n leatherHelmet LeatherHelmet = new leatherHelmet();\r\n rarity = LeatherHelmet.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Chest Plate\")){\r\n leatherChestPlate LeatherChestPlate = new leatherChestPlate();\r\n rarity = LeatherChestPlate.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Boots\")){\r\n leatherBoots LeatherBoots = new leatherBoots();\r\n rarity = LeatherBoots.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Gloves\")){\r\n leatherGloves LeatherGloves = new leatherGloves();\r\n rarity = LeatherGloves.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Boots\")){\r\n ironBoots IronBoots = new ironBoots();\r\n rarity = IronBoots.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Helmet\")){\r\n ironHelmet IronHelmet = new ironHelmet();\r\n rarity = IronHelmet.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Chest Plate\")){\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n rarity = IronChestPlate.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Gloves\")){\r\n ironGloves IronGloves = new ironGloves();\r\n rarity = IronGloves.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Short Sword\")){\r\n shortSword ShortSword = new shortSword();\r\n rarity = ShortSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Long Sword\")){\r\n longSword LongSword = new longSword();\r\n rarity = LongSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Great Sword\")){\r\n greatSword GreatSword = new greatSword();\r\n rarity = GreatSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Heaven Smiting Devil Slayer Sword\")){\r\n heavenSmitingDevilSlayerSword Honger = new heavenSmitingDevilSlayerSword();\r\n rarity = Honger.getRarity();\r\n return rarity;\r\n }\r\n return rarity;\r\n }", "public String sap(String nounA, String nounB){\n return \"a\";\n }", "public String toString(){\n String specialWord;\n if (this.stateFunded){\n specialWord = \"is\"; }\n else{\n specialWord = \"is not\";\n }\n String ss = super.toString();\n return ss + \"It has \"+ this.spaces +\n \" parking spaces and \"+ specialWord +\n \" State funded. \";\n }", "@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }", "@Override\n public String toString() {\n Helpers f = new Helpers();\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n if (super.isBonus()) {\n // x * y -> xy\n if (left instanceof Var && right instanceof Var) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // 4 * x -> 4x\n if (right instanceof Var) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // x * 4 -> 4x\n if (left instanceof Var) {\n return \"(\" + right.toString() + \"\" + left.toString() + \")\";\n }\n // 4 * (x^2) -> 4(x^2)\n if (right instanceof Pow) {\n return \"(\" + left.toString() + \"\" + right.toString() + \")\";\n }\n // 4 * (xy) -> 4xy\n if (right instanceof Mult) {\n if (((Mult) right).getLeft() instanceof Var && ((Mult) right).getRight() instanceof Var) {\n return \"(\" + left.toString() + \"\" + f.removeOuterParentheses(right.toString()) + \")\";\n }\n }\n }\n return \"(\" + left.toString() + \" * \" + right.toString() + \")\";\n }", "public BNFrule()\n {\n lhs = \"\";\n rhsSymbols = new ArrayList<String>();\n }", "SpacesInvaders_recupererEspaceJeuDansChaineASCII createSpacesInvaders_recupererEspaceJeuDansChaineASCII();", "public final String toStringInSI() {\n\t\tStringBuffer b = new StringBuffer(64) ;\n\t\tUnit u = new Unit(this) ;\n\t\t/* Convert the value to linear scale, and then edit */\n\t\tif ((u.mksa&_log) != 0) u.mksa &= ~(_log|_mag);\n\t\tif (u.offset != 0) {\t\t// Find the corresponding SI !\n\t\t\tUdef base = uLookup(u.mksa);\n\t\t\tu.symbol = base.symb;\n\t\t\tu.offset = base.orig;\n\t\t}\n\t\tu.factor = 1; \n\t\tu.convertFrom(this);\n\t\tif (!Double.isNaN(value)) { \n\t\t\tedf(b, u.value);\n\t\t\tif (b.length() == 0) b.append('1');\n\t\t}\n\t\tu.toSI(b, 0);\n\t\treturn(\"\"+b);\t\t\t// Buffer converted to String\n\t}", "private int Add ( int s, int a){\r\n if (Num10.contains(Card[a].substring(0, 1))) { //To make \"T\",\"J\",\"Q\",\"K\" represent value of 10.\r\n s += 10;\r\n }\r\n if (Card[a].substring(0, 1).equals(\"A\")) { //To make \"A\" represent value of 1.\r\n s += 1;\r\n }\r\n if (!(Num10.contains(Card[a].substring(0, 1))) && !(Card[a].substring(0, 1).equals(\"A\"))){\r\n s += Integer.parseInt(Card[a].substring(0, 1));\r\n }\r\n return s;\r\n }", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "@Override\n public void insertString(int offs, String str, AttributeSet a) throws NumberFormatException {\n int help;\n\n\n if (Character.isDigit(str.charAt(0))) {\n help = Character.digit(str.charAt(0),10);\n if (help < 10) {\n if (super.getLength() + str.length() > maxWert) {\n str = str.substring(0, maxWert - super.getLength());\n }\n try {\n super.insertString(offs, str, a);\n\n String text = super.getText(0, super.getLength());\n if(text != null && !text.equals(\"\")){\n edge.setWeight(Integer.parseInt(text));\n\n }\n\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public String toString()\r\n\t{\r\n\t\tString output = \" \";\r\n\t\tString specialModifier = \" \";\r\n\t\tif(this.isSpecial())\r\n\t\t{\r\n\t\t\tspecialModifier = \" *\";\r\n\t\t}\r\n\t\t\t\r\n\t\toutput = String.format(\"%-9s%-5s%-19s%s%.2f\",getType(), specialModifier, this.getName(),\"$ \", this.getPrice());\r\n\t\t//code to be done here\r\n\t\t\r\n\t\t\r\n\t\treturn output;\r\n\t}", "@Override\n public String toString()\n {\n\n String str = String.format(\"%5d %-20s %2c %11.2f\",id,name,rarity,value);\n\n return str;\n }", "@Override\r\n\tpublic void imprimirItemLista(String item) {\n\t\tSystem.out.println(marcador +\" \"+ item);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"\" + get3 + 'A';\r\n\t}", "public String represent();", "public Automato simples(Character c){\n\t\tAutomato r = new Automato();\n\t\t\n\t\tswitch (c) {\n\t\t//Palavra Vazia(Epsilon)\n\t\tcase 'E' : r.addEstado(new Estado(0));\n\t\t\t\t r.addEstadoFinal(r.getQ().get(0));\n\t\t\t\t break;\n\t\t//Linguagem Vazia(Vazio)\n\t\tcase 'V': r.addEstado(new Estado(0));\n\t\t \t\t break;\n\t\t\n\t\tdefault: r.addEstado(new Estado(0));\n\t\t \t\t r.addEstado(new Estado(1));\n\t\t \t\t r.addEstadoFinal(r.getQ().get(1));\n\t\t \t\t r.addTransicao(r.getQ().get(0), r.getQ().get(1), c);\n\t\t \t\t break;\n\t\t}\n\t\t\n\t\treturn r;\n\t}", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "public abstract void split(Space s);", "private void eatItem(String item)//Made by Lexi\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n System.out.println(\"You gave in to the chocolate temptation and died from poison in the candy bar\");\n }\n }", "public String process(Item item) throws ProcessException {\n\t\t\tString type;\n\n\t\t\tItem s = item.getItemAs(Relation.SYLLABLE_STRUCTURE);\n\t\t\tif (s == null) {\n\t\t\t\ttype = \"single\";\n\t\t\t} else if (s.getNext() == null) {\n\t\t\t\tif (s.getPrevious() == null) {\n\t\t\t\t\ttype = \"single\";\n\t\t\t\t} else {\n\t\t\t\t\ttype = \"final\";\n\t\t\t\t}\n\t\t\t} else if (s.getPrevious() == null) {\n\t\t\t\ttype = \"initial\";\n\t\t\t} else {\n\t\t\t\ttype = \"mid\";\n\t\t\t}\n\t\t\treturn type;\n\t\t}", "public void imprimir() {\n Nodo reco=raiz;\n System.out.println(\"Listado de todos los elementos de la pila.\");\n System.out.print(\"Raiz-\");\n while (reco!=null) {\n \tSystem.out.print(\"(\");\n System.out.print(reco.edad+\"-\");\n System.out.print(reco.nombre+\"\");\n System.out.print(\")-\");\n //System.out.print(reco.sig+\"-\");\n reco=reco.sig;\n }\n System.out.print(\"Cola\");\n System.out.println();\n }", "private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}", "private Token casoEspecial(Token palabra) throws IOException {\n\t\tString lexema = palabra.get_lexema();\n\t\tToken aux;\n\t\t// Comprobamos si es un posible caracter\n\t\tif (lexema.equals(\"'\")) {\n \t\t\tpalabra.set_lexema(construyeCaracter(lexema));\t\n\t\t}\n\t\t// Comprobamos si es \"program:\"\n\t\telse if (lexema.equals(\"program\")) {\n\t\t\tif((aux=this.nextTokenWithWhites()).get_lexema().equals(\":\")) {\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\tpalabra.set_lexema(lexema);\t\t\t\n\t\t\t} else \n\t\t\t\ttokens.pushBack();\t\t\t\t\n\t\t}\n\t\t// Comprobamos si es \"subprogram:\"\n\t\telse if (lexema.equals(\"subprogram\")) {\n\t\t\tif((aux=this.nextTokenWithWhites()).get_lexema().equals(\":\")) {\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\tpalabra.set_lexema(lexema);\t\t\t\n\t\t\t} else \n\t\t\t\ttokens.pushBack();\t\t\t\t\n\t\t}\n\t\t// Comprobamos si es :=,>=,<=,!=,=,==\n\t\telse if (lexema.matches(\"\\\\:|\\\\>|\\\\<|\\\\=|\\\\!\")) {\n\t\t\tif((aux = this.nextTokenWithWhites()).get_lexema().equals(\"=\") || lexema.equals(\"<\") && aux.get_lexema().equals(\"<\") ||\n\t\t\t\t\tlexema.equals(\">\") && aux.get_lexema().equals(\">\")) {\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\tpalabra.set_lexema(lexema);\n\t\t\t} else \n\t\t\t\ttokens.pushBack();\t\n\t\t}\t\t\n\t\t// Comprobamos si es un casting\n\t\t/*else if (lexema.equals(\"(\")) {\n\t\t\tif((aux = this.nextToken()).get_lexema().matches(\"integer|int|float|character|char|natural|nat\")) {\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\taux = this.nextToken();\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\tpalabra.set_lexema(lexema);\n\t\t\t} else\n\t\t\t\ttokens.pushBack();\t\n\t\t}*/\n\t\t// Comprobamos si es un numero exponencial\n\t\telse if (lexema.matches(\"[0-9]+(.[0-9]+)?(e|E)\")) {\n\t\t\taux=this.nextToken();\n\t\t\tif (aux.get_lexema().equals(\"-\")) {\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\taux=this.nextToken();\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\tpalabra.set_lexema(lexema);\n\t\t\t} else if (aux.get_lexema().matches(\"[0-9]+\")) {\n\t\t\t\tlexema = lexema+aux.get_lexema();\n\t\t\t\taux=this.nextToken();\n\t\t\t\tpalabra.set_lexema(lexema);\n\t\t\t}else {\n\t\t\t\ttokens.pushBack();\t\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn palabra;\n\t}", "@Override\n public String storeItem() {\n return \"N/\" + description;\n }", "public TreeItem() {\n\t\tsuper();\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\n\t}", "@Override\n public String toString(){\n switch(this){\n case GROUND : return \"0\";\n case SECOND_DAY_AIR: return \"1\";\n case INTERNATIONAL_STANDARD: return \"3\";\n case INTERNATIONAL_PREMIUM: return \"4\";\n default: return \"-1\";\n }\n }", "private static Nodo construir(String fx){\n Stack<Nodo> pila=new Stack<>();//aqui se guardaran los Nodos;\n for(int i=0;i<fx.length();i++) {\n char caracter = fx.charAt(i);\n if (caracter == '+' || caracter == '*' || caracter == '/' || caracter == '-') { /*cuando es una operacion,\n se crea un Nodo cuya raiz es la operacion, su Nodo derecho es el elemento que le sigue en la pila y su Nodo\n izq es el siguiente*/\n Nodo aux = new Nodo();\n aux.info = \"\" + caracter;\n aux.der = pila.pop();\n aux.izq = pila.pop();\n pila.push(aux);\n } else if (isDigit(caracter) || isLetter(caracter)) { /*cuando es un número o variable, se crea un nodo con\n su valor y se apila*/\n Nodo aux = new Nodo(\"\" + caracter, null, null);\n pila.push(aux);\n }\n }\n return pila.pop();\n }", "@Override\n public String toString() {\n \treturn \"()\";\n }", "public interface Stalk57 extends Stalk {\n /*\n 57 S0 DD Sat Info: S number of sats, DD horiz. dillution of position, if S=1 -> DD=0x94\n Corresponding NMEA sentences: GGA, GSA\n */\n public Integer getSats();\n public Integer getHDOP();\n}", "@Override\n\tpublic String toString(){\n\t\treturn \"A\";\n\t}", "private String computeUniqueNotation(Subquery parsedQuery) {\n if (parsedQuery.rightTerm == null) {\n parsedQuery.orderedQuery = parsedQuery.leftTerm.toString();\n return parsedQuery.leftTerm.toString();\n }\n\n String leftBare = computeUniqueNotation(parsedQuery.leftTerm instanceof Subquery ? (Subquery) parsedQuery.leftTerm : new Subquery(parsedQuery.leftTerm));\n String rightBare = computeUniqueNotation(parsedQuery.rightTerm instanceof Subquery ? (Subquery) parsedQuery.rightTerm : new Subquery(parsedQuery.rightTerm));\n\n String operator = parsedQuery.operator;\n String ordered;\n\n if (operator.equals(\"|\") || operator.equals(\"+\")) {\n if (leftBare.compareTo(rightBare) > 0) {\n ordered = rightBare + \" \" + leftBare + \" \" + operator;\n } else {\n ordered = leftBare + \" \" + rightBare + \" \" + operator;\n }\n } else {\n ordered = leftBare + \" \" + rightBare + \" \" + operator;\n }\n parsedQuery.orderedQuery = ordered;\n return ordered;\n }", "@Override\r\n public String toString() {\r\n String result = head.toString();\r\n if (result.equals(\"\")) {\r\n return \"0\";\r\n }\r\n if (result.charAt(0) == '+') {\r\n result = result.substring(1);\r\n }\r\n return result;\r\n }", "public Mountaineering() {\n super(\"Mountaineering\", \"Enchanting Tables are crafted with emeralds instead of diamonds.\");\n\n emeraldEnch = new ShapedRecipe(ENCHANT_TABLE).shape(\" B \", \"EOE\", \"OOO\")\n .setIngredient('B', Material.BOOK)\n .setIngredient('E', Material.EMERALD)\n .setIngredient('O', Material.OBSIDIAN\n );\n\n diamondEnch = new ShapedRecipe(ENCHANT_TABLE).shape(\" B \", \"DOD\", \"OOO\")\n .setIngredient('B', Material.BOOK)\n .setIngredient('D', Material.DIAMOND)\n .setIngredient('O', Material.OBSIDIAN\n );\n }", "public interface OreMineral extends Mineral {\n\tpublic Chemical getConcentrate();\n\t\n\tpublic enum Ores implements OreMineral {\n\t\tACANTHITE(Compounds.Ag2S),\n\t\tANATASE(Compounds.TiO2),\n\t\tARSENOPYRITE(Compounds.FeAsS),\n\t\tAZURITE(Compounds.Cu3CO32OH2),\n\t\tBARITE(Compounds.BaSO4, new Color(250, 250, 170), new Substitution(Sr, 0.05)),\n\t\tBASTNASITE(Compounds.CeCO3F, new Substitution(La, 0.2), new Substitution(Y, 0.1), new Substitution(Sm, 0.01)),\n\t\tBERYL(Compounds.Be3Al2SiO36),\n\t\tBISMUTHINITE(Compounds.Bi2S3),\n\t\tBORAX(Compounds.Na2B4O7),\n\t\tCALCITE(Compounds.CaCO3),\n\t\tCARNALLITE(Compounds.KCl.mix(Compounds.MgCl2_6H2O, 1.0), new Color(255, 255, 204)),\n\t\tCARNOTITE(Compounds.K2U2V2O12_3H2O),\n\t\tCASSITERITE(Compounds.SnO2, new Color(30, 20, 0)),\n\t\tCELESTINE(Compounds.SrSO4, new Color(200, 200, 250), new Substitution(Ba, 0.2)),\n\t\tCHALCOCITE(Compounds.Cu2S),\n\t\tCHALCOPYRITE(Compounds.CuFeS2, new Substitution(Ag, 0.01), new Substitution(Se, 0.01), new Substitution(Te, 0.001)),\n\t\tCHROMITE(Compounds.FeCr2O4),\n\t\tCINNABAR(Compounds.HgS),\n\t\tCOBALTITE(Compounds.CoAsS),\n\t\tCOLUMBITE(Compounds.FeNb2O6, new Substitution(Ta, 0.2)),\n\t\tCUPRITE(Compounds.Cu2O, Color.red),\n\t\tEPSOMITE(Compounds.MgSO4_7H2O),\n\t\tFLUORITE(Compounds.CaF2, new Color(155, 0, 165)),\n\t\tGALENA(Compounds.PbS, new Substitution(Bi, 0.1), new Substitution(Ag, 0.05)),\n\t\tGIBBSITE(Compounds.AlOH3, new Color(155, 75, 35), new Substitution(Ga, 0.001)),\n\t\tGOETHITE(Compounds.alpha_FeOH3, new Substitution(Ni, 0.05), new Substitution(Co, 0.01)),\n\t\tGREENOCKITE(Compounds.CdS),\n\t\tGYPSUM(Compounds.CaSO4_2H2O),\n\t\tHALITE(Compounds.NaCl, new Color(255, 205, 205)),\n\t\tLAUTARITE(Compounds.CaI2O6, new Color(255, 255, 170)),\n\t\tLEPIDOCROCITE(Compounds.gamma_FeOH3),\n\t\tHEMATITE(Compounds.Fe2O3),\n\t\tILMENITE(Compounds.FeTiO3),\n\t\tLEPIDOLITE(Compounds.Li3KSi4O10OH2, new Substitution(Rb, 0.01), new Substitution(Cs, 0.005)),\n\t\tMAGNETITE(Compounds.Fe3O4),\n\t\tMAGNESITE(Compounds.MgCO3),\n\t\tMALACHITE(Compounds.Cu2CO3OH2),\n\t\tMICROLITE(Compounds.NaCaTa2O6OH, new Substitution(Nb, 0.2), \n\t\t\t\t new Substitution(Ce, 0.03), new Substitution(La, 0.015), \n\t\t new Substitution(Nd, 0.01), new Substitution(Y, 0.01), \n\t\t new Substitution(Th, 0.01), new Substitution(U, 0.005)),\n\t\tMIRABILITE(Compounds.Na2SO4_10H2O),\n\t\tMOLYBDENITE(Compounds.MoS2, new Substitution(Re, 0.01)),\n\t\tMONAZITE(Compounds.CePO4, new Substitution(La, 0.5), new Substitution(Nd, 0.3),\n\t\t\t\t new Substitution(Pr, 0.15), new Substitution(Th, 0.5), new Substitution(Sm, 0.05)),\n\t\tNEPOUITE(Compounds.Ni3Si2O5OH4),\n\t\tNITER(Compounds.KNO3),\n\t\tNITRATINE(Compounds.NaNO3, new Color(222, 184, 135)),\n\t\tORPIMENT(Compounds.As2S3),\n\t\tPENTLANDITE(Compounds.Ni9S8, new Substitution(Fe, 1.0), new Substitution(Co, 0.01)),\n\t\tPOLLUCITE(Compounds.Cs2Al2Si4O12, new Substitution(Rb, 0.05)),\n\t\tPYRITE(Compounds.FeS2, new Substitution(Ni, 0.1), new Substitution(Co, 0.05)),\n\t\t// FIXME: how to indicate that Nb is being substituted?\n\t\tPYROCHLORE(Compounds.NaCaNb2O6OH, new Substitution(Ta, 0.1), \n\t\t\t\t new Substitution(Ce, 0.03), new Substitution(La, 0.015), \n\t\t new Substitution(Nd, 0.01), new Substitution(Y, 0.01), \n\t\t new Substitution(Th, 0.01), new Substitution(U, 0.005)),\n\t\tPYROLUSITE(Compounds.MnO2),\n\t\tQUARTZ(Compounds.SiO2),\n\t\tREALGAR(Compounds.AsS),\n\t\tRUTILE(Compounds.TiO2, new Color(130, 60, 5)),\n\t\tSCHEELITE(Compounds.CaWO4, new Color(240, 200, 150)),\n\t\tSPHALERITE(Compounds.ZnS, new Color(30, 75, 50), \n\t\t\t\t new Substitution(Cd, 0.01), new Substitution(Ga, 0.005), \n\t\t\t\t new Substitution(Ge, 0.002), new Substitution(In, 0.002)),\n\t\tSPODUMENE(Compounds.LiAlSiO32),\n\t\tSTIBNITE(Compounds.Sb2S3),\n\t\tSYLVITE(Compounds.KCl, new Color(255, 230, 205)),\n\t\tTANTALITE(Compounds.FeTa2O6, new Substitution(Nb, 0.1)),\n\t\tTENNANTITE(Compounds.Cu12As4S13),\n\t\tTETRAHEDRITE(Compounds.Cu12Sb4S13),\n\t\tTITANO_MAGNETITE(Compounds.Fe3O4.mix(Compounds.TiO2, 0.3).mix(Compounds.V2O5, 0.1)),\n\t\tURANINITE(Compounds.UO2),\n\t\tVANADINITE(Compounds.Pb5V3O12Cl),\n\t\tWOLFRAMITE(Compounds.FeWO4),\n\t\tZIRCON(Compounds.ZrSiO4, new Color(130, 60, 5)),\n\t\t\n\t\tGOLD(Au),\n\t\tELECTRUM(Alloys.ELECTRUM),\n\t\tPLATINUM(Pt.mix(Pd, 1.0).mix(Ru, 0.25).mix(Rh, 0.2)\n\t\t\t\t.mix(Ir, 0.01).mix(Alloys.IRIDOSMINE, 0.01)),\n\t\tSULFUR(S),\n\t\t\n\t\tSAL_AMMONIAC(Compounds.NH4Cl)\n\t\t;\n\n\t\tprivate OreMineral delegate;\n\t\t\n\t\tprivate Ores(OreMineral delegate) {\n\t\t\tthis.delegate = delegate;\n\t\t}\n\t\t\n\t\tprivate Ores(Mixture mixture) {\n\t\t\tthis(mixture, null);\n\t\t}\n\t\t\n\t\tprivate Ores(Mixture mixture, Color color) {\n\t\t\tthis(new SimpleOreMineral(mixture, color));\n\t\t}\n\t\t\n\t\tprivate Ores(Chemical material, Substitution... substitution) {\n\t\t\tthis(material, null, substitution);\n\t\t}\n\t\t\n\t\tprivate Ores(Chemical material, Color color, Substitution... substitution) {\n\t\t\tthis(new SimpleOreMineral(material, color, substitution));\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic List<MixtureComponent> getComponents() {\n\t\t\treturn delegate.getComponents();\n\t\t}\n\n\t\t@Override\n\t\tpublic ConditionProperties getProperties(Condition condition) {\n\t\t\treturn delegate.getProperties(condition);\n\t\t}\n\n\t\t@Override\n\t\tpublic Chemical getConcentrate() {\n\t\t\treturn delegate.getConcentrate();\n\t\t}\n\n\t\t@Override\n\t\tpublic Ore mix(IndustrialMaterial material, double weight) {\n\t\t\treturn new SimpleOre(this).mix(material, weight);\n\t\t}\n\n\t\t@Override\n\t\tpublic Mixture removeAll() {\n\t\t\treturn delegate.removeAll();\n\t\t}\n\t}\n\t\n\tpublic static class Substitution extends MixtureComponent {\n\t\tpublic Substitution(Element substitute, double rate) {\n\t\t\tsuper(substitute, rate);\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic Element getMaterial() {\n\t\t\treturn (Element)this.material;\n\t\t}\n\t}\n}", "public void optimize() {\n \tif (myRight != null) {\n \tmyRight.optimize();\n \t}\n \tif (myLeft != null) {\n \t\tmyLeft.optimize();\n \t}\n \tif (myLeft != null && myRight != null) {\n \tif (optimize_helper()) {\n \t\tSystem.out.println(\"test\");\n \t\tif (myItem.equals(\"+\")) {\n \t\t\tmyLeft.myItem = Integer.parseInt((String)myLeft.myItem);\n \t\t\tmyRight.myItem = Integer.parseInt((String)myRight.myItem);\n \t\t\tmyItem = Integer.toString((int)myLeft.myItem + (int)myRight.myItem);\n \t\t\tmyLeft = null;\n \t\t\tmyRight = null;\n \t\t} else if (myItem.equals(\"*\")) {\n \t\t\tmyLeft.myItem = Integer.parseInt((String)myLeft.myItem);\n \t\t\tmyRight.myItem = Integer.parseInt((String)myRight.myItem);\n \t\t\tmyItem = Integer.toString((int)myLeft.myItem * (int)myRight.myItem);\n \t\t\tmyLeft = null;\n \t\t\tmyRight = null;\n \t\t}\n \t}\n \t}\n }", "public ItemEnergizador(String itemNome, int bonus) {\r\n\t\tsuper(itemNome, bonus);\r\n\t}", "public abstract void alimentarse();", "@Override\n\tpublic String toString() {\n\t\tswitch(type) {\n\t\tcase CLOSURE : return \"*\";\n\t\tcase CONCATENATION : return \"\";\n\t\tcase LPAREN : return \"(\";\n\t\tcase RPAREN : return \")\";\n\t\tcase UNION : return \"|\";\n\t\tdefault: return value;\n\t\t}\n\t}", "public Item() {\n\t\tmenu.add(new Item(\"Snickers\", 10, 1.50, \"1\"));\n\t\tmenu.add(new Item(\"Chips\", 10, .50, \"2\"));\n\t\tmenu.add(new Item(\"Coke\", 10, 1.75, \"3\"));\n\n\t}", "public String toString() {\n/* 96 */ return \"Outline (Zigzag)\";\n/* */ }", "public String toString() { \r\n\t\tString Sresult = \"(\" + lChild.toString() + \" / \" + rChild.toString() + \")\";\r\n\t\treturn Sresult; \r\n\t}", "public String toString() {\n String leftstring = _left.toString();\n String rightstring = _right.toString();\n \n String left;\n if (_left.isArrowType()) left = \"(\" + leftstring + \")\";\n else if (_left.isBaseType()) left = leftstring;\n else throw new Error(\"Missed a case in a switch for type kinds.\");\n return left + \" ⇒ \" + rightstring;\n }", "public void pilihanAksi() {\n\n int urutPil = 0; //item, pintu\n int subPil = 0; //aksinya\n\n //Aksi dengan Polymorphism\n System.out.println(\"========== Pilihan Aksi pada Ruangan =============\");\n System.out.println(\"| Item di ruangan |\");\n System.out.println(\"==================================================\");\n System.out.println();\n\n //Menampilkan item dalam Array Item (Polymorphism)\n for (Item listItem : arrItem){\n urutPil++;\n subPil = 0; // Sistem penomoran 11, 12, 13, dan seterusnya\n\n System.out.println(listItem.getNama()); //Menampilkan nama pada arrItem\n\n //Menampilkan aksi pada turunan method dengan polymorphism\n ArrayList<String> arrPil = listItem.getAksi();\n for (String stringPilihan : arrPil){\n subPil++;\n //Print pilihan menu\n System.out.printf(\"%d%d. %s %n\", urutPil, subPil, stringPilihan);\n }\n }\n\n System.out.print(\"Pilihan anda : \");\n String strPil = sc.next();\n System.out.println(\"---------------\");\n\n //split pilihan dan subpilihan\n\n int pil = Integer.parseInt(strPil.substring(0,1)); //ambil digit pertama, asumsikan jumlah tidak lebih dari 10\n subPil = Integer.parseInt(strPil.substring(1,2)); //ambil digit kedua, asumsikan jumlah tidak lebih dari 10\n\n //Inheritance dari Proses Aksi dengan Polymorphism\n Item pilih = arrItem.get(pil-1);\n pilih.prosesAksi(subPil); //aksi item\n }", "public boolean containsAAAMneumonics() {\n\t\tswitch(this) {\n\t\t\n\t\tcase NOP -> \t{return true;}\n\t\tcase DECI -> \t{return true;}\n\t\tcase DECO -> \t{return true;}\n\t\tcase STRO -> \t{return true;}\n\t\tcase CHARI -> \t{return true;}\n\t\tcase CHARO -> \t{return true;}\n\t\t\n//\t\tcase RETn\n\t\t\n\t\tcase ADDSP -> \t{return true;}\n\t\tcase SUBSP -> \t{return true;}\n\t\t\n\t\tdefault -> {return false;}\n\t\t\n\t\t}\n\t\t\n\t}", "public final String explainUnit () {\n\t\tStringBuffer b = new StringBuffer(120) ;\n\t\tParsing t = new Parsing(symbol);\n\t\tUnit u = new Unit();\n\t\tint ini1 = 0;\n\t\ttry { u.unitec(t, b); }\n\t\tcatch (Exception e) {\n\t\t\tif (DEBUG>0) {\n\t\t\t\tSystem.out.println(\"++++explainUnit: catched: \" + e);\n\t\t\t\ttry { Thread.sleep(2000); } catch(Exception i) {;}\n\t\t\t}\n\t\t\tif (t.currentChar() == '\"') {\t// \"picture\" unit\n\t\t\t\tb.append(Parsing.explainComplex(t.toString()));\n\t\t\t}\n\t\t\telse { String prefix = \"?***bad Unit <\";\n\t\t\tb.insert(0, prefix);\n\t\t\tb.insert(prefix.length(), symbol);\n\t\t\tb.insert(prefix.length() + symbol.length(), \"> \");\n\t\t\t}\n\t\t}\t\t\t// Should never happen!\n\t\tini1 = skipBrackets(b);\t\t\t// Remove enclosing Parentheses\n\t\tb.append(\" (\"); toSI(b, 1); b.append(\")\") ;\n\t\t// return(\"\"+b.substring(ini1));\t// Java>=1.2\n\t\treturn(b.toString().substring(ini1));\t// AnyJavaVersion\n\t}", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "public interface BiomedicalParseSym {\n /* terminals */\n public static final int OR_OP = 6;\n public static final int String = 4;\n public static final int RPAREN = 3;\n public static final int error = 1;\n public static final int AND_OP = 5;\n public static final int NOT_OP = 7;\n public static final int LPAREN = 2;\n public static final int EOF = 0;\n}", "public A339355() {\n super(1, \"[[0],[35,32,10,1],[2,8,2],[3,0,-2,-1]]\",\"8\", 0);\n }", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 51: */ {\r\n/* 52:67 */ return ItemList.ap;\r\n/* 53: */ }", "public void getSword(Position swordPosition) {\n\n\t\tonWay = true;\n\t\tsetActive();\n\t\tsymbol = \" a\";\n\n\t\tint x0 = this.getPosition().getCol();\n\t\tint y0 = this.getPosition().getLine();\n\t\tint x1 = swordPosition.getCol();\n\t\tint y1 = swordPosition.getLine();\n\n\t\t/* 1st Octant */\n\t\tif (x1>x0 && y1>=y0 && (y1-y0)<=(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x1 - x0;\n\t\t\tb = y1 - y0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\tif (d >= 0)\t{ \n\t\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 2nd Octant */\n\t\telse if (x1>x0 && y1>y0 && (y1-y0)>(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y1 - y0;\n\t\t\tb = x1 - x0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 3rd Octant */\n\t\telse if (x1<=x0 && y1>y0 && (y1-y0)>=(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y1 - y0;\n\t\t\tb = x0 - x1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 4th Octant */\n\t\telse if (x1<x0 && y1>y0 && (y1-y0)<(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x0 - x1;\n\t\t\tb = y1 - y0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.bottomPosition().getLine(), temp.bottomPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 5th Octant */\n\t\telse if (x1<=x0 && y1<=y0 && (y0-y1)<=(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x0 - x1;\n\t\t\tb = y0 - y1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\tif (d >= 0)\t{ \n\t\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 6th Octant */\n\t\telse if (x1<x0 && y1<y0 && (y0-y1)>(x0-x1)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y0 - y1;\n\t\t\tb = x0 - x1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.leftPosition().getLine(), temp.leftPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 7th Octant */\n\t\telse if (x1>=x0 && y1<y0 && (y0-y1)>=(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = y0 - y1;\n\t\t\tb = x1 - x0;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++){\n\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\t\t/* 8th Octant */\n\t\telse if (x1>x0 && y1<y0 && (y0-y1)<(x1-x0)) {\n\t\t\tint a, b, d, inc1, inc2;\n\t\t\ta = x1 - x0;\n\t\t\tb = y0 - y1;\n\t\t\tinc2 = 2*b;\n\t\t\td = inc2 - a; /* d = 2 * b - a; */\n\t\t\tinc1 = d - a; /* inc1 = 2 * (b-a); */\n\t\t\tPosition temp = new Position(y0,x0);\n\t\t\tswordPath.add(temp);\n\t\t\treturnPath.push(temp);\n\t\t\tfor(int i=0; i<a; i++)\n\t\t\t{ \n\t\t\t\ttemp = new Position(temp.rightPosition().getLine(), temp.rightPosition().getCol());\n\t\t\t\tif (d >= 0)\t{\n\t\t\t\t\ttemp = new Position(temp.upperPosition().getLine(), temp.upperPosition().getCol());\n\t\t\t\t\td=d+inc1;\n\t\t\t\t} else {\n\t\t\t\t\td=d+inc2;\n\t\t\t\t}\n\t\t\t\tswordPath.add(temp);\n\t\t\t\treturnPath.push(temp);\n\t\t\t}\n\t\t}\n\n\t}", "private static String getMyHand(JSONObject data) {\n\n String rez = null;\n\n JSONArray myCard = (JSONArray)data.get(\"newRightHand\");\n\n JSONArray myFirstCard = (JSONArray)myCard.get(0);\n JSONArray mySecondCard = (JSONArray)myCard.get(1);\n\n if (!\"a\".equalsIgnoreCase(myFirstCard.get(0).toString()) && !\"a\".equalsIgnoreCase(mySecondCard.get(0).toString()))\n rez = mySecondCard.get(2).toString();\n else\n if (\"a\".equalsIgnoreCase(myFirstCard.get(0).toString()))\n rez = \"A\" + filterCard(mySecondCard.get(0).toString());\n else rez = \"A\" + filterCard(myFirstCard.get(0).toString());\n\n return \"A10\".equals(rez) ? \"20\" : rez;\n }", "public static void imprimirAST(NodoBase raiz){\n\t\t sangria+=2;\n\t\t while (raiz != null) {\n\t\t printSpaces();\n\t\t if (raiz instanceof NodoIf)\n\t\t \tSystem.out.println(\"If\");\n\t\t else if (raiz instanceof NodoRepeat)\n\t\t \tSystem.out.println(\"Repeat\");\n else if (raiz instanceof NodoFor)\n System.out.println(\"For\");\n else if (raiz instanceof NodoDeclaracion)\n System.out.println(\"Declaracion\");\n\t\t else if (raiz instanceof NodoLeer) \n\t\t \tSystem.out.println(\"Lectura: \"+((NodoLeer)raiz).getIdentificador());\n\t\t else if (raiz instanceof NodoEscribir)\n\t\t \tSystem.out.println(\"Escribir\");\n else if (raiz instanceof NodoEstructura)\n System.out.println(\"Estructura\");\n else if (raiz instanceof NodoFuncionRetorna){\n System.out.println(\"Funcion con Retorno\"); }\n else if (raiz instanceof NodoFuncionSinRetorna)\n System.out.println(\"Funcion sin Retorno\");\n else if (raiz instanceof NodoParametro)\n System.out.println(\"Parametro\");\n\t\t else \n if (raiz instanceof NodoAsignacion)\n {\n if(((NodoAsignacion)raiz).getPosicion()!=null) //vector\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador()+\"[\"+((NodoAsignacion)raiz).getPosicion()+\"]\"); \n else\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador());\n }\n else if (raiz instanceof NodoCall)\n {\n if(((NodoCall)raiz).getArgumentos()!=null) //vector\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()); \n else\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()+\"(\"+\")\");\n }\n else if (raiz instanceof NodoOperacion\n\t\t \t\t|| raiz instanceof NodoValor\n\t\t \t\t|| raiz instanceof NodoIdentificador )\n\t\t \timprimirNodo(raiz);\n \n else if (raiz instanceof NodoVariable)\n {\n if(((NodoVariable)raiz).getNumero()!=null)\n System.out.println(((NodoVariable)raiz).getIdentificador()+\"[\"+((NodoVariable)raiz).getNumero()+\"]\");\n else\n System.out.println(((NodoVariable)raiz).getIdentificador());\n }\n\t\t else System.out.println(\"Tipo de nodo desconocido\");\n\t\t \n\t\t \n /* Hago el recorrido recursivo */\n \n if (raiz instanceof NodoEstructura){\n printSpaces();\n System.out.println(\"**Funcion**\");\n imprimirAST(((NodoEstructura)raiz).getFuncion());\n printSpaces();\n System.out.println(\"**Main**\");\n imprimirAST(((NodoEstructura)raiz).getBloque());\n }\n \n if (raiz instanceof NodoFuncionRetorna){\n printSpaces();\n System.out.println(\"**Funcion con Retorno**\");\n imprimirAST(((NodoFuncionRetorna)raiz).getTipo());\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionRetorna)raiz).getSecuencias());\n \n printSpaces();\n System.out.println(\"retorno\");\n imprimirAST(((NodoFuncionRetorna)raiz).getExpresion());\n }\n \n if (raiz instanceof NodoFuncionSinRetorna){\n printSpaces();\n System.out.println(\"**Funcion sin Retorno**\");\n System.out.println(\"VOID\");\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionSinRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionSinRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getSecuencias());\n \n }\n \n if (raiz instanceof NodoParametro){\n printSpaces();\n System.out.println(\"**Parametros**\");\n imprimirAST(((NodoParametro)raiz).getTipo());\n \n System.out.println(\"\\tID, \"+((NodoParametro)raiz).getIdentificador());\n }\n \n if (raiz instanceof NodoCall){\n printSpaces();\n if(((NodoCall)raiz).getArgumentos()!=null)\n System.out.println(\"**argumentos**\");\n imprimirAST(((NodoCall)raiz).getArgumentos());\n }\n \n if (raiz instanceof NodoDeclaracion){\n printSpaces();\n System.out.println(\"**Declaracion**\");\n imprimirAST(((NodoDeclaracion)raiz).getTipo());\n imprimirAST(((NodoDeclaracion)raiz).getLis_asig());\n }\n \n if (raiz instanceof NodoIf){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getPrueba());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Then IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getParteThen());\n\t\t \tif(((NodoIf)raiz).getParteElse()!=null){\n\t\t \t\tprintSpaces();\n\t\t \t\tSystem.out.println(\"**Else IF**\");\n\t\t \t\timprimirAST(((NodoIf)raiz).getParteElse());\n\t\t \t}\n\t\t }\n\t\t else if (raiz instanceof NodoRepeat){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Cuerpo REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getCuerpo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getPrueba());\n\t\t }\n else if (raiz instanceof NodoFor){\n printSpaces();\n System.out.println(\"**Asignacion For**\");\n imprimirAST(((NodoFor)raiz).getAsignacion());\n printSpaces();\n System.out.println(\"**Comprobacion FOR**\");\n imprimirAST(((NodoFor)raiz).getPrueba());\n printSpaces();\n System.out.println(\"**Acumulador FOR**\");\n imprimirAST(((NodoFor)raiz).getAcumulador());\n printSpaces();\n System.out.println(\"**Cuerpo FOR**\");\n imprimirAST(((NodoFor)raiz).getCuerpo());\n \n }\n\t\t else \n \n if (raiz instanceof NodoAsignacion)\n\t\t \timprimirAST(((NodoAsignacion)raiz).getExpresion());\n\t\t else \n \n if (raiz instanceof NodoEscribir)\n\t\t \timprimirAST(((NodoEscribir)raiz).getExpresion());\n\t\t else \n \n \n if (raiz instanceof NodoOperacion){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Izquierda Operacion**\");\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpIzquierdo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Derecha Operacion**\");\t\t \t\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpDerecho());\n\t\t }\n\t\t raiz = raiz.getHermanoDerecha();\n\t\t }\n\t\t sangria-=2;\n\t\t}", "@Override\n\t\tprotected String getValueAsString() {\n\t\t\tif (itemList.size() == 0) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tStringBuilder sb = new StringBuilder(itemList.size() * 8);\n\t\t\tIterator<SVGItem> i = itemList.iterator();\n\t\t\tif (i.hasNext()) {\n\t\t\t\tsb.append(i.next().getValueAsString());\n\t\t\t}\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tsb.append(getItemSeparator());\n\t\t\t\tsb.append(i.next().getValueAsString());\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}", "public Alphabet(Alphabet o) {\n slexic = new HashMap<String, Integer>(o.slexic);\n slexicinv = new ArrayList<String>(o.slexicinv);\n spair = new HashMap<IntegerPair, Integer>(o.spair);\n spairinv = new ArrayList<IntegerPair>(o.spairinv);\n \t cast00 = cast(0, 0);\n Alphabet.debuggingInstance = this;\n }", "public String toString() {\n\t\treturn \"S\";\n\t}", "public String toString() {\n\treturn \"(\" + left.toString() + \" * \" +\n\t right.toString() + \")\";\n }", "public String toString() {\n return (\"Item: \" + itemCode + \" \" + itemName + \" \" + itemQuantityInStock + \" price: $\" + df.format(itemPrice) +\" cost: $\"+ df.format(itemCost) + \" farm supplier: \" + farmName);\n }", "public ConsumableItem(String name, String description, int numItem, char symbol) \n {\n this.name = name;\n this.description = description;\n this.numItem = numItem;\n this.symbol = symbol;\n }", "public Armor(String _name){\n super();\n // sets owner = _owner\n // sets posX = _posX\n // sets posY = _posY\n // sets itemIntValue = _itemIntValue\n name = _name; \n }", "@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}" ]
[ "0.5805723", "0.54593253", "0.51874214", "0.5157306", "0.51153696", "0.5022728", "0.5022009", "0.50024265", "0.4986282", "0.49449798", "0.49250162", "0.49148336", "0.49129015", "0.48856068", "0.48688254", "0.48601878", "0.48436984", "0.4826185", "0.48196387", "0.4807691", "0.48073944", "0.48045382", "0.47516245", "0.47430795", "0.47162592", "0.47135666", "0.47112167", "0.4704508", "0.4697701", "0.46875787", "0.46870324", "0.46782532", "0.46736866", "0.46700567", "0.466347", "0.46500883", "0.46456096", "0.4642503", "0.46347642", "0.46228123", "0.46155167", "0.46151567", "0.4608548", "0.46083534", "0.46082193", "0.46076858", "0.4604652", "0.46043938", "0.45900017", "0.45888558", "0.45821607", "0.45781735", "0.45755103", "0.45677847", "0.45671174", "0.45624518", "0.45624518", "0.45567364", "0.4555067", "0.45542282", "0.45494407", "0.45477298", "0.45460105", "0.4543738", "0.4541656", "0.45399463", "0.45393634", "0.45393234", "0.453327", "0.45278808", "0.45250955", "0.45217922", "0.45210472", "0.45140237", "0.45127916", "0.4508751", "0.45041326", "0.4503972", "0.44981188", "0.44950658", "0.44942054", "0.4493512", "0.4492808", "0.4488758", "0.44857424", "0.44856077", "0.448104", "0.44761315", "0.44722673", "0.44710916", "0.44678026", "0.44622988", "0.44614017", "0.44539642", "0.44527832", "0.44522122", "0.44507858", "0.44503367", "0.44503102", "0.44478205" ]
0.5414057
2
This method tests to see the position.
public void test(){ for(int i =0; i< this.position.length;i++){ System.out.println(" "); for(int p = 0 ; p<this.position.length;p++){ System.out.print(this.position[i][p]); } } System.out.println(" "); for(int i =0; i< this.position.length;i++){ System.out.println(" "); for(int p = 0 ; p<this.position.length;p++){ System.out.print(this.Ari[i][p]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testPosition() {\n System.out.println(\"position\");\n BufferedCharSequence instance = null;\n int expResult = 0;\n int result = instance.position();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPosition() {\n assertEquals(r1.getPosition(), new Position2D(50, 75));\n assertEquals(r2.getPosition(), new Position2D(-50, 75));\n assertEquals(r3.getPosition(), new Position2D(50, -75));\n assertEquals(r4.getPosition(), new Position2D(-50, -75));\n }", "private static void testGetCurrentLoc(Drunkard drunkard){\n\t System.out.println(\"get starting location[expected (3,5)]: (\" + drunkard.getCurrentLoc().getX() + \",\" + drunkard.getCurrentLoc().getY() + \")\");\n\t}", "@Test\n public void testGetPosition()\n {\n System.out.println(\"getPosition\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertEquals(Syntax.LABEL, token.getSyntax());\n assertEquals(1, token.getLine());\n assertEquals(1, token.getPosition());\n assertEquals(Vocabulary.COMPONENT, token.getValue());\n }", "@Test\n public void testPosition(){\n pos = Maze.position(25, 28);\n assertEquals(Maze.Position.class, pos.getClass());\n assertEquals(pos, Maze.position(25, 28));\n }", "@Test\n public void shouldBeAbleToCreatePiecePosition() {\n Assert.assertNotNull(position);\n }", "@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }", "@Test\r\n\tpublic void testGetPositionX(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionX(10);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t}", "@Test\r\n public void testBoardPosition() {\r\n BoardPosition testBoardPosition = new BoardPosition(new Point(0, 0));\r\n assertEquals(testBoardPosition.getCoordinates().x, 0);\r\n assertEquals(testBoardPosition.getCoordinates().y, 0);\r\n //\tassertEquals(testBoardPosition.getImage(), ); <-- TODO\r\n }", "@Test\n public void testIsPositionValid() {\n assertFalse(this.board.isPositionValid(new Position(-1, -1)));\n assertFalse(this.board.isPositionValid(new Position(11, 11)));\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n assertTrue(this.board.isPositionValid(new Position(line, column)));\n }\n }\n }", "public void testMovToPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.moveToPos(5));\n assertTrue(test1.getValue().inRange(5));\n assertFalse(test1.moveToPos(-5));\n assertFalse(test1.getValue().inRange(-5));\n assertFalse(test1.moveToPos(50));\n assertFalse(test1.getValue().inRange(50));\n }", "@Test\n public void testCondition1() throws ArgumentOutOfBoundsException\n {\n // Check that position is changed as expected:\n Double[] expected = {5.0, 5.0, 1.0};\n _renderable.position(expected);\n Double actual[] = _renderable.position();\n assertEquals(\"x coordinate did not get set,\", expected[0], actual[0], 0.01);\n assertEquals(\"y coordinate did not get set,\", expected[1], actual[1], 0.01);\n assertEquals(\"z coordinate did not get set,\", expected[2], actual[2], 0.01);\n }", "@Test\r\n\tpublic void testGetNewPosition() {\r\n\t\tBoard board = new Board(validSquareLocations); // board needs to have squares for this to be tested\r\n\t\tint actualNewPosition;\r\n\t\tactualNewPosition = board.getNewPosition(validCurrentPosition, validDieValue);\r\n\t\tassertEquals(actualNewPosition, expectedNewPosition);\r\n\t}", "@Test\n public void getPosition() {\n // Testing for Shape Rectangle that mutates its position and see the position match.\n assertEquals(defaultPosition1, defaultShape1.getPosition());\n Position newRectanglePosition = new Position(30, 30);\n defaultShape1 = new Rectangle(defaultColor1, newRectanglePosition, defaultSize1);\n assertEquals(newRectanglePosition, defaultShape1.getPosition());\n // Testing for Shape Oval that mutates its position and see the position match for Oval.\n assertEquals(defaultPosition2, defaultShape2.getPosition());\n Position newOvalPosition = new Position(60, 60);\n defaultShape2 = new Oval(defaultColor2, newOvalPosition, defaultSize2);\n assertEquals(newOvalPosition, defaultShape2.getPosition());\n // Both Tpe of Shape\n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "public void testGetNewPosition1() {\n WayPointEvent event = new WayPointEvent(edge, wayPoint, offset);\n\n assertEquals(\"Failed to get the correct new position.\", new Point(170, 160), event.getNewPosition());\n }", "@Test\n public void setGetPosition() {\n final CourseType courseType = new CourseType();\n final Integer POSITION = 5;\n courseType.setPosition(POSITION);\n\n assertSame(POSITION, courseType.getPosition());\n }", "public void testGetStartLocation() {\n assertEquals(test, maze1.getStartLocation());\n }", "@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}", "int getPosition();", "private Position getTestPos1() {\r\n Grid grid = GridBuilder.builder()\r\n .withMaxX(10)\r\n .withMaxY(10)\r\n .withMinY(-20)\r\n .withMinY(-20)\r\n .build();\r\n Moveable moveable = MoveableBuilder.builder()\r\n .withGrid(grid)\r\n .withShape(PositionShapeBuilder.builder()\r\n .withPosition(Positions.of(Directions.S, 0, 0, 0))\r\n .build())\r\n .withVelocity(100)\r\n .build();\r\n moveable.moveForward();\r\n moveable.turnRight();\r\n moveable = MoveableBuilder.builder()\r\n .withGrid(grid)\r\n .withShape(PositionShapeBuilder.builder()\r\n .withPosition(moveable.getPosition())\r\n .build())\r\n .withVelocity(50)\r\n .build();\r\n moveable.moveForward();\r\n PositionImpl position = (PositionImpl) moveable.getPosition();\r\n moveable.makeTurn(position.calcAbsoluteAngle() - position.getDirection().getAngle());\r\n return moveable.getPosition();\r\n }", "public void case4_Position() {\r\n Position testPosition = new Position(0,0);\r\n\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void case2_Position() {\r\n Position testPosition = new Position(6, 7);\r\n\r\n }", "public void testGetNewPosition2() {\n WayPointEvent event = new WayPointEvent(edge, 0, offset);\n\n Point pt = edge.getWayPoints().get(0).getCenter();\n assertEquals(\"Failed to get the correct new position.\", new Point(50 + pt.x, 60 + pt.y),\n event.getNewPosition());\n }", "@Test\r\n\tpublic void testSetPosition(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPosition(10, 40);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t\tassertEquals(40, title.getPositionY());\r\n\t}", "Position getPosition();", "Position getPosition();", "@Test\n public void testCondition3() throws ArgumentOutOfBoundsException\n {\n Double[] coordinates = null;\n Double before[] = _renderable.position();\n _renderable.position(coordinates);\n Double after[] = _renderable.position();\n assertEquals(\"position array changed\", before[0], after[0], 0.01);\n assertEquals(\"position array changed\", before[1], after[1], 0.01);\n assertEquals(\"position array changed\", before[2], after[2], 0.01);\n }", "Object getPosition();", "public void testBoardAvailablePositions() {\n \tassertTrue(board6.hasAvailablePositionsForTile());\n \tList<PlacementLocation> expected = new ArrayList<PlacementLocation>();\n \tboard6.place(new Placement(Color.RED, 5, 21, Color.RED, 4, 16));\n \tboard6.place(new Placement(Color.RED, 4, 12, Color.RED, 5, 14));\n \tboard6.place(new Placement(Color.RED, 4, 8, Color.RED, 5, 11));\n \tboard6.place(new Placement(Color.RED, 5, 4, Color.RED, 4, 4));\n \tboard6.place(new Placement(Color.RED, 5, 1, Color.RED, 4, 0));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(5, 26))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 20))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(5, 24))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 29))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 30))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(6, 31))));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(5, 23))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(3, 15))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(5, 27))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 33))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 35))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 37))));\n \t\n \t\n \tfor (PlacementLocation location : board6.getAvailablePositionsForTile()) {\n \t\tif (!expected.contains(location))\n \t\t\tSystem.out.println(\"expected does not contain location: \" + location);\n \t}\n \tSet<PlacementLocation> locations = board6.getAvailablePositionsForTile();\n \tfor (PlacementLocation location : locations) {\n \t\tSystem.out.println(location);\n \t}\n \tfor (PlacementLocation location : expected) {\n \t\tif (!locations.contains(location))\n \t\t\tSystem.out.println(\"expected2 does not contain location: \" + location);\n \t}\n \t\n \tassertEquals(expected, board6.getAvailablePositionsForTile());\n \t\n \t\n }", "@Test\r\n\tpublic void testLocation() {\r\n\t\tLocation l = new Location(3, 3);\r\n\t\tassertEquals(l.getCol(), 3);\r\n\t\tassertEquals(l.getRow(), 3);\r\n\t}", "@Test(expected = IllegalArgumentException.class)\r\n public void case1_Position() {\r\n Position testPosition = new Position(-1, -2);\r\n\r\n }", "@Test\r\n\tpublic void testGetPositionY(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionY(25);\r\n\t\t\r\n\t\tassertEquals(25, title.getPositionY());\r\n\t}", "@Test\n public void testNullPositionEquals(){\n assertFalse(Maze.position(0,0).equals(null));\n }", "@Override\n public int getPosition() {\n return position;\n }", "@Test\n public void testRookPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(0, chessBoard.getPiece(0, 0).getRow());\n assertEquals(0, chessBoard.getPiece(0, 0).getColumn());\n\n assertEquals(0, chessBoard.getPiece(0, 7).getRow());\n assertEquals(7, chessBoard.getPiece(0, 7).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 0).getRow());\n assertEquals(0, chessBoard.getPiece(7, 0).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 7).getRow());\n assertEquals(7, chessBoard.getPiece(7, 7).getColumn());\n }", "@Test\n public void testGeneralPos() {\n Game game = new Game(2);\n FaithTrack faith = game.getPlayers().get(0).getFaithTrack();\n faith.increasePos(6);\n assertEquals(faith.getTrackPos(), 6);\n assertTrue(faith.isVatican());\n assertEquals(faith.getVaticanSection(), 1);\n assertFalse(faith.isPopeSpace());\n assertEquals(faith.getPosPoints(), 2);\n faith.increasePos(2);\n assertTrue(faith.isVatican());\n assertEquals(faith.getVaticanSection(), 1);\n assertTrue(faith.isPopeSpace());\n }", "public int getPos();", "public int getPos();", "@Test\n\t\tpublic void canGiveTheseusLocation() {\n\t\t\tPoint whereTheseus = new Pointer(3,3);\n\t\t\tgameLoader.addTheseus(whereTheseus);\n\t\t\tPoint expected = whereTheseus;\n\t\t\tPoint actual = gameSaver.wheresTheseus();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}", "public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}", "@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }", "@Override\n\tpublic int getPos() {\n\t\treturn 0;\n\t}", "public int getPosition();", "@Test\n public void testPlayerLocationX() {\n assertEquals(5, controller.getPlayerX());\n }", "@Test\n\tpublic final void nextPositionStopTest() {\n\t\tplayer.setRight(false);\n\t\tplayer.setLeft(false);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), 0, 0);\n\t}", "@Test \r\n public void case3_Position() {\r\n Position testPosition = new Position(2, 3);\r\n\r\n }", "@Test\n\t\tpublic void canGiveMinotaurLocation() {\n\t\t\tPoint whereMinotaur = new Pointer(1,3);\n\t\t\tgameLoader.addMinotaur(whereMinotaur);\n\t\t\tPoint expected = whereMinotaur;\n\t\t\tPoint actual = gameSaver.wheresMinotaur();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}", "@Test\n public void testGetOriginCol() {\n setUp();\n assertEquals(5, move.getOriginCol());\n tearDown();\n }", "public void checkPosition(){\n int absPos = mArm.getSensorCollection().getPulseWidthPosition();\n // mArm.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder);\n mArm.setSelectedSensorPosition(absPos - offset);\n }", "@Test\n public void testPawnPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n // compare the position of the pawn on the table to the correct position\n for (int i = 0; i < 8; ++i) {\n assertEquals(1, chessBoard.getPiece(1, i).getRow());\n assertEquals(i, chessBoard.getPiece(1, i).getColumn());\n\n assertEquals(6, chessBoard.getPiece(6, i).getRow());\n assertEquals(i, chessBoard.getPiece(6, i).getColumn());\n }\n }", "@Test\n public void testLocateManager() {\n System.out.println(\"locateManager\");\n int x = 0;\n int y = 0; \n //instance.locateManager(x, y);\n \n }", "@Test\n public void test_CurrentLocation() {\n \n setup(154, 1);\n \n // Tests the player's current location.\n assertEquals(SolarSystems.ADI, player.getSolarSystems());\n \n }", "@Test\n\tpublic void test() {\n\t\tif(D.getPosition()>2 || D.getPosition()<0)\n\t\t{\n\t\t\tfail(\"La position est hors categorie\");\n\t\t}\n\t}", "public void testGetGoalLocation() {\n test = new Location(9, 9);\n assertEquals(test, maze1.getGoalLocation());\n }", "@Test\n void initPosition() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.initPlayer();\n\n assertTrue(p.getPh().getPowerupDeck().getSize() == 2);\n\n Powerup pu = p.getPh().getPowerupDeck().getPowerups().get(0);\n p.initPosition(p.getPh().getPowerupDeck().getPowerups().get(0).getName(), p.getPh().getPowerupDeck().getPowerups().get(0).getColor() );\n\n assertTrue(p.getPh().getPowerupDeck().getSize() == 1 && Board.getSpawnpoint(p.getPlayerPosition().getNum()).getColor() == pu.getColor());\n }", "public int PositionGet();", "public abstract int getStartPosition();", "@Override\n public Position getPosition() {\n return position;\n }", "public abstract String getPos();", "public abstract Position getPosition();", "@Test\n public void testDoorPosition() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n assertEquals(new Position((TerrainFactoryImpl.TERRAIN_COLUMNS - 2) * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE,\n (TerrainFactoryImpl.TERRAIN_ROWS - 2) * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE),\n TerrainFactoryImpl.DOOR_POSITION);\n level.levelUp(); \n });\n }", "public long getPosition();", "public int getPosition() {\n log.log(Level.FINE, \"position: \" + position + \"ms\");\n return position;\n }", "@Override\n public Position getPosition() {\n return Position.UNKNOWN;\n }", "@Test\n public void testGetOnlinePosition() {\n assert false : \"testGetOnlinePosition not implemented.\";\n }", "public int getPos()\n {\n return pos;\n }", "@Test\n public void testGetPawnPositionsAround() {\n assertNotNull(this.board.getPawnPositionsAround(Pawn.ZEN));\n assertNotNull(this.board.getPawnPositionsAround(Pawn.RED));\n assertNotNull(this.board.getPawnPositionsAround(Pawn.RED));\n }", "@java.lang.Override\n public boolean hasPosition() {\n return position_ != null;\n }", "@java.lang.Override\n public boolean hasPosition() {\n return position_ != null;\n }", "public void testGetCell() {\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(10, 10);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(-1, -1);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(-1, 0);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n test = new Location(0, -1);\n assertEquals(MazeCell.INVALID_CELL, maze1.getCell(test));\n }", "public int getPos()\n {\n return pos;\n }", "private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }", "@Test\n\tpublic void testBoardCoordinates() {\n\n\t\ttry {\n\t\t\tAssert.assertTrue((0 == Board.getFieldIndex(\"A1\")));\n\t\t\tAssert.assertTrue((8 == Board.getFieldIndex(\"A2\")));\n\t\t\tAssert.assertTrue((1 == Board.getFieldIndex(\"B1\")));\n\t\t\tAssert.assertTrue((9 == Board.getFieldIndex(\"B2\")));\n\t\t\tAssert.assertTrue((63 == Board.getFieldIndex(\"h8\")));\n\t\t} catch (IllegalBoardException e) {\n\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t}", "org.mojolang.mojo.lang.Position getStartPosition();", "public abstract int ranXPos();", "@Test\n public final void testNormalSetPositionStart() {\n int expResX = 2;\n int expResY = 3;\n int resultX = ship.getX();\n int resultY = ship.getY();\n assertEquals(expResX, resultX);\n assertEquals(expResY, resultY);\n // Ship s = new Ship(1, true, 4, 5);\n IShip s = createShip(1, true, 4, 5);\n expResX = 4;\n expResY = 5;\n resultX = s.getX();\n resultY = s.getY();\n assertEquals(expResX, resultX);\n assertEquals(expResY, resultY);\n }", "boolean hasStartPosition();", "boolean hasStartPosition();", "@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}", "public Position getPosition();", "public Position getPosition();", "public Position getPosition();", "RealLocalizable getPosition();", "public long getPos()\n\t{\n\t\treturn -1;\n\t}", "public int getX() { return position.x; }", "@Test\n\tpublic void testSetPositionWithoutUpdate() {\n\t}", "@Test\n public void testGeneratePositionsFrom() {\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n Position position = new Position(line, column);\n assertNotNull(this.board.generatePositionsFrom(position));\n }\n }\n }", "public int getPosition(){\n return -1;\n }", "public int getPosition()\n\t{\n\t\treturn position;\n\t}", "public int getPosition()\r\n {\r\n return position;\r\n }", "public Point getPosition(){\n\t\treturn position;\n\t}", "int getStartPosition();", "int getStartPosition();", "public void testCurrPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "Tile getPosition();", "@Test\n\tpublic void testGetters() {\n\t\tEngine engine = new Engine(20);\n\t\tCoordinate point = new Coordinate(5,5);\n\t\tCoordinate playerLocation = engine.getMoveableObject(0).getLocation();\n\t\tint playerX = playerLocation.getX();\n\t\tint playerY = playerLocation.getY();\n\t\tassertEquals(\"failure - didn't create coordinate x-val\", 5, point.getX(), 0.0);\n\t\tassertEquals(\"failure - didn't create coordinate y-val\", 5, point.getY(), 0.0);\n\t\tassertEquals(\"failure - didn't get player's x coordinate correctly\", 3, playerX, 0.0);\n\t\tassertEquals(\"failure - didn't get player's y coordinate correctly\", 3, playerY, 0.0);\n\t\t}", "public void testGetOldPosition2() {\n WayPointEvent event = new WayPointEvent(edge, 0, offset);\n\n Point expectedOldPosition = edge.getWayPoints().get(0).getCenter();\n Point pt = event.getOldPosition();\n\n assertEquals(\"Failed to get the correct old position.\", expectedOldPosition, pt);\n\n // verify the point should be set by clone\n pt.x = 876;\n assertEquals(\"The old position getter should return a cloned point.\", expectedOldPosition,\n event.getOldPosition());\n }" ]
[ "0.80618167", "0.76630765", "0.7300328", "0.72015256", "0.7172408", "0.7164219", "0.7146506", "0.7081903", "0.7031199", "0.70033777", "0.69766074", "0.6958146", "0.6934254", "0.6798414", "0.67746794", "0.67746794", "0.67746794", "0.67746794", "0.6756048", "0.6715234", "0.67010665", "0.6694234", "0.66929424", "0.66818035", "0.66362214", "0.6607129", "0.657513", "0.65742505", "0.6573207", "0.6573207", "0.6563456", "0.6558367", "0.6556945", "0.6545285", "0.6537703", "0.6533232", "0.6525822", "0.64981997", "0.64932674", "0.64843965", "0.64778906", "0.64778906", "0.6470308", "0.6469607", "0.6468155", "0.6459167", "0.64579517", "0.6449451", "0.64192826", "0.641683", "0.6402455", "0.63990235", "0.6397892", "0.63934296", "0.6389615", "0.6377378", "0.63629675", "0.6361476", "0.6360354", "0.6353566", "0.6339015", "0.632864", "0.63238716", "0.63155454", "0.6315013", "0.63112116", "0.63027364", "0.6294165", "0.6293579", "0.62886864", "0.6285152", "0.6276241", "0.6276241", "0.62595284", "0.6247965", "0.62387896", "0.62289155", "0.62174773", "0.62140894", "0.62080574", "0.6187395", "0.6187395", "0.6183492", "0.6181657", "0.6181657", "0.6181657", "0.6174718", "0.61684144", "0.614919", "0.61469215", "0.6141763", "0.61387306", "0.61373556", "0.6135067", "0.61349577", "0.613151", "0.613151", "0.61210585", "0.6119306", "0.611262", "0.6100644" ]
0.0
-1
end of test This method prints the game board to the screen.
public void print(){ System.out.println(" "); System.out.println(" "); System.out.println(" "); System.out.println(" "); System.out.println(" ~ THREE ROOM DUNGEON GAME ~ "); for(int i = 0; i < this.area.length;i++){ System.out.println(" "); System.out.print(" "); for(int p = 0 ; p < this.area.length; p++){ if(this.Garret[i][p] == 1){ System.out.print(":( "); } else if(this.Ari[i][p] ==1){ System.out.print(" ? "); } else if(this.position[i][p] ==1){ System.out.print(" + "); } else if(this.Items[i][p] != null){ System.out.print("<$>"); } else if(this.Door[i][p] ==1){ System.out.print(" D "); } else if(this.Stairs[i][p] ==1){ System.out.print(" S "); } else{ System.out.print(this.area[i][p]); } }//end of inner for print }//end of outter for print }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }", "static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }", "public void printBoard() {\r\n\t\tBoard.printBoard(this.board);\r\n\t}", "public void showBoard() {\n System.out.println(\"The board is\");\n System.out.println(\"| 1 | 2 | 3 |\\n| 4 | 5 | 6 | \\n| 7 | 8 | 9 |\");\n }", "public static void printBoard() {\n\t\tSystem.out.println(\"Board:\");\r\n\t\tfor(int i=0; i<BoardSquare.numberOfSquare; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(String.format(\"%4s\", (i+1) + \":\"));\r\n\t\t\tif(BoardGame.board.get(i).isPlayerOne()) System.out.print(\" P1\"); \r\n\t\t\tif(BoardGame.board.get(i).isPlayerTwo()) System.out.print(\" P2\");\r\n\t\t\tif(BoardGame.board.get(i).isHasCard()) System.out.print(\" C\");\t\t\t\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}", "public void displayBoard(){\r\n System.out.println(board.toString());\r\n }", "public void printBoard() {\r\n\t\tif (getOpenTiles() != 0) {\r\n\t\t\tSystem.out.println(\"\\n\\nCurrent open tiles: \" + getOpenTiles() + \" | Total moves: \" + getMoves() + \" | Current board:\");\r\n\t\t}for (int i = 0; i < gameBoard.length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard[i].length; j++) {\r\n\t\t\t\tif (gameBoard[i][j] != 0) {\r\n\t\t\t\t\tSystem.out.print(gameBoard[i][j]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}System.out.print(\" | \");\r\n\t\t\t}System.out.print(\"\\n--+\");\r\n\t\t\tfor (int k = 0; k < getSize(); k++) {\r\n\t\t\t\tSystem.out.print(\"---+\");\r\n\t\t\t}System.out.println();\r\n\t\t}\r\n\t}", "public void printBoard() {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+getPiece(j, i).getColor().toString().charAt(0)+getPiece(j, i).getName().charAt(0)+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "public static void printBoard() {\n System.out.println(\"\\t-------------\");\n for (int row = 0; row < SIZE_ROW; row++) {\n System.out.print(\"\\t| \");\n for (int col = 0; col < SIZE_COL; col++) {\n System.out.print(board[row][col] + \" | \");\n }\n System.out.println(\"\\n\\t-------------\");\n }\n }", "public void printBoard() {\n\t\tSystem.out.print(\"\\r\\n\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\");\n\t\tfor(int i = BOARD_SIZE ; i > 0 ; i--) {\n\t\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\t\tfor(int j = 0; j < BOARD_SIZE ; j++) {\n\t\t\t\tif(j == 0) {\n\t\t\t\t\tSystem.out.print(i + \" |\");\n\t\t\t\t} \n\t\t\t\tif(this.tiles.get(i).get(j).getPiece() != null) {\n\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece().getColor() == PrimaryColor.BLACK) {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" B |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"B Q|\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" W |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"W Q|\");\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\" |\");\n\t\t\t\t}\n\n\t\t\t\tif(j==BOARD_SIZE-1) {\n\t\t\t\t\tSystem.out.print(\" \" + i); \n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\\r\\n\");\n\n\t}", "static void showBoard() \n\t{\n\t\tSystem.out.println(\"|---|---|---|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[1] + \" | \" + tictactoeBoard[2] + \" | \" + tictactoeBoard[3] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[4] + \" | \" + tictactoeBoard[5] + \" | \" + tictactoeBoard[6] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[7] + \" | \" + tictactoeBoard[8] + \" | \" + tictactoeBoard[9] + \" |\");\n\t\tSystem.out.println(\"|---|---|---|\");\n\t}", "public void printBoard() {\n System.out.println(\"---+---+---\");\n for (int x = 0; x < boardLength; x++) {\n for (int y = 0; y < boardWidth; y++) {\n char currentPlace = getFromCoordinates(x, y);\n System.out.print(String.format(\" %s \", currentPlace));\n\n if (y != 2) {\n System.out.print(\"|\");\n }\n }\n System.out.println();\n System.out.println(\"---+---+---\");\n }\n }", "public void showGameBoard() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out\n .printf(\"%3d\", playingBoard[row][col].getMoveNumber());\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n }\n }\n }\n }", "public void PrintBoard() {\n\tSystem.out.println(\"printing from class\");\n\t\tString[][] a = this.piece;\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 <- X axis\");\n\t\tSystem.out.println(\" +----------------+ \");\n\t\t\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tSystem.out.print(i + \" |\");\n\t\t\tfor (int j=0; j<8;j++) {\n\t\t\t\t\n\t\tSystem.out.print(\"\" + a[i] [j] + \" \");\n\t\t\t\t\t} \n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t\tSystem.out.println(\" +----------------+ \");\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 \");\n\t\n\t}", "public void printBoard() {\n String value = \"\";\n renderBoard();\n System.out.println(\"\");\n // loop to print out values in rows and columns\n for (int i = 0; i < game.getRows(); i++) {\n for (int j = 0; j < game.getCols(); j++) {\n if (grid[i][j] == 0)\n value = \".\";\n else\n value = \"\" + grid[i][j];\n System.out.print(\"\\t\" + value);\n }\n System.out.print(\"\\n\");\n }\n }", "public static void printBoard() {\n int separatorLen = 67;\n StringBuilder boardString = new StringBuilder();\n boardString.append(new String(new char [separatorLen]).replace(\"\\0\",\"*\"));\n boardString.append(\"\\n\");\n for(int y = Y_UPPER_BOUND - 1; y >= 0; y--)\n {\n boardString.append(y + 1).append(\" \");\n boardString.append(\"*\");\n for (int x = 0; x < X_UPPER_BOUND; x++)\n {\n Piece p = Board.board[x + y * X_UPPER_BOUND];\n if(p != null)\n {\n boardString.append(\" \").append(p).append(p.getColor()? \"-B\":\"-W\").append(\" \").append((p.toString().length() == 1? \" \":\"\"));\n }\n else\n {\n boardString.append(\" \");\n }\n boardString.append(\"*\");\n }\n boardString.append(\"\\n\").append((new String(new char [separatorLen]).replace(\"\\0\",\"*\"))).append(\"\\n\");\n }\n boardString.append(\" \");\n for(char c = 'A'; c <= 'H';c++ )\n {\n boardString.append(\"* \").append(c).append(\" \");\n }\n boardString.append(\"*\\n\");\n System.out.println(boardString);\n }", "private void printBoard() {\n\n for (int j=Board.getSize()-1; j >= 0; j--) {\n for (int i=0; i < Board.getSize(); i++) {\n // make sure indexes get printed for my pieces\n if (board.layout[i][j] == player) {\n //System.out.print(\" \"+ getPieceIndex(i,j)+ \" \");\n } else {\n System.out.print(\" \"+ board.layout[i][j]+ \" \");\n }\n }\n System.out.print(\"\\n\");\n\n }\n }", "public static void printBoard() {\n\t\tfor (int i = 0; i<3; i++) {\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j<3; j++) {\n\t\t\t\tif (j == 0) {\n\t\t\t\t\tSystem.out.print(\"| \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(board[i][j] + \" | \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printBoard() {\n\t\t// loop through board and add appropriate character based on board\n\t\t// contents\n\n\t\t// for each board column\n\t\tfor (int row = 0; row < board.length; row++) {\n\t\t\t// for each board row\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\n\t\t\t\tif (board[row][col] == 0) {\n\t\t\t\t\tSystem.out.println(\" \");\n\t\t\t\t} else if (board[row][col] == 1) {\n\t\t\t\t\tSystem.out.println(\"X\");\n\t\t\t\t} else if (board[row][col] == 2) {\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}\n\n\t\t\t\t// set the dividers\n\t\t\t\tif (col < board[row].length) {\n\t\t\t\t\tSystem.out.print(\"|\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"-----\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check if the board is occupied by player X, or player O, or neither\n\t\t// Print the correct character to the screen depending on the contents\n\t\t// of the square\n\t\t// System.out.print(\"stuff\") will print things on the same row\n\n\t\t// System.out.print(\"/n\") or System.out.println() will print a new line\n\t\t// Don't forget to add in the grid lines!\n\t}", "public void printboard(){\n \tfor(int i=0;i<9;i+=3){\n\t\t\t System.err.println(board[i]+board[i+1]+board[i+2]);\n\t\t\t}\n }", "private static void showBoard()\n {\n System.out.println(board[1] + \" | \" + board[2] + \" | \" + board[3]);\n System.out.println(\"----------\");\n System.out.println(board[4] + \" | \" + board[5] + \" | \" + board[6]);\n System.out.println(\"----------\");\n System.out.println(board[7] + \" | \" + board[8] + \" | \" + board[9]);\n }", "public void printBoard() {\n\t\tSystem.out.println();\n\t\tint i;\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tSystem.out.print(board[13 - i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.printf(\" \");\n\t\twhile (i < 14) {\n\t\t\tSystem.out.print(board[i - 7] + \" \");\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printBoard() {\n\t\tfor (int colIndex = 0; colIndex < 4; colIndex++){\n\t\t\tfor (int rowIndex = 0; rowIndex < 4; rowIndex++){\n\t\t\t\tSystem.out.print(this.myBoard[colIndex][rowIndex] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void draw() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\" \" + board[0][0] + \" | \" + board[0][1] + \" | \"\n\t\t\t\t+ board[0][2]);\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\"---+---+---\");\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\" \" + board[1][0] + \" | \" + board[1][1] + \" | \"\n\t\t\t\t+ board[1][2]);\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\"---+---+---\");\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\" \" + board[2][0] + \" | \" + board[2][1] + \" | \"\n\t\t\t\t+ board[2][2]);\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println();\n\t}", "public void displayToScreen(){\n System.out.println(convertBoardToString());\n delay();\n }", "public void print_board(){\n\t\tfor(int i = 0; i < size*size; i++){\n\t\t\tif(i%this.size == 0) System.out.println(); //just for divider\n\t\t\tfor(int j = 0; j < size*size; j++){\n\t\t\t\tif(j%this.size == 0) System.out.print(\" \"); //just for divider\n\t\t\t\tSystem.out.print(board[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }", "public static void printBoard() {\n\t\tint i = 0;\n\t\tint j = 0;\n\n\t\t// Row Counter\n\t\tfor (i = 0; i < numPeople; i++) {\n\n\t\t\t// Column Counter\n\t\t\tfor (j = 0; j < numPeople; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\n\t\t}\n\n\t}", "public void printBoard() {\n System.out.println(\"Updated board:\");\n for (int row = 0; row < size; row++) {\n for (int col = 0; col < size; col++) {\n\n System.out.print(grid[row][col] + \" \");\n\n }\n System.out.println(\"\");\n }\n }", "public void ShowBoard(){\n System.out.println(\" ___________{5}_____{4}_____{3}_____{2}_____{1}_____{0}____________\");\n System.out.println(\"| ____ ____ ____ ____ ____ ____ ____ ____ |\");\n System.out.printf(\"| | | [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] | | |\\n\",\n this.gameBoard[5], this.gameBoard[4], this.gameBoard[3],\n this.gameBoard[2], this.gameBoard[1], this.gameBoard[0]);\n System.out.println(\"| | | | | |\");\n System.out.printf(\"| | %2d | ____ ____ ____ ____ ____ ____ | %2d | |\\n\",\n this.gameBoard[6], this.gameBoard[13]);\n System.out.printf(\"| |____| [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] |____| |\\n\",\n this.gameBoard[7], this.gameBoard[8], this.gameBoard[9],\n this.gameBoard[10], this.gameBoard[11], this.gameBoard[12]);\n System.out.println(\"|_________________________________________________________________|\");\n }", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "public void printBoard() {\n\t\tfor (int row=8; row>=0;row--){\n\t\t\tfor (int col=0; col<9;col++){\n\t\t\t\tSystem.out.print(boardArray[col][row]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}", "private void printBoard() {\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n System.out.print(board[j][i] + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "@Override\n public void printBoard(PrintStream output) {\n this.board.printBoard();\n }", "void displayBoard();", "public static void printBoard(){\n \n System.out.println(board[0][0] + \" | \" + board[0][1] + \" | \" + board[0][2]);\n System.out.println(board[1][0] + \" | \" + board[1][1] + \" | \" + board[1][2]);\n System.out.println(board[2][0] + \" | \" + board[2][1] + \" | \" + board[2][2]);\n \n }", "public void display() { \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tSystem.out.print(\"|\"); \r\n\t\t\tfor (int j=0; j<3; j++){ \r\n\t\t\t\tSystem.out.print(board[i][j] + \"|\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(); \r\n\t\t}\r\n\t\tSystem.out.println(); \r\n\t}", "public void Display_Boards(){\r\n\t\tfor(int i=0; i<13; i++){\r\n\t\t\tdisplay.putStaticLine(myBoard.Display(i)+\" \"+hisBoard.Display(i));\r\n\t\t}\r\n\t}", "public void printBoard()\n {\n // Print column numbers;\n System.out.print(\" \");\n for (int index = 0; index < columns; index++)\n System.out.print(\" \" + index);\n\n System.out.println();\n\n // Print the row numbers and the board contents.\n for (int index = 0; index < rows; index++)\n {\n System.out.print(index);\n\n for (int index2 = 0; index2 < columns; index2++)\n System.out.print(\" \" + board[index][index2]);\n\n System.out.println();\n }\n\n }", "private void boardPrint(){\t\t\n\t\tfor (int i=0;i<size;i++) {\n\t for (int j=0;j<size;j++) {\n\t System.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t for (int j=0;j<size;j++) {\n\t \tint value = (i*size) + j + 1;\n\t \tif(board[i][j] == '\\u0000'){\n\t \t\tif(value < 10)\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t\telse\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t}\n\t \telse\n\t \t\tSystem.out.print(\"| \"+ board[i][j] + \" |\");\n\t }\n\t System.out.println();\n\t }\n\n\t for (int i=0;i<size;i++){\n\t \tSystem.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t}", "public void draw()\n\t{\n\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t\n\t\tfor (int i = 0; i < board_size; i++)\n\t\t{\n\t\t\tSystem.out.print(board_size - i + \" |\");\n\t\t\t\n\t\t\tfor (int j = 0; j < board_size; j++)\n\t\t\t{\n\t\t\t\tif (getPiece(i,j) == null) {System.out.print(\" |\");}\n\t\t\t\telse {System.out.print(\" \" + getPiece(i,j).getSymbol().toChar() + \" |\");}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" A B C D E F G H \\n\");\n\t}", "public void gameBoard()\t\n\t{\n\t\tSystem.out.println();\n\t\t\n\t\t// for loop to read through the board array\n\t\tfor( int i = 0; i < board.length; i++ )\n\t\t{\n\t\t\tboard[ i ] = \" \";\n\t\t\t\n\t\t} // end of for( int i = 0; i < board.length; i++ )\n\t\t\n\t\t// prints the top vertical lines to create the board\n\t\tSystem.out.println( \" \" + board[ 1 ] + \" | \" + board[ 2 ] + \" | \" \n\t\t + board[ 3 ] );\n\t\t\n\t\t// prints top most horizontal line to create the board\n\t\tSystem.out.println( \"____________________________\");\n\t\t\n\t\t// prints the middle vertical lines to create the board\n\t\tSystem.out.println( \" \" + board[ 4 ] + \" | \" + board[ 5 ] + \" | \" \n + board[ 6 ] );\n\t\t\n\t\t// prints the second horizontal line to create the board\n\t\tSystem.out.println( \"____________________________\");\n\t\t\n\t\t// prints the middle vertical lines to create the board\n\t\tSystem.out.println( \" \" + board[ 7 ] + \" | \" + board[ 8 ] + \" | \" \n + board[ 9 ] );\n\t\t\n\t}", "private static void showBoard() {\n for (int i = 1; i < 10; i++) {\n for (int j = 1; j < 4; j++) {\n System.out.println(j + \".\" + board[i]);\n }\n\n }\n }", "public static void drawBoard(){\n\t\tSystem.out.println(\"\\n\\t A B C\");\r\n\t\tSystem.out.println(\"\\t .-----------.\");\r\n\t\tSystem.out.println(\"\\t1 |_\"+TicTac.place[0]+\"_|_\"+TicTac.place[1]+\"_|_\"+TicTac.place[2]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t2 |_\"+TicTac.place[3]+\"_|_\"+TicTac.place[4]+\"_|_\"+TicTac.place[5]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t3 |_\"+TicTac.place[6]+\"_|_\"+TicTac.place[7]+\"_|_\"+TicTac.place[8]+\"_|\");\r\n\t\tSystem.out.println(\"\\t '-----------'\");\r\n\t}", "public void printBoard(){\n\t\tfor(int row = 0; row <9; row++)\n\t\t{\n\t\t\tfor(int column = row; column<25-row; column++)\n\t\t\t{\n\t\t\t\tBoard[row][column]='O';\n\t\t\t}\n\t\t}\n\t\tfor(int iteration_i = 0;iteration_i<9;iteration_i++){\n\t\t\tfor(int iteration_j=0;iteration_j<25;iteration_j++)\n\t\t\t{\t\n\t\t\t\tif (Board[iteration_i][iteration_j]=='\\u0000')\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(Board[iteration_i][iteration_j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void printBoard(Tile[][] gameState) {\n\t\tint boardSize = gameState.length;\n\t\tSystem.out.println(printBoardLine());\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tSystem.out.print(\"|\");\n\t\t\t\tif (gameState[i][j].getColorValue().equals(black)) {\n\t\t\t\t\tSystem.out.print(\" b \");\n\t\t\t\t} else if (gameState[i][j].getColorValue().equals(white)) {\n\t\t\t\t\tSystem.out.print(\" w \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"|\");\n\t\t\tSystem.out.println(printBoardLine());\n\t\t}\n\t}", "public void printShipBoard() {\n\t\tSystem.out.println(Arrays.deepToString(this.shipBoard));\n\t}", "public void displayBoard(Board board) { //Print the whole current board\n System.out.print(\"\\n \");\n System.out.print(\"A B C D E F G H\");\n System.out.println();\n for (int row = 0; row < BOARD_SIZE; row++) {\n System.out.print((row + 1) + \" \");\n for (int column = 0; column < BOARD_SIZE; column++) {\n System.out.print(board.board[row][column] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n }", "public void printBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n System.out.print(board[i][j]);\n }\n if(i == 0) {\n System.out.print(\" Apples eaten: \" + appleCount);\n }\n System.out.println(\"\");\n }\n }", "public void printBoard() {\nString xAxis[] = {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"};\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tfor(int i = 0; i<8;i++) {\n\t\t\tSystem.out.print((i + 1) + \"\\t\");\n\t\t\tfor(int j = 0; j<8;j++) {\n\t\t\t\tSystem.out.print(board.getBoard()[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayBoard()\n {\n System.out.println(\"\");\n System.out.println(\" Game Board \");\n System.out.println(\" ---------------------------------\");\n for (int i = 0; i < ROW; i++)\n {\n System.out.print(i+1 + \" | \");\n for (int j = 0; j < COL; j++)\n {\n //board[i][j] = \"A\";\n System.out.print(board[i][j].getPieceName() + \" | \");\n }\n System.out.println();\n }\n System.out.println(\" ---------------------------------\");\n\n System.out.println(\" a b c d e f g h \");\n }", "private void displayBoard(Board board)\n {\n for (int i = 0; i < size; i++)\n {\n System.out.print(\"|\");\n for (int j = 0; j < size; j++)\n \n System.out.print(board.array[i][j] + \"|\");\n System.out.println();\n }\n }", "private void renderBoard() {\n Cell[][] cells = gameBoard.getCells();\n StringBuilder battleField = new StringBuilder(\"\\tA B C D E F G H I J \\n\");\n\n for (int i = 0; i < cells.length; i++) {\n battleField.append(i+1).append(\"\\t\");\n for (int j = 0; j < cells[i].length; j++) {\n if (cells[i][j].getContent().equals(Content.deck)) {\n battleField.append(\"O \");\n } else {\n battleField.append(\"~ \");\n }\n }\n battleField.append(\"\\n\");\n }\n\n System.out.println(battleField.toString());\n }", "public void drawBoard() {\n String[][] strBoard= new String[4][4];\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n if(board[x][y]==0) {\n strBoard[x][y]= \".\";\n }\n else {\n // set color\n if(board[x][y]%3==2) {\n }\n strBoard[x][y]= \"\"+board[x][y];\n }\n }\n }\n \n String line= \"---------------------------------\";\n System.out.println(line);\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n System.out.print(\"|\"+strBoard[x][y]+\"\\t\");\n }\n System.out.println(\"|\");\n }\n System.out.println(line);\n }", "public void printBoard(LightModel board){\n String separatorSx = \"| \";\n String centralSep = \" | \";\n String separatorDx = \" |\";\n\n for(LightPlayer lp : board.getPlayers()){\n playersInfo.append(lp.getColor().toString()).append(\" = \").append(lp.getName()).append(\" \");\n }\n System.out.println(playersInfo);\n playersInfo.setLength(0);\n for(int j=0; j<=4;j++) {\n floorInfo.append(\"| \");\n pawnInfo.append(separatorSx);\n for (int i = 0; i < 4; i++) {\n if (board.getLightGrid()[j][i].isRoof()) {\n floorInfo.append(\"* \").append(board.getLightGrid()[j][i].getFloor()).append(\" | \");\n } else floorInfo.append(\" \").append(board.getLightGrid()[j][i].getFloor()).append(\" | \");\n if (board.getLightGrid()[j][i].getOccupied() == null) {\n pawnInfo.append(\" \").append(centralSep);\n } else\n pawnInfo.append(board.getLightGrid()[j][i].getOccupied().toString())\n .append(board.getLightGrid()[j][i].getOccupied().getNumber())\n .append(centralSep);\n }\n if (board.getLightGrid()[j][4].isRoof()) {\n floorInfo.append(\"* \").append(board.getLightGrid()[j][4].getFloor()).append(separatorDx);\n } else floorInfo.append(\" \").append(board.getLightGrid()[j][4].getFloor()).append(separatorDx);\n if (board.getLightGrid()[j][4].getOccupied() == null) {\n pawnInfo.append(\" \").append(separatorDx);\n } else\n pawnInfo.append(board.getLightGrid()[j][4].getOccupied().toString())\n .append(board.getLightGrid()[j][4].getOccupied().getNumber())\n .append(separatorDx);\n System.out.println(\"+ - - + - - + - - + - - + - - +\");\n System.out.println(floorInfo.toString());\n System.out.println(pawnInfo.toString());\n pawnInfo.setLength(0);\n floorInfo.setLength(0);\n\n }\n System.out.println(\"+ - - + - - + - - + - - + - - +\");\n }", "public void showBoard(){\n }", "public void displayBoard() {\n newLine();\n for (int row = _board[0].length - 1; row >= 0; row -= 1) {\n String pair = new String();\n for (int col = 0; col < _board.length; col += 1) {\n pair += \"|\";\n pair += _board[col][row].abbrev();\n }\n System.out.println(pair + \"|\");\n newLine();\n }\n }", "private static void printBoard() {\n\n\t//\tJOptionPane.showMessageDialog(null, \"Heyoo\", \".-*Board*-.\", -1);\n\t\t//String name = JOptionPane.showInputDialog(\"Vat is dain name?\");\n\t\t//JOptionPane.showMessageDialog(null, \"Aiight you good, \" + name);\n\t\t\n\t\t\n\t\tString[] options = {\"Sten\", \"Sax\", \"Påse\"};\n\t\tString Val = (String)JOptionPane.showInputDialog(null, \"Sten, Sax eller Påse?\",\n \"Game nr\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n\t\t\n\t\t\n\t\t\n\t}", "private static void printBoard(char[][] board) {\n\n\t\t// header\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tSystem.out.print(\"- \");\n\t\t}\n\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tfor (int j = 0; j < board[0].length; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// footer\n\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\tSystem.out.print(\"- \");\n\t\t}\n\n\t\tSystem.out.println();\n\t}", "public void printTiles() {\r\n for (int row=0; row<BOARD_MAX_WIDTH; row++) {\r\n for (int col=0; col<BOARD_MAX_WIDTH; col++) {\r\n System.out.print(tiles[row][col]);\r\n }\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }", "public void showBoardState() {\n System.out.print(\" \");\n //top row X axis\n for(int i = 0; i < boardSize; i++){\n System.out.print(\" \" + i + \" \");\n }\n System.out.println();\n for (int i = 0; i < boardSize; i++) {\n //conversion 0-9 to char for display as Y axis\n System.out.print(\" \" + (char)(i + 'A') + \" \");\n for (int j = 0; j < boardSize; j++) {\n System.out.print(\" \" + board[i][j] + \" \");\n }\n System.out.println();\n\n }\n System.out.println();\n }", "String drawBoard();", "public String drawBoard() {\n fillBoard();\n return \"\\n\" +\n \" \" + boardArray[0][0] + \" | \" + boardArray[0][1] + \" | \" + boardArray[0][2] + \" \\n\" +\n \"------------\\n\" +\n \" \" + boardArray[1][0] + \" | \" + boardArray[1][1] + \" | \" + boardArray[1][2] + \" \\n\" +\n \"------------\\n\" +\n \" \" + boardArray[2][0] + \" | \" + boardArray[2][1] + \" | \" + boardArray[2][2] + \" \\n\";\n }", "public void print() {\r\n\t\tObject tmp[] = piece.values().toArray();\r\n\t\tfor (int i = 0; i < piece.size(); i++) {\r\n\t\t\tChessPiece p = (ChessPiece)tmp[i];\r\n\t\t\tSystem.out.println(i + \" \" + p.chessPlayer + \":\" + p.position + \" \" + p.isEnabled());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(body.countComponents());\r\n\t}", "public static void printGameBoard(Player[][] board) {\n\t\tStringBuilder rowBuffer = new StringBuilder(); \n\t\tfor (int row = 0; row < Score4Constants.rowMax; row++) {\n\t\t\tfor (int col = 0; col < Score4Constants.colMax; col++) {\n\t\t\t\trowBuffer.append(board[row][col].getName());\n\t\t\t\trowBuffer.append(\" \");\n\t\t\t}\n\t\t\tlogger.info(\"ROW: {}: {}\", row + 1, rowBuffer);\n\t\t\trowBuffer.delete(0, rowBuffer.length());\n\t\t}\n\t}", "public void displayBoard() {\n System.out.printf(\"%20s\",\"\"); // to add spacing\n for(int i = 0; i < space[0].length; i++) //Put labels for number axis\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println();\n for(int row = 0; row < this.space.length; row++) { //Put letter labels and appropriate coordinate values\n System.out.print(\" \"+ (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) //coordinate values\n System.out.print(emblem + \" \");\n System.out.println();\n }\n }", "@Override\r\n\tvoid showGameState() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t \r\n System.out.println(\"-------------\");\r\n\t\t\r\n for (int i = 0; i < boardsize; i++) \r\n {\r\n System.out.print(\"| \");\r\n for (int j = 0; j < boardsize; j++) \r\n {\r\n \tif(board[i][j]==-1)\r\n \t\tSystem.out.print(\"_\" + \" | \");\r\n \telse if\t(board[i][j]==0)\r\n \t\tSystem.out.print( \"W | \");\r\n \telse\r\n \t\tSystem.out.print( \"B | \");\r\n }\r\n System.out.println();\r\n System.out.println(\"-------------\");\r\n }\r\n }", "public void printBoard() {\r\n // Print column numbers.\r\n System.out.print(\" \");\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\" %d \", i+1);\r\n }\r\n System.out.println(\"\\n\");\r\n\r\n\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\"%c %c \", 'A' + i, board[i][0].mark);\r\n\r\n for (int j = 1; j < BOARD_SIZE; j++) {\r\n System.out.printf(\"| %c \", board[i][j].mark);\r\n }\r\n\r\n System.out.println(\"\");\r\n\r\n if (i < BOARD_SIZE - 1) {\r\n System.out.print(\" \");\r\n for (int k = 1; k < BOARD_SIZE * 3 + BOARD_SIZE; k++) {\r\n System.out.print(\"-\");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }\r\n System.out.println(\"\");\r\n }", "public void Print()\n\t{\n\t\tSystem.out.print(\"\\n_____GRID______\");\n\t\n\t\tfor(int x = 0; x < 9; x++)\n\t\t{\n\t\t\t\tif(x%3 == 0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\tif(grid[x] !=0)\n\t\t\t\t{\n\t\t\t\t\tif(grid[x] == -1)\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"O\" + \"_|\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"X\" + \"_|\");\n\t\t\t\t}\n\t\t\t\telse // blank square\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"|_\"+ \" \" + \"_|\");\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "public String showBoard() {\n return name + \"\\r\\n\" + myBoard.displayMyBoard() + \"\\r\\n\" + opponentsBoard.displayShotsTaken();\n }", "public void PrintGameBoard(int [][] arr) {\r\n\t\tsb.append(\" | A B C D E F G H I J\");\r\n\t\tSystem.out.println(sb.toString());\r\n\t\tsb.delete(0, sb.length());\r\n\t\tfor (int i = 0; i <arr.length; i++ ) {\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\t\tif (arr[i][j] == 0 || arr[i][j] == 3) {\r\n\t\t\t\t\tsb.append(\"* \");\r\n\t\t\t\t}\r\n\t\t\t\telse if(arr[i][j] == 1) {\r\n\t\t\t\t\tsb.append(\"O \");\r\n\t\t\t\t}\r\n\t\t\t\telse if (arr[i][j] == 2) {\r\n\t\t\t\t\tsb.append(\"X \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(i+\"| \"+sb.toString());\r\n\t\t\tsb.delete(0, sb.length());\r\n\t\t}\r\n\t}", "public void dumpCommand() {\r\n System.out.println(_board);\r\n }", "private static void printBoard(char [][] board){\n for (int i = 0; i < 6; i++){\n for(int j = 0; j < 7; j++){\n System.out.print(\"|\"+board[i][j]);\n }\n System.out.println(\"|\");\n }\n System.out.println();\n }", "public static void printBoard(Player[] players) {\r\n\t\tint startCount = 0;\r\n\t\tint endCount = BOARD_LENGTH - 1;\r\n\t\t//top row\r\n\t\tfor (int i = 0; i < BOARD_SIZE; i++) {\r\n\t\t\tSystem.out.print(Spaces[startCount++].ID);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\t//sides\r\n\t\tfor (int i = 0; i < BOARD_SIZE - 2; i++) {\r\n\t\t\tfor (int j = 0; j < BOARD_SIZE; j++) {\r\n\t\t\t\tif (j == 0) {\r\n\t\t\t\t\tSystem.out.print(Spaces[endCount--].ID);\r\n\t\t\t\t} else if (j == BOARD_SIZE - 1) {\r\n\t\t\t\t\tSystem.out.println(Spaces[startCount++].ID);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//bottom row\r\n\t\tfor (int i = 0; i < BOARD_SIZE; i++) {\r\n\t\t\tSystem.out.print(Spaces[endCount--].ID);\r\n\t\t}\r\n\t\t//player information\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t\tplayers[0].showPlayerInfo();\r\n\t\tplayers[1].showPlayerInfo();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "public void print(){\n for (int i = 0; i < rows; i++)\n {\n for (int j = 0; j < cols; j++)\n {\n if (start.getCol()==j&&start.getRow()==i)\n System.out.print('S');\n else if (end.getCol()==j&&end.getRow()==i)\n System.out.print('E');\n else if (maze[i][j]==1)\n System.out.print('\\u2588');\n else if (maze[i][j]==0)\n System.out.print('\\u2591');\n if (j!=cols-1){\n System.out.print(\" \");\n }\n }\n System.out.println();\n }\n //System.out.println(\"-------\");\n }", "public void PrintBoard(Board b);", "public void printBoard(){\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] == 0){\n System.out.print(\"0 \");\n }else{\n System.out.print(currentBoardState[i][j] + \" \");\n }\n }\n System.out.println();\n }\n }", "public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }", "public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }", "public static void displayboard(String board[][]){\n\t\tint rowindicator[]=new int[boardwidth+1];\n\t\tint rowcount=1;\n\t\tfor(int i=1;i<=boardwidth;i++){\n\t\t\trowindicator[i]=rowcount;\n\t\t\trowcount++;\n\t\t}\n\t\tint columnindicator[]=new int[boardlength+1];\n\t\tint columncount=1;\n\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\tcolumnindicator[i]=columncount;\n\t\t\tcolumncount++;\n\t\t}\n\t\tSystem.out.print(\"\\n \");\n\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t//displays column indicator\n\t\t\tSystem.out.print(\" \"+columnindicator[i]);\n\t\t}\n\t\t//displays board\n\t\tSystem.out.println(\"\");\n\t\tfor(int x=1;x<=boardwidth;x++){\n\t\t\t//displays row indicator\n\t\t\tSystem.out.print(\" \"+rowindicator[x]);\n\t\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t\tSystem.out.print(\" \"+board[x][i]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void display() {\n drawLine();\n for(int i=0; i < nRows; i++) {\n System.out.print(\"|\");\n for(int j=0; j < nCols; j++) {\n if(used[i][j] && board[i][j].equals(\" \")) {\n System.out.print(\" x |\");\n }\n else {\n System.out.print(\" \" + board[i][j] + \" |\");\n }\n }\n System.out.println(\"\");\n drawLine();\n }\n }", "public void printBoard(int[][] board) //creates a user-freindly representation of the board and prints it for the user\n {\n for (int i = 0; i < 9; i++) //n\n {\n if (i == 0) { //1\n System.out.println(\"-------------------------\"); //prints top border of board //1\n }\n \n for (int j = 0; j < 9; j++) //n\n {\n if (j == 0)\n {\n System.out.print(\"| \" + board[i][j] + \" \");\n }\n else if ((j+1) % 3 == 0) // 3\n {\n System.out.print(board[i][j] + \" | \"); //prints divider to separate into sets of 3 columns //3\n }\n else \n {\n System.out.print(board[i][j] + \" \");\n }\n }\n System.out.println(); //1\n\n if ((i+1) % 3 == 0) //3\n {\n System.out.println(\"-------------------------\"); //prints to separate into sets of 3 rows //1\n }\n }\n }", "public static String printBoard(Game board) {\n return board.toString();\n }", "public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\"#\");\r\n\t\t\t \t\t}\r\n\t\t\t \tif (col % 1 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\" \");\r\n\t\t\t \t\t}\r\n\t\t\t}\r\n\t\t if (row % 1 == 0)\r\n\t\t {\r\n\t\t\t\tif (col % 2 == 0)\r\n\t\t \t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t \t\t\t}\r\n\t\t\t\r\n\t\t \t\tif (col % 1 == 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tSystem.out.print(\"#\");\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t System.out.println(\"\");\r\n\t }\r\n\t System.out.println(\"\");\r\n\t}\r\n}", "private void showTheMove() {\n\r\n updateTicTacToeShape();\r\n for (int ii=0; ii<5; ii++) {\r\n System.out.println(ticTacToeShape[ii]);\r\n }\r\n }", "public void DisplayBoard(Board bord);", "public static void display(int[][] board) {\r\n\t\tfor (int i = 0; i < board.length; i++) {\r\n\t\t\tfor (int j = 0; j < board[0].length; j++)\r\n\t\t\t\tSystem.out.print(board[i][j] + \" \");\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public void update() {\n System.out.println(\"\\n\\n Board: \\n\");\n System.out.println(\" \" + pos1 + \" | \" + pos2 + \" | \" + pos3 + \" \");\n System.out.println(\" ---+---+--- \");\n System.out.println(\" \" + pos4 + \" | \" + pos5 + \" | \" + pos6 + \" \");\n System.out.println(\" ---+---+--- \");\n System.out.println(\" \" + pos7 + \" | \" + pos8 + \" | \" + pos9 + \" \");\n }", "String displayMyBoard();", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "public void printBoard(){\n if(this.isEmpty()){\n System.out.println(\"Board empty: place anything\");\n } else {\n\n System.out.println(\"Dominos played:\");\n for (Dominos s : this) {\n if(this.indexOf(s)%2==0) {\n System.out.print(\"[\" + s.toString() + \"]\" + \" \");\n }\n }\n System.out.println();\n System.out.print(\" \");\n for (Dominos s : this) {\n if(this.indexOf(s)%2==1) {\n System.out.print(\"[\" + s.toString() + \"]\" + \" \");\n }\n }\n System.out.println();\n\n\n// System.out.println(\"Left domino: \" + this.getFirst()\n// + \", Right Domino: \" + this.getLast());\n }\n }", "public static void main(String[] args) {\n\n Board myboard = new Board(8,8);\n System.out.println(myboard.drawBoard());\n myboard.boardToLetters();\n //System.out.println(myboard.drawBoard());\n // myboard.boardToFigures();\n // System.out.println(myboard.drawBoard());\n\n System.out.println(\"------------------- Movimientos Posibles\");\n //myboard.obtenerPiezasPorColor();\n\n Coordinate coordinate = new Coordinate(4,3);\n Piece pieza = myboard.obtenerPiezaCoordenadas(coordinate);\n Movimientos movimientos = new Movimientos(pieza, myboard);\n ArrayList<Coordinate> listaMovimientos = new ArrayList<>(movimientos.obtenerMovimientos());\n\n //System.out.println(piece.toString());\n for(Coordinate coordenadas : listaMovimientos)\n {\n System.out.println(coordenadas.toString());\n }\n\n if(listaMovimientos.isEmpty())\n {\n System.out.println(\"Esta vacia\");\n }\n }", "@Override\n public void displayShuffleboard() {\n\n }", "@Test\n\tpublic void drawInitialBoard_test()\n\t{\n\t\tassertEquals(b.drawInitialBoard(),\" | | \\n------\\n | | \\n------\\n | | \\n\");\n\t}", "public void print_maze () {\n \n System.out.println();\n\n for (int row=0; row < grid.length; row++) {\n for (int column=0; column < grid[row].length; column++)\n System.out.print (grid[row][column]);\n System.out.println();\n }\n\n System.out.println();\n \n }", "public void Print() {\r\n\t\tfor(Cell2048[] a : game) {\r\n\t\t\tfor(Cell2048 b : a) {\r\n\t\t\t\tSystem.out.print(b.getValue() + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"score : \"+ score);\r\n\t}", "void printBattle(ConsolePrinter printer);", "public void displayPossibleMoves() {\n \tGame.permBoard.displayBoard();\n }", "public void Print(Board b, int turn, int[] moves);", "void drawBoard(Board board);" ]
[ "0.8336725", "0.8270206", "0.8159433", "0.81591684", "0.81562394", "0.8143366", "0.80912995", "0.7978199", "0.79737675", "0.7970823", "0.79473114", "0.7941825", "0.79069936", "0.78578335", "0.7854875", "0.78477484", "0.78418505", "0.78379023", "0.7834487", "0.7823194", "0.7805503", "0.7772323", "0.77714247", "0.77584827", "0.775114", "0.7734584", "0.7732266", "0.7693957", "0.76753587", "0.7643801", "0.7639851", "0.7629102", "0.7606283", "0.7597278", "0.75868475", "0.7580075", "0.75649196", "0.75613004", "0.749952", "0.7494403", "0.7490832", "0.7485532", "0.746856", "0.74372715", "0.73999465", "0.73969996", "0.73918235", "0.7381576", "0.7370805", "0.73666763", "0.73354197", "0.73345506", "0.7283355", "0.7279889", "0.72696406", "0.72603965", "0.725459", "0.72460383", "0.72443545", "0.7222964", "0.72211856", "0.7212848", "0.7211618", "0.7180455", "0.7160748", "0.71564597", "0.71519375", "0.71355695", "0.7128028", "0.71172494", "0.70699763", "0.70693153", "0.7063283", "0.70468897", "0.7028478", "0.7020776", "0.701824", "0.6998446", "0.6985306", "0.69729304", "0.69648916", "0.6949078", "0.6931436", "0.69159997", "0.690626", "0.6890592", "0.6890466", "0.6889365", "0.68767416", "0.68636113", "0.68566644", "0.68448937", "0.6841547", "0.6841129", "0.6834538", "0.6832423", "0.68319196", "0.68229234", "0.6800009", "0.6792345" ]
0.68352437
94
end of print This method saves the state of the game board and the players and items positions and stores it into a file.
void save(PrintWriter pw){ int YEG = 0; int XEG = 0; for(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets cu rrent lo cations for(int p = 0; p < this.Garret.length;p++){ if(this.Garret[i][p] == 1){ YEG = i; XEG = p; }//end of if statement }//end of inner for loop }//end of outer for loop pw.println(YEG + " " + XEG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public void save() {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tOutputStream file = new FileOutputStream(\"games.txt\");\n\t\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\t\t\ttry {\n\t\t\t\tif (gameOver) {\n\t\t\t\t\t//notify no need to save completed game\n\t\t\t\t} else {\n\t\t\t\t\tgames.add(this);\n\t\t\t\t\toutput.writeObject(games);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Save not successful\");\n\t\t}\n\t}", "public void saveGame(){\n updateProperties();\n try {\n output = new FileOutputStream(fileName);\n properties.store(output, null); //saving properties to file\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO SAVE GAME ---\");\n e.printStackTrace();\n } finally {\n if (output != null) {\n try {\n output.close();\n System.out.println(\"--- GAME SAVED ---\");\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE OUTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }", "void save4(PrintWriter pw){\n\t\t \t pw.println(\" \");\n\t\t\t int YEG = 0;\n int XEG = 0;\n for(int i =0; i < this.Items.length;i++){\n for(int p= 0; p < this.Items.length; p++){\n if(this.Items[i][p] != null){\n YEG = i;\n XEG = p;\n }//end of if statement\n }//end of inner for loop\n }//end of outer for loop\n pw.println(YEG + \" \" + XEG);\n\n\t\t }", "public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }", "public void save(PrintWriter pw) {\n\t\tpw.println(color);\n\t\tpw.println(name);\n\t\tpw.println(diceValue);\n\t\tpw.println(diceTossed);\n\t\tfor(int i = 1; i<=4; i++)\n\t\t\tif(hasPawn(i))\n\t\t\t\tpw.println(pawns[i-1].getPosition());\n\t\t\telse\n\t\t\t\tpw.println(0);\n\t}", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}", "public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }", "public void save() {\r\n IniReader.write(FILE_NAME, \"x\", x, \"y\", y, \"fullscreen\", fullscreen, \"controlType\", controlType, \"vol\", volMul,\r\n \"keyUpMouse\", getKeyUpMouseName(), \"keyDownMouse\", getKeyDownMouseName(), \"keyUp\", getKeyUpName(), \"keyDown\", keyDownName,\r\n \"keyLeft\", keyLeftName, \"keyRight\", keyRightName, \"keyShoot\", keyShootName, \"keyShoot2\", getKeyShoot2Name(),\r\n \"keyAbility\", getKeyAbilityName(), \"keyEscape\", getKeyEscapeName(), \"keyMap\", keyMapName, \"keyInventory\", keyInventoryName,\r\n \"keyTalk\", getKeyTalkName(), \"keyPause\", getKeyPauseName(), \"keyDrop\", getKeyDropName(), \"keySellMenu\", getKeySellMenuName(),\r\n \"keyBuyMenu\", getKeyBuyMenuName(), \"keyChangeShipMenu\", getKeyChangeShipMenuName(), \"keyHireShipMenu\", getKeyHireShipMenuName());\r\n }", "private void saveGame(){\n\t\t\n\t}", "public void save() {\n\t\tlog.log(\"Attempting to save...\");\n\t\tPath spath = Paths.get(getFullSavePath());\n\t\tPath cpath = Paths.get(getFullSavePath() + \"units/\");\n\t\ttry {\n\t\t\tif(!Files.exists(spath))\n\t\t\t\tFiles.createDirectory(spath);\n\t\t\tif(!Files.exists(cpath))\n\t\t\t\tFiles.createDirectory(cpath);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\n\t\tFile[] files = new File(cpath.toString()).listFiles();\n\t\tfor(File f : files) {\n\t\t\tf.delete();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedWriter mfestWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"progress.txt\"));\n\t\t\tmfestWriter.write(name);\n\t\t\tmfestWriter.close();\n\t\t\tfor(MapCharacter mc : getFriendlies()) {\n\t\t\t\tBufferedWriter charWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"units/\"\n\t\t\t\t\t\t+ mc.getEnclosed().getDirName()));\n\t\t\t\tcharWriter.write(mc.getEnclosed().save());\n\t\t\t\tcharWriter.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.log(\"Game saved.\");\n\t}", "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void savePokemonData()\r\n {\r\n try\r\n {\r\n int currentPokemon = playerPokemon.getCurrentPokemon();\r\n\r\n FileWriter fw = new FileWriter(\"tempPlayerPokemon.txt\");\r\n\r\n List<String> list = Files.readAllLines(Paths.get(\"playerPokemon.txt\"), StandardCharsets.UTF_8);\r\n String[] pokemonList = list.toArray(new String[list.size()]);\r\n\r\n String currentPokemonStr = pokemonList[currentPokemon];\r\n String[] currentPokemonArray = currentPokemonStr.split(\"\\\\s*,\\\\s*\");\r\n\r\n currentPokemonArray[1] = Integer.toString(playerPokemon.getLevel());\r\n currentPokemonArray[3] = Integer.toString(playerPokemon.getCurrentHealth());\r\n currentPokemonArray[4] = Integer.toString(playerPokemon.getCurrentExperience());\r\n for(int c = 0; c < 4; c++)\r\n {\r\n currentPokemonArray[5 + c] = playerPokemon.getMove(c);\r\n }\r\n\r\n String arrayAdd = currentPokemonArray[0];\r\n for(int i = 1; i < currentPokemonArray.length; i++)\r\n {\r\n arrayAdd = arrayAdd.concat(\", \" + currentPokemonArray[i]);\r\n }\r\n\r\n pokemonList[currentPokemon] = arrayAdd;\r\n\r\n for(int f = 0; f < pokemonList.length; f++)\r\n {\r\n fw.write(pokemonList[f]);\r\n fw.write(\"\\n\");\r\n }\r\n fw.close();\r\n\r\n Writer.overwriteFile(\"tempPlayerPokemon\", \"playerPokemon\");\r\n }\r\n catch(Exception error)\r\n {\r\n }\r\n }", "public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}", "static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.getName() +\".txt\"));\n\t\toos.writeObject(Player.class);\n\t\toos.close();\n\t\t*/\n\t\t\n\t\tString[] player = Player.getInfoAsStringArray();\n\t\tjava.io.File playerData = new java.io.File(\"Players/\" + player[0] +\".txt\");\n\t\tif (!playerData.exists()){\n\t\t\tplayerData.createNewFile();\n\t\t}\n\t\tjava.io.PrintWriter writer = new java.io.PrintWriter(playerData);\n\t\t//[0] Name, \n\t\twriter.println(\"# Name\");\n\t\twriter.println(player[0]);\n\t\t//[1] Level, \n\t\twriter.println(\"# Level\");\n\t\twriter.println(player[1]);\n\t\t//[2] getRoleAsInt(),\n\t\twriter.println(\"# Role/Class\");\n\t\twriter.println(player[2]);\n\t\t//[3] exp,\n\t\twriter.println(\"# Exp\");\n\t\twriter.println(player[3]);\n\t\t//[4] nextLevelAt,\n\t\twriter.println(\"# Exp Required for Next Level Up\");\n\t\twriter.println(player[4]);\n\t\t//[5] health,\n\t\twriter.println(\"# Current Health\");\n\t\twriter.println(player[5]);\n\t\t//[6] maxHealth,\n\t\twriter.println(\"# Max Health\");\n\t\twriter.println(player[6]);\n\t\t//[7] intelligence,\n\t\twriter.println(\"# Intelligence\");\n\t\twriter.println(player[7]);\n\t\t//[8] dexterity,\n\t\twriter.println(\"# Dexterity\");\n\t\twriter.println(player[8]);\n\t\t//[9] strength,\n\t\twriter.println(\"# Strength\");\n\t\twriter.println(player[9]);\n\t\t//[10] speed,\n\t\twriter.println(\"# Speed\");\n\t\twriter.println(player[10]);\n\t\t//[11] protection,\n\t\twriter.println(\"# Protection\");\n\t\twriter.println(player[11]);\n\t\t//[12] accuracy,\n\t\twriter.println(\"# Accuracy\");\n\t\twriter.println(player[12]);\n\t\t//[13] dodge,\n\t\twriter.println(\"# Dodge\");\n\t\twriter.println(player[13]);\n\t\t//[14] weaponCode,\n\t\twriter.println(\"# Weapon's Code\");\n\t\twriter.println(player[14]);\n\t\t//[15] armorCode,\n\t\twriter.println(\"# Armor's Code\");\n\t\twriter.println(player[15]);\n\t\t//[16] Gold,\n\t\twriter.println(\"# Gold\");\n\t\twriter.println(player[16]);\n\t\twriter.close();\n\t\t\n\t}", "public void SaveCurrentGame(){\n if(gameStarted == false){ return; }\n recordGame.write(board, timeRuunableThread, level);\n timeRuunableThread.setDrawNumber(false);\n canLoadGame = true;\n // update infoCanvas\n CleanInfoCanvas();\n }", "private void save() {\n Tile[][] field = gameController.grid.field;\n Tile[][] undoField = gameController.grid.undoField;\n// SharedPreferenceUtil.put(this, SpConstant.WIDTH, field.length);\n// SharedPreferenceUtil.put(this, SpConstant.HEIGHT, field.length);\n for (int xx = 0; xx < field.length; xx++) {\n for (int yy = 0; yy < field[0].length; yy++) {\n if (field[xx][yy] != null) {\n SharedPreferenceUtil.put(this, xx + \"_\" + yy, field[xx][yy].getValue());\n } else {\n SharedPreferenceUtil.put(this, xx + \"_\" + yy, 0);\n }\n\n if (undoField[xx][yy] != null) {\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GRID + xx + \"_\" + yy, undoField[xx][yy].getValue());\n } else {\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GRID + xx + \"_\" + yy, 0);\n }\n }\n }\n SharedPreferenceUtil.put(this, SpConstant.SCORE, gameController.currentScore);\n SharedPreferenceUtil.put(this, SpConstant.HIGH_SCORE_TEMP, gameController.historyHighScore);\n SharedPreferenceUtil.put(this, SpConstant.UNDO_SCORE, gameController.lastScore);\n SharedPreferenceUtil.put(this, SpConstant.CAN_UNDO, gameController.canUndo);\n SharedPreferenceUtil.put(this, SpConstant.GAME_STATE, gameController.gameState);\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GAME_STATE, gameController.lastGameState);\n SharedPreferenceUtil.put(this, SpConstant.AUDIO_ENABLED, gameController.isAudioEnabled);\n }", "void saveGameState(File saveName);", "@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}", "private void saveScore() {\n try {\n PrintWriter writer = new PrintWriter(new FileOutputStream(new File(Const.SCORE_FILE), true));\n writer.println(this.player.getName() + \":\" + this.player.getGold() + \":\" + this.player.getStrength());\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static void saveBoxScore(){\n Engine engine = Utility.getEngine();\n ArrayList<Player> homePlayers = engine.getHomePlayers();\n ArrayList<Player> awayPlayers = engine.getAwayPlayers();\n ArrayList<String> output = new ArrayList<String>();\n output.add(\"Home team\");\n for(Player player : homePlayers){\n Player upToDatePlayer = Utility.getPlayer(player);\n output.add(upToDatePlayer.toString());\n }\n\n output.add(\"Away team\");\n for(Player player : awayPlayers){\n Player upToDatePlayer = Utility.getPlayer(player);\n output.add(upToDatePlayer.toString());\n }\n\n try {\n Path path = Paths.get(Constants.OUTPUT_FILE_PATH);\n Files.write(path,output,StandardCharsets.UTF_8);\n } catch (Exception e){\n System.out.println(\"Exception: \" + e.toString());\n }\n\n System.exit(0);\n }", "void saveData(PrintWriter out, Player player, Computer computer, Object strategy) {\r\n\t\t\r\n\t\tout.println(\"CompGrid:\");\r\n\t\tint[][] saveCompGrid = new int[Computer.computerGrid.length][Computer.computerGrid[0].length];\r\n\t\tfor (int i = 0; i < Computer.computerGrid.length; ++i) {\r\n\t saveCompGrid[i] = new int[Computer.computerGrid[i].length];\r\n\t for (int j = 0; j < saveCompGrid[i].length; ++j) {\r\n\t saveCompGrid[i][j] = Computer.computerGrid[i][j];\r\n\t out.print(saveCompGrid[i][j]);\r\n\t }\r\n\t out.println(\"\");\r\n\t\t}\r\n\t\tif(strategy instanceof HitStrategy)\r\n\t\t\tout.println(\"Computer Score: \"+ ((HitStrategy)strategy).getScore());\r\n\t\telse\r\n\t\t\tout.println(\"Computer Score: \"+ ((HitStrategySalvo)strategy).getScore());\r\n\t\tout.print(\"Computer Sunken ships:\");\r\n\t\tsaveComputerSunkenShips(out);\r\n\t\tout.println(\"Computer ships status: \");\r\n\t\tsaveComputerShipsMap(out);\r\n\t\tout.print(\"Coordinates hit:\");\r\n\t\tsetComputerCoordinatesHit(Computer.coordinatesHit);\r\n\t\tsaveComputerCoordinatesHit(out);\r\n\t\tout.println(\"ShipGrid:\");\r\n\t\tint[][] saveUserGrid = new int[Player.userGrid.length][Player.userGrid[0].length];\r\n\t\tfor (int i = 0; i < Player.userGrid.length; ++i) {\r\n\t saveUserGrid[i] = new int[Player.userGrid[i].length];\r\n\t for (int j = 0; j < saveUserGrid[i].length; ++j) {\r\n\t saveUserGrid[i][j] = Player.userGrid[i][j];\r\n\t out.print(saveUserGrid[i][j]);\r\n\t }\r\n\t out.println(\"\");\r\n\t\t}\r\n\t\tout.println(\"Player Score: \"+computer.getScoreComp());\r\n\t\tout.print(\"Player Sunken ships:\");\r\n\t\tsaveUserSunkenShips(out);\r\n\t\tout.println(\"Player ships status: \");\r\n\t\tsaveUserShipsMap(out);\r\n\t\tout.print(\"Coordinates hit:\");\r\n\t\tsetComputerCoordinatesHit(Computer.coordinatesHit);\r\n\t\tsaveUserCoordinatesHit(out);\t\t\r\n\t}", "void save3(PrintWriter pw){\n\t\t\t pw.println(\" \");\n\t\t\t int YEG = 0;\n int XEG = 0;\n for(int i =0; i < this.position.length;i++){\n for(int p= 0; p < this.position.length; p++){\n if(this.position[i][p] == 1){\n YEG = i;\n XEG = p;\n }//end of if statement\n }//end of inner for loop\n }//end of outer for loop\n pw.println(YEG + \" \" + XEG);\n\t\t }", "void gameSaved() {\n\t\tSystem.out.println(\"\\n\\nGame saved.\");\n\t}", "public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}", "public void save(int boardSize, PlayerColor firstPlayer, PlayerColor secondPlayer, String player1Color,\r\n String player2Color) throws IOException {\r\n //set the data.\r\n this.boardSize = boardSize;\r\n this.firstPlayer = firstPlayer;\r\n this.secondPlayer = secondPlayer;\r\n this.player1Color = player1Color;\r\n this.player2Color = player2Color;\r\n\r\n //writing to a file\r\n File file = new File(this.filename);\r\n FileOutputStream fos = new FileOutputStream(file);\r\n ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n oos.writeObject(this);\r\n fos.close();\r\n oos.close();\r\n }", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveGame(File f) {\n savegame = new SaveGame(f, chessboard, gamelog, colorsTurn);\n System.out.println(\"Gamed Saved.\");\n\n }", "void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }", "private void writeToFile() {\n boolean flag = true;\n int expectedPacket = (lastPacket)? sequenceNo: Constants.WINDOW_SIZE;\n for (int i = 0; i < expectedPacket; i++) {\n if(!receivedPacketList.containsKey(i)) {\n flag = false;\n }\n }\n if (flag) {\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Write to file Possible\");\n try (BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(fileSavePath, true))) {\n for (int i = 0; i < receivedPacketList.size(); i++) {\n //System.out.println(new String(receivedPacketList.get(i)));\n stream.write(receivedPacketList.get(i));\n }\n receivedPacketList.clear();\n stream.close();\n } catch (FileNotFoundException ex) {\n \n } catch (IOException ex) {\n \n }\n receivedPacketList.clear();\n expectedList.clear();\n }\n }", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "void saveGame();", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "private void saveCustomDeck() {\n try (PrintWriter pw = new PrintWriter(new FileWriter(USER_DECK))) {\n for (int i = 0; i < customDeck.size(); i++) {\n pw.print(customDeck.get(i) + \"\\n\\n\");\n }\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n }", "public void save(){\n BoardSerializer.serialize(this);\n }", "public void save() {\n\t\tInputManager.resetWriter(false);\n\t\tInputManager.writer(InputManager.newDelimeterOne + \" \" + InputManager.newDelimeterTwo);\n\t\tfor(Row r: rows) {\n\t\t\tInputManager.writer(r.toString());\n\t\t}\n\t}", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}", "public void saveGame(File fileLocation);", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}", "public void save(View v) {\n if (!currentMode.equals(Mode.GAME)) {\n Toast.makeText(this, \"Speichern nur im Spiel moeglich!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // Leeres speichern verhindern\n if (!(itemList.size() > 0)) {\n Toast.makeText(this, \"Keine Tips zum Speichern!\", Toast.LENGTH_LONG).show();\n return;\n }\n // String formatieren\n String output = generateSaveFileString();\n\n // In Datei speichern\n writeToSaveFile(output);\n\n // Neue Runde starten\n startNewRound();\n }", "public void endGame(){\r\n\t\tupdateRecord();\r\n\t\tgameStats.writeToFile();\r\n\t\tstatisticsList = gameStats.makeArrayList();\r\n\t\tgameStats.writeListToFile(statisticsList);\r\n\t}", "public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}", "public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }", "public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}", "public static void saveStats() {\r\n\t\tif(Main.optionsCheckbox.getState()) FileUtils.exportGameOptions();\r\n\t\t\r\n\t\tif(Main.isFourHandedTeams) {\r\n\t\t\tif(Main.team1Checkbox.getState()) FileUtils.exportTeamFile(Main.teamOne);\r\n\t\t\tif(Main.team2Checkbox.getState()) FileUtils.exportTeamFile(Main.teamTwo);\r\n\t\t\tif(Main.teamPreviousCheckbox.getState()) FileUtils.exportTeamFile(Main.teamPrevious);\r\n\t\t}\r\n\t\t\r\n\t\tif(Main.isFourHandedSingle) {\r\n\t\t\tif(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);\r\n\t\t\tif(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);\r\n\t\t\tif(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);\r\n\t\t\tif(Main.player4Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerFour);\r\n\t\t\tif(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);\r\n\t\t}\r\n\t\t\r\n\t\tif(Main.isThreeHanded) {\r\n\t\t\tif(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);\r\n\t\t\tif(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);\r\n\t\t\tif(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);\r\n\t\t\tif(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);\r\n\t\t}\r\n\t}", "public void saveState(ObjectOutput out) throws IOException {\n\t\t// save deikto values\n\t\tdk.saveState(out);\n\t\t// save interpreter values\n\t\tout.writeFloat(interpreter.globalActorBox);\n\t\tout.writeFloat(interpreter.globalPropBox);\n\t\tout.writeFloat(interpreter.globalStageBox);\n\t\tout.writeFloat(interpreter.globalEventBox);\n\t\tout.writeFloat(interpreter.globalVerbBox);\n\t\tout.writeFloat(interpreter.globalBNumberBox);\n\n\t\t// save ticks\n\t\tout.writeInt(cMoments);\n\t\t// save inactivity counter\n\t\tout.writeInt(cInactivity);\n\t\t// save player inactivity\n\t\tout.writeInt(playerInactivity);\n\t\t// save storyIsOver\n\t\tout.writeBoolean(storyIsOver);\n\t\tout.writeBoolean(isEpilogueNow);\n\t\tout.writeBoolean(isHappilyDone);\n\t\tout.writeBoolean(isPenultimateDone);\n\n\t\t// save historyBook\n\t\tout.writeInt(historyBook.size());\n\t\tfor(Sentence s:historyBook)\n\t\t\tout.writeObject(s);\n\t\t// save random seeds\n\t\tout.writeObject(random);\n\t\tout.writeLong(interpreter.scriptRandom.getSeed());\n\t\t// save alarms\n\t\tout.writeInt(alarms.size());\n\t\tfor(Alarm a:alarms)\n\t\t\tout.writeObject(a);\n\t\tout.writeInt(storybook.size());\n\t\tfor(String s:storybook)\n\t\t\tout.writeUTF(s);\n\t}", "public void saving() {\n\t\tSystem.out.println(\"7\");\n\n\t}", "public void dumpInventory() {\n\t\tFileWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(inventoryFilePath);\n\t\t\tyaml.dump(testInventoryData, writer);\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}", "public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}", "public SaveGame() {\n\t\tlives = 0;\n\t\tscore = 0;\n\t\tbrainX = 0;\n\t\tbrainY = 0;\n\t\tzombieX = 0;\n\t}", "public void saveObject(ObjectOutputStream out) throws IOException {\n out.defaultWriteObject();\n out.writeObject(otherColor);\n out.writeObject(mode);\n out.writeObject(tod);\n out.writeObject(prune);\n out.writeObject(currBoard);\n }", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "@Override\n public void onPause() {\n super.onPause();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveGame() {\n\t\tmanager.saveGame();\n\t}", "public void saveGame(GamePanel gamePanel) throws IOException\r\n\t{\r\n\t\tSystem.out.println(\"Saving your game.\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(\"Game.ser\"));\r\n\t\t\tos.writeObject(gamePanel);\r\n\t\t\tos.close();\r\n\t\t}\r\n\t\tcatch (IOException ex) \r\n\t\t{\r\n ex.printStackTrace();\r\n }\r\n\t}", "private void saveGame() throws FileNotFoundException {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showSaveDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\t\tif (file != null) {\r\n\t\t\tFileWriter fileWriter = new FileWriter(convertToStringArrayList(), file);\r\n\t\t\tfileWriter.writeFile();\r\n\t\t}\r\n\r\n\t}", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "public void write() {\n\t\tint xDist, yDist;\r\n\t\ttry {\r\n\t\t\tif (Pipes.getPipes().get(0).getX() - b.getX() < 0) { // check if pipes are behind bird\r\n\t\t\t\txDist = Pipes.getPipes().get(1).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(1).getY() - b.getY() + Pipes.height;\r\n\t\t\t} else {\r\n\t\t\t\txDist = Pipes.getPipes().get(0).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(0).getY() - b.getY() + Pipes.height;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\txDist = -6969;\r\n\t\t\tyDist = -6969;\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Pipe out of bounds\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"DATA.txt\");\r\n\t\t\tFileWriter fr = new FileWriter(file, true);\r\n\t\t\tfr.write(xDist + \",\" + yDist + \",\" + b.getYVel() + \",\" + didJump);\r\n\t\t\tfr.write(System.getProperty(\"line.separator\")); // makes a new line\r\n\t\t\tfr.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Wtrie file error\");\r\n\t\t}\r\n\t}", "public void save () {\r\n\t\tlog.debug(\"TunnelList:save()\");\r\n\t\tlog.info(\"Saving to file\");\r\n\t\tFileTunnel.saveTunnels(this);\r\n\t}", "public void save(String file) throws IOException {\n String output = \"\"; \r\n for (int row = 0; row < grid.length; row++) { //iterate through the current instance\r\n for (int col = 0; col < grid[row].length; col++) {\r\n if (grid[row][col]==true) { //if cell is alive\r\n output = output + \"1\"; //store one\r\n } else {\r\n output = output + \"0\"; //else, store a zero\r\n }\r\n }\r\n }\r\n System.out.println(\"File \" + file + \".txt is saved.\"); //display that file is saved\r\n String fileName = file + \".txt\"; //add txt extension\r\n FileWriter writer = new FileWriter(fileName); //finish saving the file\r\n writer.write(output);\r\n writer.close();\r\n\r\n }", "@Override\n\t\tpublic void finishIteration() {\n\t\t\trailroad.save();\n\t\t\tSystem.out.println(\"SAVING!\");\n\t\t\tsuper.finishIteration();\n\t\t}", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n rom.save(obstacle, frog);\n isSaved = true;\n }", "public void saveGame();", "@Override\n protected void onPause() {\n super.onPause();\n saveToFile(StartingActivity.TEMP_SAVE_FILENAME);\n boardManager.setLastTime(stopTimer());\n System.out.println(\"pause: \" + boardManager.getLastTime());\n }", "public String saveGame(String fileName) {\n File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File saveFile = new File(file, fileName);\n\n try {\n PrintWriter writer = new PrintWriter(saveFile.getAbsolutePath(), \"UTF-8\");\n writer.println(\"Black: \" + playerBlack.getScore());\n writer.println(\"White: \" + playerWhite.getScore());\n writer.println(\"Board:\");\n\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n if (boardObject.getSlot(r, c).getColor() == Slot.BLACK) {\n writer.print(\"B \");\n } else if (boardObject.getSlot(r, c).getColor() == Slot.WHITE) {\n writer.print(\"W \");\n } else {\n writer.print(\"O \");\n }\n }\n writer.println();\n }\n\n String nextPlayer = playerWhite.isTurn() ? \"White\" : \"Black\";\n writer.println(\"Next player: \" + nextPlayer);\n\n String humanPlayer = playerWhite.isComputer() ? \"Black\" : \"White\";\n writer.println(\"Human: \" + humanPlayer);\n\n writer.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return saveFile.getAbsolutePath();\n }", "public void save() {\r\n try {\r\n FileOutputStream fos = new FileOutputStream(REPO_STATE_FILE_NAME);\r\n fos.write(CodecUtils.toJson(this).getBytes());\r\n fos.close();\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n }", "public void saveToFile(String fileName) {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(fileName, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "void saveSet() {\n if( file==null ) {\n int returnVal = fc.showSaveDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n }\n System.out.println(\"Saving to: \" + file.getName());\n try {\n int count = tabbedPane.getTabCount();\n ArrayList l = new ArrayList();\n for(int i=0; i< count; i++) {\n rrpanel= (RoombaRecorderPanel)tabbedPane.getComponentAt(i);\n l.add(rrpanel.copy());\n }\n FileOutputStream fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //oos.writeObject(loopButton);\n //oos.writeObject(\n oos.writeObject(l);\n oos.close();\n } catch( Exception e ) {\n System.out.println(\"Save error \"+e);\n }\n }", "private void saveToFile(){\n this.currentMarkovChain.setMarkovName(this.txtMarkovChainName.getText());\n saveMarkovToCSVFileInformation();\n \n //Save to file\n Result result = DigPopGUIUtilityClass.saveDigPopGUIInformationSaveFile(\n this.digPopGUIInformation,\n this.digPopGUIInformation.getFilePath());\n }", "public void save () {\n // Make sure the workspace folder exist\n createFolder(this.pathToWorkspaceFolder);\n\n // Write the serialized Flow object\n System.out.println(\"Saving\");\n try (FileWriter file = new FileWriter(this.pathToWorkspaceFolder.toString() + \"/\" + FLOW_FILE_NAME)) {\n file.write(flow.serialize());\n System.out.println(\"Successfully Copied Flow \" + flow.getId() + \" to File :)\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void save()\n {\n try {\n \n \n PrintWriter fich = null;\n \n fich = new PrintWriter(new BufferedWriter(new FileWriter(\"bd.pl\", true)));\n\t\t\t//true c'est elle qui permet d'écrire à la suite des donnée enregistrer et non de les remplacé \n \n for(String auto : GestionController.listApp)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listDetFact)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listFact)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listType)\n {\n \n fich.println(auto);\n }\n fich.println();\n fich.close();\n } catch (Exception e1) {\n printStrace(e1);\n\t\t}\n }", "public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }", "public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}", "@Override\n public void actionPerformed(ActionEvent e){\n JFileChooser fileChooser = new JFileChooser();\n int status = fileChooser.showSaveDialog(null);\n \n //Check if they actually saved the file\n if (status == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n \n //Try block to make sure file actually exists\n try {\n FileOutputStream fos = new FileOutputStream(fileToSave);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(games);\n \n //Close the file\n fos.close();\n out.close();\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File not found\");\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File I/O problem\");\n }\n \n //Tell the user it saved successfully\n JOptionPane.showMessageDialog(null, \"Saved as file: \" + fileToSave.getAbsolutePath());\n }\n }", "public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }", "private void saveItems() {\n PrintWriter writer = null;\n try {\n FileOutputStream fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(\n fos)));\n\n for (int idx = 0; idx < mAdapter.getItemCount(); idx++) {\n\n writer.println(mAdapter.getItem(idx));\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (null != writer) {\n writer.close();\n }\n }\n }", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "public void printState() throws IOException, FileNotFoundException {\n\t\tprintState(new PrintWriter(new BufferedWriter(new FileWriter(modelname))));\n\t}", "public void saveGame(DataOutputStream s) throws IOException {\n s.writeUTF(level.toString());\n s.writeUTF(level.getName());\n s.writeInt(lives);\n s.writeInt(points);\n s.writeInt(wonLevels);\n pacman.writeEntity(s);\n s.writeInt(entities.size());\n for (GameEntity entity : entities)\n entity.writeEntity(s);\n }", "public void writeState(float timer, float xPos, float yPos, Float killCount, Float pHealth, Float level, Float gravity) throws IOException {\n boolean append = false;\n FileWriter writer = null;\n try {\n writer = new FileWriter(fileName, append);\n writer.write(timer + \",\" + xPos + \",\"+ yPos + \",\" + killCount + \",\" + pHealth + \",\" + level + \",\" + gravity + \"\\n\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }", "public void Stop(Player player){\r\n \r\n if (Players.size()==1)\r\n {\r\n enddate=new Date();\r\n //write the result in a file \r\n //read the last game id and plus it with 1\r\n int gameID=0;\r\n String result=\"\";\r\n boolean playerwin=false;\r\n File f = new File(new File(\"\").getAbsolutePath() + \"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\GameRecords\");\r\n ObjectInputStream obj=null;\r\n try {\r\n obj = new ObjectInputStream(new FileInputStream(f));\r\n } catch (IOException ex) {System.out.println(\"exeption for newing the obj in game id initllize\");}\r\n while (true) {\r\n try {\r\n\r\n FinishedGameRecord temp = (FinishedGameRecord) obj.readObject();\r\n gameID=temp.gameID;\r\n } catch (EOFException e) {\r\n try {\r\n obj.close();\r\n } catch (IOException ex) {}\r\n break;\r\n } catch (IOException ex) {System.out.println(\"gameID initlizing IOE error\"); \r\n } catch (ClassNotFoundException ex) {System.out.println(\"gameID initlizing Class not found error\");\r\n }\r\n }\r\n \r\n gameID++;\r\n if (Objects.equals(Players.get(0).name, new String(\"Random PC\")))\r\n {\r\n result=\"PC Win\";\r\n \r\n }else\r\n {\r\n playerwin=true;\r\n result=Players.get(0).name+\" Win\";\r\n }\r\n //insert the new game record \r\n FinishedGameRecord lastscore=new FinishedGameRecord(playername,\"Random PC\",startdate,enddate,gameID,result);\r\n try {\r\n FileOutputStream os=new FileOutputStream(new File(new File(\"\").getAbsoluteFile()+\"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\GameRecords\"),true);\r\n AppendingObjectOutputStream obj2=new AppendingObjectOutputStream(os);\r\n \r\n obj2.writeObject(lastscore);\r\n \r\n obj2.close();\r\n os.close();\r\n } catch (FileNotFoundException ex) {System.out.println(\"writeing finished game record 111a\");} \r\n catch (IOException ex){System.out.println(\"111b\");}\r\n \r\n //writing to the score board \r\n \r\n File f3 = new File(new File(\"\").getAbsolutePath() + \"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\ScoreBoard\");\r\n try {\r\n AppendingObjectOutputStream obj4sore=new AppendingObjectOutputStream(new FileOutputStream(f3,true));\r\n \r\n obj4sore.writeObject(new ScoreRecord(playername, playerwin));\r\n \r\n obj4sore.close();\r\n } catch (FileNotFoundException ex) {System.out.println(\"File not Found obj 4 score\");\r\n } catch (IOException ex) {System.out.println(\"IOEexception obj4score\");\r\n }\r\n \r\n \r\n //insert the toturial records\r\n File f2 = new File(new File(\"\").getAbsolutePath() + \"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\ToturialFile\");\r\n try {\r\n \r\n AppendingObjectOutputStream obj3=new AppendingObjectOutputStream(new FileOutputStream(f2,true));\r\n WritableToturialClass temp=new WritableToturialClass();\r\n temp.Initlize(moves.size());\r\n temp.gameID=gameID;\r\n temp.grid=boarddata;\r\n temp.note=notedata;\r\n temp.header=boardsheader;\r\n for(int i=0;i<moves.size();i++){\r\n temp.add(moves.get(i).nameoftheattacker, moves.get(i).xaxis, moves.get(i).xaxis,moves.get(i).date);\r\n moves.get(i);\r\n }\r\n obj3.writeObject(temp);\r\n obj3.close();\r\n } catch (FileNotFoundException ex) {System.out.println(\"File not Found obj 3 \");\r\n } catch (IOException ex) {System.out.println(\"IOEexception obj3\");\r\n }\r\n //end of the adding operations\r\n \r\n WinnerDisplay win=new WinnerDisplay();\r\n win.setWinner(Players.get(0).name);\r\n //make the list disappear before the saving shit happen\r\n playerboard.repaintafterupdate();\r\n playerboard.setVisible(false);\r\n win.setLocation(500,300);\r\n win.setVisible(true);\r\n music.StopTheMusic();\r\n music.PlayWinner();\r\n \r\n \r\n }\r\n }", "public void save(String filePath){\r\n Scanner in = new Scanner(System.in);\r\n File saveFile = new File(filePath);\r\n if (saveFile.exists()){\r\n System.out.println(\"Do you really, really want to overwrite your previous game?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n int input = in.nextInt();\r\n if (input!=1){\r\n return;\r\n }\r\n }\r\n File saveDir = new File(this.savePath);\r\n if (!saveDir.exists()){\r\n saveDir.mkdir();\r\n }\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n try {\r\n fos = new FileOutputStream(saveFile);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(this.serialVersionUID);\r\n out.writeObject(p);\r\n out.writeObject(map);\r\n out.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"Make sure you don't use spaces in your folder names.\");\r\n ex.printStackTrace();\r\n }\r\n }", "private void saveFile(){\n\tif (numPlayers == 1 && 0 < numNPCs && numNPCs < 6){\n\t int returnVal = fileChooser.showSaveDialog(this);\n\t if (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\ttry {\n\t\t FileWriter writer =\n\t\t\tnew FileWriter(fileChooser.getSelectedFile());\n\t\t writer.write(this.toXML());\n\t\t writer.close();\n\t\t} catch (Exception ex) {\n\t\t ex.printStackTrace();\n\t\t}\n\t }\n\t} else {\n\t //If it wouldn't make a valid game, warn the user\n\t JFrame f = new JFrame();\n\t JOptionPane.showMessageDialog(f,\n\t\t\t\t\t \"You must have exactly one playable\\n\"\n\t\t\t\t\t + \"character and 1-5 NPCs.\\n\" +\n\t\t\t\t\t \"Current PCs= \" + numPlayers +\n\t\t\t\t\t \", NPCs = \" + numNPCs,\n\t\t\t\t\t \"Improper Game Configuration\",\n\t\t\t\t\t JOptionPane.WARNING_MESSAGE);\t \n\t}\n }", "public static void SaveAchievements()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(achievements_file_name, \"UTF-8\");\n int actualLine = 0, nb_achievements_done = 0;\n while(actualLine<Achievement.NB_ACHIEVEMENTS)\n {\n boolean currentValue = Achievement.achievements_done[actualLine];\n if(currentValue)\n nb_achievements_done++;\n writer.print(Utilities.BoolToInt(currentValue) + \"\\r\\n\");\n actualLine++;\n }\n writer.close();\n Achievement.nb_achievements_done = nb_achievements_done;\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + achievements_file_name + \".\"); }\n }", "private boolean savePosition(File file)\n {\n Node root = new Node();\n Node child = new Node();\n root.addChild(child);\n \n GameInfo info = new GameInfo();\n info.setBoardSize(m_guiboard.getBoardSize());\n m_guiboard.storePosition(child);\n child.setPlayerToMove(m_tomove);\n return save_tree(file, root, info);\n }", "public void saveBoard(String outputBoard) throws IOException\n {\n // Creates a new file named depending on your parameter\n PrintWriter printwriter = new PrintWriter( outputBoard );\n printwriter.println( GRID_SIZE );\n printwriter.println( score );\n // runs through row first, column second\n for ( int i=0; i< GRID_SIZE; i++) {\n for ( int j=0; j< GRID_SIZE; j++) {\n printwriter.print( grid[i][j] + \" \" );\n }\n printwriter.println();\n }\n printwriter.close();\n }", "@Override\n public void saveGame() {\n\n }", "public void saveScores(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(topScores.get(0) + \"-\" + topScores.get(1) + \"-\" + topScores.get(2) + \"-\" + topScores.get(3) + \"-\" + topScores.get(4));\n writer.newLine();\n writer.write(topName.get(0) + \"-\" + topName.get(1) + \"-\" + topName.get(2) + \"-\" + topName.get(3) + \"-\" + topName.get(4));\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}", "public void startSavedGame()\n {\n \n // get rid of nl character left in the stream\n // outFile.flush();\n \n // prompt user and get a file path\n System.out.println(\"\\nWhat is the file path?\");\n String filePath = keyboard.next();\n \n // call the getSavedGame( ) method in the GameControl class to load the game\n GameControl gc = new GameControl();\n gc.getSavedGame(filePath);\n\n // display the game menu for the loaded game\n MainMenuView mmv = new MainMenuView();\n mmv.displaySaveGameView();\n }", "void onGameSaved(File file);", "public static void save()\n {\n try\n {\n FileOutputStream fOS = new FileOutputStream(propsFile); \n props.store(fOS, \"\");\n fOS.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public void saveCharacterInformation() throws IOException, ClassNotFoundException {\n\t\t// @@@@ File writing\n\t\tFileOutputStream fileOut = new FileOutputStream(\"characterSheet.ser\");\n\t\tObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t\tout.writeObject(characterName);\n\t\tout.writeObject(alignment);\n\t\tout.writeObject(playerName);\n\t\tout.writeObject(deity);\n\t\tout.writeObject(homeland);\n\t\tout.writeObject(ageInput);\n\t\tout.writeObject(heightInput);\n\t\tout.writeObject(weightInput);\n\t\tout.close();\n\t\tfileOut.close();\n\t\tSystem.out.printf(\"Serialization finished\");\n\t}", "public void Save() {\n try {\n ObjectOutputStream objUt = new ObjectOutputStream(\n new FileOutputStream(\"sparfil.txt\"));\n objUt.writeObject(this);\n } catch(Exception e) {\n System.out.println(e);}\n }" ]
[ "0.7548275", "0.692615", "0.6828929", "0.68182003", "0.6810132", "0.6748227", "0.67017746", "0.6688937", "0.6681128", "0.6661693", "0.6573443", "0.65555525", "0.65406173", "0.65230906", "0.64932764", "0.64881855", "0.64872736", "0.6456967", "0.64475954", "0.6438539", "0.6422535", "0.64009976", "0.6386182", "0.6362359", "0.63541335", "0.6350944", "0.63478816", "0.6343862", "0.633377", "0.6329909", "0.632955", "0.63254917", "0.6322301", "0.63210666", "0.6311759", "0.62864006", "0.6274725", "0.62523425", "0.62490237", "0.6248537", "0.6229343", "0.6228094", "0.61962986", "0.6189497", "0.6176276", "0.61728454", "0.6166201", "0.61604357", "0.6159349", "0.61578983", "0.61518466", "0.6150533", "0.6143206", "0.6124793", "0.61101496", "0.6109969", "0.6109466", "0.60993564", "0.60937434", "0.60760605", "0.6072418", "0.6070898", "0.6063846", "0.60600543", "0.60558623", "0.6052014", "0.60403013", "0.60388756", "0.6038813", "0.6036124", "0.6024232", "0.6020121", "0.6012933", "0.6006841", "0.6004738", "0.600206", "0.59952176", "0.59872687", "0.59801924", "0.59783816", "0.5974024", "0.596386", "0.59631765", "0.5962758", "0.5961775", "0.59530574", "0.594121", "0.59328353", "0.5920086", "0.591367", "0.5905269", "0.5904294", "0.590311", "0.59005105", "0.58914924", "0.58840793", "0.58781594", "0.5876455", "0.58719945", "0.58664715", "0.5864023" ]
0.0
-1
end of save method
void save2(PrintWriter pw){ int YEG = 0; int XEG = 0; for(int i =0; i < this.Ari.length;i++){ for(int p= 0; p < this.Ari.length; p++){ if(this.Ari[i][p] == 1){ YEG = i; XEG = p; }//end of if statement }//end of inner for loop }//end of outer for loop pw.println(YEG + " " + XEG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void save() {\n \n }", "@Override\n public void save()\n {\n \n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\n public void save() {\n\n }", "@Override\n public void Save() {\n\t \n }", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public void save() {\t\n\t\n\t\n\t}", "@Override\n public void saveValues() {\n \n }", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "public void save() {\n }", "@Override\r\n\tpublic void innerSave() {\n\r\n\t}", "private void saveData() {\n }", "@Override\n public boolean save()\n {\n return false;\n }", "protected abstract void doSave();", "public void save();", "public void save();", "public void save();", "public void save();", "@Override\n public int save( Mention obj ) {\n return 0;\n }", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "public void save(){\n\t\tlowresModelManager.save();\n\t}", "@Override\n\tpublic void save(Religiao obj) throws Exception {\n\t\t\n\t}", "@Override\r\n\tpublic void validateSave() throws Exception {\n\r\n\t}", "void save();", "void save();", "void save();", "protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }", "public Saving() {\n super();\n }", "protected void saveValues() {\n dataModel.persist();\n }", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}", "@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\r\n\tpublic Ngo save(Ngo obj) {\n\t\treturn null;\r\n\t}", "private void saveFunction() {\n }", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}", "protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void save(Field entity) {\n\t\t\n\t}", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "private void save() {\n Saver.saveTeam(team);\n }", "public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}", "@Override\n public void persist() {\n }", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "public boolean save() {\n return false;\n }", "@Override\n\t\tpublic void finishIteration() {\n\t\t\trailroad.save();\n\t\t\tSystem.out.println(\"SAVING!\");\n\t\t\tsuper.finishIteration();\n\t\t}", "private void saveCurrentObject() {\n\t}", "@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}", "@Override\n public Owner save(Owner object) {\n return super.save(object);\n }", "public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}", "@Override\n protected void validateSave(Fornecedor post) {\n\n }", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "@Override\n String save() {\n return \"\";\n }", "public void saveExtraData() {}", "public boolean save();", "@Override\r\n\tpublic void persist() {\n\t}", "public boolean save(BaseVo vo) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic void save(Company company) {\n\t\t\n\t}", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "@Exclude\n public abstract void save();", "@Override\n\tpublic String save() throws Exception {\n\t\treturn null;\n\t}", "protected boolean save() {\r\n\t\tboolean saved=true;\r\n\t\tif(validated()){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tsaved=false;\r\n\t\t}\r\n\t\treturn saved;\r\n\t}", "@Override\n public void save(Game game) {\n }", "public int save() {\n\t\treturn 0;\n\t}", "public void save() throws DfException {\n\t\tobject.save();\n\t}", "@Override\n\tpublic int save(CursoAsignatura ca) {\n\t\treturn 0;\n\t}", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "@PostPersist\n\t@PostUpdate\n\tprivate void storeChangesToDw() {\n\t}", "public void saveFormData() {\r\n if(!saveRequired) return;\r\n if(cvHierarchyData != null && cvHierarchyData.size()>0) {\r\n SponsorHierarchyBean sponsorHierarchyBean;\r\n for(int index=0; index<cvHierarchyData.size(); index++) {\r\n try {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvHierarchyData.get(index);\r\n if(sponsorHierarchyBean.getAcType() != null) {\r\n if(sponsorHierarchyBean.getAcType() == TypeConstants.UPDATE_RECORD) {\r\n queryEngine.update(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.INSERT_RECORD) {\r\n queryEngine.insert(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.DELETE_RECORD) {\r\n queryEngine.delete(queryKey,sponsorHierarchyBean);\r\n }\r\n }\r\n }catch(CoeusException coeusException){\r\n coeusException.printStackTrace();\r\n }\r\n }\r\n }\r\n saveRequired = false;\r\n }", "@Override\n\tpublic void save(Person person) {\n\t\t\n\t}", "@Override\r\n\tpublic Visit save(Visit object) {\n\t\treturn super.save(object);\r\n\t}", "public void trySave() throws BOException {\n//\t\tif (verifyState()) {\n\t\tverifyState();\n\t\tsave();\n//\t\t}\n\t}", "@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}", "@Override\n public ContentValues db_save(ContentValues values) {\n return null;\n }", "@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "public void saveBack() {\n\t\tmodified = false;\n\n\t\t// set basics\n\t\tRubyHelper.setNum(object, \"@code\", id);\n\t\tRubyHelper.setNum(object, \"@indent\", indent);\n\n\t\t// set parameters\n\t\tRubyArray para = (RubyArray) object.getInstanceVariable(\"@parameters\");\n\t\tpara.clear();\n\n\t\tfor (IRubyObject r : parameters) {\n\t\t\tpara.add(r);\n\t\t}\n\t}", "public void saveModel() {\n\t}", "@Override\n\tprotected void save() throws Exception {\n\t\t//turn the list of data into a unique list of tickets\n\t\tMap<String, ExtTicketVO> tickets= new HashMap<>(data.size());\n\t\tfor (SOHDRFileVO dataVo : data) {\n\t\t\t//035 are harvests and all we care about\n\t\t\tif (\"035\".equals(dataVo.getSoType())) {\n\t\t\t\tExtTicketVO vo = transposeTicketData(dataVo, new ExtTicketVO());\n\t\t\t\ttickets.put(vo.getTicketId(), vo);\n\t\t\t}\n\t\t}\n\n\t\tpopulateTicketDBData(tickets);\n\n\t\ttickets = removeGhostRecords(tickets);\n\n\t\t//don't bother with the rest of this class if we have no tickets\n\t\tif (tickets.isEmpty()) return;\n\n\t\tdecomissionUnits(tickets.keySet()); //ticket\n\n\t\tpurgePartShipments(tickets.keySet()); //calls purgeShipments to cascade deletion\n\n\t\tsetDispositionCode(tickets); //ticket_data attr_dispositionCode\tNONREPAIRABLE\n\n\t\tcorrectLedgerEntries(tickets);\n\t}", "@Override\n\tItem save(Item item);", "@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}", "public void save() {\n settingService.saveMaxScore(score);\r\n// powerUpCount = 0;\r\n// powerDownCount = 0;\r\n// purplePowerCount = 0;\r\n// yellowMadnessCount = 0;\r\n// shapeCount = 0;\r\n }", "void save(Bill bill);", "@PrePersist\n private void onSave()\n {\n this.lastUpdateDateTime = new Date();\n if(this.registerDateTime == null)\n {\n this.registerDateTime = new Date();\n }\n \n if(this.personKey == null || this.personKey.isEmpty())\n {\n this.personKey = UUID.randomUUID().toString();\n }\n \n if(this.activationDate == null && (this.activationKey == null || this.activationKey.isEmpty()))\n {\n this.activationKey = UUID.randomUUID().toString();\n this.activationDate = new Date();\n }\n \n // O ID só será 0 (zero) se for a criação do registro no banco\n if(this.id == 0)\n {\n this.isValid = false;\n }\n }", "@Override\r\n\tpublic GameState save() {\n\t\treturn null;\r\n\t}", "void saveData() throws SerializerException;", "public boolean doSave() {\n return true;\n }", "public void save() {\n\t\tSystem.out.println(\"-----------from PersonDao.save()\");\n\t}", "@Override\n\tprotected void prepareForSave() throws WorkflowException {\n\n\t}", "protected void doSave() {\n GWT.log(\"Please override\");\n }", "public abstract String doSave() throws Exception;", "@Override\n\tpublic String save(Model m) throws Exception {\n\t\treturn null;\n\t}", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}" ]
[ "0.8167485", "0.8131333", "0.8062892", "0.8062892", "0.7905353", "0.7905353", "0.7882997", "0.7857697", "0.7781345", "0.7717348", "0.7635301", "0.7602069", "0.7460948", "0.7453943", "0.7356166", "0.7213759", "0.71668506", "0.715709", "0.71376795", "0.70257", "0.70257", "0.70257", "0.70257", "0.70057434", "0.6982785", "0.6966383", "0.68952405", "0.68706816", "0.6870455", "0.6870455", "0.6870455", "0.6851211", "0.6800791", "0.6785017", "0.6781269", "0.6772469", "0.6772469", "0.67572904", "0.6749307", "0.6738926", "0.6716908", "0.67028034", "0.67023337", "0.6701848", "0.6691423", "0.6652891", "0.664143", "0.66261727", "0.6612625", "0.6610356", "0.66103274", "0.66021705", "0.6595206", "0.65935254", "0.65915143", "0.65806293", "0.6564721", "0.65532684", "0.65524375", "0.6551068", "0.6542512", "0.65415925", "0.65356195", "0.65319484", "0.65215397", "0.6511214", "0.6510211", "0.65099865", "0.65046775", "0.6493397", "0.64918387", "0.6483571", "0.6483048", "0.6476845", "0.6463992", "0.64573604", "0.64556885", "0.6441726", "0.6441583", "0.6437814", "0.6431321", "0.64264864", "0.6426296", "0.6415547", "0.64150536", "0.6414903", "0.6414356", "0.64136696", "0.640878", "0.64041364", "0.63949996", "0.6390429", "0.63898045", "0.63897663", "0.6388488", "0.63808686", "0.63685316", "0.636786", "0.63568854", "0.6351006", "0.6345372" ]
0.0
-1
end of save2 methid
void save3(PrintWriter pw){ pw.println(" "); int YEG = 0; int XEG = 0; for(int i =0; i < this.position.length;i++){ for(int p= 0; p < this.position.length; p++){ if(this.position[i][p] == 1){ YEG = i; XEG = p; }//end of if statement }//end of inner for loop }//end of outer for loop pw.println(YEG + " " + XEG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void save() {\t\n\t\n\t\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\n public void Save() {\n\t \n }", "@Override\n public void save() {\n\n }", "@Override\n public void save() {\n \n }", "@Override\n public void save()\n {\n \n }", "public void save() {\n }", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "@Override\r\n\tpublic void innerSave() {\n\r\n\t}", "void save();", "void save();", "void save();", "protected abstract void doSave();", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "public void save();", "public void save();", "public void save();", "public void save();", "@Override\n\tpublic void save(Religiao obj) throws Exception {\n\t\t\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public int save( Mention obj ) {\n return 0;\n }", "private void saveData() {\n }", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "private void saveFunction() {\n }", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "@Override\n public void saveValues() {\n \n }", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}", "@Test\n\t\tpublic void testSave2()\n\t\t{\n\t\t\tChObject cho = repoTest.get(\"68268301\");\n\t\t\trepoTest.remove(cho);\n\t\t\tcho.setDate(\"1900\");\n\t\t\tcho.setDescription(\"test input\");\n\t\t\trepoTest.save(cho);\n\n\t\t\tChObject cho2 = repoTest.get(\"68268301\");\n\t\t\tassertTrue(\"1900\".equals(cho2.getDate()));\n\t\t\tassertTrue(\"test input\".equals(cho2.getDescription()));\n\t\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\n\tpublic void save(WorkSummary entity1, Employee entity2) {\n\n\t}", "public void saveBack() {\n\t\tmodified = false;\n\n\t\t// set basics\n\t\tRubyHelper.setNum(object, \"@code\", id);\n\t\tRubyHelper.setNum(object, \"@indent\", indent);\n\n\t\t// set parameters\n\t\tRubyArray para = (RubyArray) object.getInstanceVariable(\"@parameters\");\n\t\tpara.clear();\n\n\t\tfor (IRubyObject r : parameters) {\n\t\t\tpara.add(r);\n\t\t}\n\t}", "public void saveExtraData() {}", "private void saveGame(){\n\t\t\n\t}", "@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void doSaveAs() {\n\t}", "public void save(Object obj) throws HibException;", "@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}", "@Override\r\n\tpublic Ngo save(Ngo obj) {\n\t\treturn null;\r\n\t}", "public abstract String doSave() throws Exception;", "void save(Bill bill);", "private void saveCurrentObject() {\n\t}", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "public int save() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}", "@Override\n\tpublic void save(Person person) {\n\t\t\n\t}", "@Override\n public boolean save()\n {\n return false;\n }", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "public boolean save(New object);", "public boolean save();", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "@Override\n public void save(Game game) {\n }", "@Override\r\n\tpublic <S extends Estates> S save(S arg0) {\n\t\treturn null;\r\n\t}", "public boolean save(BaseVo vo) {\n\t\t\t\treturn false;\n\t\t\t}", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "@Override\n public void saveGame() {\n\n }", "@Override\r\n protected XMLSave createXMLSave() {\r\n prepareSave();\r\n return super.createXMLSave();\r\n }", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "@Override\n\tItem save(Item item);", "@Override\n\tpublic int save(CursoAsignatura ca) {\n\t\treturn 0;\n\t}", "public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}", "@Override\r\n\tpublic void validateSave() throws Exception {\n\r\n\t}", "int needsSaving();", "@Exclude\n public abstract void save();", "@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}", "public void saveJbdTravelPoint2014(JbdTravelPoint2014 jbdTravelPoint2014);", "public Saving() {\n super();\n }", "@Override\n\tpublic void save(Field entity) {\n\t\t\n\t}", "@Override\r\n\tpublic ObjectWithId save(ObjectWithId objectToSave) {\n\t\treturn null;\r\n\t}", "protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}", "public void save(){\n\t\tlowresModelManager.save();\n\t}", "public void save(Person p) {\n\n\t}", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "@Override\n\tpublic Spittle save(Spittle spittle) {\n\t\treturn null;\n\t}", "@Override\n\tpublic <S extends Pessoa> S save(S arg0) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void save(Photo photo) {\n\t\t\n\t}", "protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n rom.save(obstacle, frog);\n isSaved = true;\n }", "@Override\r\n\tpublic void onSave(Bundle outState) {\n\t}", "@Override\n protected void validateSave(Fornecedor post) {\n\n }", "T save(T t);", "@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "public void saveModel() {\n\t}", "@Override\n\tpublic <S extends ComplitedOrderInfo> Iterable<S> save(Iterable<S> arg0) {\n\t\treturn null;\n\t}", "private void saveString(String paramString1, String paramString2) {\n }", "private void save() {\n Saver.saveTeam(team);\n }", "public MainItemOrdered save(MainItemOrdered mainItemOrdered);", "@Override\n String save() {\n return \"\";\n }", "@Override\n public Owner save(Owner object) {\n return super.save(object);\n }", "int save(T t);", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "public void saveModel() {\n\n }" ]
[ "0.7444135", "0.7444135", "0.7392914", "0.7318031", "0.7318031", "0.7279988", "0.72069126", "0.7205703", "0.71892965", "0.7067109", "0.7058565", "0.7029092", "0.69141304", "0.69141304", "0.69141304", "0.6908128", "0.6897477", "0.68284833", "0.68284833", "0.68284833", "0.68284833", "0.68192", "0.67657083", "0.6743146", "0.67387974", "0.66876394", "0.6642799", "0.6634676", "0.6610316", "0.6527014", "0.6525769", "0.64488137", "0.6439634", "0.64206964", "0.64206964", "0.64111876", "0.63760334", "0.63745046", "0.63709974", "0.6366233", "0.63590115", "0.6350135", "0.63346595", "0.6315751", "0.63145584", "0.63065165", "0.62918854", "0.6268688", "0.6264814", "0.62523365", "0.6250814", "0.6229082", "0.6218834", "0.61990064", "0.61960614", "0.61585015", "0.61446613", "0.613617", "0.612795", "0.61184347", "0.6117984", "0.61116344", "0.6109306", "0.60920453", "0.6089625", "0.6087199", "0.60848343", "0.6084625", "0.6078443", "0.6067802", "0.60661775", "0.6059731", "0.6056277", "0.6051128", "0.60431546", "0.60380644", "0.6037815", "0.60335124", "0.6031673", "0.6026131", "0.60230225", "0.60164475", "0.6010957", "0.6009927", "0.5992328", "0.59737915", "0.59714764", "0.59614354", "0.5957452", "0.59567434", "0.59490997", "0.59478414", "0.5944195", "0.592626", "0.5925463", "0.5922941", "0.5922592", "0.5916079", "0.5911966", "0.59090555", "0.5908561" ]
0.0
-1
end of save3 method
void save4(PrintWriter pw){ pw.println(" "); int YEG = 0; int XEG = 0; for(int i =0; i < this.Items.length;i++){ for(int p= 0; p < this.Items.length; p++){ if(this.Items[i][p] != null){ YEG = i; XEG = p; }//end of if statement }//end of inner for loop }//end of outer for loop pw.println(YEG + " " + XEG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void save() {\t\n\t\n\t\n\t}", "@Override\n public void save() {\n \n }", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\n public void save()\n {\n \n }", "@Override\n public void Save() {\n\t \n }", "@Override\n public void save() {\n\n }", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "void save();", "void save();", "void save();", "private void saveData() {\n }", "@Override\r\n\tpublic void innerSave() {\n\r\n\t}", "@Override\n public void saveValues() {\n \n }", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "public void save() {\n }", "private void saveFunction() {\n }", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "@Override\n public int save( Mention obj ) {\n return 0;\n }", "public void save();", "public void save();", "public void save();", "public void save();", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "protected abstract void doSave();", "@Override\n\tpublic void save(Religiao obj) throws Exception {\n\t\t\n\t}", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "private void saveGame(){\n\t\t\n\t}", "@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }", "public void saveExtraData() {}", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\r\n\tpublic Ngo save(Ngo obj) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "@Override\n public boolean save()\n {\n return false;\n }", "@Override\n\tpublic int save(CursoAsignatura ca) {\n\t\treturn 0;\n\t}", "public void saveBack() {\n\t\tmodified = false;\n\n\t\t// set basics\n\t\tRubyHelper.setNum(object, \"@code\", id);\n\t\tRubyHelper.setNum(object, \"@indent\", indent);\n\n\t\t// set parameters\n\t\tRubyArray para = (RubyArray) object.getInstanceVariable(\"@parameters\");\n\t\tpara.clear();\n\n\t\tfor (IRubyObject r : parameters) {\n\t\t\tpara.add(r);\n\t\t}\n\t}", "@Override\n\tprotected void save() throws Exception {\n\t\t//turn the list of data into a unique list of tickets\n\t\tMap<String, ExtTicketVO> tickets= new HashMap<>(data.size());\n\t\tfor (SOHDRFileVO dataVo : data) {\n\t\t\t//035 are harvests and all we care about\n\t\t\tif (\"035\".equals(dataVo.getSoType())) {\n\t\t\t\tExtTicketVO vo = transposeTicketData(dataVo, new ExtTicketVO());\n\t\t\t\ttickets.put(vo.getTicketId(), vo);\n\t\t\t}\n\t\t}\n\n\t\tpopulateTicketDBData(tickets);\n\n\t\ttickets = removeGhostRecords(tickets);\n\n\t\t//don't bother with the rest of this class if we have no tickets\n\t\tif (tickets.isEmpty()) return;\n\n\t\tdecomissionUnits(tickets.keySet()); //ticket\n\n\t\tpurgePartShipments(tickets.keySet()); //calls purgeShipments to cascade deletion\n\n\t\tsetDispositionCode(tickets); //ticket_data attr_dispositionCode\tNONREPAIRABLE\n\n\t\tcorrectLedgerEntries(tickets);\n\t}", "@Override\n public void save(Game game) {\n }", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "@Override\r\n\tpublic void validateSave() throws Exception {\n\r\n\t}", "private void save() {\n Tile[][] field = gameController.grid.field;\n Tile[][] undoField = gameController.grid.undoField;\n// SharedPreferenceUtil.put(this, SpConstant.WIDTH, field.length);\n// SharedPreferenceUtil.put(this, SpConstant.HEIGHT, field.length);\n for (int xx = 0; xx < field.length; xx++) {\n for (int yy = 0; yy < field[0].length; yy++) {\n if (field[xx][yy] != null) {\n SharedPreferenceUtil.put(this, xx + \"_\" + yy, field[xx][yy].getValue());\n } else {\n SharedPreferenceUtil.put(this, xx + \"_\" + yy, 0);\n }\n\n if (undoField[xx][yy] != null) {\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GRID + xx + \"_\" + yy, undoField[xx][yy].getValue());\n } else {\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GRID + xx + \"_\" + yy, 0);\n }\n }\n }\n SharedPreferenceUtil.put(this, SpConstant.SCORE, gameController.currentScore);\n SharedPreferenceUtil.put(this, SpConstant.HIGH_SCORE_TEMP, gameController.historyHighScore);\n SharedPreferenceUtil.put(this, SpConstant.UNDO_SCORE, gameController.lastScore);\n SharedPreferenceUtil.put(this, SpConstant.CAN_UNDO, gameController.canUndo);\n SharedPreferenceUtil.put(this, SpConstant.GAME_STATE, gameController.gameState);\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GAME_STATE, gameController.lastGameState);\n SharedPreferenceUtil.put(this, SpConstant.AUDIO_ENABLED, gameController.isAudioEnabled);\n }", "@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}", "@Override\n\tItem save(Item item);", "public int save() {\n\t\treturn 0;\n\t}", "protected void saveData(DataModel[] models) throws Exception {\n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "private void saveCurrentObject() {\n\t}", "public abstract String doSave() throws Exception;", "int needsSaving();", "private void save() {\n var boolGrid = editor.getBoolGrid();\n //Generate a track grid from the bool frid\n var grid = Track.createFromBoolGrid(boolGrid);\n var valid = Track.isValidTrack(grid);\n if (!valid) {\n //fire an error event\n MessageBus.fire(new ErrorEvent(\"Invalid track\", \"\", 2));\n } else {\n //Save the track and pop back\n var generator = new TrackFromGridGenerator(grid);\n var track = generator.generateTrack();\n (new TrackStorageManager()).saveTrack(track);\n menu.navigationPop();\n menu.showError(new ErrorEvent(\"Saved track!\", \"\", 2, Colour.GREEN));\n }\n }", "@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}", "void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }", "public void save(){\n\t\tlowresModelManager.save();\n\t}", "public MainItemOrdered save(MainItemOrdered mainItemOrdered);", "public boolean save();", "public static void save()\n\t{\n writeMap();\n\t}", "@Override\n public void saveGame() {\n\n }", "@Override\n\t\tpublic void finishIteration() {\n\t\t\trailroad.save();\n\t\t\tSystem.out.println(\"SAVING!\");\n\t\t\tsuper.finishIteration();\n\t\t}", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "private void saveData() {\n\t\tdataSaver.save(data);\n\t}", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "public void save(){\r\n if (inputValidation()) {\r\n if (modifyingPart) {\r\n saveExisting();\r\n } else {\r\n saveNew();\r\n }\r\n closeWindow();\r\n }\r\n\r\n }", "private void save(Store store) {\n if (saved) {\n return;\n }\n\n if (saves.isEmpty()) {\n saved = true;\n return;\n }\n\n store.save(saves);\n saved = true;\n }", "public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}", "public void onSaveClick() {\n Log.d(\"database\", \"onSaveClick invoked.\");\n Prediction p = new Prediction(0, resultStringToSave, byteArrayToSave);\n Log.d(\"database\", \"Prediction before adding to db... id: ? prediction string: \" + resultStringToSave + \" bytearr: \" + byteArrayToSave);\n PredictionDatabase.insert(p);\n // save to db\n }", "public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}", "void save(Bill bill);", "public void saveFormData() {\r\n if(!saveRequired) return;\r\n if(cvHierarchyData != null && cvHierarchyData.size()>0) {\r\n SponsorHierarchyBean sponsorHierarchyBean;\r\n for(int index=0; index<cvHierarchyData.size(); index++) {\r\n try {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvHierarchyData.get(index);\r\n if(sponsorHierarchyBean.getAcType() != null) {\r\n if(sponsorHierarchyBean.getAcType() == TypeConstants.UPDATE_RECORD) {\r\n queryEngine.update(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.INSERT_RECORD) {\r\n queryEngine.insert(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.DELETE_RECORD) {\r\n queryEngine.delete(queryKey,sponsorHierarchyBean);\r\n }\r\n }\r\n }catch(CoeusException coeusException){\r\n coeusException.printStackTrace();\r\n }\r\n }\r\n }\r\n saveRequired = false;\r\n }", "public void save(Object obj) throws HibException;", "private void save() {\n Saver.saveTeam(team);\n }", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "private boolean savingData(Track track){\n return sqLiteController.SAVE_TRACK_DATA(track);\n }", "@Override\n\tpublic String save() throws Exception {\n\t\treturn null;\n\t}", "public void save() throws IOException {\n/* 481 */ Connection dbcon = null;\n/* 482 */ PreparedStatement ps = null;\n/* */ \n/* */ try {\n/* 485 */ CreaturePos pos = CreaturePos.getPosition(this.wurmid);\n/* 486 */ if (pos != null) {\n/* */ \n/* 488 */ pos.setPosX(this.posx);\n/* 489 */ pos.setPosY(this.posy);\n/* 490 */ pos.setPosZ(this.posz, false);\n/* 491 */ pos.setRotation(this.rotation);\n/* 492 */ pos.setZoneId(this.zoneid);\n/* 493 */ pos.setLayer(0);\n/* */ } else {\n/* */ \n/* 496 */ new CreaturePos(this.wurmid, this.posx, this.posy, this.posz, this.rotation, this.zoneid, 0, -10L, true);\n/* 497 */ } dbcon = DbConnector.getPlayerDbCon();\n/* 498 */ if (exists(dbcon)) {\n/* */ \n/* 500 */ ps = dbcon.prepareStatement(\"DELETE FROM PLAYERS WHERE WURMID=?\");\n/* 501 */ ps.setLong(1, this.wurmid);\n/* 502 */ ps.executeUpdate();\n/* 503 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* 505 */ ps = dbcon.prepareStatement(\"insert into PLAYERS (MAYUSESHOP,PASSWORD,WURMID,LASTLOGOUT,PLAYINGTIME,TEMPLATENAME,SEX,CENTIMETERSHIGH,CENTIMETERSLONG,CENTIMETERSWIDE,INVENTORYID,BODYID,MONEYSALES,BUILDINGID,STAMINA,HUNGER,THIRST,IPADDRESS,REIMBURSED,PLANTEDSIGN,BANNED,PAYMENTEXPIRE,POWER,RANK,DEVTALK,WARNINGS,LASTWARNED,FAITH,DEITY,ALIGNMENT,GOD,FAVOR,LASTCHANGEDDEITY,REALDEATH,CHEATED,LASTFATIGUE,FATIGUE,DEAD,KINGDOM,SESSIONKEY,SESSIONEXPIRE,VERSION,MUTED,LASTFAITH,NUMFAITH,MONEY,CLIMBING,NUMSCHANGEDKINGDOM,AGE,LASTPOLLEDAGE,FAT,BANEXPIRY,BANREASON,FACE,REPUTATION,LASTPOLLEDREP,TITLE,PET,NICOTINE,NICOTINETIME,ALCOHOL,ALCOHOLTIME,LOGGING,MAYMUTE,MUTEEXPIRY,MUTEREASON,LASTSERVER,CURRENTSERVER,REFERRER,EMAIL,PWQUESTION,PWANSWER,PRIEST,BED,SLEEP,CREATIONDATE,THEFTWARNED,NOREIMB,DEATHPROT,FATIGUETODAY,FATIGUEYDAY,FIGHTMODE,NEXTAFFINITY,DETECTIONSECS,TUTORIALLEVEL,AUTOFIGHT,APPOINTMENTS,PA,APPOINTPA,PAWINDOW,NUTRITION,DISEASE,PRIESTTYPE,LASTCHANGEDPRIEST,LASTCHANGEDKINGDOM,LASTLOSTCHAMPION,CHAMPIONPOINTS,CHAMPCHANNELING,MUTETIMES,VOTEDKING,EPICKINGDOM,EPICSERVER,CHAOSKINGDOM,FREETRANSFER,HOTA_WINS,LASTMODIFIEDRANK,MAXRANK,KARMA,MAXKARMA,TOTALKARMA,BLOOD,FLAGS,FLAGS2,ABILITIES,ABILITYTITLE,SCENARIOKARMA,UNDEADTYPE,UNDEADKILLS,UNDEADPKILLS,UNDEADPSECS,NAME,CALORIES,CARBS,FATS,PROTEINS,SECONDTITLE) VALUES(?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n/* 506 */ ps.setBoolean(1, this.overrideshop);\n/* 507 */ ps.setString(2, this.password);\n/* 508 */ ps.setLong(3, this.wurmid);\n/* 509 */ ps.setLong(4, System.currentTimeMillis());\n/* 510 */ ps.setLong(5, this.playingTime);\n/* 511 */ ps.setString(6, this.templateName);\n/* 512 */ ps.setByte(7, this.sex);\n/* 513 */ ps.setShort(8, this.centhigh);\n/* 514 */ ps.setShort(9, this.centlong);\n/* 515 */ ps.setShort(10, this.centwide);\n/* 516 */ ps.setLong(11, this.inventoryId);\n/* 517 */ ps.setLong(12, this.bodyId);\n/* 518 */ ps.setLong(13, this.moneySalesEver);\n/* 519 */ ps.setLong(14, this.buildingId);\n/* 520 */ ps.setShort(15, (short)this.stamina);\n/* 521 */ ps.setShort(16, (short)this.hunger);\n/* 522 */ ps.setShort(17, (short)this.thirst);\n/* 523 */ ps.setString(18, this.lastip);\n/* 524 */ ps.setBoolean(19, this.reimbursed);\n/* 525 */ ps.setLong(20, this.plantedSign);\n/* 526 */ ps.setBoolean(21, this.banned);\n/* 527 */ ps.setLong(22, this.paymentExpire);\n/* 528 */ ps.setByte(23, this.power);\n/* 529 */ ps.setInt(24, this.rank);\n/* 530 */ ps.setBoolean(25, this.mayHearDevtalk);\n/* 531 */ ps.setShort(26, (short)this.warnings);\n/* 532 */ ps.setLong(27, this.lastwarned);\n/* 533 */ ps.setFloat(28, this.faith);\n/* 534 */ ps.setByte(29, this.deity);\n/* 535 */ ps.setFloat(30, this.align);\n/* 536 */ ps.setByte(31, this.god);\n/* 537 */ ps.setFloat(32, this.favor);\n/* 538 */ ps.setLong(33, this.lastChangedDeity);\n/* 539 */ ps.setByte(34, this.realdeathcounter);\n/* 540 */ ps.setLong(35, this.lastcheated);\n/* 541 */ ps.setLong(36, this.lastfatigue);\n/* 542 */ ps.setInt(37, this.fatiguesecsleft);\n/* 543 */ ps.setBoolean(38, this.dead);\n/* 544 */ ps.setByte(39, this.kingdom);\n/* 545 */ ps.setString(40, this.session);\n/* 546 */ ps.setLong(41, this.sessionExpiration);\n/* 547 */ ps.setLong(42, this.ver);\n/* 548 */ ps.setBoolean(43, this.mute);\n/* 549 */ ps.setLong(44, this.lastfaith);\n/* 550 */ ps.setByte(45, this.numfaith);\n/* 551 */ ps.setLong(46, this.money);\n/* 552 */ ps.setBoolean(47, this.climbing);\n/* 553 */ ps.setByte(48, this.changedKingdom);\n/* 554 */ ps.setInt(49, this.age);\n/* 555 */ ps.setLong(50, this.lastPolledAge);\n/* 556 */ ps.setByte(51, this.fat);\n/* 557 */ ps.setLong(52, this.banexpiry);\n/* 558 */ ps.setString(53, this.banreason);\n/* 559 */ ps.setLong(54, this.face);\n/* 560 */ ps.setInt(55, this.reputation);\n/* 561 */ ps.setLong(56, this.lastPolledReputation);\n/* 562 */ ps.setInt(57, this.title);\n/* 563 */ ps.setLong(58, this.pet);\n/* 564 */ ps.setFloat(59, this.nicotine);\n/* 565 */ ps.setLong(60, this.nicotineTime);\n/* 566 */ ps.setFloat(61, this.alcohol);\n/* 567 */ ps.setLong(62, this.alcoholTime);\n/* 568 */ ps.setBoolean(63, this.logging);\n/* 569 */ ps.setBoolean(64, this.mayMute);\n/* 570 */ ps.setLong(65, this.muteexpiry);\n/* 571 */ ps.setString(66, this.mutereason);\n/* 572 */ ps.setInt(67, this.lastServer);\n/* 573 */ ps.setInt(68, this.currentServer);\n/* 574 */ ps.setLong(69, this.referrer);\n/* 575 */ ps.setString(70, this.emailAdress);\n/* 576 */ ps.setString(71, this.pwQuestion);\n/* 577 */ ps.setString(72, this.pwAnswer);\n/* 578 */ ps.setBoolean(73, this.isPriest);\n/* 579 */ ps.setLong(74, this.bed);\n/* 580 */ ps.setInt(75, this.sleep);\n/* 581 */ ps.setLong(76, this.creationDate);\n/* 582 */ ps.setBoolean(77, this.istheftwarned);\n/* 583 */ ps.setBoolean(78, this.noReimbLeft);\n/* 584 */ ps.setBoolean(79, this.deathProt);\n/* 585 */ ps.setInt(80, this.fatigueSecsToday);\n/* 586 */ ps.setInt(81, this.fatigueSecsYday);\n/* 587 */ ps.setByte(82, this.fightmode);\n/* 588 */ ps.setLong(83, this.nextAffinity);\n/* 589 */ ps.setShort(84, this.detectionSecs);\n/* 590 */ ps.setInt(85, this.tutLevel);\n/* 591 */ ps.setBoolean(86, this.autofight);\n/* 592 */ ps.setLong(87, this.appointments);\n/* 593 */ ps.setBoolean(88, this.isPA);\n/* 594 */ ps.setBoolean(89, this.mayAppointPA);\n/* 595 */ ps.setBoolean(90, this.seesPAWin);\n/* 596 */ ps.setFloat(91, this.nutrition);\n/* 597 */ ps.setByte(92, this.disease);\n/* 598 */ ps.setByte(93, this.priestType);\n/* 599 */ ps.setLong(94, this.lastChangedPriestType);\n/* 600 */ ps.setLong(95, this.lastChangedKingdom);\n/* 601 */ ps.setLong(96, this.lastLostChampion);\n/* 602 */ ps.setShort(97, this.championPoints);\n/* 603 */ ps.setFloat(98, this.champChanneling);\n/* 604 */ ps.setShort(99, this.muteTimes);\n/* 605 */ ps.setBoolean(100, this.voteKing);\n/* 606 */ ps.setByte(101, this.epicKingdom);\n/* 607 */ ps.setInt(102, this.epicServerId);\n/* 608 */ ps.setInt(103, this.chaosKingdom);\n/* 609 */ ps.setBoolean(104, this.hasFreeTransfer);\n/* 610 */ ps.setShort(105, this.hotaWins);\n/* */ \n/* 612 */ ps.setLong(106, this.lastModifiedRank);\n/* 613 */ ps.setInt(107, this.maxRank);\n/* 614 */ ps.setInt(108, this.karma);\n/* 615 */ ps.setInt(109, this.maxKarma);\n/* 616 */ ps.setInt(110, this.totalKarma);\n/* 617 */ ps.setByte(111, this.blood);\n/* 618 */ ps.setLong(112, this.flags);\n/* 619 */ ps.setLong(113, this.flags2);\n/* 620 */ ps.setLong(114, this.abilities);\n/* 621 */ ps.setInt(115, this.abilityTitle);\n/* 622 */ ps.setInt(116, this.scenarioKarma);\n/* */ \n/* 624 */ ps.setByte(117, this.undeadType);\n/* 625 */ ps.setInt(118, this.undeadKills);\n/* 626 */ ps.setInt(119, this.undeadPKills);\n/* 627 */ ps.setInt(120, this.undeadPSecs);\n/* */ \n/* 629 */ ps.setString(121, this.name);\n/* 630 */ ps.setFloat(122, this.calories);\n/* 631 */ ps.setFloat(123, this.carbs);\n/* 632 */ ps.setFloat(124, this.fats);\n/* 633 */ ps.setFloat(125, this.proteins);\n/* */ \n/* 635 */ ps.setInt(126, this.secondTitle);\n/* */ \n/* 637 */ ps.executeUpdate();\n/* 638 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 640 */ Players.getInstance().registerNewKingdom(this.wurmid, this.kingdom);\n/* */ \n/* 642 */ ps = dbcon.prepareStatement(\"DELETE FROM FRIENDS WHERE WURMID=?\");\n/* 643 */ ps.setLong(1, this.wurmid);\n/* 644 */ ps.executeUpdate();\n/* 645 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 647 */ if (this.friends != null)\n/* */ {\n/* 649 */ for (int x = 0; x < this.friends.length; x++) {\n/* */ \n/* 651 */ ps = dbcon.prepareStatement(INSERT_FRIEND);\n/* 652 */ ps.setLong(1, this.wurmid);\n/* 653 */ ps.setLong(2, this.friends[x]);\n/* 654 */ ps.setByte(3, this.friendcats[x]);\n/* 655 */ ps.executeUpdate();\n/* 656 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 660 */ ps = dbcon.prepareStatement(\"DELETE FROM IGNORED WHERE WURMID=?\");\n/* 661 */ ps.setLong(1, this.wurmid);\n/* 662 */ ps.executeUpdate();\n/* 663 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 665 */ if (this.ignored != null)\n/* */ {\n/* 667 */ for (int x = 0; x < this.ignored.length; x++) {\n/* */ \n/* 669 */ ps = dbcon.prepareStatement(INSERT_IGNORED);\n/* 670 */ ps.setLong(1, this.wurmid);\n/* 671 */ ps.setLong(2, this.ignored[x]);\n/* 672 */ ps.executeUpdate();\n/* 673 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 677 */ if (this.enemies != null)\n/* */ {\n/* 679 */ for (int x = 0; x < this.enemies.length; x++) {\n/* */ \n/* 681 */ ps = dbcon.prepareStatement(INSERT_ENEMY);\n/* 682 */ ps.setLong(1, this.wurmid);\n/* 683 */ ps.setLong(2, this.enemies[x]);\n/* 684 */ ps.executeUpdate();\n/* 685 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 689 */ if (this.titleArr.length > 0)\n/* */ {\n/* 691 */ for (int x = 0; x < this.titleArr.length; x++) {\n/* */ \n/* 693 */ Titles.Title t = Titles.Title.getTitle(this.titleArr[x]);\n/* 694 */ if (t != null) {\n/* */ \n/* 696 */ ps = dbcon.prepareStatement(\"INSERT INTO TITLES (WURMID,TITLEID,TITLENAME) VALUES(?,?,?)\");\n/* 697 */ ps.setLong(1, this.wurmid);\n/* 698 */ ps.setInt(2, this.titleArr[x]);\n/* 699 */ ps.setString(3, t.getName(true));\n/* 700 */ ps.executeUpdate();\n/* 701 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 706 */ if (this.hasAwards) {\n/* */ \n/* 708 */ ps = dbcon.prepareStatement(\"DELETE FROM AWARDS WHERE WURMID=?\");\n/* 709 */ ps.setLong(1, this.wurmid);\n/* 710 */ ps.executeUpdate();\n/* 711 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 713 */ ps = dbcon.prepareStatement(\"INSERT INTO AWARDS(WURMID, DAYSPREM, MONTHSPREM, MONTHSEVER, CONSECMONTHS, SILVERSPURCHASED, LASTTICKEDPREM, CURRENTLOYALTY, TOTALLOYALTY) VALUES(?,?,?,?,?,?,?,?,?)\");\n/* 714 */ ps.setLong(1, this.wurmid);\n/* 715 */ ps.setInt(2, this.daysPrem);\n/* 716 */ ps.setInt(3, this.monthsPaidSinceReset);\n/* 717 */ ps.setInt(4, this.monthsPaidEver);\n/* 718 */ ps.setInt(5, this.monthsPaidInARow);\n/* 719 */ ps.setInt(6, this.silverPaidEver);\n/* 720 */ ps.setLong(7, this.lastTicked);\n/* 721 */ ps.setInt(8, this.currentLoyaltyPoints);\n/* 722 */ ps.setInt(9, this.totalLoyaltyPoints);\n/* 723 */ ps.executeUpdate();\n/* 724 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* 726 */ if (this.cooldowns.size() > 0)\n/* */ {\n/* 728 */ Cooldowns cd = Cooldowns.getCooldownsFor(this.wurmid, true);\n/* 729 */ for (Map.Entry<Integer, Long> ent : this.cooldowns.entrySet())\n/* */ {\n/* 731 */ cd.addCooldown(((Integer)ent.getKey()).intValue(), ((Long)ent.getValue()).longValue(), false);\n/* */ }\n/* */ }\n/* */ \n/* 735 */ } catch (SQLException sqex) {\n/* */ \n/* 737 */ logger.log(Level.WARNING, this.name + \" \" + sqex.getMessage(), sqex);\n/* 738 */ throw new IOException(sqex);\n/* */ }\n/* */ finally {\n/* */ \n/* 742 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* 743 */ DbConnector.returnConnection(dbcon);\n/* */ } \n/* */ }", "@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}", "void saveData() throws SerializerException;", "public void save(){\n checkpoint = chapter;\n }", "public void saveMaterials() {\n\t}", "public void saveState() { }", "@Override\n\tpublic void saveSettings() {\n\n\t}", "public boolean save(Data model);", "@Override\r\n\tpublic void onSave(Bundle outState) {\n\t}", "@Override\r\n\tpublic GameState save() {\n\t\treturn null;\r\n\t}", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "protected void saveValues() {\n dataModel.persist();\n }", "public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}", "protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n rom.save(obstacle, frog);\n isSaved = true;\n }" ]
[ "0.7296886", "0.7296886", "0.72558147", "0.7148999", "0.7119551", "0.7119551", "0.7119477", "0.7055846", "0.69643044", "0.6856452", "0.6822022", "0.6822022", "0.6822022", "0.67456776", "0.66838074", "0.6644745", "0.6638284", "0.6614802", "0.66038024", "0.6600396", "0.6578041", "0.6578041", "0.65742785", "0.6545617", "0.65311176", "0.65311176", "0.65311176", "0.65311176", "0.6524548", "0.6494915", "0.64716697", "0.6397245", "0.6390583", "0.6367083", "0.6298666", "0.62873656", "0.6253307", "0.6216156", "0.6213945", "0.62114555", "0.61920184", "0.6172646", "0.61659265", "0.6163104", "0.6158028", "0.614919", "0.6121275", "0.61189216", "0.6117367", "0.6110381", "0.61019564", "0.6084677", "0.6068348", "0.60605913", "0.60492367", "0.60451275", "0.6041145", "0.6033792", "0.6028955", "0.6027912", "0.6027634", "0.6027312", "0.60172725", "0.60100496", "0.60056216", "0.6004778", "0.59962755", "0.5992029", "0.5988536", "0.5975271", "0.59675115", "0.5966434", "0.59625214", "0.5962402", "0.5959554", "0.5946296", "0.5936013", "0.59327614", "0.593272", "0.5932459", "0.5930104", "0.5923521", "0.5916111", "0.59078085", "0.58943707", "0.58921796", "0.588068", "0.5877963", "0.58489907", "0.5847502", "0.5846085", "0.5845327", "0.5840776", "0.58404624", "0.5836009", "0.58324987", "0.5823939", "0.5817739", "0.5814329", "0.58139944", "0.5813465" ]
0.0
-1
already ended; ignore it
@Override public void finished() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isEnding() {\n return false;\n }", "protected void end() {\n \t// theres nothing to end\n }", "public abstract boolean shouldEnd();", "protected abstract boolean end();", "@Override\n protected void end() {\n }", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n protected void end() {\n\n }", "void unsetEnd();", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "protected void end()\n\t{\n\t}", "protected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "void cancelEof() {\n\t\tthis.eofSeen = false;\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "String reachedDeadEnd();", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "@Override\n\tpublic void end() {\n\t\t\n\t}", "public void end() {\n\t\tsigue = false;\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "protected void end() {\n \n \n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}", "@Override\n public void end() {\n }", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n protected boolean isFinished() \n {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected void end() {\n \n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}" ]
[ "0.7380021", "0.6999358", "0.67266196", "0.67252696", "0.6698899", "0.6694085", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.66779846", "0.6655504", "0.6611309", "0.6604292", "0.6587907", "0.6582766", "0.6577087", "0.6577087", "0.6577087", "0.6577087", "0.6577087", "0.6577087", "0.6560566", "0.6560566", "0.6560566", "0.6560566", "0.6552577", "0.6539842", "0.65330994", "0.6518077", "0.6518077", "0.65022427", "0.6491483", "0.6491483", "0.6491483", "0.6482983", "0.6482983", "0.6482983", "0.6482983", "0.6473531", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64685696", "0.64671737", "0.64586514", "0.6446209", "0.6446209", "0.6440951", "0.64307857", "0.6429756", "0.6413558", "0.63999397", "0.63999397", "0.639744", "0.637863", "0.637863", "0.637405", "0.637405", "0.63657916", "0.63599026", "0.63599026", "0.63599026", "0.63599026", "0.63599026", "0.63599026", "0.63599026" ]
0.0
-1
Data is the data to be renedered for this column.
public abstract String render (String data, String type, T row);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void setData(E data) {\n\t\tthis.data=data;\r\n\t}", "public void setData(E data){\n\t\t\tthis.data = data;\n\t\t}", "public void setData(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public void setData(String data) {\n _data = data;\n }", "public void setData(String data) {\r\n this.data = data;\r\n }", "public void setData(Object data) {\r\n this.data = data;\r\n }", "public void setData(Data data) {\n this.data = data;\n }", "public static void setData(String rowData) {\n data.append(rowData);\n }", "public void setData(String data) {\n this.data = data;\n }", "public void setData(Object data) {\n this.data = data;\n }", "public void setData(V data){\n\t\tthis.data = data;\n\t}", "public void setData(E data)\n {\n this.data = data;\n }", "@Override\n\tpublic void changementMap(String dataName) {\n\t\talgo.setDataName(dataName);\n\t}", "public void setData(String data) {\n\tthis.data = data;\n }", "public void setData(Object data) {\n\t\tthis.data = data;\n\t}", "@Override\r\n public void dataAdded(DataSet data) {\n rebuildColumns();\r\n }", "public void setData(String data) {\n\t\tthis.data = data;\n\t}", "public void setData(String data) {\n\t\tthis.data = data;\n\t}", "public void setData(D data) {\n this.data = data;\n }", "public void setData( E data ) {\n\t\tthis.data = data;\n\t}", "public void updateData() {}", "void setData(T data) {\n\t\tthis.data = data;\n\t}", "@Override\n\tpublic void setData() {\n\n\t}", "public void setData(java.lang.String data) {\r\n this.data = data;\r\n }", "@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}", "void setData (Object newData) { /* package access */ \n\t\tdata = newData;\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }", "public void updateDataCell();", "public void setOldData(String oldData) {\r\n this.oldData = oldData;\r\n }", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public abstract void setCustomData(Object data);", "public void setData(T data){\n this.data = data;\n }", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "private Cell(E data) {\n Cell.this.data = data;\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public void setData(Object oData) { m_oData = oData; }", "@Override\n public String getData() {\n return \"T \" + super.getData();\n }", "@Override\n\tpublic Data toData() {\n\t\treturn null;\n\t}", "public void setData(int data) {\n this.data = data;\n }", "public void setData(int data) {\n this.data = data;\n }", "public synchronized Object setData(Object newData) {\n Object old = data;\n data = newData;\n return old;\n }", "@Override\n public String toString() {\n return \" \" + this.data;\n }", "public void setData(Map<E, String> data) {\n\t\tthis.data = data;\n\t}", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "@Override\n protected void onDataChanged() {\n }", "public ScGridColumn<AcActionAutoCorrectedLog> newCorrectedDataColumn()\n {\n return newCorrectedDataColumn(\"Corrected Data\");\n }", "public String data() {\n return this.data;\n }", "public String toData() {\n return super.toData() + \"~S~\" + by;\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tprotected void getDataRefresh() {\n\t\t\n\t}", "public void changeData() {\n\t\tDefaultTableModel dtm = new DefaultTableModel(dataModel.getData(),\n\t\t\t\tdataModel.getHeader());\n\t\tsetModel(dtm);\n\t}", "public void setData(Vector data){\r\n this.data = data;\r\n //Set status to row\r\n if (flagAddStatusRow) {\r\n for (int row = 0; row < data.size(); row++) {\r\n ( (Vector) data.elementAt(row)).add(numberOfcolumns,\r\n new Integer(IS_NO_CHANGE));\r\n }\r\n } else {\r\n for (int row = 0; row < data.size(); row++) {\r\n ((Vector) data.elementAt(row)).setElementAt(\r\n new Integer(IS_NO_CHANGE), numberOfcolumns);\r\n }\r\n }\r\n\r\n deletedStatus = false;\r\n insertStatus = false;\r\n updatedStatus = false;\r\n }", "@Override\n public String getData()\n {\n return null;\n }", "public E getData() { return data; }", "public void setData(int data) {\n\t\tthis.data = data;\n\t}", "public void onDataChanged(IData data) {\r\n setData(data);\r\n }", "public void setData(String data) {\n this.data = data == null ? null : data.trim();\n }", "public void setData(String data) {\n this.data = data == null ? null : data.trim();\n }", "public void setData(String data) {\n this.data = data == null ? null : data.trim();\n }", "public String getData() {\r\n return this.data;\r\n }", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public void setData(int data)\n\t {\n\t this.data = data;\n\t }", "@Override\n public void setData(byte[] data) {\n\tsuper.setData(data);\n\tsetLC(data.length);\n }", "public ChangeData()\r\n\t\t{\r\n\t\t}", "public void update(DataFrame data) {\n update(data.toArray(columns));\n }", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "public void setData(Object d) {\n\t\t funcData = d; \n\t}", "@Override\n\tpublic String getData()\n\t{\n\t\treturn areaCell.toString();\n\t}", "@Override\n public void changedData(final CModule module, final byte[] data) {\n }", "public void setData(E d)\n {\n data = d;\n }", "public E getData(){\n\t\t\treturn data;\n\t\t}", "public final void setDataName(String dataName) {\n this.dataName = dataName;\n }", "public String getData() {\r\n\t\treturn data;\r\n\t}", "public String getDataString() {\r\n return formatoData.format(data);\r\n }", "public String getData()\n {\n return data;\n }", "public String getData() {\n\treturn data;\n }", "@Override\n public Object getData() {\n return new String(outputData);\n }", "public void setData(IData data) {\n this.data = data;\n }", "public E getData() {\r\n\t\treturn data;\r\n\t}", "public void setData(CellRecord[] data) {\r\n setAttribute(\"data\", data, true);\r\n }", "@Override\n\tpublic void onRxDataArray(String name, Matrix data) {\n\t\t\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "@Override\n public String toString() {\n return this.data.toString();\n }", "@Override\n public void onDataChanged() {\n\n }", "public String getData() {\n\t\treturn this.data;\n\t}", "public void setColumnCellEditorData(int columnIndex, Object data){\n\t\tcheckColumnIndex(columnIndex);\n\t\t((TextEditingSupport)(tableViewer.getTable().getColumn(columnIndex).\n\t\t\t\tgetData(TEXT_EDITING_SUPPORT_KEY))).setCellEditorData(data);\n\t}", "public void setData(D s){\n\t\tdata = s;\n\t}", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "java.lang.String getData();", "private void setData() {\n\n }", "public void changeData(String specificData, String newData) {\r\n data.set(data.indexOf(specificData), newData);\r\n }", "public E getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }" ]
[ "0.6116472", "0.61005133", "0.6053748", "0.5996619", "0.5958903", "0.5919323", "0.5900956", "0.58881336", "0.5875087", "0.58609295", "0.5856427", "0.58562064", "0.5833752", "0.5831239", "0.5811429", "0.5806275", "0.58032167", "0.578835", "0.5770249", "0.5770249", "0.5762839", "0.5760522", "0.5760221", "0.5758037", "0.5700588", "0.5688108", "0.56855565", "0.567451", "0.56707615", "0.5573425", "0.5569832", "0.5561012", "0.55555993", "0.555049", "0.5541064", "0.5524556", "0.5524556", "0.5513699", "0.5509711", "0.5504719", "0.5500668", "0.5479378", "0.5469022", "0.5469022", "0.5468209", "0.54580396", "0.5447421", "0.54301804", "0.5425603", "0.5423112", "0.5415455", "0.5411875", "0.54080987", "0.5406348", "0.5396614", "0.53855896", "0.5384994", "0.53826255", "0.5375748", "0.5372406", "0.5353584", "0.5353584", "0.5353584", "0.5352283", "0.5350315", "0.5349065", "0.5348708", "0.5341591", "0.5319226", "0.5312291", "0.5311784", "0.5302379", "0.5301211", "0.5292064", "0.52794015", "0.5276927", "0.5273141", "0.5268969", "0.5263035", "0.52557784", "0.5251704", "0.5243537", "0.5241189", "0.5240886", "0.52379465", "0.52237076", "0.52237076", "0.52237076", "0.52237076", "0.5223075", "0.5217458", "0.5217398", "0.5209655", "0.52071404", "0.5200074", "0.51972824", "0.5197231", "0.51923543", "0.5187688", "0.5184867", "0.5184867" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_playlist, container, false); listView = view.findViewById(R.id.listView); final MergeAdapter mergeAdapter = new MergeAdapter(); autoPlaylistGridAdapter = new AutoPlaylistGridAdapter(getActivity()); //listView.addHeaderView(getActivity().getLayoutInflater().inflate(R.layout.listview_header, null)); View Header2 = mInflater.inflate(R.layout.heading_with_button, null); TextView textView2 = Header2.findViewById(R.id.titleTextView); textView2.setText(getString(R.string.created_playlists)); Button addPlaylist = Header2.findViewById(R.id.button); addPlaylist.setTextColor(ContextCompat.getColor(context, (new CommonUtils(context)).accentColor(new SharedPrefsUtils(context)))); addPlaylist.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final Dialog alertDialog = new Dialog(getActivity()); alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); alertDialog.setContentView(R.layout.dialog_add_playlist); final EditText input = alertDialog.findViewById(R.id.editText); input.requestFocus(); alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); alertDialog.findViewById(R.id.btnCreate).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String name = input.getText().toString(); (new SongsUtils(getActivity())).addPlaylist(name); playlistGridAdapter.notifyDataSetChanged(); alertDialog.cancel(); } }); alertDialog.findViewById(R.id.btnCancel).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { alertDialog.cancel(); } }); alertDialog.show(); } }); View playlistGrid = mInflater.inflate(R.layout.scroll_disabled_grid_view, null); NoScrollGridView noScrollGridView = playlistGrid.findViewById(R.id.scroll_disabled_grid_view); noScrollGridView.setExpanded(true); playlistGridAdapter = new PlaylistGridAdapter(getActivity()); noScrollGridView.setAdapter(playlistGridAdapter); mergeAdapter.addAdapter(autoPlaylistGridAdapter); mergeAdapter.addView(Header2); mergeAdapter.addView(noScrollGridView); listView.setAdapter(mergeAdapter); // Button btn = (Button) view.findViewById(R.id.button); // btn.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // MusicUtils.createPlaylistDialog(getActivity(),new SongsUtils(getActivity()),playlistGridAdapter); // } // }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
TODO Autogenerated method stub
@Override public void handleMessage(Message msg) { processBluetoothDeviceMessage(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Get the Iframe Macro Block type
private void getIMBType(BufferedBitStream stream) throws InterruptedException { int data[] = IMBTable[stream.showBits(2)]; stream.flushBits(data[1]); mbType = data[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BlockType getType()\n {\n return blockType;\n }", "public static String getFrameType(Frame frame)\r\n/* 64: */ {\r\n/* 65:84 */ return getFrameType(frame.getThing());\r\n/* 66: */ }", "protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException\n {\n // Starting from the Macroblock type\n /* read macro block bit flags */\n/*\n swi*tch (getPictureType()) {\n\n case Picture.I_TYPE:\n getIMBType(stream);\n break;\n case Picture.P_TYPE:\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n break;\n case Picture.B_TYPE:\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n break;\n }\n*/\n int type = getPictureType();\n if (type == Picture.I_TYPE) {\n getIMBType(stream);\n } else if (type == Picture.P_TYPE) {\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n } else if (type == Picture.B_TYPE) {\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n }\n\n\n\n if (haveMBQuant())\n setQuantizerScale(stream.getBits(5));\n\n if (isForwardPredicted())\n forwardVector.getMotionVector(stream);\n\n if (isBackwardPredicted())\n backwardVector.getMotionVector(stream);\n\n if (haveMBPattern())\n getMBPattern(stream);\n else resetMBPattern();\n\n int i,j;\n\n // Clear the block data\n for (i=0;i<6;i++)\n for (j=0;j<64;j++)\n block[i][j] = 0;\n\n // Read DCT coefficients\n if (isMBIntra()) {\n\n for (i=0;i<4;i++) {\n dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream));\n IDCT.transform(block[i]);\n }\n\n dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream));\n IDCT.transform(block[4]);\n\n dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream));\n IDCT.transform(block[5]);\n\n } else {\n for (i=0;i<6;i++) {\n\n if ((codedBlockPattern & (1 << (5-i))) != 0) {\n\n getInterBlock(block[i], stream);\n IDCT.transform(block[i]);\n }\n }\n }\n\n if (getPictureType() == Picture.D_TYPE)\n stream.flushBits(1);\n // Parsing Macro Block finished!\n }", "public static String getFrameType(Entity frameThing)\r\n/* 59: */ {\r\n/* 60:74 */ return (String)EntityUtils.getRepType(frameThing);\r\n/* 61: */ }", "public DocumentBodyBlock type(TypeEnum type) {\n this.type = type;\n return this;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n\t\treturn type;\n\t}", "public Block getBlock()\n {\n return block;\n }", "BundleType getType();", "abstract ContentType getContnentType();", "Bodymodtype getBodyModType();", "@ASTNodeAnnotation.Child(name=\"Block\")\n public Block getBlock() {\n return (Block) getChild(0);\n }", "private String getAltBlockParentType() {\n\t\tRegSetProperties parent = getRegSetParent();\n\t\tString blockBase = ((parent == null) || parent.getBaseName().isEmpty())? \"\" : \"_\" + parent.getBaseName();\n\t\treturn altModelRootType + blockBase; \n\t}", "Coding getType();", "public CardTypes getType() {\n\t\treturn type;\n\t}", "Collaboration getType();", "public String getFramesMimeType() {\n return framesMimeType;\n }", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "public abstract byte getType();", "public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}", "public String getIfType() {\r\n return ifType;\r\n }", "public int GetID()\n {\n return blockType.GetID();\n }", "public byte getType() {\n return this.type;\n }", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "public TokenType getType() {\n\t\treturn type;\n\t}", "Class getGmMacroClass();", "public CIType getType() {\r\n\t\treturn type;\r\n\t}", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "private String getAltBlockType() {\n\t\tString blockBase = (regSetProperties.getBaseName().isEmpty())? \"\" : \"_\" + regSetProperties.getBaseName();\n\t\treturn altModelRootType + blockBase; // TODO - make parameterizable, getAddressMapName() + \"_\" + regSetProperties.getBaseName() + \"_t\"\n\t}", "public TokenType getType() {\n return type;\n }", "ImageType getType();", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "public Block getBlock() {\n return (Block)getChild(0);\n }", "public Type type() {\n\t\treturn type;\n\t}", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "MediaPackageElement.Type getElementType();", "ModuleType type();", "public LightType type()\n\t{\n\t\treturn _type;\n\t}", "public TypeIdentifierSnippet getTypeIdentifier() {\n return typeIdentifier;\r\n }", "public FreeColGameObjectType getType() {\n return this;\n }", "@AutoEscape\n\tpublic String getFlowType();", "public TokenType getType() {\n\t\treturn this.type;\n\t}", "type getType();", "public int getType () {\r\n return type;\r\n }", "public String Type()\t{\r\n\t\treturn BrickFinder.getDefault().getType();\r\n\t}", "public Type getType()\n {\n return type;\n }", "public String getTypeOfBody() {\n\t\treturn typeOfBody;\n\t}", "protected Block getBlock() {\r\n return this.block;\r\n }", "public IType getType() {\r\n return type;\r\n }", "public ChunkType getType();", "public static String getType() {\n\t\treturn type;\n\t}", "public int getType () {\n return type;\n }", "public int getType () {\n return type;\n }", "public BlockType[] getBlocks() {\n return blocks;\n }", "public int getType(){\n return type;\n }", "public String getType()\n {\n return MODULE_TYPE;\n }", "private Struct parseType() {\n check(Token.IDENT);\n\n String identName = token.string;\n SymObject object = find(identName);\n assertIsType(object);\n Struct type = object.type;\n\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n check(Token.RBRACK);\n\n type = new Struct(Struct.KIND_ARRAY, type);\n }\n\n return type;\n }", "@Override\n public WolfType getType() {\n return WolfType.TYPE;\n }", "public int getType() {\r\n\t\treturn (type);\r\n\t}", "public int getType() { return type; }", "public int getType() { return type; }", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public IType getType();", "public MediaType getType() {\n return type;\n }", "public int Gettype(){\n\t\treturn type;\n\t}", "public TreeBlockType getTreeBlockType() {\n return this.treeBlockType;\n }", "public int getType() { \n return type; \n }", "String getChunkType();", "public Type getType () {\n\t\treturn type;\n\t}", "public Class getType();", "public TYPE getType(){\n return this.type;\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();" ]
[ "0.67084354", "0.597547", "0.5807596", "0.56598306", "0.5455809", "0.5449236", "0.5449236", "0.5449236", "0.5449236", "0.5449236", "0.5449236", "0.5443127", "0.54416263", "0.5407544", "0.54070306", "0.5406017", "0.5337006", "0.53356165", "0.533398", "0.5314286", "0.52744853", "0.52278906", "0.5221275", "0.52187705", "0.5216198", "0.5206613", "0.5204378", "0.51747644", "0.51734585", "0.5170078", "0.5170007", "0.51549", "0.51374626", "0.5131126", "0.5128099", "0.51267374", "0.512395", "0.5122686", "0.51176536", "0.51096636", "0.5109364", "0.5103482", "0.5098407", "0.50963444", "0.50954485", "0.5091287", "0.50795513", "0.5074445", "0.50640124", "0.5063989", "0.5060904", "0.50454223", "0.504278", "0.5040437", "0.5039295", "0.503883", "0.5036673", "0.5036673", "0.50351876", "0.5034865", "0.50324374", "0.5029775", "0.5025766", "0.5025529", "0.50246197", "0.50246197", "0.50171673", "0.50153685", "0.5013156", "0.5010957", "0.500686", "0.50059944", "0.5001684", "0.5001275", "0.50009006", "0.499956", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468" ]
0.5051476
51
Get the Iframe Macro Block type
private void getPMBType(BufferedBitStream stream) throws InterruptedException { int code = stream.showBits(6); int data[]; if (code >= 8) data = PMBTable[ code >>> 3]; else data = PMBTable [ code + 8 ]; stream.flushBits(data[1]); mbType = data[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BlockType getType()\n {\n return blockType;\n }", "public static String getFrameType(Frame frame)\r\n/* 64: */ {\r\n/* 65:84 */ return getFrameType(frame.getThing());\r\n/* 66: */ }", "protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException\n {\n // Starting from the Macroblock type\n /* read macro block bit flags */\n/*\n swi*tch (getPictureType()) {\n\n case Picture.I_TYPE:\n getIMBType(stream);\n break;\n case Picture.P_TYPE:\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n break;\n case Picture.B_TYPE:\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n break;\n }\n*/\n int type = getPictureType();\n if (type == Picture.I_TYPE) {\n getIMBType(stream);\n } else if (type == Picture.P_TYPE) {\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n } else if (type == Picture.B_TYPE) {\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n }\n\n\n\n if (haveMBQuant())\n setQuantizerScale(stream.getBits(5));\n\n if (isForwardPredicted())\n forwardVector.getMotionVector(stream);\n\n if (isBackwardPredicted())\n backwardVector.getMotionVector(stream);\n\n if (haveMBPattern())\n getMBPattern(stream);\n else resetMBPattern();\n\n int i,j;\n\n // Clear the block data\n for (i=0;i<6;i++)\n for (j=0;j<64;j++)\n block[i][j] = 0;\n\n // Read DCT coefficients\n if (isMBIntra()) {\n\n for (i=0;i<4;i++) {\n dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream));\n IDCT.transform(block[i]);\n }\n\n dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream));\n IDCT.transform(block[4]);\n\n dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream));\n IDCT.transform(block[5]);\n\n } else {\n for (i=0;i<6;i++) {\n\n if ((codedBlockPattern & (1 << (5-i))) != 0) {\n\n getInterBlock(block[i], stream);\n IDCT.transform(block[i]);\n }\n }\n }\n\n if (getPictureType() == Picture.D_TYPE)\n stream.flushBits(1);\n // Parsing Macro Block finished!\n }", "public static String getFrameType(Entity frameThing)\r\n/* 59: */ {\r\n/* 60:74 */ return (String)EntityUtils.getRepType(frameThing);\r\n/* 61: */ }", "public DocumentBodyBlock type(TypeEnum type) {\n this.type = type;\n return this;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n\t\treturn type;\n\t}", "public Block getBlock()\n {\n return block;\n }", "BundleType getType();", "abstract ContentType getContnentType();", "Bodymodtype getBodyModType();", "@ASTNodeAnnotation.Child(name=\"Block\")\n public Block getBlock() {\n return (Block) getChild(0);\n }", "private String getAltBlockParentType() {\n\t\tRegSetProperties parent = getRegSetParent();\n\t\tString blockBase = ((parent == null) || parent.getBaseName().isEmpty())? \"\" : \"_\" + parent.getBaseName();\n\t\treturn altModelRootType + blockBase; \n\t}", "Coding getType();", "public CardTypes getType() {\n\t\treturn type;\n\t}", "Collaboration getType();", "public String getFramesMimeType() {\n return framesMimeType;\n }", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "public abstract byte getType();", "public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}", "public String getIfType() {\r\n return ifType;\r\n }", "public int GetID()\n {\n return blockType.GetID();\n }", "public byte getType() {\n return this.type;\n }", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "public TokenType getType() {\n\t\treturn type;\n\t}", "Class getGmMacroClass();", "public CIType getType() {\r\n\t\treturn type;\r\n\t}", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "private String getAltBlockType() {\n\t\tString blockBase = (regSetProperties.getBaseName().isEmpty())? \"\" : \"_\" + regSetProperties.getBaseName();\n\t\treturn altModelRootType + blockBase; // TODO - make parameterizable, getAddressMapName() + \"_\" + regSetProperties.getBaseName() + \"_t\"\n\t}", "public TokenType getType() {\n return type;\n }", "ImageType getType();", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "public Block getBlock() {\n return (Block)getChild(0);\n }", "public Type type() {\n\t\treturn type;\n\t}", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "MediaPackageElement.Type getElementType();", "ModuleType type();", "public LightType type()\n\t{\n\t\treturn _type;\n\t}", "public TypeIdentifierSnippet getTypeIdentifier() {\n return typeIdentifier;\r\n }", "public FreeColGameObjectType getType() {\n return this;\n }", "@AutoEscape\n\tpublic String getFlowType();", "public TokenType getType() {\n\t\treturn this.type;\n\t}", "type getType();", "public int getType () {\r\n return type;\r\n }", "public String Type()\t{\r\n\t\treturn BrickFinder.getDefault().getType();\r\n\t}", "public Type getType()\n {\n return type;\n }", "private void getIMBType(BufferedBitStream stream) throws InterruptedException\n {\n int data[] = IMBTable[stream.showBits(2)];\n stream.flushBits(data[1]);\n mbType = data[0];\n }", "public String getTypeOfBody() {\n\t\treturn typeOfBody;\n\t}", "protected Block getBlock() {\r\n return this.block;\r\n }", "public IType getType() {\r\n return type;\r\n }", "public ChunkType getType();", "public static String getType() {\n\t\treturn type;\n\t}", "public int getType () {\n return type;\n }", "public int getType () {\n return type;\n }", "public BlockType[] getBlocks() {\n return blocks;\n }", "public int getType(){\n return type;\n }", "public String getType()\n {\n return MODULE_TYPE;\n }", "private Struct parseType() {\n check(Token.IDENT);\n\n String identName = token.string;\n SymObject object = find(identName);\n assertIsType(object);\n Struct type = object.type;\n\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n check(Token.RBRACK);\n\n type = new Struct(Struct.KIND_ARRAY, type);\n }\n\n return type;\n }", "@Override\n public WolfType getType() {\n return WolfType.TYPE;\n }", "public int getType() {\r\n\t\treturn (type);\r\n\t}", "public int getType() { return type; }", "public int getType() { return type; }", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public IType getType();", "public MediaType getType() {\n return type;\n }", "public int Gettype(){\n\t\treturn type;\n\t}", "public TreeBlockType getTreeBlockType() {\n return this.treeBlockType;\n }", "public int getType() { \n return type; \n }", "String getChunkType();", "public Type getType () {\n\t\treturn type;\n\t}", "public Class getType();", "public TYPE getType(){\n return this.type;\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();" ]
[ "0.67084354", "0.597547", "0.5807596", "0.56598306", "0.5455809", "0.5449236", "0.5449236", "0.5449236", "0.5449236", "0.5449236", "0.5449236", "0.5443127", "0.54416263", "0.5407544", "0.54070306", "0.5406017", "0.5337006", "0.53356165", "0.533398", "0.5314286", "0.52744853", "0.52278906", "0.5221275", "0.52187705", "0.5216198", "0.5206613", "0.5204378", "0.51747644", "0.51734585", "0.5170078", "0.5170007", "0.51549", "0.51374626", "0.5131126", "0.5128099", "0.51267374", "0.512395", "0.5122686", "0.51176536", "0.51096636", "0.5109364", "0.5103482", "0.5098407", "0.50963444", "0.50954485", "0.5091287", "0.50795513", "0.5074445", "0.50640124", "0.5063989", "0.5060904", "0.5051476", "0.50454223", "0.504278", "0.5040437", "0.5039295", "0.503883", "0.5036673", "0.5036673", "0.50351876", "0.5034865", "0.50324374", "0.5029775", "0.5025766", "0.5025529", "0.50246197", "0.50246197", "0.50171673", "0.50153685", "0.5013156", "0.5010957", "0.500686", "0.50059944", "0.5001684", "0.5001275", "0.50009006", "0.499956", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468", "0.49978468" ]
0.0
-1
Get the Bframe Macro Block type
private void getBMBType(BufferedBitStream stream) throws InterruptedException { int code = stream.showBits(6); int data[]; if (code >= 8) data = BMBTable[ code >>> 2 ]; else data = BMBTable [ code + 16 ]; stream.flushBits(data[1]); mbType = data[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BlockType getType()\n {\n return blockType;\n }", "protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException\n {\n // Starting from the Macroblock type\n /* read macro block bit flags */\n/*\n swi*tch (getPictureType()) {\n\n case Picture.I_TYPE:\n getIMBType(stream);\n break;\n case Picture.P_TYPE:\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n break;\n case Picture.B_TYPE:\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n break;\n }\n*/\n int type = getPictureType();\n if (type == Picture.I_TYPE) {\n getIMBType(stream);\n } else if (type == Picture.P_TYPE) {\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n } else if (type == Picture.B_TYPE) {\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n }\n\n\n\n if (haveMBQuant())\n setQuantizerScale(stream.getBits(5));\n\n if (isForwardPredicted())\n forwardVector.getMotionVector(stream);\n\n if (isBackwardPredicted())\n backwardVector.getMotionVector(stream);\n\n if (haveMBPattern())\n getMBPattern(stream);\n else resetMBPattern();\n\n int i,j;\n\n // Clear the block data\n for (i=0;i<6;i++)\n for (j=0;j<64;j++)\n block[i][j] = 0;\n\n // Read DCT coefficients\n if (isMBIntra()) {\n\n for (i=0;i<4;i++) {\n dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream));\n IDCT.transform(block[i]);\n }\n\n dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream));\n IDCT.transform(block[4]);\n\n dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream));\n IDCT.transform(block[5]);\n\n } else {\n for (i=0;i<6;i++) {\n\n if ((codedBlockPattern & (1 << (5-i))) != 0) {\n\n getInterBlock(block[i], stream);\n IDCT.transform(block[i]);\n }\n }\n }\n\n if (getPictureType() == Picture.D_TYPE)\n stream.flushBits(1);\n // Parsing Macro Block finished!\n }", "public Byte getType() {\n\t\treturn type;\n\t}", "public TreeBlockType getTreeBlockType() {\n return this.treeBlockType;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public static String getFrameType(Frame frame)\r\n/* 64: */ {\r\n/* 65:84 */ return getFrameType(frame.getThing());\r\n/* 66: */ }", "private String getAltBlockType() {\n\t\tString blockBase = (regSetProperties.getBaseName().isEmpty())? \"\" : \"_\" + regSetProperties.getBaseName();\n\t\treturn altModelRootType + blockBase; // TODO - make parameterizable, getAddressMapName() + \"_\" + regSetProperties.getBaseName() + \"_t\"\n\t}", "public BCClass getTypeBC() {\n return getProject().loadClass(getType());\n }", "@ASTNodeAnnotation.Child(name=\"Block\")\n public Block getBlock() {\n return (Block) getChild(0);\n }", "public Block getBlock()\n {\n return block;\n }", "private String getAltBlockParentType() {\n\t\tRegSetProperties parent = getRegSetParent();\n\t\tString blockBase = ((parent == null) || parent.getBaseName().isEmpty())? \"\" : \"_\" + parent.getBaseName();\n\t\treturn altModelRootType + blockBase; \n\t}", "public BCClass getFieldTypeBC() {\n String type = getFieldTypeName();\n if (type == null)\n return null;\n return getProject().loadClass(type, getClassLoader());\n }", "public DocumentBodyBlock type(TypeEnum type) {\n this.type = type;\n return this;\n }", "Bodymodtype getBodyModType();", "private void getIMBType(BufferedBitStream stream) throws InterruptedException\n {\n int data[] = IMBTable[stream.showBits(2)];\n stream.flushBits(data[1]);\n mbType = data[0];\n }", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "public String Type()\t{\r\n\t\treturn BrickFinder.getDefault().getType();\r\n\t}", "public byte getType() {\n return this.type;\n }", "public abstract byte getType();", "public String getLBR_CNAB240DocType();", "DefineBlock createDefineBlock();", "ModuleType type();", "BundleType getType();", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "BAnyBlock createBAnyBlock();", "Coding getType();", "public com.example.cs217b.ndn_hangman.MessageBuffer.Messages.MessageType getType() {\n return type_;\n }", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "public static String getFrameType(Entity frameThing)\r\n/* 59: */ {\r\n/* 60:74 */ return (String)EntityUtils.getRepType(frameThing);\r\n/* 61: */ }", "public LightType type()\n\t{\n\t\treturn _type;\n\t}", "public String getBoatType() {\n return BOATTYPE[boatTypeIndex];\n }", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "public String getType()\n {\n return MODULE_TYPE;\n }", "public com.example.cs217b.ndn_hangman.MessageBuffer.Messages.MessageType getType() {\n return type_;\n }", "public int GetID()\n {\n return blockType.GetID();\n }", "public Block getBlock() {\n return (Block)getChild(0);\n }", "public char getType() {\r\n return type;\r\n }", "public char getType() {\n return type;\n }", "public char getType() {\n return type;\n }", "public char getType(){\n\t\treturn type;\n\t}", "protected ASPBlock getBizWfBlock()\n {\n return headblk;\n }", "public String getBayType() {\n return (String) getAttributeInternal(BAYTYPE);\n }", "BlockConstant createBlockConstant();", "public char getType() {\n\t\treturn type;\n\t}", "public CIType getType() {\r\n\t\treturn type;\r\n\t}", "public java.lang.String getStructuretype()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STRUCTURETYPE$2);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public Byte getBuildingType() {\n return buildingType;\n }", "public Type getType() {\n \t\tif(type == null) {\n \t\t\ttry {\n \t\t\t\tsetType(B3BackendActivator.instance.getBundle().loadClass(getQualifiedName()));\n \t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO: ?? Need to handle this, so the \"not found\" surfaces to the user...\n\t\t\t\t// Handled via model validation - type can not be null\n \t\t\t}\n \t\t}\n \t\treturn type;\n \t}", "public BodyType getType () {\n\t\torg.jbox2d.dynamics.BodyType type = body.getType();\n\t\tif (type == org.jbox2d.dynamics.BodyType.DYNAMIC) return BodyType.DynamicBody;\n\t\tif (type == org.jbox2d.dynamics.BodyType.KINEMATIC) return BodyType.KinematicBody;\n\t\tif (type == org.jbox2d.dynamics.BodyType.STATIC) return BodyType.StaticBody;\n\t\treturn BodyType.DynamicBody;\n\t}", "public java.lang.String getBillType () {\n\t\treturn billType;\n\t}", "public byte type() {\n return (byte) value;\n }", "public String getUnitName() {\n\n\treturn \"Block(s)\";\n }", "public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}", "BlockAssignmentType createBlockAssignmentType();", "Block getBlock(String congName, String blockName, String blockNumber);", "com.example.cs217b.ndn_hangman.MessageBuffer.Messages.MessageType getType();", "String getBlockName() {\n return this.blockName;\n }", "Class getGmMacroClass();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public MPTMessageType getMessageType()\n {\n \tint value = mMessage.getInt( B1_MESSAGE_TYPE );\n\n \treturn MPTMessageType.fromNumber( value );\n }", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "public String getBlockStart () {\n return BLOCK_START_PREFIX + objectName + BLOCK_START_SUFFIX;\n }", "public CardTypes getType() {\n\t\treturn type;\n\t}", "public int getBlock(){\n return this.position.getCurrentBlock();\n }", "protected Block getBlock() {\r\n return this.block;\r\n }", "String type();", "String type();", "String type();", "String type();", "String type();" ]
[ "0.71397203", "0.6267466", "0.5937798", "0.5933787", "0.5922891", "0.5922891", "0.5922891", "0.5922891", "0.5922891", "0.5922891", "0.5828829", "0.5819598", "0.58067995", "0.5719481", "0.5701506", "0.5645116", "0.5634653", "0.5634016", "0.56191295", "0.56161875", "0.5604837", "0.56023103", "0.5588045", "0.5569059", "0.5540204", "0.55381006", "0.5508192", "0.549653", "0.548572", "0.5482538", "0.5469621", "0.54668885", "0.5465503", "0.54601693", "0.54524124", "0.5442815", "0.54427", "0.54356617", "0.54322594", "0.5394102", "0.53814816", "0.53752995", "0.5368977", "0.53683656", "0.53683656", "0.5358003", "0.53563434", "0.53545356", "0.5346832", "0.53462076", "0.5342303", "0.5328571", "0.5324193", "0.5317815", "0.53158295", "0.5308629", "0.53081393", "0.53077495", "0.53076327", "0.5303255", "0.5301528", "0.52981097", "0.52969295", "0.52947634", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5294175", "0.5287996", "0.5283791", "0.5283639", "0.52726954", "0.5259514", "0.5256969", "0.5249464", "0.5249464", "0.5249464", "0.5249464", "0.5249464" ]
0.55788666
23
Get the Coded Block Pattern
private void getMBPattern (BufferedBitStream stream) throws InterruptedException { int data[]; int code = stream.showBits(9); if (code >= 128) data = CBPCode[code >>> 4]; else data = CBPCode[(code) + 32]; stream.flushBits(data[1]); codedBlockPattern = data[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SwiftPattern getBbanPattern() {\n return bbanPattern;\n }", "public String getCodeBlock() {\n return codeBlock;\n }", "public String generateBlock(){\n return null;\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak getCodeBreak();", "public BlockStmt\ngetInitiationPart();", "CodeBlock createCodeBlock();", "RclBlock createRclBlock();", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "Block createBlock();", "@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }", "abstract public ByteString getBlocksBuffer();", "public List<PatternItem> pattern() {\n List<PatternItem> out = new ArrayList<>();\n int level = 0;\n int n = 0;\n String c;\n\n boolean done = false;\n while (!done) {\n DNAToken token = parser.step();\n\n switch (token) {\n case CONT:\n break;\n case C:\n out.add(new PatternItem(PatternItem.Type.BASE, 'I'));\n break;\n case F:\n out.add(new PatternItem(PatternItem.Type.BASE, 'C'));\n break;\n case P:\n out.add(new PatternItem(PatternItem.Type.BASE, 'F'));\n break;\n case IC:\n out.add(new PatternItem(PatternItem.Type.BASE, 'P'));\n break;\n case IP:\n n = parser.nat();\n out.add(new PatternItem(PatternItem.Type.JUMP, n));\n break;\n case IF:\n parser.next(); // Consume one more character for no good reason\n c = parser.consts();\n out.add(new PatternItem(PatternItem.Type.SEARCH, c));\n break;\n case IIP:\n level += 1;\n out.add(new PatternItem(PatternItem.Type.OPEN));\n break;\n case IIF:\n case IIC:\n if (level == 0) {\n done = true;\n } else {\n level -= 1;\n out.add(new PatternItem(PatternItem.Type.CLOSE));\n }\n break;\n case III:\n rna.concat(dna.substring(0, 7));\n dna.trunc(7);\n break;\n default:\n finish();\n }\n }\n\n return out;\n }", "public ArrayList<Byte> generateRepeatBlockCode(RepeatBlock rb) {\n if ((rb.getActions().getChildren().size() == 0) || (rb.getCondition().getChildren().size() == 0)\n || rb.getHolders().getChildren().size() == 0) {\n return null;\n }\n Block conBlock = (Block) rb.getCondition().getChildren().get(0);\n\n ArrayList<Byte> childArr = generateByteList(rb.getHolders());\n ArrayList<Byte> cmdArr = new ArrayList<>();\n //checking condition or sense\n char instruction = 'c';\n int address = conBlock.getCapability().getDevice().getAddress();\n char cmdChar = conBlock.getCapability().getExeCommand().charAt(0);\n char cmdChar1 = conBlock.getCapability().getExeCommand().charAt(1);\n char compType = conBlock.getCapability().getCompType().charAt(0);\n\n switch (conBlock.getCapability().getCompType().charAt(0)) {\n\n case '=':\n compType = '!';\n break;\n case '!':\n compType = '=';\n break;\n case '<':\n compType = '.';\n break;\n case '>':\n compType = ',';\n break;\n case '.':\n compType = '<';\n break;\n case ',':\n compType = '>';\n break;\n }\n\n cmdArr.add((byte) instruction);\n cmdArr.add((byte) address);\n cmdArr.add((byte) compType);\n\n short respSize = Short.parseShort(conBlock.getCapability().getRespSize());\n byte[] respArr = shortToByteArray(respSize);\n cmdArr.add(respArr[0]);\n// for(byte b:respArr){\n// cmdArr.add(b);\n// }\n int refVal = Integer.parseInt(conBlock.getCapability().getRefValue());\n if (conBlock.getCapability().getType().equals(Capability.CAP_CONDITION)) {\n refVal = Integer.parseInt(conBlock.getTextField().getText());\n }\n byte[] refArr = intToByteArray(refVal);\n for (int i = 0; i < respSize; i++) {\n cmdArr.add(refArr[i]);\n }\n cmdArr.add((byte) cmdChar);\n cmdArr.add((byte) cmdChar1);\n short jumpAdd = (short) (childArr.size() + 4 + cmdArr.size() + 3);\n byte[] jumpArr = shortToByteArray(jumpAdd);\n int counter = 3;\n for (byte b : jumpArr) {\n cmdArr.add(counter++, b);\n }\n //prepending command length parameter\n cmdArr.add(0, (byte) (cmdArr.size() + 1));\n\n //jump back instruction\n ArrayList<Byte> jumpBytes = new ArrayList<>();\n instruction = 'j';\n jumpAdd = (short) (-childArr.size() - cmdArr.size());\n jumpBytes.add((byte) instruction);\n jumpArr = shortToByteArray(jumpAdd);\n for (byte b : jumpArr) {\n jumpBytes.add(b);\n }\n //prepending command length parameter\n jumpBytes.add(0, (byte) (jumpBytes.size() + 1));\n\n //merging lists\n cmdArr.addAll(childArr);\n cmdArr.addAll(jumpBytes);\n\n return cmdArr;\n }", "CommandBlock getCaseSharp();", "BranchingBlock createBranchingBlock();", "public Rule itBlock()\n \t{\n \t\treturn sequence(BRACKET_L, zeroOrMore(stmt()), BRACKET_R);\n \t}", "public abstract void generateNextBlock();", "private void resetMBPattern()\n {\n codedBlockPattern = 0;\n }", "@Override\r\n public List<Block> blocks() {\r\n List<Block> blockList = new ArrayList<Block>();\r\n java.awt.Color[] colors = new Color[5];\r\n colors[0] = Color.decode(\"#c1b8b2\");\r\n colors[1] = Color.decode(\"#ef1607\");\r\n colors[2] = Color.decode(\"#ffff1e\");\r\n colors[3] = Color.decode(\"#211ed8\");\r\n colors[4] = Color.decode(\"#fffff6\");\r\n int y = 150;\r\n int[] hitPoints = {2, 1, 1, 1, 1};\r\n for (int i = 0; i < colors.length; i++) {\r\n for (int j = i + 5; j < 15; j++) {\r\n blockList.add(new Block(j * 50 + 25, y, 50, 20, colors[i], hitPoints[i]));\r\n }\r\n y += 20;\r\n }\r\n return blockList;\r\n }", "public int getPattern() {\n return this.pattern;\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "@Override\n public CssDeclarationBlockNode getBlock() {\n return (CssDeclarationBlockNode) super.getBlock();\n }", "public List<Block> blocks() {\r\n List<Block> list = new ArrayList<Block>();\r\n double width = 50;\r\n for (int i = 0; i < 7; ++i) {\r\n Color c = new Color(0, 0, 0);\r\n switch (i) {\r\n case 0:\r\n c = Color.gray;\r\n break;\r\n case 1:\r\n c = Color.red;\r\n break;\r\n case 2:\r\n c = Color.yellow;\r\n break;\r\n case 3:\r\n c = Color.green;\r\n break;\r\n case 4:\r\n c = Color.white;\r\n break;\r\n case 5:\r\n c = Color.pink;\r\n break;\r\n default:\r\n c = Color.cyan;\r\n break;\r\n }\r\n for (int j = 0; j < 15; ++j) {\r\n Block b = new Block(new Rectangle(new Point(\r\n 25 + j * width, 100 + i * 20), width, 20));\r\n if (i == 0) {\r\n b.setHitPoints(2);\r\n } else {\r\n b.setHitPoints(1);\r\n }\r\n list.add(b);\r\n }\r\n }\r\n return list;\r\n }", "public Pattern getPattern(){\n\t\treturn pattern;\n\t}", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "CaseBlockRule createCaseBlockRule();", "public Pattern getPattern() {\n return pattern;\n }", "DirectionBlock createDirectionBlock();", "BlockConstant createBlockConstant();", "protected Block getBlock() {\r\n return this.block;\r\n }", "public final byte[] getPattern() {\n return pattern;\n }", "ControlBlockRule createControlBlockRule();", "@Override\n public List<Block> blocks() {\n int columns = 15, width = 51, height = 30;\n Color darkGreen = new Color(29, 101, 51);\n List<Block> blocks = new ArrayList<>();\n for (int j = 0; j < columns; j++) {\n blocks.add(new Block(new arkanoid.geometry.Rectangle(new Point(20 + width * j, 110 + height),\n width, height), darkGreen));\n }\n return blocks;\n }", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String getPattern() {\r\n return this.currPattern;\r\n }", "StatementBlock createStatementBlock();", "public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}", "public final Pattern getPattern() {\n return pattern;\n }", "protected bed e()\r\n/* 124: */ {\r\n/* 125:136 */ return new bed(this, new IBlockData[] { a });\r\n/* 126: */ }", "protected bed e()\r\n/* 210: */ {\r\n/* 211:245 */ return new bed(this, new IBlockData[] { a, b });\r\n/* 212: */ }", "private List<Block> createBlocks() {\n ArrayList<String> listOfBlocksAndSpacers = new ArrayList<String>();\n boolean buffer = false;\n for (int i = 0; i < level.size(); i++) {\n // if it starts with END_BLOCKS\n if (level.get(i).startsWith(\"END_BLOCKS\")) {\n buffer = false;\n } // if the buffer is true\n if (buffer) {\n listOfBlocksAndSpacers.add(level.get(i));\n } // if it starts with START_BLOCKS\n if (level.get(i).startsWith(\"START_BLOCKS\")) {\n buffer = true;\n } else if (level.get(i).startsWith(\"END_BLOCKS\")) {\n buffer = false;\n }\n }\n // find the x position where it all starts\n int startX = Integer.parseInt(this.map.get(\"blocks_start_x\"));\n int xForSave = startX;\n // find the y position where it all starts\n int startY = Integer.parseInt(this.map.get(\"blocks_start_y\"));\n List<Block> listOfBlocks = new ArrayList<>();\n String[] s;\n setBlocks();\n // go over the list of blocks of spacers\n for (int i = 0; i < listOfBlocksAndSpacers.size(); i++) {\n // split it with empty lines\n s = listOfBlocksAndSpacers.get(i).split(\"\");\n for (int j = 0; j < s.length; j++) {\n if (s[j].equals(\"\")) {\n continue;\n } // if it is a block symbol\n if (this.factory.isBlockSymbol(s[j])) {\n // add to listOfBlocks a block\n listOfBlocks.add(this.factory.getBlock(s[j], startX, startY));\n // continue to the next block with the next location\n startX += this.factory.getBlock(s[j], startX, startY).getCollisionRectangle().getWidth();\n } else if (this.factory.isSpaceSymbol(s[j])) { // move following\n // spacers\n startX += this.factory.getSpaceWidth(s[j]);\n }\n }\n startX = xForSave;\n startY += Integer.parseInt(this.map.get(\"row_height\"));\n }\n // put the blocks in a new blocks list and return it\n List<Block> listOfBlocksCopy = new ArrayList<>();\n for (int z = 0; z < listOfBlocks.size(); z++) {\n listOfBlocksCopy.add(listOfBlocks.get(z).copyBlock());\n }\n return listOfBlocksCopy;\n }", "public CodeFragment getCode() {\n\t\treturn code;\n\t}", "public String getPattern () {\n return pattern;\n }", "public ImagePattern getImagePattern() {\n return new ImagePattern(new Image(this.texture));\n }", "@Override\n\tpublic int getReplaceBlock() {\n\t\treturn 0;\n\t}", "List<Block> blocks();", "BAnyBlock createBAnyBlock();", "public ArrayList<Byte> generateBlockCode(Holder h) {\n if (h.getActions().getChildren().size() == 0) {\n return null;\n }\n Block acBlock = (Block) h.getActions().getChildren().get(0);\n\n ArrayList<Byte> cmdArr1 = new ArrayList<>();\n ArrayList<Byte> cmdArr2 = new ArrayList<>();\n\n //executing action\n char instruction = 'b';\n int address = acBlock.getCapability().getDevice().getAddress();\n char cmdChar = acBlock.getCapability().getExeCommand().charAt(0);\n char cmdChar1 = acBlock.getCapability().getExeCommand().charAt(1);\n cmdArr1.add((byte) instruction);\n cmdArr1.add((byte) address);\n cmdArr1.add((byte) cmdChar);\n cmdArr1.add((byte) cmdChar1);\n\n //prepending command length parameter\n cmdArr1.add(0, (byte) (cmdArr1.size() + 1));\n \n //checking condition or sense\n instruction = 'c';\n cmdChar = acBlock.getCapability().getExeCommand().charAt(0);\n cmdChar1 = acBlock.getCapability().getExeCommand().charAt(1);\n char compType = '!';\n\n cmdArr2.add((byte) instruction);\n cmdArr2.add((byte) address);\n cmdArr2.add((byte) compType);\n short jumpAdd = 0;\n byte[] jumpArr = shortToByteArray(jumpAdd);\n for (byte b : jumpArr) {\n cmdArr2.add(b);\n }\n short respSize = 1;\n byte[] respArr = shortToByteArray(respSize);\n cmdArr2.add(respArr[0]);\n// for(byte b:respArr){\n// cmdArr2.add(b);\n// }\n int refVal = 0;\n \n byte[] refArr = intToByteArray(refVal);\n for (int i = 0; i < respSize; i++) {\n cmdArr2.add(refArr[i]);\n }\n cmdArr2.add((byte) cmdChar);\n cmdArr2.add((byte) cmdChar1);\n //prepending command length parameter\n cmdArr2.add(0, (byte) (cmdArr2.size() + 1));\n \n cmdArr1.addAll(cmdArr2);\n \n return cmdArr1;\n }", "public Block instance(int paramInt)\r\n/* 194: */ {\r\n/* 195:225 */ return instance().setData(a, bds.b(paramInt)).setData(b, (paramInt & 0x8) > 0 ? bdu.b : bdu.a);\r\n/* 196: */ }", "protected static List<TripleBlock> partitionBlocks(List<Triple> pattern) {\n\t\tNode currentVar = null;\n\t\tList<Triple> currentBlock = new ArrayList<>();\n\t\tList<TripleBlock> allBlocks = new ArrayList<>();\n\t\tfor (Triple trip : pattern) {\n\t\t\tNode subj = trip.getSubject();\n\t\t\tif (subj.isVariable() && trip.getPredicate().isConcrete()\n\t\t\t\t\t&& trip.getObject().isConcrete()) {\n\t\t\t\tif (currentVar == null || !currentVar.equals(subj)) {\n\t\t\t\t\tif (!currentBlock.isEmpty()) {\n\t\t\t\t\t\t// end block\n\t\t\t\t\t\tTripleBlockType nextType = currentVar == null\n\t\t\t\t\t\t\t\t? TripleBlockType.ARBITRARY_BLOCK\n\t\t\t\t\t\t\t\t: TripleBlockType.VARIABLE_PATTERN_BLOCK;\n\t\t\t\t\t\tallBlocks.add(new TripleBlock(nextType, currentBlock));\n\t\t\t\t\t\tcurrentBlock = new ArrayList<>();\n\t\t\t\t\t}\n\t\t\t\t\tcurrentVar = subj;\n\t\t\t\t}\n\t\t\t\tcurrentBlock.add(trip);\n\t\t\t} else {\n\t\t\t\t// Not of the special \"?var :concrete :concrete\" form that we\n\t\t\t\t// look for\n\t\t\t\tif (currentVar != null && !currentBlock.isEmpty()) {\n\t\t\t\t\tallBlocks.add(new TripleBlock(\n\t\t\t\t\t\t\tTripleBlockType.VARIABLE_PATTERN_BLOCK,\n\t\t\t\t\t\t\tcurrentBlock));\n\t\t\t\t\tcurrentBlock = new ArrayList<>();\n\t\t\t\t}\n\t\t\t\tcurrentVar = null;\n\t\t\t\tcurrentBlock.add(trip);\n\t\t\t}\n\t\t}\n\t\tif (!currentBlock.isEmpty()) {\n\t\t\tTripleBlockType nextType = currentVar == null\n\t\t\t\t\t? TripleBlockType.ARBITRARY_BLOCK\n\t\t\t\t\t: TripleBlockType.VARIABLE_PATTERN_BLOCK;\n\t\t\tallBlocks.add(new TripleBlock(nextType, currentBlock));\n\t\t}\n\t\treturn allBlocks;\n\t}", "public P getPattern() {\n return this.slp.getProduction(patter);\n }", "@Override\n public List<Block> blocks() {\n List<Block> blocksList = new ArrayList<Block>();\n\n //Setting the blocks\n for (int j = 0; j <= 14; j++) {\n if (j == 0 || j == 1) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.CYAN));\n } else if (j == 2 || j == 3) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.PINK));\n } else if (j == 4 || j == 5) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.BLUE));\n } else if (j == 6 || j == 7 || j == 8) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.GREEN));\n } else if (j == 9 || j == 10) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.YELLOW));\n } else if (j == 11 || j == 12) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.ORANGE));\n } else if (j == 13 || j == 14) {\n blocksList.add(new Block(new Rectangle(\n new Point(730 - j * 50.6666667, 215), 51, 25), java.awt.Color.RED));\n }\n }\n\n return blocksList;\n }", "public String getPattern() {\n return pattern;\n }", "public int getRenderBlockPass(){\r\n return 1;\r\n }", "public String getPattern() {\r\n\t\treturn pattern;\r\n\t}", "public String getPattern() {\r\n \treturn pattern;\r\n }", "public Block getBlock()\n {\n return block;\n }", "public String getPattern() {\n\treturn pattern;\n }", "DefineBlock createDefineBlock();", "public final StepPattern getStepPattern() {\n/* 176 */ return this.m_stepPattern;\n/* */ }", "public String[] getPatterns()\n/* */ {\n/* 92 */ return this.patterns;\n/* */ }", "Block getBlock(String congName, String blockName, String blockNumber);", "public String nextBlockNumber()\n\t{\n\t\tblockNumber++;\n\t\treturn (\"\" + blockNumber);\n\t}", "protected BlockStmt currentBlock() {\n return enclosingBlocks.peekFirst();\n }", "public ArrayList<Block> getBlocks() {\n ArrayList<Block> blocks = new ArrayList<>();\n\n for (Vector2D pos : template) {\n blocks.add(new Block(pos.addVectorGetNewVector(center), this.color));\n }\n return blocks;\n }", "abstract public int getNumberOfBlocks();", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public int c(Block parambec)\r\n/* 199: */ {\r\n/* 200:232 */ int i = 0;\r\n/* 201: */ \r\n/* 202:234 */ i |= ((EnumDirection)parambec.getData(a)).a();\r\n/* 203:236 */ if (parambec.getData(b) == bdu.b) {\r\n/* 204:237 */ i |= 0x8;\r\n/* 205: */ }\r\n/* 206:240 */ return i;\r\n/* 207: */ }", "@Test\r\n public void Test028generateNextPatternBlock()\r\n {\r\n\r\n gol.makeLiveCell(4, 4);\r\n gol.makeLiveCell(4, 5);\r\n gol.makeLiveCell(5, 4);\r\n gol.makeLiveCell(5, 5);\r\n gol.generateNextPattern();\r\n\r\n assertEquals(4, gol.getTotalAliveCells());\r\n }", "public IDatatype getPattern() { \n\t\treturn myPattern;\n\t}", "String getBlockPolicy();", "@Override\n\tpublic int getBlockNum() {\n\t\treturn 0;\n\t}", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "@ASTNodeAnnotation.Child(name=\"Block\")\n public Block getBlock() {\n return (Block) getChild(0);\n }", "public Block(){\n\t\tinstns = new ArrayList<Instruction>();\n\t}", "@Override\n\tpublic String getDesignation() {\n\t\treturn code;\n\t}", "public ArrayList<ModuleElement> generateMixPattern(Module m, ModuleElement start_cell, String patternType, double mix_percentage){\n\t\tArrayList<ModuleElement> pattern = new ArrayList<ModuleElement>(); \n\t\tint i = start_cell.x;\n\t\tint j = start_cell.y; \n\t\tboolean mixed = false; \n\t\tpattern.add(start_cell); \n\t\t// ROUNDTHECLOCK pattern (going round on the borders)\n\t\tif (patternType.compareTo(\"ROUNDTHECLOCK\")== 0){\n\t\t\tif(mix_percentage>=100) mixed = true; \n\t\t\t//System.out.println(\"mix = \" + mix_percentage); \n\t\t\twhile(!mixed){\n\t\t\t//for (int kk=0; kk<1;kk++){\n\t\t\t\t// go to the right\n\t\t\t\tfor (int k=0; k<m.width-1 && !mixed; k++){\n\t\t\t\t\tj++; \n\t\t\t\t\t//System.out.println(\"(\"+i+\",\"+j+\")\"); \n\t\t\t\t\tpattern.add(new ModuleElement(i,j)); \n\t\t\t\t\tmix_percentage = computeMix(pattern,mix_percentage); \n\t\t\t\t\t//System.out.println(\"mix = \" + mix_percentage); \n\t\t\t\t\tif(mix_percentage>=100) mixed = true; \n\t\t\t\t}\n\t\t\t\t// go down\n\t\t\t\tif (!mixed) for (int k=0; k<m.height-1 && !mixed; k++){\n\t\t\t\t\ti++; \n\t\t\t\t\t//System.out.println(\"(\"+i+\",\"+j+\")\"); \n\t\t\t\t\tpattern.add(new ModuleElement(i,j)); \n\t\t\t\t\tmix_percentage = computeMix(pattern,mix_percentage); \n\t\t\t\t\tif(mix_percentage>=100) mixed = true; \n\t\t\t\t}\n\t\t\t\t// go left \n\t\t\t\tif (!mixed) for (int k=0; k<m.width-1 && !mixed; k++){\n\t\t\t\t\tj--; \n\t\t\t\t\t//System.out.println(\"(\"+i+\",\"+j+\")\"); \n\t\t\t\t\tpattern.add(new ModuleElement(i,j)); \n\t\t\t\t\tmix_percentage = computeMix(pattern,mix_percentage); \n\t\t\t\t\tif(mix_percentage>=100) mixed = true; \n\t\t\t\t}\n\t\t\t\t// go up\n\t\t\t\tif (!mixed) for (int k=0; k<m.height-1 && !mixed; k++){\n\t\t\t\t\ti--; \n\t\t\t\t\t//System.out.println(\"(\"+i+\",\"+j+\")\"); \n\t\t\t\t\tpattern.add(new ModuleElement(i,j)); \n\t\t\t\t\tmix_percentage = computeMix(pattern,mix_percentage); \n\t\t\t\t\tif(mix_percentage>=100) mixed = true; \n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(\"Mix percentage: \" + mix_percentage); \n\t\t}\n\t\t// ZIGZAG pattern (back and forth on every row)\n\t\t// this one starts from one corner\n\t\tif (patternType.compareTo(\"ZIGZAG\")== 0){\n\t\t\twhile(!mixed){\n\t\t\t\tfor (int k=0; k<m.height && !mixed; k++)\n\t\t\t\t{\n\t\t\t\t\t if (k % 2 == 0)\n\t\t\t\t\t\t for (int q = 0; q<m.width && !mixed; q++){\n\t\t\t\t\t\t\t pattern.add(new ModuleElement(k,q)); \n\t\t\t\t\t\t\tif(this.computeMix(pattern,mix_percentage)>=100) mixed = true; \n\t\t\t\t\t\t }\n\t\t\t\t\t if (k % 2 != 0)\n\t\t\t\t\t\t for (int q = m.width-1; q>=0 && !mixed; q--){\n\t\t\t\t\t\t\t pattern.add(new ModuleElement(k,q));\n\t\t\t\t\t\t\tif(this.computeMix(pattern,mix_percentage)>=100) mixed = true; \n\t\t\t\t\t\t }\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t// RANDOM pattern\n\t\tif (patternType.compareTo(\"RANDOM\")== 0){\n\t\t\twhile (!mixed){\n\t\t\t\tRandom generator = new Random(); \n\t\t\t\tint r = generator.nextInt(4); \n\t\t\t\tswitch(r){\n\t\t\t\t\tcase 1: i++; \n\t\t\t\t\tcase 2: j++; \n\t\t\t\t\tcase 3: i--; \n\t\t\t\t\tcase 4: i++; \n\t\t\t\t\tdefault:break; \n\t\t\t\t}\n\t\t\t\t// test for out-of-boundaries results\n\t\t\t\tif (j>=m.width) j--; \n\t\t\t\tif (j< 0) j++; \n\t\t\t\tif (i>= m.height) i--; \n\t\t\t\tif (i< 0) i++; \n\t\t\t\tpattern.add(new ModuleElement(i,j)); \n\t\t\t\tif(this.computeMix(pattern,mix_percentage)>=100) mixed = true; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn pattern; \n\t}", "public String getBlockStart () {\n return BLOCK_START_PREFIX + objectName + BLOCK_START_SUFFIX;\n }", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "public Block getObj()\n\t{\n\t\treturn block;\n\t}", "BlockchainFactory getBlockchainFactory();", "int getBlockNumber();", "int getBlockNumber();", "public IGUIBlock getHighlightedBlock() {\n Block highlightedBlock = blockHandler.getPA().getNextBlockInProgram();\n return (highlightedBlock != null) ? blockLink.getGUIBlockFromBlock(highlightedBlock) : null;\n }", "phaseI.Hdfs.BlockLocations getNewBlock();", "DefaultCaseBlockRule createDefaultCaseBlockRule();", "public final ANTLRv3Parser.block_return block() throws RecognitionException {\r\n ANTLRv3Parser.block_return retval = new ANTLRv3Parser.block_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token lp=null;\r\n Token rp=null;\r\n Token char_literal76=null;\r\n Token char_literal78=null;\r\n ANTLRv3Parser.optionsSpec_return opts =null;\r\n\r\n ANTLRv3Parser.altpair_return altpair77 =null;\r\n\r\n ANTLRv3Parser.altpair_return altpair79 =null;\r\n\r\n\r\n CommonTree lp_tree=null;\r\n CommonTree rp_tree=null;\r\n CommonTree char_literal76_tree=null;\r\n CommonTree char_literal78_tree=null;\r\n RewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\r\n RewriteRuleTokenStream stream_68=new RewriteRuleTokenStream(adaptor,\"token 68\");\r\n RewriteRuleTokenStream stream_91=new RewriteRuleTokenStream(adaptor,\"token 91\");\r\n RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,\"token 74\");\r\n RewriteRuleSubtreeStream stream_altpair=new RewriteRuleSubtreeStream(adaptor,\"rule altpair\");\r\n RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule optionsSpec\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:192:5: (lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' -> ^( BLOCK[$lp,\\\"BLOCK\\\"] ( optionsSpec )? ( altpair )+ EOB[$rp,\\\"EOB\\\"] ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:192:9: lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')'\r\n {\r\n lp=(Token)match(input,68,FOLLOW_68_in_block1203); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_68.add(lp);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:193:3: ( (opts= optionsSpec )? ':' )?\r\n int alt31=2;\r\n int LA31_0 = input.LA(1);\r\n\r\n if ( (LA31_0==OPTIONS||LA31_0==74) ) {\r\n alt31=1;\r\n }\r\n switch (alt31) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:193:5: (opts= optionsSpec )? ':'\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:193:5: (opts= optionsSpec )?\r\n int alt30=2;\r\n int LA30_0 = input.LA(1);\r\n\r\n if ( (LA30_0==OPTIONS) ) {\r\n alt30=1;\r\n }\r\n switch (alt30) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:193:6: opts= optionsSpec\r\n {\r\n pushFollow(FOLLOW_optionsSpec_in_block1212);\r\n opts=optionsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_optionsSpec.add(opts.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n char_literal76=(Token)match(input,74,FOLLOW_74_in_block1216); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_74.add(char_literal76);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_altpair_in_block1223);\r\n altpair77=altpair();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_altpair.add(altpair77.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:194:11: ( '|' altpair )*\r\n loop32:\r\n do {\r\n int alt32=2;\r\n int LA32_0 = input.LA(1);\r\n\r\n if ( (LA32_0==91) ) {\r\n alt32=1;\r\n }\r\n\r\n\r\n switch (alt32) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:194:13: '|' altpair\r\n \t {\r\n \t char_literal78=(Token)match(input,91,FOLLOW_91_in_block1227); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_91.add(char_literal78);\r\n\r\n\r\n \t pushFollow(FOLLOW_altpair_in_block1229);\r\n \t altpair79=altpair();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_altpair.add(altpair79.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop32;\r\n }\r\n } while (true);\r\n\r\n\r\n rp=(Token)match(input,69,FOLLOW_69_in_block1244); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_69.add(rp);\r\n\r\n\r\n // AST REWRITE\r\n // elements: optionsSpec, altpair\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 196:9: -> ^( BLOCK[$lp,\\\"BLOCK\\\"] ( optionsSpec )? ( altpair )+ EOB[$rp,\\\"EOB\\\"] )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:196:12: ^( BLOCK[$lp,\\\"BLOCK\\\"] ( optionsSpec )? ( altpair )+ EOB[$rp,\\\"EOB\\\"] )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(BLOCK, lp, \"BLOCK\")\r\n , root_1);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:196:34: ( optionsSpec )?\r\n if ( stream_optionsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_optionsSpec.nextTree());\r\n\r\n }\r\n stream_optionsSpec.reset();\r\n\r\n if ( !(stream_altpair.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_altpair.hasNext() ) {\r\n adaptor.addChild(root_1, stream_altpair.nextTree());\r\n\r\n }\r\n stream_altpair.reset();\r\n\r\n adaptor.addChild(root_1, \r\n (CommonTree)adaptor.create(EOB, rp, \"EOB\")\r\n );\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public BlockInfo mo41171g() {\n return new BlockInfo(this.f25419a, this.f25420b, this.f25421c.get());\n }", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));\r\n\t\t} else {\r\n\t\t\tpatternSpecs.add(\"^.*$\");\r\n\t\t}\r\n\t\t\r\n\t\tString completeSpec = Joiner.on(\"|\").join(patternSpecs); // \r\n\t\t\r\n\t\tPattern pattern = Pattern.compile(completeSpec);\r\n\t\t\r\n\t\treturn pattern;\r\n\t}", "Pattern getTagPattern();", "public List<Block> blocks() {\n this.blocks = createBlocks();\n return this.blocks;\n }", "TACBlock optimise(TACBlock code);", "Code getCode();", "public ProductionBlock getSpecificProductionBlock(int id);", "public static PlsqlBlock getMethodBlock(List blockHier, String name, String packageName, boolean isDef) {\n for (int i = 0; i\n < blockHier.size(); i++) {\n PlsqlBlock temp = (PlsqlBlock) blockHier.get(i);\n //if this is not a procedure look at the children and return\n if (isDef && (temp.getName().equalsIgnoreCase(name)) && (temp.getType() == PROCEDURE_DEF\n || temp.getType() == FUNCTION_DEF)) {\n return temp;\n } else if (!isDef && (temp.getName().equalsIgnoreCase(name)) && (temp.getType() == PROCEDURE_IMPL\n || temp.getType() == FUNCTION_IMPL)) {\n return temp;\n } else if ((temp.getType() == PACKAGE_BODY\n || temp.getType() == PACKAGE) && temp.getName().equalsIgnoreCase(packageName)) {\n return getMethodBlock(temp.getChildBlocks(), name, packageName, isDef);\n }\n }\n return null;\n }", "public Block() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t\tthis.point_BlockTopRight = null;\r\n\t\tthis.point_BlockDownleft = null;\r\n\t\tthis.setpoint_BlockTopLeft(null);\r\n\t\tthis.IDBloack = 0;\r\n\t\tthis.type = \"\";\r\n\t}", "public com.google.protobuf.ByteString\n getGetBytes() {\n java.lang.String ref = \"\";\n if (patternCase_ == 2) {\n ref = (java.lang.String) pattern_;\n }\n return com.google.protobuf.ByteString.copyFromUtf8(ref);\n }", "byte getBlockData();" ]
[ "0.62513953", "0.6172814", "0.5968741", "0.59667444", "0.5922697", "0.58882225", "0.5883128", "0.58240485", "0.58198756", "0.5817437", "0.5808155", "0.577836", "0.5729239", "0.5707536", "0.5623298", "0.5615281", "0.5604527", "0.5604117", "0.56013894", "0.5582522", "0.55688304", "0.5562351", "0.55537766", "0.5531974", "0.55311817", "0.5529324", "0.5528463", "0.5521989", "0.55186", "0.5518586", "0.5488502", "0.5473723", "0.545793", "0.5456779", "0.54560566", "0.543657", "0.54179627", "0.5389968", "0.53664017", "0.5365881", "0.5365872", "0.53615415", "0.53546464", "0.5335489", "0.53013986", "0.52989864", "0.5298628", "0.5295819", "0.5293016", "0.5267949", "0.52482843", "0.5245207", "0.52388805", "0.5238645", "0.52216035", "0.52169126", "0.52141297", "0.5208015", "0.5195806", "0.5180103", "0.5176511", "0.5170832", "0.5166472", "0.5163612", "0.51632506", "0.51615196", "0.5138306", "0.5138306", "0.51344675", "0.513026", "0.5125232", "0.51234734", "0.5120137", "0.51077557", "0.50900424", "0.50845075", "0.50712657", "0.5070538", "0.505285", "0.5051393", "0.5044114", "0.5041547", "0.50415283", "0.50415283", "0.5035806", "0.502987", "0.50255144", "0.502389", "0.5022551", "0.5012236", "0.5010691", "0.5005287", "0.50008285", "0.49976555", "0.49835917", "0.49801555", "0.49760768", "0.4976054", "0.4975625", "0.49631995" ]
0.5855393
7
Reset the coded block pattern
private void resetMBPattern() { codedBlockPattern = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reset() {\n blocks.clear();\n }", "public void resetBlocks() {\n\t\tBLOCK_LIST.clear();\n\t}", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }", "void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }", "public void resetComputation()\n {\n for (Block block : this.blocks) {\n block.setShadow(null);\n block.deleteInputValues();\n }\n }", "public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}", "public void reset()\n {\n a = 0x0123456789ABCDEFL;\n b = 0xFEDCBA9876543210L;\n c = 0xF096A5B4C3B2E187L;\n\n xOff = 0;\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n\n bOff = 0;\n for (int i = 0; i != buf.length; i++)\n {\n buf[i] = 0;\n }\n\n byteCount = 0;\n }", "private void reset() {\n // Init-values\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0;\n }\n\n // Random colors\n for (int i = 0; i < colors.length; i++) {\n colors[i] = Color.color(Math.random(), Math.random(), Math.random());\n }\n\n // mid = 1.\n cells[cells.length / 2] = 1;\n\n // Clearing canvas\n gc.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n\t\trabbitcount[1]=8;\n\t\trabbitcount[2]=8;\n\t\tpieces.clear();\n\t\tselectedsquares.clear();\n\t\trepaint();\n\t}", "private void clearCustom() {\n if (patternCase_ == 8) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }", "public void resetBlockColor() {\n for(int i=0;i<gridWidth; i++) {\n for(int j=0;j<gridHeight;j++) {\n getBlock(i,j).setDarker(false);\n }\n }\n repaint();\n }", "public void reset() {\n\t\tthis.flow = 0;\n\t}", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "public final void Reset()\n\t{\n\t}", "private void clearPost() {\n if (patternCase_ == 4) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }", "public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }", "private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }", "public void reset() {\n\n\t}", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\n }", "public void presetPattern(){\n // clear all the cells\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n game.grid[i][j] = false;\n }\n }\n \n // change specific cells to live\n for (int i = 7; i < 12; i++) {\n for (int j = 7; j < 12; j++) {\n game.grid[i][j] = true;\n }\n }\n \n // remove middle cell\n game.grid[9][9] = false;\n \n repaint();\n }", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}", "public void reset() {\n bb.clear();\n cb.clear();\n found = false;\n }", "private void reset() {\n }", "private void clearPatch() {\n if (patternCase_ == 6) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }", "public void reset() {\n\t\tremoveAll();\n\t\twrongLetters = \"\";\n\t\taddScaffold(getWidth(),getHeight());\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset () {}", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public synchronized void reset() {\n }", "protected void reset() {\n\t\t}", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n\r\n\t}", "public void reset(){\n\n boxPositions = new HashMap<>();\n boxWeights = new ArrayList<Stack<Box>>();\n for(int i = 0; i < 16; i++) {\n boxPositions.put(i*40, i);\n }\n for ( int i = 0; i < 16; i++){\n boxWeights.add( new Stack< Box >());\n }\n boxGen = new BoxGenerator();\n\n timeCounter = 100;\n mc.resetLazarusPosition();\n\n }", "public void reset() {\n deadBlackCount = 0;\n deadWhiteCount = 0;\n deadRedCount = 0;\n deadBlueCount = 0;\n\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n fields[i][j].reset();\n }\n }\n }", "public void reset() {\n\n }", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "void Reset() {\n lq = 0;\n ls = 0;\n }", "void reset() {\n this.pointer = 0;\n }", "public void reset() {\n position = 0;\n }", "protected void reset()\n {\n super.reset();\n m_seqNum = 1;\n }", "public final void Reset()\n\t{\n\t\t_curindex = -1;\n\t}", "public void reset(){\n star.clear();\n planet.clear();\n }", "public final void reset() {\n\n // Reset the output buffer\n out.reset();\n\n a=0x8000;\n c=0;\n b=0;\n if(b==0xFF)\n cT=13;\n else\n cT=12;\n resetCtxts();\n nrOfWrittenBytes = -1;\n delFF = false;\n\n nSaved = 0;\n }", "public void resetBuffer() {\n\n\t}", "void fullReset();", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }", "public void reset(){\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}", "public void reset() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}", "public void reset()\n\t{ removeAll();\n\t\t int center_y=(getHeight()/2);\n int center_x=(getWidth()/2);\n\t\tScaffoldEnd=new GPoint((center_x-BEAM_LENGTH),ARM_OFFSET_FROM_HEAD+(2*HEAD_RADIUS)+ROPE_LENGTH);\n\t\tGLine scaffold=new GLine((center_x-BEAM_LENGTH),ScaffoldEnd.getY()+SCAFFOLD_HEIGHT,ScaffoldEnd.getX(),ScaffoldEnd.getY());\n\t\tadd(scaffold);\n\t\tBeamEnd=new GPoint((center_x),ScaffoldEnd.getY());\n\t\tGLine beam=new GLine(ScaffoldEnd.getX(),ScaffoldEnd.getY(),BeamEnd.getX(),BeamEnd.getY());\n\t\tadd(beam);\n\t\tRopeEnd=new GPoint((center_x),(BeamEnd.getY()+ROPE_LENGTH));\n\t\tGLine rope=new GLine(BeamEnd.getX(),BeamEnd.getY(),RopeEnd.getX(),RopeEnd.getY());\n\t\tadd(rope);\n\t\tguessedLabel=new GLabel(\"-----\",20,20);\n\t\twrongLabel=new GLabel(\"-----\",20,40);\n\t\ti=1;\n\t\twrong=\"\";\n\t}", "public void resetCarry() {\n\t\tset((byte) (get() & ~(1 << 4)));\n\t}", "protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\n\t\tselectedCurves.clear();\n\t\thooveredCurves.clear();\n\t\tselectedPoints.clear();\n\t\thooveredPoints.clear();\n\t\tselectionTool.clear();\n\t}", "abstract void reset();", "public GoLBoard reset()\n\t{\n\t\treturn reset(new GoLRandomInitializer(setSize));\n\t}", "void reset()\n {\n\n }", "public void Reset(){\n py = 0f;\n }", "void reset() ;", "private void resetMask() {\n maskArray = new int [][]{\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0}\n };\n }", "public void reset()\n {\n currentPosition = 0;\n }", "protected void reset() {\r\n super.reset();\r\n this.ring = null;\r\n }", "@Override\n public void reset() \n {\n\n }", "public void reset() {\n\tthis.contents = \"\";\n\tthis.isLegalMove = false;\n }", "@Override\r\n\tpublic void reset() {\n\t}", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "public void reset() {\n x = random(-2*width, 3*width); // set the x position\n y = random(-height, 2*height); // set the y position\n c[0] = color(random(150, 255), random(150, 255), random(150, 255)); // set the top color (a bit lighter)\n // randomly set the 4 colors in the base of the shape\n for (int i=1; i<5; i++) {\n c[i] = color(random(255), random(255), random(255)); // random RGB color\n }\n }", "public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();" ]
[ "0.7387321", "0.7149385", "0.6904737", "0.6891746", "0.6879149", "0.6844712", "0.6816209", "0.6620288", "0.6613408", "0.6611838", "0.6606515", "0.65881157", "0.6583964", "0.6582226", "0.6575258", "0.6550097", "0.65390867", "0.6529945", "0.65282947", "0.6523587", "0.65099657", "0.6506201", "0.6502562", "0.6494361", "0.6494361", "0.64933914", "0.6489013", "0.6481782", "0.64797133", "0.6464369", "0.64534223", "0.64534223", "0.64534223", "0.64534223", "0.64487725", "0.64487493", "0.6413795", "0.640888", "0.6399821", "0.6399821", "0.6399821", "0.6399821", "0.6395648", "0.6373351", "0.6365065", "0.63638407", "0.6355581", "0.63495564", "0.6337506", "0.6337506", "0.6337506", "0.6337506", "0.6329608", "0.6328572", "0.63200545", "0.6318291", "0.631525", "0.6307415", "0.6299651", "0.62996095", "0.6296106", "0.62892604", "0.62842464", "0.6284158", "0.6275168", "0.6271069", "0.62672156", "0.6261307", "0.62577134", "0.62474906", "0.6245724", "0.6242488", "0.62416846", "0.6241237", "0.6237974", "0.6234585", "0.62344813", "0.62335944", "0.6230302", "0.6226758", "0.6223425", "0.6214749", "0.62116885", "0.62116885", "0.6209361", "0.620758", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564", "0.62064564" ]
0.864582
0
Reset the Macro Block
void reset() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void reset() {\n\t\tvxlFragment = new StringBuffer();\n\t\tpreprocessorList = new LinkedList<ASTNode>();\n\t}", "void reset() {\n blocks.clear();\n }", "public void reset() {\n\n\t}", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "private void reset() {\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void resetBlocks() {\n\t\tBLOCK_LIST.clear();\n\t}", "public void reset() {\n\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset(){\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n\r\n\t}", "public void reset () {}", "void reset() ;", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset() {\n\t\treset(ModSettings.currentContext);\n\t}", "public final void Reset()\n\t{\n\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "public synchronized void reset() {\n }", "@Override\r\n\tpublic void reset() {\n\t}", "protected void reset() {\n\t\t}", "@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}", "@Override\n\tpublic void reset() {\n\t}", "void Reset() {\n lq = 0;\n ls = 0;\n }", "@Override\r\n\tpublic void reset() {\n\r\n\t}", "@Override\r\n\tpublic void reset() {\n\r\n\t}", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tvoid reset() {\n\t\t\n\t}", "@Override\n\tpublic void reset() {\n\n\t}", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "@Override\n public void reset() {\n }", "public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }", "@Override\n public void reset() \n {\n\n }", "void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "public void resetComputation()\n {\n for (Block block : this.blocks) {\n block.setShadow(null);\n block.deleteInputValues();\n }\n }", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void reset() {\n reset(animateOnReset);\n }", "@Override\n public void reset() {\n\n }", "public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}", "public static void reset() {\n parentNameToBlockStubs.clear();\n parentNameToParentBlocks.clear();\n }", "void reset ();", "public void reset() {\n super.reset();\n }", "public void reset() {\n cycles = 0;\n nextHaltCycle = GB_CYCLES_PER_FRAME;\n nextUpdateCycle = 0;\n running = false;\n timer.reset();\n \n cpu.reset();\n ram.reset();\n soundHandler.reset();\n }", "public void reset() {\n initBody();\n }", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }", "public void resetPhase();", "public void reset ()\n {\n final String METHOD_NAME = \"reset()\";\n this.logDebug(METHOD_NAME + \" 1/2: Started\");\n super.reset();\n this.lid = null;\n this.refId = Id.UNDEFINED;\n this.fromDocType = DocType.UNDEFINED;\n this.logDebug(METHOD_NAME + \" 2/2: Done\");\n }", "public void resetWorkspace() {\n //clear all pages and their drawers\n //clear all drawers and their content\n //clear all block and renderable block instances\n workspace.reset();\n //clear procedure output information\n ProcedureOutputManager.reset();\t//*****\n\n }", "public void reset() {\n aCollection = this.asciiMathLibraryBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n cCollection = this.customFuncBlock.getOwnedElement().stream().filter(e -> e instanceof NamedElement).collect(Collectors.toList());\n }", "public void reset()\n {\n myOffset = 0;\n amIInsideDoubleQuotes = false;\n amIInsideSingleQuotes = false;\n myCurrLexeme = null;\n }", "public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}" ]
[ "0.7155069", "0.7080989", "0.698541", "0.695417", "0.695417", "0.69477385", "0.692311", "0.692311", "0.692311", "0.692311", "0.6922406", "0.6899504", "0.6897069", "0.6897069", "0.6897069", "0.6897069", "0.68840575", "0.68731534", "0.6859844", "0.6855241", "0.6758426", "0.6753389", "0.67447627", "0.670539", "0.66976565", "0.66976565", "0.66976565", "0.66976565", "0.66584176", "0.66584176", "0.66444266", "0.66384876", "0.66221625", "0.66217524", "0.65986466", "0.659701", "0.659611", "0.659611", "0.6591456", "0.6588358", "0.658692", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.6573864", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65498704", "0.65395117", "0.6528699", "0.6497465", "0.64867914", "0.6483612", "0.646757", "0.6467021", "0.6443616", "0.64399636", "0.6435142", "0.64331466", "0.6419861", "0.6411285", "0.63873404", "0.6385641", "0.6373462", "0.6372373", "0.6356091", "0.6337544", "0.6333276", "0.633085", "0.6300984", "0.6296062", "0.62802625" ]
0.6975273
3
Parsing the Macro Block
protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException { // Starting from the Macroblock type /* read macro block bit flags */ /* swi*tch (getPictureType()) { case Picture.I_TYPE: getIMBType(stream); break; case Picture.P_TYPE: getPMBType(stream); if (!isForwardPredicted()) resetMotionVector(); if (!isMBIntra()) resetDCPredictor(); break; case Picture.B_TYPE: getBMBType(stream); if (isMBIntra()) resetMotionVector(); else resetDCPredictor(); break; } */ int type = getPictureType(); if (type == Picture.I_TYPE) { getIMBType(stream); } else if (type == Picture.P_TYPE) { getPMBType(stream); if (!isForwardPredicted()) resetMotionVector(); if (!isMBIntra()) resetDCPredictor(); } else if (type == Picture.B_TYPE) { getBMBType(stream); if (isMBIntra()) resetMotionVector(); else resetDCPredictor(); } if (haveMBQuant()) setQuantizerScale(stream.getBits(5)); if (isForwardPredicted()) forwardVector.getMotionVector(stream); if (isBackwardPredicted()) backwardVector.getMotionVector(stream); if (haveMBPattern()) getMBPattern(stream); else resetMBPattern(); int i,j; // Clear the block data for (i=0;i<6;i++) for (j=0;j<64;j++) block[i][j] = 0; // Read DCT coefficients if (isMBIntra()) { for (i=0;i<4;i++) { dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream)); IDCT.transform(block[i]); } dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream)); IDCT.transform(block[4]); dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream)); IDCT.transform(block[5]); } else { for (i=0;i<6;i++) { if ((codedBlockPattern & (1 << (5-i))) != 0) { getInterBlock(block[i], stream); IDCT.transform(block[i]); } } } if (getPictureType() == Picture.D_TYPE) stream.flushBits(1); // Parsing Macro Block finished! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GmMacro createGmMacro(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "GmMacro createGmMacro(Reader reader) throws IOException, SAXException, ParserConfigurationException;", "GmMacro createGmMacro(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "private Token define()\r\n throws IOException,\r\n LexerException {\r\n Token tok = source_token_nonwhite();\r\n if (tok.getType() != IDENTIFIER) {\r\n error(tok, \"Expected identifier\");\r\n return source_skipline(false);\r\n }\r\n /* if predefined */\r\n\r\n String name = tok.getText();\r\n if (\"defined\".equals(name)) {\r\n error(tok, \"Cannot redefine name 'defined'\");\r\n return source_skipline(false);\r\n }\r\n\r\n Macro m = new Macro(getSource(), name);\r\n List<String> args;\r\n\r\n tok = source_token();\r\n if (tok.getType() == '(') {\r\n tok = source_token_nonwhite();\r\n if (tok.getType() != ')') {\r\n args = new ArrayList<String>();\r\n ARGS:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case IDENTIFIER:\r\n args.add(tok.getText());\r\n break;\r\n case ELLIPSIS:\r\n // Unnamed Variadic macro\r\n args.add(\"__VA_ARGS__\");\r\n // We just named the ellipsis, but we unget the token\r\n // to allow the ELLIPSIS handling below to process it.\r\n source_untoken(tok);\r\n break;\r\n case NL:\r\n case EOF:\r\n error(tok,\r\n \"Unterminated macro parameter list\");\r\n return tok;\r\n default:\r\n error(tok,\r\n \"error in macro parameters: \"\r\n + tok.getText());\r\n return source_skipline(false);\r\n }\r\n tok = source_token_nonwhite();\r\n switch (tok.getType()) {\r\n case ',':\r\n break;\r\n case ELLIPSIS:\r\n tok = source_token_nonwhite();\r\n if (tok.getType() != ')')\r\n error(tok,\r\n \"ellipsis must be on last argument\");\r\n m.setVariadic(true);\r\n break ARGS;\r\n case ')':\r\n break ARGS;\r\n\r\n case NL:\r\n case EOF:\r\n /* Do not skip line. */\r\n error(tok,\r\n \"Unterminated macro parameters\");\r\n return tok;\r\n default:\r\n error(tok,\r\n \"Bad token in macro parameters: \"\r\n + tok.getText());\r\n return source_skipline(false);\r\n }\r\n tok = source_token_nonwhite();\r\n }\r\n } else {\r\n assert tok.getType() == ')' : \"Expected ')'\";\r\n args = Collections.emptyList();\r\n }\r\n\r\n m.setArgs(args);\r\n } else {\r\n /* For searching. */\r\n args = Collections.emptyList();\r\n source_untoken(tok);\r\n }\r\n\r\n /* Get an expansion for the macro, using indexOf. */\r\n boolean space = false;\r\n boolean paste = false;\r\n int idx;\r\n\r\n /* Ensure no space at start. */\r\n tok = source_token_nonwhite();\r\n EXPANSION:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case EOF:\r\n break EXPANSION;\r\n case NL:\r\n break EXPANSION;\r\n\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n /* XXX This is where we implement GNU's cpp -CC. */\r\n // break;\r\n case WHITESPACE:\r\n if (!paste)\r\n space = true;\r\n break;\r\n\r\n /* Paste. */\r\n case PASTE:\r\n space = false;\r\n paste = true;\r\n m.addPaste(new Token(M_PASTE,\r\n tok.getLine(), tok.getColumn(),\r\n \"#\" + \"#\", null));\r\n break;\r\n\r\n /* Stringify. */\r\n case '#':\r\n if (space)\r\n m.addToken(Token.space);\r\n space = false;\r\n Token la = source_token_nonwhite();\r\n if (la.getType() == IDENTIFIER\r\n && ((idx = args.indexOf(la.getText())) != -1)) {\r\n m.addToken(new Token(M_STRING,\r\n la.getLine(), la.getColumn(),\r\n \"#\" + la.getText(),\r\n Integer.valueOf(idx)));\r\n } else {\r\n m.addToken(tok);\r\n /* Allow for special processing. */\r\n source_untoken(la);\r\n }\r\n break;\r\n\r\n case IDENTIFIER:\r\n if (space)\r\n m.addToken(Token.space);\r\n space = false;\r\n paste = false;\r\n idx = args.indexOf(tok.getText());\r\n if (idx == -1)\r\n m.addToken(tok);\r\n else\r\n m.addToken(new Token(M_ARG,\r\n tok.getLine(), tok.getColumn(),\r\n tok.getText(),\r\n Integer.valueOf(idx)));\r\n break;\r\n\r\n default:\r\n if (space)\r\n m.addToken(Token.space);\r\n space = false;\r\n paste = false;\r\n m.addToken(tok);\r\n break;\r\n }\r\n tok = source_token();\r\n }\r\n\r\n if (getFeature(Feature.DEBUG))\r\n LOG.info(\"Defined macro \" + m);\r\n addMacro(m);\r\n\r\n return tok;\t/* NL or EOF. */\r\n\r\n }", "private void parseElementForMacrodefs(Element element)\n {\n for (Iterator targetsIterator = element.getDescendants(new ElementFilter(\"macrodef\")); targetsIterator.hasNext();)\n {\n Element macrodefElement = (Element) targetsIterator.next();\n Attribute nameAttribute = macrodefElement.getAttribute(\"name\");\n String name = nameAttribute.getValue();\n Macrodef macrodef = new Macrodef(name, this, macrodefElement);\n\n addMacrodef(macrodef);\n macrodef.parseForDependencies(); // dgbtodo -elsewhere???\n }\n }", "GmMacro createGmMacro(File file) throws IOException, SAXException, ParserConfigurationException;", "private boolean macro(Macro m, Token orig)\r\n throws IOException,\r\n LexerException {\r\n Token tok;\r\n List<Argument> args;\r\n\r\n // System.out.println(\"pp: expanding \" + m);\r\n if (m.isFunctionLike()) {\r\n OPEN:\r\n for (;;) {\r\n tok = source_token();\r\n // System.out.println(\"pp: open: token is \" + tok);\r\n switch (tok.getType()) {\r\n case WHITESPACE:\t/* XXX Really? */\r\n\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n case NL:\r\n break;\t/* continue */\r\n\r\n case '(':\r\n break OPEN;\r\n default:\r\n source_untoken(tok);\r\n return false;\r\n }\r\n }\r\n\r\n // tok = expanded_token_nonwhite();\r\n tok = source_token_nonwhite();\r\n\r\n /* We either have, or we should have args.\r\n * This deals elegantly with the case that we have\r\n * one empty arg. */\r\n if (tok.getType() != ')' || m.getArgs() > 0) {\r\n args = new ArrayList<Argument>();\r\n\r\n Argument arg = new Argument();\r\n int depth = 0;\r\n boolean space = false;\r\n\r\n ARGS:\r\n for (;;) {\r\n // System.out.println(\"pp: arg: token is \" + tok);\r\n switch (tok.getType()) {\r\n case EOF:\r\n error(tok, \"EOF in macro args\");\r\n return false;\r\n\r\n case ',':\r\n if (depth == 0) {\r\n if (m.isVariadic()\r\n && /* We are building the last arg. */ args.size() == m.getArgs() - 1) {\r\n /* Just add the comma. */\r\n arg.addToken(tok);\r\n } else {\r\n args.add(arg);\r\n arg = new Argument();\r\n }\r\n } else {\r\n arg.addToken(tok);\r\n }\r\n space = false;\r\n break;\r\n case ')':\r\n if (depth == 0) {\r\n args.add(arg);\r\n break ARGS;\r\n } else {\r\n depth--;\r\n arg.addToken(tok);\r\n }\r\n space = false;\r\n break;\r\n case '(':\r\n depth++;\r\n arg.addToken(tok);\r\n space = false;\r\n break;\r\n\r\n case WHITESPACE:\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n case NL:\r\n /* Avoid duplicating spaces. */\r\n space = true;\r\n break;\r\n\r\n default:\r\n /* Do not put space on the beginning of\r\n * an argument token. */\r\n if (space && !arg.isEmpty())\r\n arg.addToken(Token.space);\r\n arg.addToken(tok);\r\n space = false;\r\n break;\r\n\r\n }\r\n // tok = expanded_token();\r\n tok = source_token();\r\n }\r\n /* space may still be true here, thus trailing space\r\n * is stripped from arguments. */\r\n\r\n if (args.size() != m.getArgs()) {\r\n if (m.isVariadic()) {\r\n if (args.size() == m.getArgs() - 1) {\r\n args.add(new Argument());\r\n } else {\r\n error(tok,\r\n \"variadic macro \" + m.getName()\r\n + \" has at least \" + (m.getArgs() - 1) + \" parameters \"\r\n + \"but given \" + args.size() + \" args\");\r\n return false;\r\n }\r\n } else {\r\n error(tok,\r\n \"macro \" + m.getName()\r\n + \" has \" + m.getArgs() + \" parameters \"\r\n + \"but given \" + args.size() + \" args\");\r\n /* We could replay the arg tokens, but I \r\n * note that GNU cpp does exactly what we do,\r\n * i.e. output the macro name and chew the args.\r\n */\r\n return false;\r\n }\r\n }\r\n\r\n for (Argument a : args) {\r\n a.expand(this);\r\n }\r\n\r\n // System.out.println(\"Macro \" + m + \" args \" + args);\r\n } else {\r\n /* nargs == 0 and we (correctly) got () */\r\n args = null;\r\n }\r\n\r\n } else {\r\n /* Macro without args. */\r\n args = null;\r\n }\r\n\r\n if (m == __LINE__) {\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(NUMBER,\r\n orig.getLine(), orig.getColumn(),\r\n Integer.toString(orig.getLine()),\r\n new NumericValue(10, Integer.toString(orig.getLine())))}\r\n ), true);\r\n } else if (m == __FILE__) {\r\n StringBuilder buf = new StringBuilder(\"\\\"\");\r\n String name = getSource().getName();\r\n if (name == null)\r\n name = \"<no file>\";\r\n for (int i = 0; i < name.length(); i++) {\r\n char c = name.charAt(i);\r\n switch (c) {\r\n case '\\\\':\r\n buf.append(\"\\\\\\\\\");\r\n break;\r\n case '\"':\r\n buf.append(\"\\\\\\\"\");\r\n break;\r\n default:\r\n buf.append(c);\r\n break;\r\n }\r\n }\r\n buf.append(\"\\\"\");\r\n String text = buf.toString();\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(STRING,\r\n orig.getLine(), orig.getColumn(),\r\n text, text)}\r\n ), true);\r\n } else if (m == __COUNTER__) {\r\n /* This could equivalently have been done by adding\r\n * a special Macro subclass which overrides getTokens(). */\r\n int value = this.counter++;\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(NUMBER,\r\n orig.getLine(), orig.getColumn(),\r\n Integer.toString(value),\r\n new NumericValue(10, Integer.toString(value)))}\r\n ), true);\r\n } else {\r\n push_source(new MacroTokenSource(m, args), true);\r\n }\r\n\r\n return true;\r\n }", "private void processMacro( String text, Sink sink )\n throws XmlPullParserException\n {\n String s = text.substring( text.indexOf( '{' ) + 1, text.indexOf( '}' ) );\n s = escapeForMacro( s );\n String[] params = StringUtils.split( s, \"|\" );\n String macroName = params[0];\n\n Map<String, Object> parameters = new HashMap<>();\n for ( int i = 1; i < params.length; i++ )\n {\n String[] param = StringUtils.split( params[i], \"=\" );\n if ( param.length == 1 )\n {\n throw new XmlPullParserException( \"Missing 'key=value' pair for macro parameter: \" + params[i] );\n }\n\n String key = unescapeForMacro( param[0] );\n String value = unescapeForMacro( param[1] );\n parameters.put( key, value );\n }\n\n MacroRequest request = new MacroRequest( sourceContent, new Xhtml5Parser(), parameters, getBasedir() );\n\n try\n {\n executeMacro( macroName, request, sink );\n }\n catch ( MacroExecutionException e )\n {\n throw new XmlPullParserException( \"Unable to execute macro in the document: \" + macroName );\n }\n catch ( MacroNotFoundException me )\n {\n throw new XmlPullParserException( \"Macro not found: \" + macroName );\n }\n }", "GmMacro createGmMacro(String uri) throws IOException, SAXException, ParserConfigurationException;", "private XDOM prepareWikiMacroContent(MacroTransformationContext context)\n {\n XDOM xdom = this.content.clone();\n\n // Macro code segment is always parsed into a separate xdom document. Now if this code segment starts with\n // another macro block, it will always be interpreted as a block macro regardless of the current wiki macro's\n // context (because as far as the nested macro is concerned, it starts on a new line). This will introduce\n // unnecessary paragraph elements when the wiki macro is used inline, so we need to force such opening macro\n // blocks to behave as inline macros if the wiki macro is used inline.\n if (context.isInline()) {\n List<Block> children = xdom.getChildren();\n if (children.size() > 0 && children.get(0) instanceof MacroBlock) {\n MacroBlock old = (MacroBlock) children.get(0);\n MacroBlock replacement = new MacroBlock(old.getId(), old.getParameters(), old.getContent(), true);\n xdom.replaceChild(replacement, old);\n }\n }\n\n return xdom;\n }", "private boolean isMacro(int nextVal) throws java.io.IOException, IOException {\n\t\tif (nextVal == PREPROCESSING) {\n\t\t\tint pos = (int) reader.getFilePointer();\n\t\t\tthis.readUntilEndOfLine(nextVal);\n\t\t\tthis.seek(pos);\n\t\t\treturn !(next.matches(\"!procedure.*\") || next.matches(\"!function.*\"));\n\t\t}\n\t\treturn false;\n\t}", "GmMacro createGmMacro(Element element);", "@Test\n void shouldExpandTokenMacro() {\n WorkflowJob job = createPipelineWithWorkspaceFilesWithSuffix(\"checkstyle1.xml\", \"checkstyle2.xml\");\n\n configureToken(job, \"checkstyle1\");\n\n AnalysisResult baseline = scheduleBuildAndAssertStatus(job, Result.SUCCESS);\n verifyConsoleLog(baseline, 3, 0, 0);\n\n configureToken(job, \"checkstyle2\");\n\n AnalysisResult result = scheduleBuildAndAssertStatus(job, Result.SUCCESS);\n\n verifyConsoleLog(result, 4, 3, 2);\n }", "@Nonnull\r\n private Token expanded_token()\r\n throws IOException,\r\n LexerException {\r\n for (;;) {\r\n Token tok = source_token();\r\n // System.out.println(\"Source token is \" + tok);\r\n if (tok.getType() == IDENTIFIER) {\r\n Macro m = getMacro(tok.getText());\r\n if (m == null)\r\n return tok;\r\n if (source.isExpanding(m))\r\n return tok;\r\n if (macro(m, tok))\r\n continue;\r\n }\r\n return tok;\r\n }\r\n }", "public interface ParserMASConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int SINGLE_LINE_COMMENT = 9;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 10;\r\n /** RegularExpression Id. */\r\n int MULTI_LINE_COMMENT = 11;\r\n /** RegularExpression Id. */\r\n int COLON = 13;\r\n /** RegularExpression Id. */\r\n int AT = 14;\r\n /** RegularExpression Id. */\r\n int COMMA = 15;\r\n /** RegularExpression Id. */\r\n int NRAGENTS = 16;\r\n /** RegularExpression Id. */\r\n int IDENTIFIER = 17;\r\n /** RegularExpression Id. */\r\n int FILENAME = 18;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n /** Lexical state. */\r\n int IN_SINGLE_LINE_COMMENT = 1;\r\n /** Lexical state. */\r\n int IN_FORMAL_COMMENT = 2;\r\n /** Lexical state. */\r\n int IN_MULTI_LINE_COMMENT = 3;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"%\\\"\",\r\n \"\\\"//\\\"\",\r\n \"<token of kind 7>\",\r\n \"\\\"/*\\\"\",\r\n \"<SINGLE_LINE_COMMENT>\",\r\n \"\\\"*/\\\"\",\r\n \"\\\"*/\\\"\",\r\n \"<token of kind 12>\",\r\n \"\\\":\\\"\",\r\n \"\\\"@\\\"\",\r\n \"\\\",\\\"\",\r\n \"<NRAGENTS>\",\r\n \"<IDENTIFIER>\",\r\n \"<FILENAME>\",\r\n };\r\n\r\n}", "@Test\n\tpublic void testBlock() throws ParseException {\n\t\tBlock block = parser(\"foo <%=666%> bar\").block();\n\t\tassertEquals(block.getLocation().getColumn(), 1);\n\t\tassertEquals(block.getLocation().getLine(), 1);\n\t\tassertEquals(block.getExpressions().size(), 3);\n\t\tassertEquals(block.getExpressions().get(0).getClass(), StringLiteral.class);\n\t\tassertEquals(((StringLiteral) block.getExpressions().get(0)).getValue(), \"foo \");\n\t\tassertEquals(block.getExpressions().get(1).getClass(), LongLiteral.class);\n\t\tassertEquals(((LongLiteral) block.getExpressions().get(1)).longValue(), 666L);\n\t\tassertEquals(block.getExpressions().get(2).getClass(), StringLiteral.class);\n\t\tassertEquals(((StringLiteral) block.getExpressions().get(2)).getValue(), \" bar\");\n\t}", "public String getNextMacro() throws IOException {\n\t\ttry {\n\t\t\tint pos = (int)reader.getFilePointer();\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = ignore(nextVal);\n\t\t\tif (isMacro(nextVal)) {\n\t\t\t\treadUntilEndOfLine(nextVal);\n\t\t\t\treturn next;\n\t\t\t}\n\t\t\treader.seek(pos);\n\t\t\treturn null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}", "@Test(expected = SyntaxErrorException.class)\n public void saveMacro() throws Exception{\n\t macroParser.saveMacro(\"! +\");\n }", "@Test\n public void macroParseTest1() throws TapisException\n {\n var s = \"$varname\";\n var m = _pattern.matcher(s);\n var b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"varname\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname ,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n\n s = \"$varname,\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n }", "public IAstPreprocessorMacroExpression[] getMacroExpressions();", "public List<Macrodef> parseForMacrodefs()\n {\n parseElementForMacrodefs(rootElement); // parse outside of targets - most common definition\n\n for (Iterator targetsIterator = rootElement.getDescendants(new ElementFilter(\"target\")); targetsIterator.hasNext();)\n {\n Element targetElement = (Element) targetsIterator.next();\n\n parseElementForMacrodefs(targetElement); // parse inside of targets (such as \"init\"\n }\n\n return localMacrodefs;\n }", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public interface DefccConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int MODULE_TKN = 11;\n /** RegularExpression Id. */\n int CLASS_TKN = 12;\n /** RegularExpression Id. */\n int INCLUDE_TKN = 13;\n /** RegularExpression Id. */\n int BYTE_TKN = 14;\n /** RegularExpression Id. */\n int BOOLEAN_TKN = 15;\n /** RegularExpression Id. */\n int INT_TKN = 16;\n /** RegularExpression Id. */\n int LONG_TKN = 17;\n /** RegularExpression Id. */\n int FLOAT_TKN = 18;\n /** RegularExpression Id. */\n int DOUBLE_TKN = 19;\n /** RegularExpression Id. */\n int STRING_TKN = 20;\n /** RegularExpression Id. */\n int BUFFER_TKN = 21;\n /** RegularExpression Id. */\n int VECTOR_TKN = 22;\n /** RegularExpression Id. */\n int MAP_TKN = 23;\n /** RegularExpression Id. */\n int LBRACE_TKN = 24;\n /** RegularExpression Id. */\n int RBRACE_TKN = 25;\n /** RegularExpression Id. */\n int LT_TKN = 26;\n /** RegularExpression Id. */\n int GT_TKN = 27;\n /** RegularExpression Id. */\n int SEMICOLON_TKN = 28;\n /** RegularExpression Id. */\n int COMMA_TKN = 29;\n /** RegularExpression Id. */\n int DOT_TKN = 30;\n /** RegularExpression Id. */\n int CSTRING_TKN = 31;\n /** RegularExpression Id. */\n int IDENT_TKN = 32;\n /** RegularExpression Id. */\n int IDENT_TKN_W_DOT = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int WithinOneLineComment = 1;\n /** Lexical state. */\n int WithinMultiLineComment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"module\\\"\",\n \"\\\"class\\\"\",\n \"\\\"include\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"int\\\"\",\n \"\\\"long\\\"\",\n \"\\\"float\\\"\",\n \"\\\"double\\\"\",\n \"\\\"string\\\"\",\n \"\\\"buffer\\\"\",\n \"\\\"vector\\\"\",\n \"\\\"map\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"<CSTRING_TKN>\",\n \"<IDENT_TKN>\",\n \"<IDENT_TKN_W_DOT>\",\n };\n\n}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "public void parse() {\n MessageBlockLexer lexer = new MessageBlockBailLexer(name, postNumber, CharStreams.fromString(raw));\n\n // remove ConsoleErrorListener\n lexer.removeErrorListeners();\n\n // create a buffer of tokens pulled from the lexer\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n\n // create a parser that feeds off the tokens buffer\n MessageBlockParser parser = new MessageBlockParser(tokens);\n\n // remove ConsoleErrorListener\n parser.removeErrorListeners();\n\n // Create/add custom error listener\n MessageBlockErrorListener errorListener = new MessageBlockErrorListener(name, topic, postNumber);\n parser.addErrorListener(errorListener);\n\n // Begin parsing at the block rule\n ParseTree tree = parser.block();\n\n // Check for parsing errors\n errorListener.throwIfErrorsPresent();\n\n LOGGER.trace(tree.toStringTree(parser));\n\n // Walk the tree\n ParseTreeWalker walker = new ParseTreeWalker();\n walker.walk(new Listener(this), tree);\n }", "GmMacro createGmMacro(URL url) throws IOException, SAXException, ParserConfigurationException;", "public Macro(Object name) {\n super(name);\n }", "DefineBlock createDefineBlock();", "private Block parseBlock(Tokenizer in) {\n\t\tBlock block = new Block();\n\t\tToken next = in.next();\n\t\twhile (next.type != Token.TokenType.CLOSE_BRACE) {\n\t\t\tin.pushTokens(next);\n\t\t\tblock.statements.add(parseStmt(in));\n\t\t\tnext = in.next();\n\t\t}\n\t\treturn block;\n\t}", "private void parse() {\r\n for (int length = sourceCode.length(); index < length; ++index) {\r\n char c = sourceCode.charAt(index);\r\n if (!Character.isWhitespace(c)) {\r\n ArrayList<String> tokens = tokenizeStatement(sourceCode);\r\n if (tokens != null) {\r\n parseStatementTokens(tokens);\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }", "public interface LogoParserConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int PROC = 6;\r\n /** RegularExpression Id. */\r\n int END = 7;\r\n /** RegularExpression Id. */\r\n int MAKE = 8;\r\n /** RegularExpression Id. */\r\n int VARNAME = 9;\r\n /** RegularExpression Id. */\r\n int RPT = 10;\r\n /** RegularExpression Id. */\r\n int RT = 11;\r\n /** RegularExpression Id. */\r\n int FD = 12;\r\n /** RegularExpression Id. */\r\n int ID = 13;\r\n /** RegularExpression Id. */\r\n int DECPOINT = 14;\r\n /** RegularExpression Id. */\r\n int PLUS = 15;\r\n /** RegularExpression Id. */\r\n int MINUS = 16;\r\n /** RegularExpression Id. */\r\n int TIMES = 17;\r\n /** RegularExpression Id. */\r\n int DIVIDE = 18;\r\n /** RegularExpression Id. */\r\n int COLON = 19;\r\n /** RegularExpression Id. */\r\n int COMMA = 20;\r\n /** RegularExpression Id. */\r\n int LBRACKET = 21;\r\n /** RegularExpression Id. */\r\n int RBRACKET = 22;\r\n /** RegularExpression Id. */\r\n int LSQR = 23;\r\n /** RegularExpression Id. */\r\n int RSQR = 24;\r\n /** RegularExpression Id. */\r\n int NUMBER = 25;\r\n /** RegularExpression Id. */\r\n int DIGIT = 26;\r\n /** RegularExpression Id. */\r\n int ALPHA = 27;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\r\\\\n\\\"\",\r\n \"\\\"proc\\\"\",\r\n \"\\\"end\\\"\",\r\n \"\\\"make\\\"\",\r\n \"<VARNAME>\",\r\n \"\\\"rpt\\\"\",\r\n \"\\\"rt\\\"\",\r\n \"\\\"fd\\\"\",\r\n \"<ID>\",\r\n \"\\\".\\\"\",\r\n \"\\\"+\\\"\",\r\n \"\\\"-\\\"\",\r\n \"\\\"*\\\"\",\r\n \"\\\"/\\\"\",\r\n \"\\\":\\\"\",\r\n \"\\\",\\\"\",\r\n \"\\\"(\\\"\",\r\n \"\\\")\\\"\",\r\n \"\\\"[\\\"\",\r\n \"\\\"]\\\"\",\r\n \"<NUMBER>\",\r\n \"<DIGIT>\",\r\n \"<ALPHA>\",\r\n };\r\n\r\n}", "GmMacro createGmMacro(Document doc);", "private void formatBlockContent(final TermParserReader p) {\n while (p.current().kind() != Terms.EOF\n && p.current().kind() != Terms.BLOCK_END) {\n final TermToken tt = p.current();\n final Token tk = token(tt);\n switch (tt.kind()) {\n case IGNORABLE:\n processIgnorable(p, tk);\n break;\n case CONTROL:\n // Whatever token was, advance to the next token.\n // Note that actual '{', '}' and ';' tokens are printed\n // by the block and segment parsing code.\n p.advance();\n break;\n case STATEMENT_START:\n formatSegment(p);\n break;\n case GRAMMAR_IS_LOADED:\n // FIXME log?\n p.advance();\n break;\n case SYNTAX_ERROR:\n // FIXME REPORT\n p.advance();\n break;\n default:\n assert false : \"it should be never encountered here: \" + tt;\n break;\n }\n }\n }", "@Input\n public Map<String, String> getMacros() {\n return macros;\n }", "private static void buildTokens (Document doc, String block, boolean[] newToken,\n int offset, int nextBlockStart, boolean firstBlock) {\n int tokenStart = 0;\n \tfor (int i=1; i<=block.length(); i++) {\n \t\tif(newToken[i]) {\n \t\t\tint tokenEnd = i;\n \t\t\tFeatureSet fs = null;\n \t\t\t// if number, compute value (set value=-1 if not a number)\n \t\t\tint value = 0;\n \t\t\tfor (int j=tokenStart; j<tokenEnd; j++) {\n \t\t\t\tif (Character.isDigit(block.charAt(j))) {\n \t\t\t\t\tvalue = (value * 10) + Character.digit(block.charAt(j),10);\n \t\t\t\t} else if (block.charAt(j) == ',' && value > 0) {\n \t\t\t\t\t// skip comma if preceded by non-zero digit\n \t\t\t\t} else {\n \t\t\t\t\tvalue = -1;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\tString type = specialTokenType.get(tokenStart + offset);\n \t\t\tif (type != null) {\n \t\t\t\tfs = new FeatureSet (\"type\", type);\n \t\t\t} else if (Character.isUpperCase(block.charAt(tokenStart))) {\n \t\t\t\tif (firstBlock ||\n \t\t\t\t // for ACE\n \t\t\t\t lastToken.equals(\"_\") ||\n \t\t\t\t lastToken.equals(\"\\\"\") || lastToken.equals(\"``\") || lastToken.equals(\"`\")) {\n \t\t\t\t\tfs = new FeatureSet (\"case\", \"forcedCap\");\n \t\t\t\t} else {\n \t\t\t\t\tfs = new FeatureSet (\"case\", \"cap\");\n \t\t\t\t}\n \t\t\t} else if (value >= 0) {\n \t\t\t\tfs = new FeatureSet (\"intvalue\", new Integer(value));\n \t\t\t} else {\n \t\t\t\tfs = new FeatureSet ();\n \t\t\t}\n \t\t\t// create token\n \t\t\tint spanEnd = (tokenEnd == block.length()) ? nextBlockStart : tokenEnd + offset;\n \t\t\tString tokenString = block.substring(tokenStart, tokenEnd);\n \t\t\trecordToken (doc, tokenString, tokenStart + offset, spanEnd, fs);\n \t\t\ttokenStart = tokenEnd;\n \t\t\tlastToken = tokenString;\n \t\t}\n \t}\n\t}", "public interface PreprocessorConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP2 = 1;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP3 = 2;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP4 = 3;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP_INVISIBLE_ALL = 4;\n /** RegularExpression Id. */\n int KEEP_SPACE = 9;\n /** RegularExpression Id. */\n int CSTYLECOMMENTSTART = 10;\n /** RegularExpression Id. */\n int NEWLINE = 11;\n /** RegularExpression Id. */\n int LINECOMMENTSTART = 12;\n /** RegularExpression Id. */\n int STARTDIRECTIVE = 13;\n /** RegularExpression Id. */\n int PPINCLUDE = 19;\n /** RegularExpression Id. */\n int PPIF = 20;\n /** RegularExpression Id. */\n int PPIFDEF = 21;\n /** RegularExpression Id. */\n int PPIFNDEF = 22;\n /** RegularExpression Id. */\n int PPELIF = 23;\n /** RegularExpression Id. */\n int PPELSE = 24;\n /** RegularExpression Id. */\n int PPENDIF = 25;\n /** RegularExpression Id. */\n int PPDEFINE = 26;\n /** RegularExpression Id. */\n int PPUNDEF = 27;\n /** RegularExpression Id. */\n int PPLINE = 28;\n /** RegularExpression Id. */\n int PPERROR = 29;\n /** RegularExpression Id. */\n int PPPRAGMA = 30;\n /** RegularExpression Id. */\n int UNEXPECTED = 31;\n /** RegularExpression Id. */\n int DQFILENAME = 32;\n /** RegularExpression Id. */\n int AQFILENAME = 33;\n /** RegularExpression Id. */\n int KEEP_KEYWORD = 34;\n /** RegularExpression Id. */\n int KEEP_NCONST = 35;\n /** RegularExpression Id. */\n int INT = 36;\n /** RegularExpression Id. */\n int INTSUFFIX = 37;\n /** RegularExpression Id. */\n int FLOATCONST = 38;\n /** RegularExpression Id. */\n int LOCAL_FLOATCONST = 39;\n /** RegularExpression Id. */\n int DIGITS = 40;\n /** RegularExpression Id. */\n int EXPPART = 41;\n /** RegularExpression Id. */\n int KEEP_ACONST = 42;\n /** RegularExpression Id. */\n int CHARACTER = 43;\n /** RegularExpression Id. */\n int STRING = 44;\n /** RegularExpression Id. */\n int SIMPLEESCAPESEQ = 45;\n /** RegularExpression Id. */\n int OCTALESCAPESEQ = 46;\n /** RegularExpression Id. */\n int HEXESCAPESEQ = 47;\n /** RegularExpression Id. */\n int UCODENAME = 48;\n /** RegularExpression Id. */\n int HEXQUAD = 49;\n /** RegularExpression Id. */\n int HEXDIG = 50;\n /** RegularExpression Id. */\n int KEEP_ID = 51;\n /** RegularExpression Id. */\n int KEEP_REST = 52;\n\n /** Lexical state. */\n int AFTERINCLUDE = 0;\n /** Lexical state. */\n int DIRECTIVE0 = 1;\n /** Lexical state. */\n int IN_C_COMMENT = 2;\n /** Lexical state. */\n int IN_LINE_COMMENT = 3;\n /** Lexical state. */\n int IN_PEDAGOGICAL_COMMENT = 4;\n /** Lexical state. */\n int MIDLINE = 5;\n /** Lexical state. */\n int DEFAULT = 6;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<PEDAGOGICALMARKUP2>\",\n \"<PEDAGOGICALMARKUP3>\",\n \"\\\"/*#\\\"\",\n \"\\\"/*#I\\\"\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 8>\",\n \"<KEEP_SPACE>\",\n \"\\\"/*\\\"\",\n \"<NEWLINE>\",\n \"\\\"//\\\"\",\n \"\\\"#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 15>\",\n \"\\\"*/\\\"\",\n \"<token of kind 17>\",\n \"<token of kind 18>\",\n \"\\\"include\\\"\",\n \"\\\"if\\\"\",\n \"\\\"ifdef\\\"\",\n \"\\\"ifndef\\\"\",\n \"\\\"elif\\\"\",\n \"\\\"else\\\"\",\n \"\\\"endif\\\"\",\n \"\\\"define\\\"\",\n \"\\\"undef\\\"\",\n \"\\\"line\\\"\",\n \"\\\"error\\\"\",\n \"\\\"pragma\\\"\",\n \"<UNEXPECTED>\",\n \"<DQFILENAME>\",\n \"<AQFILENAME>\",\n \"<KEEP_KEYWORD>\",\n \"<KEEP_NCONST>\",\n \"<INT>\",\n \"<INTSUFFIX>\",\n \"<FLOATCONST>\",\n \"<LOCAL_FLOATCONST>\",\n \"<DIGITS>\",\n \"<EXPPART>\",\n \"<KEEP_ACONST>\",\n \"<CHARACTER>\",\n \"<STRING>\",\n \"<SIMPLEESCAPESEQ>\",\n \"<OCTALESCAPESEQ>\",\n \"<HEXESCAPESEQ>\",\n \"<UCODENAME>\",\n \"<HEXQUAD>\",\n \"<HEXDIG>\",\n \"<KEEP_ID>\",\n \"<KEEP_REST>\",\n };\n\n}", "@Test\n\tpublic void embeddedComment() throws ParseException {\n\t\t// -->\n\t\tILineMatcher startMatcher = JavaSourceLineMatcher.startMatcher();\n\t\tILineMatcher endMatcher = JavaSourceLineMatcher.endMatcher();\n\t\tBlockToBlockListConverter converter = new BlockToBlockListConverter(startMatcher, endMatcher);\n\n\t\tList<String> lines = Lists.newArrayList();\n\n\t\tlines.add(\" // -->\");\n\t\tlines.add(\" // shift one left\");\n\t\tlines.add(\" \t// <--\");\n\t\tlines.add(\" \t// -->\");\n\t\tlines.add(\" \t// shift one left (embedded)\");\n\t\tlines.add(\" \t// this line too (embedded)\");\n\t\tlines.add(\" \t// <--\");\n\t\tlines.add(\" \t// -->\");\n\t\tlines.add(\" // this line too\");\n\t\tlines.add(\" // <--\");\n\n\t\tList<Block> blocks = converter.convert(new Block(lines));\n\n\t\tassertEquals(1, blocks.size());\n\t\tBlock block = blocks.get(0);\n\t\tassertNotNull(block);\n\t\tassertEquals(\"// shift one left\", block.lines().get(0));\n\t\tassertEquals(\"\t// shift one left (embedded)\", block.lines().get(1));\n\t\tassertEquals(\"\t// this line too (embedded)\", block.lines().get(2));\n\t\tassertEquals(\"// this line too\", block.lines().get(3));\n\t\t// <--\n\t}", "final public void block() throws ParseException {\n jj_consume_token(35);\n jj_consume_token(BLOCK);\n label_3:\n while (true) {\n if (jj_2_35(4)) {\n ;\n } else {\n break label_3;\n }\n jj_consume_token(34);\n }\n if (jj_2_36(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(36);\n }", "public HTMLBlock parse () throws HTMLParseException {\r\n block = new HTMLBlock (pagepart, length);\r\n nextToken = START;\r\n match (START);\r\n page ();\r\n\r\n return block;\r\n }", "final public void parse() throws ParseException {\n\t\tToken x = null;\n\t\tjj_consume_token(20);\n\t\tgetColumns(true);\n\t\tjj_consume_token(REFER);\n\n\t\tx = jj_consume_token(ID);\n\t\tm_refcatalog = x.image;\n\t\tjj_consume_token(21);\n\t\tx = jj_consume_token(ID);\n\t\tm_reftable = x.image;\n\t\tjj_consume_token(20);\n\t\tgetColumns(false);\n\t\tgetActions();\n\t}", "public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }", "public void parseFunctions(){\n\t\t\n\t}", "public Macro(Object name, Procedure expander2) {\n super(name);\n Object obj;\n new QuoteExp(expander2);\n this.expander = obj;\n }", "public MacroDefinition(int lineno, ExpansionManager manager, String header)\n throws AbnormalTerminationException {\n this(lineno, manager);\n this.setHeaderInfo(header);\n }", "public DrakonMacro getBody()\r\n {\r\n return body;\r\n }", "@Test\n @Tag(\"bm1000\")\n public void testETAMACRO() {\n CuteNetlibCase.doTest(\"ETAMACRO.SIF\", \"-755.7152312325337\", \"258.71905646302014\", NumberContext.of(7, 4));\n }", "void compileTermAdvanceHelper(String tokenType, String token) throws IOException {\n if (currentToken.equals(OPEN_SQUARE_BRACKET_SYMBOL)) {\n printToken(tokenType, token);\n printToken();\n getNextToken();\n compileExpression();\n printToken();\n getNextToken();\n\n } else if (currentToken.equals(OPEN_BRACKET_SYMBOL)) {\n printToken(tokenType, token);\n printToken();\n compileExpressionList();\n printToken();\n getNextToken();\n\n } else if (currentToken.equals(DOT_SYMBOL)) {\n\n printToken(tokenType, token);\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n printToken();\n compileExpressionList();\n printToken();\n getNextToken();\n } else {\n printToken(tokenType, token);\n }\n }", "public interface BibtexConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int COMMENT = 5;\r\n /** RegularExpression Id. */\r\n int COMMENT_START = 6;\r\n /** RegularExpression Id. */\r\n int PREAMBLE_START = 7;\r\n /** RegularExpression Id. */\r\n int STRING_START = 8;\r\n /** RegularExpression Id. */\r\n int COMMENT_ENTRY = 9;\r\n /** RegularExpression Id. */\r\n int OPEN_ENTRY = 11;\r\n /** RegularExpression Id. */\r\n int CLOSE_ENTRY = 12;\r\n /** RegularExpression Id. */\r\n int START_B_CONTENT = 14;\r\n /** RegularExpression Id. */\r\n int CLOSE_B_CONTENT = 15;\r\n /** RegularExpression Id. */\r\n int START_Q_CONTENT = 18;\r\n /** RegularExpression Id. */\r\n int CLOSE_Q_CONTENT = 19;\r\n /** RegularExpression Id. */\r\n int CONTENT_TEXT = 20;\r\n /** RegularExpression Id. */\r\n int ID = 21;\r\n /** RegularExpression Id. */\r\n int SEPARATOR = 22;\r\n /** RegularExpression Id. */\r\n int EQUALS = 23;\r\n /** RegularExpression Id. */\r\n int NUMBER = 24;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n /** Lexical state. */\r\n int IN_ENTRY = 1;\r\n /** Lexical state. */\r\n int IN_ENTRY_TYPE = 2;\r\n /** Lexical state. */\r\n int IN_COMMENT_ENTRY = 3;\r\n /** Lexical state. */\r\n int IN_PREAMBLE = 4;\r\n /** Lexical state. */\r\n int IN_BRACED_CONTENT = 5;\r\n /** Lexical state. */\r\n int IN_BRACED_NESTED_CONTENT = 6;\r\n /** Lexical state. */\r\n int IN_QUOTED_CONTENT = 7;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"<COMMENT>\",\r\n \"\\\"comment\\\"\",\r\n \"\\\"preamble\\\"\",\r\n \"\\\"string\\\"\",\r\n \"<COMMENT_ENTRY>\",\r\n \"<token of kind 10>\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"<token of kind 13>\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\"\\\\\\\"\\\"\",\r\n \"\\\"\\\\\\\"\\\"\",\r\n \"<CONTENT_TEXT>\",\r\n \"<ID>\",\r\n \"\\\",\\\"\",\r\n \"\\\"=\\\"\",\r\n \"<NUMBER>\",\r\n \"\\\"#\\\"\",\r\n };\r\n\r\n}", "@Override\r\n\tpublic void visit(BlockExpression blockExpression) {\n\r\n\t}", "IIndexMacro[] findMacros(char[] name, boolean isPrefix, boolean caseSensitive, IndexFilter filter, IProgressMonitor monitor) throws CoreException;", "public void parse(String blockName) throws IllegalArgumentException {\n String copy = \"\";\n if (implicitMain && !\"main\".equals(blockName) && !blockName.startsWith(\"main.\")) {\n blockName = \"main.\" + blockName;\n }\n try {\n copy = blocks.get(blockName).toString();\n } catch (NullPointerException e) {\n if (!this.failSilently) {\n throw new IllegalArgumentException(\n \"Block '\" + blockName + \"' not found.\" +\n \" Matches \" + locateBlock(blockName));\n }\n }\n //pattern = Pattern.compile(\"\\\\{([\\\\w\\\\.]+)\\\\}\");\n Matcher matcher = pattern.matcher(copy);\n //blockPattern = Pattern.compile(\"_BLOCK_\\\\.(.+)\");\n for (Matcher matcher2; matcher.find(); ) {\n String match = matcher.group(1);\n matcher2 = blockPattern.matcher(match);\n if (matcher2.find()) {\n if (parsedBlocks.containsKey(matcher2.group(1))) {\n copy = copy.replaceFirst(\"\\\\{\" + match + \"\\\\}\", escape(\n parsedBlocks.get(matcher2.group(1)).toString()));\n } else {\n copy = copy.replaceFirst(\"\\\\{\" + match + \"\\\\}\", \"\");\n }\n } else {\n if (vars.containsKey(match)) {\n copy = copy.replaceFirst(\"\\\\{\" + match + \"\\\\}\", escape(\n vars.get(match).toString()));\n } else {\n // Leave unchanged because it might be wanted in output.\n // Can always be removed by assigning empty value.\n //copy = copy.replaceFirst(\"\\\\{\"+match+\"\\\\}\", \"\");\n }\n }\n }\n if (parsedBlocks.containsKey(blockName)) {\n parsedBlocks.put(blockName, parsedBlocks.get(blockName) + copy);\n } else {\n parsedBlocks.put(blockName, copy);\n }\n if (subBlocks.containsKey(blockName)) {\n parsedBlocks.put(subBlocks.get(blockName), \"\");\n }\n }", "public Rule itBlock()\n \t{\n \t\treturn sequence(BRACKET_L, zeroOrMore(stmt()), BRACKET_R);\n \t}", "public void parse(){\n\t\t//Read next line in content; timestamp++\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(instructionfile))) {\n\t\t String line;\n\t\t while ((line = br.readLine()) != null) {\n\t\t \t//divide the line by semicolons\n\t\t \tString[] lineParts = line.split(\";\");\n\t\t \tfor(String aPart: lineParts){\n\t\t\t \tSystem.out.println(\"Parser:\"+aPart);\n\n\t\t\t \t// process the partial line.\n\t\t\t \tString[] commands = parseNextInstruction(aPart);\n\t\t\t \tif(commands!=null){\n\t\t\t\t\t\t\n\t\t\t \t\t//For each instruction in line: TransactionManager.processOperation()\n\t\t\t \t\ttm.processOperation(commands, currentTimestamp);\n\t\t\t \t}\n\t\t \t}\n\t\t \t//Every new line, time stamp increases\n\t \t\tcurrentTimestamp++;\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n\t\t}\n\t}", "private String generateMacro(){\r\n\t\tString code=\"\";\r\n\t\tcode += \"#include <assert.h>\\n\";\r\n\t\tcode += \"#include \\\"osek.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"oil.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"readyQ.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"kernel.h\\\"\\n\";\r\n\t\treturn code;\r\n\t}", "public void parseSubs(){\n\t\t\n\t\t\n\t}", "@Override\n\tpublic Void visit(Block block) {\n\t\tprintIndent(\"block\");\n\t\tindent++;\n\t\tfor (var v : block.content) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public ResolvedMacro defineMacro(IComponent component, MessageLocation messageLocation, DefineMacroType type) {\n\t\tSet<String> inheritedArguments = new HashSet<String>();\r\n\t\t\r\n\t\t// Resolve the macro's arguments so it doesn't refer to other macros'\r\n\t\tMap<String, MacroArgumentType> arguments = new LinkedHashMap<String, MacroArgumentType>();\r\n\t\tMap<String, ResolvedMacro> argumentOrigins = new LinkedHashMap<String, ResolvedMacro>();\r\n\t\tSet<ResolvedMacro> includedMacros = new HashSet<ResolvedMacro>();\r\n\t\t\r\n\t\tfor (Iterator iter = type.getImportArguments().iterator(); iter.hasNext();) {\r\n\t\t\tImportArgumentsType importArgs = (ImportArgumentsType) iter.next();\r\n\t\t\tResolvedMacro theMacro = nameToMacroMap.get(importArgs.getMacroName());\r\n\t\t\tif (theMacro == null) {\r\n\t \t\t\tdefineMacroError(messageLocation, type, \r\n\t \t\t\t\t\t\"SourceGenXMLParser.BadImportArgumentsMacro\", //$NON-NLS-1$\r\n \t\t\t\t\tnew Object[] { importArgs.getMacroName() });\r\n\t\t\t} else if (importArgs.getArguments() != null \r\n\t\t\t\t\t&& importArgs.getArguments().size() > 0) {\r\n\t\t\t\t// import a selection of arguments\r\n\t\t\t\tif (importArgs.getExceptArguments() != null) {\r\n\t\t\t\t\tdefineMacroError(messageLocation, type,\r\n\t\t\t\t\t\t\t\"SourceGenXMLParser.InvalidExceptArgumentsUsage\", //$NON-NLS-1$\r\n\t \t\t\t\t\tnew Object[] { importArgs.getMacroName() });\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tincludedMacros.add(theMacro);\r\n\t\t\t\t\r\n\t\t\t\tfor (Iterator iterator = importArgs.getArguments().iterator(); iterator\r\n\t\t\t\t\t\t.hasNext();) {\r\n\t\t\t\t\tString argName = (String) iterator.next();\r\n\t\t\t\t\tMacroArgumentType theArg = theMacro.arguments.get(argName);\r\n\t\t\t\t\tif (theArg == null) {\r\n\t\t\t\t\t\tdefineMacroError(messageLocation, type,\r\n\t\t\t\t\t\t\t\t\"SourceGenXMLParser.BadPassArgumentsArgument\", //$NON-NLS-1$\r\n\t\t \t\t\t\t\tnew Object[] { argName, importArgs.getMacroName() });\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (arguments.containsKey(argName)) {\r\n\t\t\t\t\t\t\t/*defineMacroError(type,\r\n\t\t\t\t\t\t\t\t\t\"SourceGenXMLParser.DupMacroArgumentOnImport\", //$NON-NLS-1$\r\n\t\t\t \t\t\t\t\tnew Object[] { argName, importArgs.getMacroName() });\r\n\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\targuments.put(argName, theArg);\r\n\t\t\t\t\t\t\targumentOrigins.put(argName, theMacro);\r\n\t\t\t\t\t\t\tinheritedArguments.add(argName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// import all arguments, except any not imported\r\n\t\t\t\tList<String> exceptArguments = importArgs.getExceptArguments();\r\n\t\t\t\tif (exceptArguments == null) {\r\n\t\t\t\t\texceptArguments = Collections.EMPTY_LIST;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (Map.Entry<String, MacroArgumentType> entry : theMacro.arguments.entrySet()) {\r\n\t\t\t\t\tString argName = entry.getKey();\r\n\t\t\t\t\tif (arguments.containsKey(argName)\r\n\t\t\t\t\t\t\t|| exceptArguments.contains(argName)) {\r\n\t\t\t\t\t\t// ignore\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\targuments.put(argName, entry.getValue());\r\n\t\t\t\t\t\targumentOrigins.put(argName, theMacro);\r\n\t\t\t\t\t\tinheritedArguments.add(argName);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n \tResolvedMacro resolvedMacro = new ResolvedMacro(component, type, arguments, argumentOrigins, includedMacros);\r\n\r\n\t\t// add our arguments\r\n\t\tfor (Iterator iter = type.getMacroArgument().iterator(); iter.hasNext();) {\r\n\t\t\tMacroArgumentType argument = (MacroArgumentType) iter.next();\r\n\t\t\tString argName = argument.getName();\r\n\t\t\tif (arguments.containsKey(argName)\r\n\t\t\t\t\t&& !inheritedArguments.contains(argName)) {\r\n\t\t\t\tdefineMacroError(messageLocation, type,\r\n\t\t\t\t\t\t\"SourceGenXMLParser.DupMacroArgument\", //$NON-NLS-1$\r\n \t\t\t\t\tnew Object[] { argName });\r\n\t\t\t}\r\n\t\t\targuments.put(argName, argument);\r\n\t\t\targumentOrigins.put(argName, resolvedMacro);\r\n\t\t}\r\n\t\t\r\n\t\t// record the resolved macro\r\n\t\tnameToMacroMap.put(type.getId(), resolvedMacro);\r\n\t\t\r\n\t\treturn resolvedMacro;\r\n\t}", "private static void initialize() {\n\n addToken(\"COMMENT1\", \"\\\\/\\\\/.*\");\n addToken(\"COMMENT2\", \"\\\\/\\\\*((?!\\\\*\\\\/)[\\\\w\\\\W])*\\\\*\\\\/\");\n\n // In case of unmatched comment key characters.\n addToken(\"COMMENT_L\", \"\\\\/\\\\*\");\n addToken(\"COMMENT_R\", \"\\\\*\\\\/\");\n\n // addToken(\"EOL\", \"\\\\n\");\n\n // Arithmetic operators.\n addToken(\"PLUS\", \"\\\\+\");\n addToken(\"MINUS\", \"-\");\n addToken(\"MULTIPLY\", \"\\\\*\");\n addToken(\"DIVIDE\", \"\\\\/\");\n\n addToken(\"EQUAL\", \"=\");\n\n addToken(\"LESS_THAN\", \"<\");\n addToken(\"GREATER_THAN\", \"<\");\n\n addToken(\"IF\", \"\\\\bif\\\\b\");\n addToken(\"ELSE\", \"\\\\belse\\\\b\");\n addToken(\"WHILE\", \"\\\\bwhile\\\\b\");\n\n addToken(\"RETURN\", \"\\\\breturn\\\\b\");\n\n addToken(\"THIS\", \"\\\\bthis\\\\b\");\n\n addToken(\"CLASS\", \"\\\\bclass\\\\b\");\n\n addToken(\"PUBLIC\", \"\\\\bpublic\\\\b\");\n addToken(\"PRIVATE\", \"\\\\bprivate\\\\b\");\n\n addToken(\"LENGTH\", \"\\\\blength\\\\b\");\n\n addToken(\"EXTENDS\", \"\\\\bextends\\\\b\");\n\n addToken(\"SYSTEM.OUT.PRINTLN\", \"\\\\bSystem\\\\.out\\\\.println\\\\b\");\n\n addToken(\"STATIC\", \"\\\\bstatic\\\\b\");\n\n addToken(\"NEW\", \"\\\\bnew\\\\b\");\n\n addToken(\"FLOAT\", \"\\\\bfloat\\\\b\");\n addToken(\"INT\", \"\\\\bint\\\\b\");\n addToken(\"CHARACTER\", \"\\\\bchar\\\\b\");\n addToken(\"BOOLEAN\", \"\\\\bboolean\\\\b\");\n addToken(\"String\", \"\\\\bString\\\\b\");\n addToken(\"VOID\", \"\\\\bvoid\\\\b\");\n\n addToken(\"TRUE\", \"\\\\btrue\\\\b\");\n addToken(\"FALSE\", \"\\\\bfalse\\\\b\");\n\n // Brackets.\n addToken(\"LEFT_CURLY_BRACKET\", \"\\\\{\");\n addToken(\"RIGHT_CURLY_BRACKET\", \"\\\\}\");\n addToken(\"LEFT_SQUARE_BRACKET\", \"\\\\[\");\n addToken(\"RIGHT_SQUARE_BRACKET\", \"\\\\]\");\n addToken(\"LEFT_ROUND_BRACKET\", \"\\\\(\");\n addToken(\"RIGHT_ROUND_BRACKET\", \"\\\\)\");\n\n addToken(\"COMMA\", \",\");\n addToken(\"SEMICOLON\", \";\");\n addToken(\"DOT\", \"\\\\.\");\n addToken(\"NOT\", \"\\\\!\");\n\n addToken(\"AND\", \"&&\");\n\n // Literals.\n addToken(\"FLOAT_LITERAL\", \"\\\\b[0-9]*\\\\.[0-9]*\\\\b\");\n addToken(\"INTEGRAL_LITERAL\", \"\\\\b[0-9]+\\\\b\");\n addToken(\"CHARACTER_LITERAL\", \"'.'\");\n addToken(\"STRING_LITERAL\", \"\\\".*\\\"\");\n\n addToken(\"Identifier\", \"\\\\b[a-zA-Z]+\\\\w*\\\\b\");\n\n addToken(\"SINGLE_QUOTE\", \"'\");\n addToken(\"DOUBLE_QUOTE\", \"\\\"\");\n }", "@Test\n public void test() throws ParseException {\n String test1 = \"klasse Test{ voeruit() { getal number is 1; } }\";\n parse(test1, \"program\");\n }", "GmMacro createGmMacro(RStack stack);", "public void Inverse_macroblock_partition_scanning_process(){\n\t\tx=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,0);\n\t\ty=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,1);\n\n\t}", "public void SLRParser () throws IOException {\n char Action ;\n String tableOutput;\n int num;\n int i;\n SLRParsStack.push(\"0\");\n while (!token.getValue().equals(\"&\")) {\n// System.out.println(token.getType() + \" \" + token.getValue());\n for (i = 0; i < SLRterminal.length; i++)\n {\n if (!BUCheckTerminal(token.getValue()))\n {\n if (SLRterminal[i].equals(\"id\")) {\n break;\n }\n }\n else {\n if (SLRterminal[i].equals(token.getValue()))\n break;\n }\n }\n// System.out.println(SLRParsStack.peek() + \" \" + i);\n tableOutput = BUParseTable[Integer.parseInt(SLRParsStack.peek()) + 1][i + 1];\n// System.out.println(tableOutput);\n Action = tableOutput.charAt(0);\n if (tableOutput.length() == 3)\n {\n num = Character.getNumericValue(tableOutput.charAt(1));\n num *= 10;\n num += Character.getNumericValue(tableOutput.charAt(2));\n }\n else\n {\n num = Character.getNumericValue(tableOutput.charAt(1));\n }\n// System.out.println(token.getValue());\n// System.out.println(Action);\n// System.out.println(num);\n switch (Action) {\n case 's':\n// System.out.println(\"in shift action\");\n SLRParsStack.push(String.valueOf(num));\n token = LA.Scanner();\n// System.out.println(token.getValue());\n break;\n case 'r':\n// System.out.println(\"in reduce action\");\n int numberOfVar = Integer.parseInt(LRTTable[num - 1][1]);\n// System.out.println(SLRParsStack.size());\n while (numberOfVar > 0) {\n SLRParsStack.pop();\n numberOfVar--;\n }\n// System.out.println(\"out of while\");\n// System.out.println(LRTTable[num - 1][0]);\n for (i = 0; i < SLRterminal.length; i++)\n {\n if (SLRterminal[i].equals(LRTTable[num - 1][0]))\n break;\n }\n// System.out.println(i);\n// System.out.println(SLRParsStack.isEmpty() + \" size stack\");\n tableOutput = BUParseTable[Integer.parseInt(SLRParsStack.peek()) + 1][i + 1];\n// System.out.println(tableOutput);\n SLRParsStack.push(String.valueOf(tableOutput.charAt(1)));\n break;\n case 'a':\n// System.out.println(\"in accept\");\n Accept();\n return;\n case 'e':\n// System.out.println(\"in error\");\n error(4);\n }\n }\n\n }", "@Test\r\n\tpublic void test3() throws IOException, LexerException, ParserException {\r\n\t\tStringReader ex = new StringReader(\"(lam^s f.\\n\\t(lam^s x.x) (f 1))\\n(lam^c y.\\n\\t(lam^s z.z) y)\");\r\n\r\n\t\tParser parser = new Parser();\r\n\t\tTerm result = parser.Parsing(ex);\r\n\t}", "public interface ParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int IMPLIES = 1;\n /** RegularExpression Id. */\n int EQUIVALENT = 2;\n /** RegularExpression Id. */\n int AND = 3;\n /** RegularExpression Id. */\n int OR = 4;\n /** RegularExpression Id. */\n int LBRACKET = 5;\n /** RegularExpression Id. */\n int RBRACKET = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int EQUALS = 8;\n /** RegularExpression Id. */\n int FORALL = 9;\n /** RegularExpression Id. */\n int THEREEXISTS = 10;\n /** RegularExpression Id. */\n int VARIABLE = 11;\n /** RegularExpression Id. */\n int PREDICATE = 12;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<AND>\",\n \"<OR>\",\n \"<LBRACKET>\",\n \"<RBRACKET>\",\n \"<NOT>\",\n \"<EQUALS>\",\n \"<FORALL>\",\n \"<THEREEXISTS>\",\n \"<VARIABLE>\",\n \"<PREDICATE>\",\n };\n\n}", "public void parse(Scanner S) {\n if (!S.expectedToken(Core.INPUT)) {\n Utility.expectedhelper(Core.INPUT, S.currentToken());\n System.exit(-1);\n }\n if (S.currentToken() == Core.ID) {\n id = S.getID();\n S.nextToken();\n } else {\n Utility.expectedhelper(Core.ID, S.currentToken());\n System.exit(-1);\n }\n if (!S.expectedToken(Core.SEMICOLON)) {\n Utility.expectedhelper(Core.SEMICOLON, S.currentToken());\n System.exit(-1);\n }\n }", "public abstract String parse(String name, List<CodeLine> c, Cluster cluster, Map<String,String> subs, Assemble compiler);", "public interface LTLParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int KAS = 9;\n /** RegularExpression Id. */\n int KATE = 10;\n /** RegularExpression Id. */\n int KDATE = 11;\n /** RegularExpression Id. */\n int KEXISTS = 12;\n /** RegularExpression Id. */\n int KFORALL = 13;\n /** RegularExpression Id. */\n int KFORMULA = 14;\n /** RegularExpression Id. */\n int KIN = 15;\n /** RegularExpression Id. */\n int KNUMBER = 16;\n /** RegularExpression Id. */\n int KPI = 17;\n /** RegularExpression Id. */\n int KRENAME = 18;\n /** RegularExpression Id. */\n int KSET = 19;\n /** RegularExpression Id. */\n int KSTRING = 20;\n /** RegularExpression Id. */\n int KSUBFORMULA = 21;\n /** RegularExpression Id. */\n int INTEGER_LITERAL = 22;\n /** RegularExpression Id. */\n int REAL_LITERAL = 23;\n /** RegularExpression Id. */\n int EXPONENT = 24;\n /** RegularExpression Id. */\n int STRING_LITERAL = 25;\n /** RegularExpression Id. */\n int DESC_LITERAL = 26;\n /** RegularExpression Id. */\n int PIID = 27;\n /** RegularExpression Id. */\n int ATEID = 28;\n /** RegularExpression Id. */\n int ID = 29;\n /** RegularExpression Id. */\n int IDENTIFIER = 30;\n /** RegularExpression Id. */\n int STARTLETTER = 31;\n /** RegularExpression Id. */\n int LETTER = 32;\n /** RegularExpression Id. */\n int DIGIT = 33;\n /** RegularExpression Id. */\n int LPAREN = 34;\n /** RegularExpression Id. */\n int RPAREN = 35;\n /** RegularExpression Id. */\n int LBRACE = 36;\n /** RegularExpression Id. */\n int RBRACE = 37;\n /** RegularExpression Id. */\n int LBRACKET = 38;\n /** RegularExpression Id. */\n int RBRACKET = 39;\n /** RegularExpression Id. */\n int BAR = 40;\n /** RegularExpression Id. */\n int SEMICOLON = 41;\n /** RegularExpression Id. */\n int COMMA = 42;\n /** RegularExpression Id. */\n int DOT = 43;\n /** RegularExpression Id. */\n int COLON = 44;\n /** RegularExpression Id. */\n int ASSIGN = 45;\n /** RegularExpression Id. */\n int GT = 46;\n /** RegularExpression Id. */\n int LT = 47;\n /** RegularExpression Id. */\n int PNOT = 48;\n /** RegularExpression Id. */\n int SLASH = 49;\n /** RegularExpression Id. */\n int PLUS = 50;\n /** RegularExpression Id. */\n int MINUS = 51;\n /** RegularExpression Id. */\n int STAR = 52;\n /** RegularExpression Id. */\n int EQ = 53;\n /** RegularExpression Id. */\n int LE = 54;\n /** RegularExpression Id. */\n int GE = 55;\n /** RegularExpression Id. */\n int NE = 56;\n /** RegularExpression Id. */\n int REQ = 57;\n /** RegularExpression Id. */\n int POR = 58;\n /** RegularExpression Id. */\n int PAND = 59;\n /** RegularExpression Id. */\n int PIMPLIES = 60;\n /** RegularExpression Id. */\n int PBIIMPLIES = 61;\n /** RegularExpression Id. */\n int LALWAYS = 62;\n /** RegularExpression Id. */\n int LEVENTUALLY = 63;\n /** RegularExpression Id. */\n int LNEXTTIME = 64;\n /** RegularExpression Id. */\n int LUNTIL = 65;\n /** RegularExpression Id. */\n int URI = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_SINGLE_LINE_COMMENT = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"#\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"<token of kind 8>\",\n \"\\\"as\\\"\",\n \"\\\"ate\\\"\",\n \"\\\"date\\\"\",\n \"\\\"exists\\\"\",\n \"\\\"forall\\\"\",\n \"\\\"formula\\\"\",\n \"\\\"in\\\"\",\n \"\\\"number\\\"\",\n \"\\\"pi\\\"\",\n \"\\\"rename\\\"\",\n \"\\\"set\\\"\",\n \"\\\"string\\\"\",\n \"\\\"subformula\\\"\",\n \"<INTEGER_LITERAL>\",\n \"<REAL_LITERAL>\",\n \"<EXPONENT>\",\n \"<STRING_LITERAL>\",\n \"<DESC_LITERAL>\",\n \"<PIID>\",\n \"<ATEID>\",\n \"<ID>\",\n \"<IDENTIFIER>\",\n \"<STARTLETTER>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\"|\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\":=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"!\\\"\",\n \"\\\"/\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"~=\\\"\",\n \"\\\"\\\\\\\\/\\\"\",\n \"\\\"/\\\\\\\\\\\"\",\n \"\\\"->\\\"\",\n \"\\\"<->\\\"\",\n \"\\\"[]\\\"\",\n \"\\\"<>\\\"\",\n \"\\\"_O\\\"\",\n \"\\\"_U\\\"\",\n \"<URI>\",\n };\n\n}", "public Snippet visit(MethodDeclaration n, Snippet argu) {\n\t\t Snippet _ret=null;\n\t\t\ttPlasmaCode = \"\";\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.returnType.accept(this, argu);\n\t String tempString = \"\";\n\t\t\tif(f2 != null){\n\t\t\t\t//System.out.println(\" \"+f2.expType+\" \"+f2.returnTemp);\n\t\t\t\ttempString = f2.expType.typeName;\n\t\t\t}else{\n\t\t\t\ttempString = \"void \";\n\t\t\t}\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t String methodName = f3.expType.getTypeName();\n\t memberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = methodName;\n\t\t\tcurrentMethod = currentClass.methods.get(methodName);\n\t\t\t\n\t\t\t\n\t\t\ttempCounter = tempZero;\n\t\t\tblockId = 1;\n\t\t\tcurrentBlock = 1;\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t // n.nodeToken3.accept(this, argu);\n\t memberSig = null;\n\t\t\tblockId = 0;\n\t\t\tcurrentBlock = 0;\n\t\t\t\n\t\t\tString tempFormal = \"\";\n\t\t\tif(f5 != null){\n\t\t\t\ttempFormal = f5.returnTemp+\",\";\n\t\t\t}else{\n\t\t\t\ttempFormal = \"\";\n\t\t\t}\n\t\t\t\n\t\t\ttempString+=\" \"+methodName+\" \"+\"( \"+tempFormal+\" int myUniquePlacePoint)\";\n\t\t\t\n\t\t\ttPlasmaCode += \"public static \"+tempString+\"\\n\";\n\t\t\t//String placeCheckString = \"final HashMap<Integer, HashSet<Integer>> globalPointerHashMap = new final HashMap<Integer, HashSet<Integer>>(4)\";\n\t\t\t//placeCheckString += \"final int maxPlaces = 4; \\n for(int i =0; i <maxPlaces; ++i){globalPointerHashMap.put(i, new HashSet<Integer>());}\";\n\t\t\tn.block.accept(this, argu);\n\t currentClassBody.methods += tPlasmaCode;\n\t\t\ttPlasmaCode = \"\";\n\t return _ret;\n\t }", "Syntax.Node ParseActualParameters(Token t) throws Exception{\n if (t.token.equals(\"(\")){\n var expList = ParseExpList();\n t = lexer.next();\n if (t.token.equals(\")\")){\n return new Syntax.NodeActualParameters( expList);\n }\n }\n throw new Exception(\"Error in ParseActualParameters !!! \");\n }", "private Term parseImpl() throws ParseException {\n final Term expr = parseTerm(false);\n final int tt = _tokenizer.next();\n if (tt != Tokenizer.TT_EOS) {\n reportError(\"Incomplete expression.\"); /*I18N*/\n }\n return expr;\n }", "void compileTermBasicHelper() throws IOException {\n\n\n switch (currTokenType) {\n case JackTokenizer.INT_CONST_TOKEN_TYPE:\n case JackTokenizer.STRING_CONST_TOKEN_TYPE:\n case JackTokenizer.KEYWORD_TOKEN_TYPE:\n printToken();\n getNextToken();\n return;\n }\n switch (currentToken) {\n case HYPHEN_SYMBOL:\n case TILDE_SYMBOL:\n printToken();\n getNextToken();\n compileTerm();\n break;\n case OPEN_BRACKET_SYMBOL:\n printToken();\n getNextToken();\n compileExpression();\n printToken();\n getNextToken();\n break;\n default:\n String prevToken = currentToken;\n String prevTokenType = currTokenType;\n getNextToken();\n compileTermAdvanceHelper(prevTokenType, prevToken);\n break;\n }\n\n }", "private TraceParser genParser() throws ParseException {\n TraceParser parser = new TraceParser();\n parser.addRegex(\"^(?<VTIME>)(?<TYPE>)$\");\n parser.addPartitionsSeparator(\"^--$\");\n return parser;\n }", "private void compileReturnHelper() throws IOException {\n printToken(); // prints 'return'\n getNextToken();\n if (!Objects.equals(currentToken, SEMICOLON)) compileExpression();\n printToken();\n }", "public interface SimpleGrParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int NumberLit = 6;\n /** RegularExpression Id. */\n int BooleanLit = 7;\n /** RegularExpression Id. */\n int StringLit = 8;\n /** RegularExpression Id. */\n int Null = 9;\n /** RegularExpression Id. */\n int And = 10;\n /** RegularExpression Id. */\n int Or = 11;\n /** RegularExpression Id. */\n int Not = 12;\n /** RegularExpression Id. */\n int Identifier = 13;\n /** RegularExpression Id. */\n int Equal = 14;\n /** RegularExpression Id. */\n int NotEqual = 15;\n /** RegularExpression Id. */\n int LessThan = 16;\n /** RegularExpression Id. */\n int LessEqualThan = 17;\n /** RegularExpression Id. */\n int GreaterThan = 18;\n /** RegularExpression Id. */\n int GreaterEqualThan = 19;\n /** RegularExpression Id. */\n int Plus = 20;\n /** RegularExpression Id. */\n int Minus = 21;\n /** RegularExpression Id. */\n int Div = 22;\n /** RegularExpression Id. */\n int Mult = 23;\n /** RegularExpression Id. */\n int Open = 24;\n /** RegularExpression Id. */\n int Close = 25;\n /** RegularExpression Id. */\n int Comma = 26;\n /** RegularExpression Id. */\n int Letter = 27;\n /** RegularExpression Id. */\n int Digit = 28;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"<NumberLit>\",\n \"<BooleanLit>\",\n \"<StringLit>\",\n \"\\\"NULL\\\"\",\n \"\\\"AND\\\"\",\n \"\\\"OR\\\"\",\n \"\\\"NOT\\\"\",\n \"<Identifier>\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"/\\\"\",\n \"\\\"*\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\",\\\"\",\n \"<Letter>\",\n \"<Digit>\",\n };\n\n}", "public boolean next() {\n\t\tif (done())\n\t\t\treturn false;\n\t\tmany(whitespace);\n\t\tString c=program.charAt(pos)+\"\";\n\t\tif (digits.contains(c))\n\t\t\tnextNumber();\n\t\telse if (letters.contains(c))\n\t\t\tnextKwId();\n\t\telse if (operators.contains(c))\n\t\t\tnextOp();\n\t\telse if (c.equals(\"#\")){\n\t\t\t//this is a comment, move past the first hashtag\n\t\t\tpast('#');\n\t\t\t//move past the second hastag, ignoring everything in between\n\t\t\tpast('#');\n\t\t\treturn next();\n\t\t} else {\n\t\t\tSystem.err.println(\"illegal character at position \"+pos);\n\t\t\tpos++;\n\t\t\treturn next();\n\t\t}\n\t\treturn true;\n }", "@Test\n\tpublic void simpleComment() throws ParseException {\n\t\t// -->\n\t\tILineMatcher startMatcher = JavaSourceLineMatcher.startMatcher();\n\t\tILineMatcher endMatcher = JavaSourceLineMatcher.endMatcher();\n\t\tBlockToBlockListConverter converter = new BlockToBlockListConverter(startMatcher, endMatcher);\n\n\t\tList<String> lines = Lists.newArrayList();\n\n\t\tlines.add(\" // -->\");\n\t\tlines.add(\" // shift one left\");\n\t\tlines.add(\" // this line too\");\n\t\tlines.add(\" // <--\");\n\n\t\tList<Block> blocks = converter.convert(new Block(lines));\n\n\t\tassertEquals(1, blocks.size());\n\t\tBlock block = blocks.get(0);\n\t\tassertNotNull(block);\n\t\tassertEquals(\"// shift one left\", block.lines().get(0));\n\t\tassertEquals(\"// this line too\", block.lines().get(1));\n\t\t// <--\n\t}", "public void outABlockBlocks (ABlockBlocks node)\n\t{\n\t\tString Transition = node.getBeginblock().toString();\n\t\tTransition = Transition.substring(9);\n\t\t//System.out.println(Transition);\n\t\tString Transition1 = \"none\";\n\t\tif (Transition.startsWith(\"slide\")){\n\t\t\tTransition1 = SymbolTable.Transition;\n\t\t}\n\t\telse if (Transition.startsWith(\"fade\")){\n\t\t\tTransition1 = \"fade\";\n\t\t}\n\t\telse if (Transition.startsWith(\"swipe\")){\n\t\t\tTransition1 = \"swipe\";\n\t\t}\n\t\telse if (Transition.startsWith(\"scale\")){\n\t\t\tTransition1 = \"scale\";\n\t\t}\n\t\telse if (Transition.startsWith(\"rotatescale\")){\n\t\t\tTransition1 = \"rotatescale\";\n\t\t}\n\t\t/*\t\ttry{\n\t\tString First =node.getLines().getFirst().toString();\n\t\tString Last =node.getLines().getLast().toString();\n\t\t}\n\t\tcatch(Exception a){\n\t\t\t//System.out.println(\"Slided er tomt\");\n\t\t\tindent--;\n\t\t\treturn;\n\t\t} */\n\t\tString SlideType = \"Unknown\";\n\t\tObject[] Slide = node.getLines().toArray();\n\t\tint Lines = Slide.length;\n\t\tint i = 0;\n\t\tint title = 0;\n\t\tint subtitle = 0;\n\t\tint image = 0;\n\t\tfor (i=0; i<Lines; i++){\n\t\t\tString Slide1 = Slide[i].toString();\n\t\t\tif (Slide1.startsWith(\"@setting\") || Slide1.startsWith(\"@note\")){\n\t\t\t}\n\t\t\telse if (Slide1.startsWith(\"@title\") ) {\n\t\t\t\ttitle++;\n\t\t\t}\n\t\t\telse if (Slide1.startsWith(\"@subtitle\") ) {\n\t\t\t\tsubtitle++;\n\t\t\t}\n\t\t\telse if (Slide1.startsWith(\"@image\") ) {\n\t\t\t\timage++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSlideType = \"Normal\";\n\t\t\t\tSymbolTable.SlideTableAdd(SlideType, Transition1);\n\t\t\t\tindent--;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\tif (title > 0 && subtitle == 0 && image == 0){\n\t\t\tSlideType = \"Title\";\n\t\t}\n\t\telse if (title == 0 && subtitle > 0 && image == 0){\n\t\t\tSlideType = \"Subtitle\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 1){\n\t\t\tSlideType = \"TitleImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 1){\n\t\t\tSlideType = \"TitleSubtitleImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 1){\n\t\t\tSlideType = \"SubtitleImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 2){\n\t\t\tSlideType = \"TitleDImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 2){\n\t\t\tSlideType = \"TitleSubtitleDImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 2){\n\t\t\tSlideType = \"SubtitleDImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 3){\n\t\t\tSlideType = \"TitleTImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 3){\n\t\t\tSlideType = \"TitleSubtitleTImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 3){\n\t\t\tSlideType = \"SubtitleTImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 4){\n\t\t\tSlideType = \"TitleQImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 4){\n\t\t\tSlideType = \"TitleSubtitleQImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 4){\n\t\t\tSlideType = \"SubtitleQImage\";\n\t\t}\n\t\telse if (title > 0 && subtitle > 0 && image == 0){\n\t\t\tSlideType = \"XTitleXSubtitle\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 1){\n\t\t\tSlideType = \"Image\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 2){\n\t\t\tSlideType = \"DImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 3){\n\t\t\tSlideType = \"TImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 4){\n\t\t\tSlideType = \"QImage\";\n\t\t}\n\t\telse if (title > 0 && subtitle > 0 && image > 0){\n\t\t\tSlideType = \"Lots\";\n\t\t}\n\n\t\tSymbolTable.SlideTableAdd(SlideType, Transition1);\n\t\tindent--;\n\n\t}", "static RobotProgramNode parseFile(File code){\r\n\tScanner scan = null;\r\n\ttry {\r\n\t scan = new Scanner(code);\r\n\r\n\t // the only time tokens can be next to each other is\r\n\t // when one of them is one of (){},;\r\n\t scan.useDelimiter(\"\\\\s+|(?=[{}(),;])|(?<=[{}(),;])\");\r\n\r\n\t RobotProgramNode n = parseProgram(scan); // You need to implement this!!!\r\n\r\n\t scan.close();\r\n\t return n;\r\n\t} catch (FileNotFoundException e) {\r\n\t System.out.println(\"Robot program source file not found\");\r\n\t} catch (ParserFailureException e) {\r\n\t System.out.println(\"Parser error:\");\r\n\t System.out.println(e.getMessage());\r\n\t scan.close();\r\n\t}\r\n\treturn null;\r\n }", "private static boolean enum_block_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"enum_block_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = enum_block_4_0_0(b, l + 1);\n if (!r) r = comment(b, l + 1);\n if (!r) r = consumeToken(b, EOL);\n exit_section_(b, m, null, r);\n return r;\n }", "public interface UATokenizerConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int WHITESPACE = 1;\n /** RegularExpression Id. */\n int CHAR = 5;\n /** RegularExpression Id. */\n int PICTURES = 6;\n /** RegularExpression Id. */\n int FILLERWORDS = 7;\n /** RegularExpression Id. */\n int THREELETTERWORDS = 8;\n /** RegularExpression Id. */\n int EMAIL = 9;\n /** RegularExpression Id. */\n int PRICES = 10;\n /** RegularExpression Id. */\n int DOMAIN = 11;\n /** RegularExpression Id. */\n int PHONE = 12;\n /** RegularExpression Id. */\n int PHONE2 = 13;\n /** RegularExpression Id. */\n int PHONE3 = 14;\n /** RegularExpression Id. */\n int WORD = 15;\n /** RegularExpression Id. */\n int HTML = 16;\n /** RegularExpression Id. */\n int HTML2 = 17;\n /** RegularExpression Id. */\n int HTMLCOMMENTS = 18;\n /** RegularExpression Id. */\n int NUMBER = 19;\n /** RegularExpression Id. */\n int TOPLEVELDOMAINS = 20;\n /** RegularExpression Id. */\n int SYMBOLS = 21;\n /** RegularExpression Id. */\n int OTHER = 22;\n /** RegularExpression Id. */\n int CHARACTERS = 23;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<CHAR>\",\n \"<PICTURES>\",\n \"<FILLERWORDS>\",\n \"<THREELETTERWORDS>\",\n \"<EMAIL>\",\n \"<PRICES>\",\n \"<DOMAIN>\",\n \"<PHONE>\",\n \"<PHONE2>\",\n \"<PHONE3>\",\n \"<WORD>\",\n \"<HTML>\",\n \"<HTML2>\",\n \"<HTMLCOMMENTS>\",\n \"<NUMBER>\",\n \"<TOPLEVELDOMAINS>\",\n \"<SYMBOLS>\",\n \"<OTHER>\",\n \"<CHARACTERS>\",\n };\n\n}", "private void yy() {\n\n\t}", "public token next_token() throws IOException, DasmError {\n token_line_num = line_num;\n\n for (;;)\n switch (nextChar) {\n case ';': // a comment\n case '\\n':\n // return single SEP token (skip multiple newlines\n // interspersed with whitespace or comments)\n skipEmptyLines();\n token_line_num = line_num;\n return new token(sym.SEP);\n\n case ' ':\n case '\\t':\n case '\\r':\n case ',': // whitespace\n readNextChar();\n break;\n\n case -1: // EOF token\n char_num = -1;\n return new token(sym.EOF);\n\n case '=': // EQUALS token\n readNextChar();\n return new token(sym.EQ);\n\n case ':': // COLON token\n readNextChar();\n return new token(sym.COLON);\n\n case '-':\n case '+':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '.': // a number\n {\n return readNumber();\n }\n\n case '\"': // quoted string\n {\n return readQuotedString();\n }\n\n case '{': // list of registers\n {\n return readRegList();\n }\n\n case '\\'': // quotation for overloading reserved words\n return readQuotedReservedWord();\n\n default: {\n // read up until a separatorcharacter\n boolean only_name = false;\n\n charBuf.reset();\n do {\n char chval = (char) nextChar;\n if (nextChar == '\\\\') {\n chval = nameEscape();\n only_name = true;\n }\n charBuf.add(chval);\n readNextChar();\n } while (!isSeparator(nextChar));\n\n String str = charBuf.toString();\n\n if (!only_name) {\n token tok;\n\n // keyword or directive?\n if ((tok = ReservedWords.get(str)) != null) return tok;\n\n // VM instruction?\n if (DopInfo.contains(str))\n return new str_token(sym.Insn, str);\n\n if (str.charAt(0) == '$') {\n String s = str.substring(1);\n Object v;\n int n = 10;\n boolean neg = false;\n switch (s.charAt(0)) {\n default:\n break;\n\n case '-':\n neg = true;\n case '+':\n s = s.substring(1);\n if (s.startsWith(\"0x\")) {\n n = 16;\n s = s.substring(2);\n }\n try {\n n = Integer.parseInt(s, n);\n } catch (NumberFormatException e) {\n throw new DasmError(\n \"Bad relative offset number\");\n }\n if (neg) n = -n;\n return new relative_number_token(sym.Relative, n);\n }\n // Do variable substitution\n if ((v = dict.get(s)) != null) return (token) v;\n } // not begin from '$'\n } // !only_name\n // Unrecognized string token (e.g. a classname)\n return new str_token(sym.Word, str);\n }\n }\n }", "public MacroDefinition(int lineno, ExpansionManager manager)\n throws AbnormalTerminationException {\n this._lines = new ArrayList();\n this._manager = manager;\n this._labels = new HashMap();\n this._formalParameters = new ArrayList();\n this._lineno = lineno;\n }", "static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }", "private Token scanKeywordOrIdentifier() {\n Token tok;\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n while ((Character.isLetterOrDigit(c) || c == '_') && c != -1) {\n buffer.add(c);\n c = in.read();\n }\n\n String st = buffer.toString();\n TokenType type;\n buffer.flush();\n\n if ((type = Token.KEYWORD_TABLE.get(st)) != null) {\n tok = new Token(st, type, pos);\n } else {\n tok = new Token(st, TokenType.IDENTIFIER, pos);\n }\n return tok;\n }", "public GenToken scan(ParseString ps, GenToken token) throws ParserException {\n if (token != null) {\n //a token is already found, so handle it here\n GenToken result = token;\n if (token.getType().equals(\"id\")) {\n //token is an identifier\n String name = (String)token.get(\"name\");\n if ((name.equals(\"true\")) || (name.equals(\"false\"))) {\n //token is a boolean constant\n result = new GenToken(\"const\");\n result.add(\"value\", new Boolean(name));\n }\n if (name.equals(\"hash\")) {\n //token is a hash operator\n result = opToken(\"~\");\n }\n }\n return result;\n }\n //no token is found yet\n char ch = ps.nextChar();\n GenToken result = null;\n if (ch == ';') {\n result = new GenToken(\"semicol\");\n } else if (ch == ',') {\n result = new GenToken(\"comma\");\n } else if (ch == '(') {\n result = new GenToken(\"lbrack\");\n } else if (ch == ')') {\n result = new GenToken(\"rbrack\");\n } else if (ch == '{') {\n result = new GenToken(\"lacc\");\n } else if (ch == '}') {\n result = new GenToken(\"racc\");\n } else if (ch == '+') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"plusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"+\");\n }\n } else if (ch == '-') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"minusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"-\");\n }\n } else if (ch == '*') {\n result = opToken(\"*\");\n } else if (ch == '/') {\n result = opToken(\"/\");\n } else if (ch == '%') {\n result = opToken(\"%\");\n } else if (ch == '~') {\n result = opToken(\"~\");\n } else if (ch == '|') {\n char ach = ps.nextChar();\n if (ach == '|') result = opToken(\"||\"); else ps.returnChar(ach);\n } else if (ch == '&') {\n char ach = ps.nextChar();\n if (ach == '&') result = opToken(\"&&\"); else ps.returnChar(ach);\n } else if (ch == '=') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"==\"); else\n if (ach == '>') result = opToken(\"=>\"); else {\n ps.returnChar(ach);\n result = new GenToken(\"assign\");\n }\n } else if (ch == '!') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"!=\"); else {\n ps.returnChar(ach);\n result = opToken(\"!\");\n }\n } else if (ch == '<') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"<=\"); else {\n ps.returnChar(ach);\n result = opToken(\"<\");\n }\n } else if (ch == '>') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\">=\"); else {\n ps.returnChar(ach);\n result = opToken(\">\");\n }\n } else if (ch == '\"') {\n StringBuffer aconst = new StringBuffer();\n char ach = ps.nextChar();\n while ( ach != '\"' ) {aconst.append(ach); ach = ps.nextChar();}\n result = new GenToken(\"const\");\n result.add(\"value\", aconst.toString());\n } else if (Character.isDigit(ch)) {\n StringBuffer aconst = new StringBuffer();\n aconst.append(ch);\n char ach = ps.nextChar();\n while ( (Character.isDigit(ach)) || (ch == '.') ) {aconst.append(ach); ach = ps.nextChar();}\n ps.returnChar(ach);\n\n float f = Float.parseFloat(aconst.toString());\n result = new GenToken(\"const\");\n result.add(\"value\", new Float(f));\n } else {\n ps.returnChar(ch);\n }\n return result;\n }", "@NotNull\n private SyntaxToken<?> parseDefinitionBody(final Color color) {\n final SyntaxToken<?> reference = next();\n if (reference.getType() == TokenType.IDENTIFICATION) {\n reference.setColor(color);\n if (isPunctuation(Punctuation.DEFINITION_DELIMITER)) {\n tokens.add(reference);\n tokens.add(parseDelimiter());\n if (!isPunctuation(Punctuation.INSTRUCTION_END)) {\n tokens.add(parseExpression());\n }\n }\n }\n return reference;\n }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "@Test\n public void LexerTest1() {\n String test = \"^^C B [ABC] %Hi \\r [GF_B] \\r % own line comment \\r\";\n for(Token t:(new Lexer(test)).getTokens()){\n System.out.println(t.type+\" : \"+t.value);\n }\n }", "IIndexFragmentBinding[] findMacroContainers(Pattern pattern, IndexFilter filter, IProgressMonitor monitor) throws CoreException;", "public void run()\n {\n yyparse();\n }", "public interface ParserConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int LINE_COMMENT = 6;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 7;\r\n /** RegularExpression Id. */\r\n int MULTILINE_COMMENT = 8;\r\n /** RegularExpression Id. */\r\n int INT = 9;\r\n /** RegularExpression Id. */\r\n int VOID = 10;\r\n /** RegularExpression Id. */\r\n int STRING = 11;\r\n /** RegularExpression Id. */\r\n int BOOLEAN = 12;\r\n /** RegularExpression Id. */\r\n int NULL = 13;\r\n /** RegularExpression Id. */\r\n int THIS = 14;\r\n /** RegularExpression Id. */\r\n int TRUE = 15;\r\n /** RegularExpression Id. */\r\n int FALSE = 16;\r\n /** RegularExpression Id. */\r\n int MAIN = 17;\r\n /** RegularExpression Id. */\r\n int LENGTH = 18;\r\n /** RegularExpression Id. */\r\n int PRINT = 19;\r\n /** RegularExpression Id. */\r\n int IF = 20;\r\n /** RegularExpression Id. */\r\n int NEW = 21;\r\n /** RegularExpression Id. */\r\n int ELSE = 22;\r\n /** RegularExpression Id. */\r\n int CLASS = 23;\r\n /** RegularExpression Id. */\r\n int WHILE = 24;\r\n /** RegularExpression Id. */\r\n int PUBLIC = 25;\r\n /** RegularExpression Id. */\r\n int RETURN = 26;\r\n /** RegularExpression Id. */\r\n int STATIC = 27;\r\n /** RegularExpression Id. */\r\n int EXTENDS = 28;\r\n /** RegularExpression Id. */\r\n int INTERFACE = 29;\r\n /** RegularExpression Id. */\r\n int ADD = 30;\r\n /** RegularExpression Id. */\r\n int SUB = 31;\r\n /** RegularExpression Id. */\r\n int MULT = 32;\r\n /** RegularExpression Id. */\r\n int AND = 33;\r\n /** RegularExpression Id. */\r\n int NOT = 34;\r\n /** RegularExpression Id. */\r\n int LESS = 35;\r\n /** RegularExpression Id. */\r\n int ASSIGN = 36;\r\n /** RegularExpression Id. */\r\n int LPARENS = 37;\r\n /** RegularExpression Id. */\r\n int RPARENS = 38;\r\n /** RegularExpression Id. */\r\n int LBRACKET = 39;\r\n /** RegularExpression Id. */\r\n int RBRACKET = 40;\r\n /** RegularExpression Id. */\r\n int LBRACE = 41;\r\n /** RegularExpression Id. */\r\n int RBRACE = 42;\r\n /** RegularExpression Id. */\r\n int COMMA = 43;\r\n /** RegularExpression Id. */\r\n int DOT = 44;\r\n /** RegularExpression Id. */\r\n int SEMI = 45;\r\n /** RegularExpression Id. */\r\n int NUM = 46;\r\n /** RegularExpression Id. */\r\n int ID = 47;\r\n /** RegularExpression Id. */\r\n int LETTER = 48;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\f\\\"\",\r\n \"<LINE_COMMENT>\",\r\n \"<FORMAL_COMMENT>\",\r\n \"<MULTILINE_COMMENT>\",\r\n \"\\\"int\\\"\",\r\n \"\\\"void\\\"\",\r\n \"\\\"String\\\"\",\r\n \"\\\"boolean\\\"\",\r\n \"\\\"null\\\"\",\r\n \"\\\"this\\\"\",\r\n \"\\\"true\\\"\",\r\n \"\\\"false\\\"\",\r\n \"\\\"main\\\"\",\r\n \"\\\"length\\\"\",\r\n \"\\\"System.out.println\\\"\",\r\n \"\\\"if\\\"\",\r\n \"\\\"new\\\"\",\r\n \"\\\"else\\\"\",\r\n \"\\\"class\\\"\",\r\n \"\\\"while\\\"\",\r\n \"\\\"public\\\"\",\r\n \"\\\"return\\\"\",\r\n \"\\\"static\\\"\",\r\n \"\\\"extends\\\"\",\r\n \"\\\"interface\\\"\",\r\n \"\\\"+\\\"\",\r\n \"\\\"-\\\"\",\r\n \"\\\"*\\\"\",\r\n \"\\\"&&\\\"\",\r\n \"\\\"!\\\"\",\r\n \"\\\"<\\\"\",\r\n \"\\\"=\\\"\",\r\n \"\\\"(\\\"\",\r\n \"\\\")\\\"\",\r\n \"\\\"[\\\"\",\r\n \"\\\"]\\\"\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\",\\\"\",\r\n \"\\\".\\\"\",\r\n \"\\\";\\\"\",\r\n \"<NUM>\",\r\n \"<ID>\",\r\n \"<LETTER>\",\r\n };\r\n\r\n}", "public OperationMacro() {\n errorList = new ArrayList();\n linkedOpList = new ArrayList();\n }", "public void addMacro(@Nonnull String name)\r\n throws LexerException {\r\n addMacro(name, \"1\");\r\n }", "Collection<IDefine> getMacros();", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "public static void assignCompoundTokens(ArrayList<String>scan){\n\nfor(int i=0;i<scan.size();i++){\n if( isUnaryPostOperator( scan.get(i) ) ){\n \n if(isNumber(scan.get(i-1))||isVariableString(scan.get(i-1))){ \n int index=i-1;\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\ni=j+1;\n }//end if\n\n else if(isClosingBracket(scan.get(i-1))){\n int index=MBracket.getComplementIndex(false, i-1, scan);\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\n i=j+1;\n }\n \n \n \n }\n \n \n \n}\n\n\n\n}", "GmMacro createGmMacro(GmMacro source);", "protected void recordExecutionMacro(ExecutionMacro macro) {\n super.recordExecutionMacro(macro);\n \n if (styledText == null) {\n return;\n }\n \n if (macro.getCommandId().compareTo(\"org.eclipse.ui.edit.copy\") == 0 ||\n macro.getCommandId().compareTo(\"org.eclipse.jdt.ui.edit.text.java.copy.qualified.name\") == 0) {\n int offset = styledText.getSelectionRange().x;\n String text = styledText.getSelectionText();\n \n long time = Time.getCurrentTime();\n CopyMacro cmacro = new CopyMacro(time, \"Copy\", macro.getPath(), offset, text);\n \n recordRawMacro(cmacro);\n dumpMacros(cmacro);\n \n } else if (macro.getCommandId().compareTo(\"org.eclipse.ui.edit.delete\") == 0) {\n macro.setType(\"Delete\");\n }\n }", "public void parseHeader(String line) throws BugTrap {\n\t\t\n\t\tLineTokenizer tokenizer = new LineTokenizer(line);\n\t\t\n\t\tif (tokenizer.isAccessModifier())\n\t\t\taccess = tokenizer.parseAccessModifier();\n\n\t\tif (!tokenizer.isKeyword(StartKeyword)) throw new BugTrap(this, StartKeyword + \": Keyword missing\");\n\t\ttokenizer.parseKeyword(StartKeyword);\n\n\t\tif (!tokenizer.isName()) throw new BugTrap(this, \"name missing\");\n\t\tname = tokenizer.parseName();\n\n\t\tif (!tokenizer.isParameters()) throw new BugTrap(this, \"missing or bad parameter list\");\n\t\tparametersList = tokenizer.parseParameters();\n\n\t\tif (Debug) IOUtils.println(getClass().getSimpleName() + \" \" + name + \" parsed header: \" + line);\n\t}" ]
[ "0.6614255", "0.6236724", "0.60547084", "0.59081423", "0.5907108", "0.5871341", "0.5837266", "0.5808514", "0.58031696", "0.57457244", "0.5704397", "0.5650352", "0.55581695", "0.55505717", "0.5527417", "0.54860437", "0.54244095", "0.54083014", "0.54021674", "0.5384556", "0.53598136", "0.53179806", "0.53141177", "0.52925396", "0.5253548", "0.52437997", "0.52117366", "0.52064896", "0.52040285", "0.5192812", "0.51721734", "0.51548386", "0.51317894", "0.51306313", "0.5108005", "0.507522", "0.5067323", "0.50455797", "0.5041443", "0.5040029", "0.5036597", "0.5032765", "0.5008293", "0.49715105", "0.49695432", "0.49690658", "0.49632663", "0.49573863", "0.49570176", "0.49552318", "0.49495763", "0.49412453", "0.49309236", "0.49085104", "0.48870042", "0.48778588", "0.48627514", "0.48451996", "0.48439378", "0.4839852", "0.48361793", "0.48348975", "0.48329854", "0.4827434", "0.48090696", "0.47904235", "0.47870457", "0.4784383", "0.47803482", "0.477319", "0.47694474", "0.47693068", "0.47680947", "0.4765968", "0.4756795", "0.47551787", "0.4755022", "0.47408503", "0.47352657", "0.47351864", "0.47348297", "0.47277707", "0.47257236", "0.47188625", "0.47120094", "0.47080737", "0.47016242", "0.4699121", "0.4682446", "0.46742326", "0.4671709", "0.46717045", "0.4664132", "0.4662883", "0.46570903", "0.46462348", "0.46411687", "0.46355805", "0.4634937", "0.46267194" ]
0.60514337
3
Set Default Intra Quantize Matrix
void setDefaultIntraQuantMatrix() { for (int i=0;i<defaultIntraQuantMatrix.length;i++) intraQuantMatrix[i] = defaultIntraQuantMatrix[i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDefaultInterQuantMatrix()\n {\n for (int i=0;i<interQuantMatrix.length;i++)\n interQuantMatrix[i] = 16;\n }", "void setIntraQuantMatrix(BufferedBitStream stream) throws InterruptedException\n {\n for (int i=0;i<defaultIntraQuantMatrix.length;i++)\n intraQuantMatrix[i] = stream.getBits(8);\n }", "public void setQuantite(int quantite) {\r\n this.quantite = quantite;\r\n }", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "void setInterQuantMatrix(BufferedBitStream stream) throws InterruptedException\n {\n for (int i=0;i<interQuantMatrix.length;i++)\n interQuantMatrix[i] = stream.getBits(8);\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "protected void initQMark() {\n\t\tINF = calcMaxCapPlus1();\n\t\tmarkVertice(srcId, new Tuple4(NULL_DIRECTION, NO_PRED, INF, false));\n\t}", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }", "@NativeType(\"uint16_t\")\n public short use_default_scaling_matrix_mask() { return nuse_default_scaling_matrix_mask(address()); }", "public Matrix getInversematrixS()\n {\n // Build alpha * I\n double [][] alphainvmatrix;\n alphainvmatrix = new double[x + 1][x + 1];\n for(int i = 0; i < x + 1; i++)\n {\n alphainvmatrix[i][i] = alpha;\n\n }\n Matrix alphamatrixnew = new Matrix(alphainvmatrix);\n\n // calculate summation\n Matrix sum = new Matrix(x + 1, 1);\n int i = 1;\n while (i <= arraylistofprices.size() - 1) {\n phimatrix(i);\n\n sum.plusEquals(phi);\n\n i++;\n }\n Matrix summation = sum.times(phiT);\n summation.timesEquals(beta); \n\n // alpha * I + beta * sum\n Matrix sInv = alphamatrixnew.plus(summation);\n return sInv;\n }", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "int getQuantite();", "int getQuantite();", "public void setQuantum(int v) {\n this.quantum = v;\n }", "public AgileSet(double initialCurrentSize) {\n currentSize = initialCurrentSize;\n }", "public Matrix xMatrix(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeans.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public void setQuantidade(int quantos);", "public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}", "public Matrix xMatrixTranspose(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeansTranspose.times(1.0/Math.sqrt(denom));\n return mat;\n }", "Quantity initQuantity(Quantity iQuantity)\n {\n iQuantity.updateElementValue(\"Quantity\");\n return iQuantity;\n }", "public final void setIdentity() {\n \t\n this.m00 = 1.0F;\n this.m01 = 0.0F;\n this.m02 = 0.0F;\n this.m10 = 0.0F;\n this.m11 = 1.0F;\n this.m12 = 0.0F;\n this.m20 = 0.0F;\n this.m21 = 0.0F;\n this.m22 = 1.0F;\n }", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "public void setIzq(int izq) {\r\n\t\tthis.izq = izq;\r\n\t}", "public void setDefaultCardMatrix(float[] matrix) {\n mController.setDefaultCardMatrix(matrix);\n }", "@Override\n\tpublic void setIQ(double IQ) {\n\n\t}", "public int getQuantite() {\r\n return quantite;\r\n }", "public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "private void setMToIdentity()\n\t\t{\n\t\t\tfor(rowNumber = 0; rowNumber < 4; rowNumber++)\n\t\t\t\tfor(int column = 0; column < 4; column++)\n\t\t\t\t{\n\t\t\t\t\tif(rowNumber == column)\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 0;\n\t\t\t\t}\n\t\t\ttransform = new Transform3D(mElements);\n\t\t\trowNumber = 0;\n\t\t}", "public void useCovarianceMatrix(){\n this.covRhoOption = true;\n }", "public Mondrian(int numQI, int k){\n\t\tthis.numQI = numQI;\n\t\tthis.k = k;\n\t\tanoynmizedPartition = new ArrayList<double[]>();\n\t\tclusterSet = new ArrayList<ArrayList<double[]>>();\n\t}", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public Matrix P0 ();", "public PCA(){\n super.trunc = 4;\n }", "private void setXscale() {\n\t}", "public HPFModel(RealMatrix umat, RealMatrix imat,\n KeyIndex uidx, KeyIndex iidx) {\n super(umat, imat, uidx, iidx);\n }", "public void setEqualizer(float[] equalizer) {\n \t\tSystem.arraycopy(equalizer, 0, this.equalizer , 0, 32);\n \t}", "MatrixElement(int edgesQuantity) {\r\n\t\tthis.edgesQuantity = edgesQuantity;\r\n\t}", "public void setInitialValue(Complex i) {\r\n initialValue = i;\r\n }", "protected SimpleMatrix() {}", "public void setQuantidade(Integer quantidade) { this.quantidade = quantidade; }", "@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }", "public static Mat2 initIdentity(int size) {\n\t\tdouble[][] data = new double[size][size];\n\t\tfor(int i=0; i<size; i++) {\n\t\t\tfor(int j=0; j<size; j++) {\n\t\t\t\tdata[i][j] = 0;\n\t\t\t\tif(i==j) data[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(data);\n\t}", "long getQuantite();", "public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}", "public IMU()\n {\n this(Axis.kZ, AHRSAlgorithm.kComplementary);\n }", "@Override\n\tpublic void setNodeMatrix(int nodeIndex, int matrixIndex, double[] matrix) {\n// \tSystem.out.println(\"old:\"+Arrays.toString(\n// \tArrayUtils.subarray(matrices[0][nodeIndex], matrixIndex * matrixSize, matrixIndex * matrixSize + matrixSize)\n// \t));\n// \tSystem.out.println(\"new:\"+Arrays.toString(matrix));\n System.arraycopy(matrix, 0, matrices[currentMatricesIndices[nodeIndex]][nodeIndex],\n matrixIndex * matrixSize, matrixSize);\n }", "public InfLinearAxis() {\n }", "public void setOldCardinalityNum(int param){\n \n // setting primitive attribute tracker to true\n localOldCardinalityNumTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldCardinalityNum=param;\n \n\n }", "public A151843(final int... inits) {\n mInits = inits;\n mFaj0 = mInits[3];\n mFaj1 = mInits[4];\n }", "@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n final Matrix33d m = new Matrix33d();\n m.setA(junk);\n\n m.identity();\n final double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n if (i == 0 || i == 4 || i == 8) {\n assertEquals(a[i], 1D);\n } else {\n assertEquals(a[i], 0D);\n }\n }\n }", "public void setDefaultSettings()\n {\n this.IndexerEffort = 0;\n this.indexZIPFiles = true;\n this.thumbnailsMatrix = \"64\";\n this.SaveThumbnails = false;\n }", "public void setQuantity(int quant){\n\t\t// store into the instance variable quantity the value of the parameter quant\n\t\tquantity = quant;\n\t}", "public InbreedingCoeff(){\n super((Set<String>) null);\n }", "public Matrix4f() {\n setIdentity();\n }", "public void initQTable() {\r\n\t\tString bound = \"\";\r\n\t\tint edge=(int) Math.sqrt(QLearningPara.DIM_MAP);\r\n\t\t\r\n\t\tfor(int i=0;i<QLearningPara.DIM_MAP;i++){\r\n\t\t\tfor(int j=0;j<4.;j++) {\r\n\t\t\t\tbound = String.valueOf(i);\r\n\t\t\t\tif(i%edge == 0 || i==0)\r\n\t\t\t\t\tqTable[i][2]=-900;//block moovLeft when we are on the left side\r\n\t\t\t\tif(i<edge)\r\n\t\t\t\t\tqTable[i][0]=-900; //block moovUp when we are on the top line\r\n\t\t\t\tif(i>=90) \r\n\t\t\t\t\tqTable[i][1]=-900; //block moovDown when we are on the lowest line\t\r\n\t\t\t\tif (i>=edge-1) { \r\n\t\t\t\t\tif (i == edge-1)\r\n\t\t\t\t\t\tqTable[i][3]=-900; // block moovRight when we are on the right side of the first line\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if(bound.substring(1).equals(\"9\"))\r\n\t\t\t\t\t\tqTable[i][3]=-900; //block moovRight when we are on the right side of the other lines\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\tqTable[i][j]=0; //default value\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setNewCardinalityNum(int param){\n \n // setting primitive attribute tracker to true\n localNewCardinalityNumTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewCardinalityNum=param;\n \n\n }", "private void setMultipliersArraySize(int i) {\r\n\t\tp_multiplier_name = new String[i];\r\n\t\tp_multiplier_value = new Double[i];\r\n\t\tp_multiplier_description = new String[i];\r\n\t}", "public VOIVector(int initialsize) {\r\n super(initialsize);\r\n }", "public void setIndx(int indx){\n this.indx = indx;\n }", "@Override\n\tprotected void setMultiplier(DynamicMultiplier multiplier) {\n\t\tif (\"supportVectors\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors);\n\t\t} else if (\"supportVectorsMinusOne\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor(numberOfSupportVectors - 1);\n\t\t} else if (\"supportVectorMachines\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((numberOfClasses * (numberOfClasses - 1)) / 2);\n\t\t} else if (\"squareAndMultiplyDegree\".equals(multiplier.getName())) {\n\t\t\tmultiplier.setFactor((int) (2.0 * FastMath.floor(FastMath.log(2.0, ((Integer) kernelDegree.getValue())))));\n\t\t}\n\t}", "public DoubleMatrixDataset() {\r\n }", "public Matriz( int lin, int col )\n {\n if(lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Quantidade invalida. \" );\n } //end\n else\n {\n table = new Object[lin][col];\n } //end se\n }", "void setDisplayQuantity(BigDecimal inDisplayQuantity);", "@Override\n\tprotected void initDefaultCommand() {\n\t\tfor(int i=0; i<10; i++){\n\t\t\tlimSwitches[i]= new DigitalInput(i);\n\t\t}\n\t\t\n\t\tlowerLeft.setInverted(true);\n\t\tintakeMotor.setInverted(true);\n\t\t\n\t}", "public USB2Mat scale(double arg0) {\n\t\tfor (int i = 0; i < n_; i++)\n\t\t\tfor (int j = 0; j < hbw_ + 1; j++)\n\t\t\t\tmat_[i][j] *= arg0;\n\t\treturn this;\n\t}", "public void setSimplexOperation(int n,int m,RealMatrix phase,boolean isMaximization)\r\n\t{\n\t\tthis.m=m;\r\n\t\tthis.n=n;\r\n\t\tthis.isMaximization=isMaximization;\r\n\t\t// there can be some bugs dueto the Z included into matrix. If there is a bug due to the z we should change write op.\r\n\t\t//simplexTable=initMatrix;\r\n\t\tsimplexTable=phase;\r\n\t\t\r\n\t}", "public Matrix3f() {\n\t\n \tthis.setZero();\n }", "public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 0;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 0;\t\n \n }", "MatrixParameter createMatrixParameter();", "public void setCurrentQuantity(int currentQuantity) {\n this.currentQuantity = currentQuantity;\n }", "public void setIniter(Initializer initer)\r\n\t{\r\n\t\tif (parent != null)\r\n\t\t\t((ParamComputeUnit) parent).initer = initer;\r\n\t}", "@Override\r\n\tpublic void majMemoireIA() {\r\n\t}", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public void setMatrixForItem(int n, float[] matrix) {\n mController.setMatrixForItem(n, matrix);\n }", "static void setIdentityM(float[] sm, int smOffset) {\n for (int i = 0; i < 16; i++) {\n sm[smOffset + i] = 0;\n }\n for (int i = 0; i < 16; i += 5) {\n sm[smOffset + i] = 1.0f;\n }\n }", "public final void setScale(float scale) {\n\t\n \tthis.svd(this);\n \tthis.mul(scale);\n }", "public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }", "protected void calibrateMetaModel(final int currentParamNo) {\r\n\t\tCalcfc optimization=new Calcfc() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic double compute(int m, int n, double[] x, double[] constrains) {\r\n\t\t\t\tdouble objective=0;\r\n\t\t\t\tMetaModelParams=x;\r\n\t\t\t\tfor(int i:params.keySet()) {\r\n\t\t\t\t\tobjective+=Math.pow(calcMetaModel(0, params.get(i))-simData.get(i),2)*calcEuclDistanceBasedWeight(params, i,currentParamNo);\r\n\t\t\t\t}\r\n\t\t\t\treturn objective;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t};\r\n\t\tdouble[] x=new double[this.noOfMetaModelParams]; \r\n\t\tfor(int i=0;i<this.noOfMetaModelParams;i++) {\r\n\t\t\tx[i]=0;\r\n\t\t}\r\n\t CobylaExitStatus result = Cobyla.findMinimum(optimization, this.noOfMetaModelParams, 0, x,0.5,Math.pow(10, -6) ,3, 1500);\r\n\t this.MetaModelParams=x;\r\n\t}", "public void InitScaling() {\n\tc2.InitScaling();\n\tc3.InitScaling();\n\tc1.InitScaling();\n\tc3.CalcPrev();\n\tc3.UpdateAllNoCoord();\n }", "@Override\n public void setSuitNum(int total, int normal, int taobao, int imgs) {\n }", "public static native void OpenMM_AmoebaBondForce_setAmoebaGlobalBondQuartic(PointerByReference target, double quarticK);", "public void initialize(VectorSet orig) {\n\t\t\n\t}", "public void setTableToDefault() {\n TableColumnModel tcm = table.getColumnModel();\n\n for (int i = 0; i < msbQTM.getColumnCount(); i++) {\n tcm.getColumn(i).setPreferredWidth(-1);\n }\n\n table.setColumnModel(tcm);\n }", "public abstract void recalcNormalizationExtrema();", "public void setQuantidade(double quantidade) {\n this.quantidade = quantidade;\n }", "@Override\n public void convertToDefaultValueOps() {\n\n }", "OCRSet(int initialCapacity, float loadFactor, boolean dummy) {\r\n this.map = new LinkedHashMap<Integer, E>(initialCapacity, loadFactor);\r\n }", "private void setObjective() throws IloException{\n\n IloLinearNumExpr expr = this.cplex.linearNumExpr();\n int i = 0;\n for(IloNumVar xi : x){\n expr.addTerm(xi, this.c[i]);\n i++;\n }\n this.objective = this.cplex.addMinimize(expr);\n }", "public final void set () {\t\n\t\tsymbol = null;\t\n\t\tmksa = underScore; factor = 1;\n\t\tvalue = 0./0.;\t\t\t// NaN\n\t\toffset = 0.;\n\t}", "static void productoEscalarMatriz() {\r\n\r\n System.out.println(\"PRODUCTO ESCALAR X MATRIZ \\n\");\r\n setup(false);\r\n String valor = inputDialog(\"Inserte un escalar\", \"Escalar\", JOptionPane.INFORMATION_MESSAGE);\r\n int escalar = Integer.parseInt(valor);\r\n matrizA.productoEscalarMatriz(escalar);\r\n messageDialog(\"La matriz resultante al multiplicar por el escalar \" + escalar + \", es: \\n\" + matrizA.datosMatrizNumeros(), \"Producto escalar\", 3);\r\n\r\n }", "protected CategoricalMatrixImpl(Document document) {\r\n\t\tsuper(document,\"Standard\");\r\n\t}", "public void initializeDemandVector() {\r\n\t\tdouble marketSplit = Parameters.marketSplit / 100.0;\r\n\t\tfor (int i = 0; i < demandVector.length; i++) {\r\n\t\t\t\r\n\t\t\tdouble r = RandomHelper.nextDoubleFromTo(0, 1);\r\n\t\t\t\r\n\t\t\tdemandVector[i] = r < marketSplit ? 1 : 0;\r\n\t\t}\r\n\t}", "Quantifier createQuantifier();", "public void useCorrelationMatrix(){\n this.covRhoOption = false;\n }", "private void getProperBaseMatrix(Matrix matrix) \r\n {\r\n \tif(mViewWidth == 0)\r\n \t\treturn;\r\n \t\r\n \tfloat w = mRoBitmap.getWidth();\r\n \tfloat h = mRoBitmap.getHeight();\r\n \t\r\n matrix.reset();\r\n // We limit up-scaling to 3x otherwise the result may look bad if it's\r\n // a small icon.\r\n float widthScale = (float)((float)mViewWidth / w);//Math.min((float)((float)mViewWidth / w), 3.0f);\r\n float heightScale = (float)((float)mViewHeight / h);//Math.min((float)((float)mViewHeight / h), 3.0f);\r\n float scale = Math.max(widthScale, heightScale);\r\n \r\n matrix.postConcat(mRoBitmap.getRotateMatrix());\r\n matrix.postScale(scale, scale);\r\n\r\n matrix.postTranslate(\r\n (mViewWidth - w * scale) / 2F,\r\n (mViewHeight - h * scale) / 2F);\r\n }", "public void setInseamQty(Number value) {\n setAttributeInternal(INSEAMQTY, value);\n }", "Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }" ]
[ "0.7790762", "0.58624136", "0.5577123", "0.54912674", "0.5233481", "0.5173861", "0.50818264", "0.49943638", "0.49177867", "0.48087332", "0.48028305", "0.4787359", "0.47515297", "0.47515297", "0.47380862", "0.47190386", "0.47057956", "0.46928757", "0.46914092", "0.4662076", "0.4659258", "0.4649214", "0.46457437", "0.46440485", "0.46379054", "0.46295193", "0.46157122", "0.4593224", "0.45781973", "0.45700556", "0.45694017", "0.45682377", "0.45466924", "0.45356715", "0.45346645", "0.4529902", "0.45231146", "0.45096555", "0.45072836", "0.45060322", "0.4504656", "0.4494172", "0.44872418", "0.44772404", "0.446282", "0.4459366", "0.44538093", "0.4428221", "0.4425503", "0.44248125", "0.44168442", "0.44121918", "0.4410837", "0.4398643", "0.43897995", "0.43848768", "0.43831712", "0.4380075", "0.4378819", "0.43770874", "0.43619546", "0.43616468", "0.4358982", "0.43570808", "0.43502265", "0.43417752", "0.43407428", "0.4333161", "0.43293712", "0.43263397", "0.43173704", "0.43116587", "0.4306545", "0.43061358", "0.43045044", "0.43044716", "0.43028757", "0.42994553", "0.42954457", "0.4291605", "0.42905435", "0.42805347", "0.42743444", "0.427162", "0.42709273", "0.4269753", "0.4267871", "0.42630264", "0.42511907", "0.42492142", "0.42465404", "0.42438912", "0.4242215", "0.42392808", "0.42384553", "0.4236067", "0.42253107", "0.42168796", "0.4216649", "0.42077082" ]
0.8019095
0
Set Intra Quantize Matrix
void setIntraQuantMatrix(BufferedBitStream stream) throws InterruptedException { for (int i=0;i<defaultIntraQuantMatrix.length;i++) intraQuantMatrix[i] = stream.getBits(8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDefaultIntraQuantMatrix()\n {\n for (int i=0;i<defaultIntraQuantMatrix.length;i++)\n intraQuantMatrix[i] = defaultIntraQuantMatrix[i];\n }", "void setDefaultInterQuantMatrix()\n {\n for (int i=0;i<interQuantMatrix.length;i++)\n interQuantMatrix[i] = 16;\n }", "void setInterQuantMatrix(BufferedBitStream stream) throws InterruptedException\n {\n for (int i=0;i<interQuantMatrix.length;i++)\n interQuantMatrix[i] = stream.getBits(8);\n }", "public void setQuantite(int quantite) {\r\n this.quantite = quantite;\r\n }", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "public Matrix getInversematrixS()\n {\n // Build alpha * I\n double [][] alphainvmatrix;\n alphainvmatrix = new double[x + 1][x + 1];\n for(int i = 0; i < x + 1; i++)\n {\n alphainvmatrix[i][i] = alpha;\n\n }\n Matrix alphamatrixnew = new Matrix(alphainvmatrix);\n\n // calculate summation\n Matrix sum = new Matrix(x + 1, 1);\n int i = 1;\n while (i <= arraylistofprices.size() - 1) {\n phimatrix(i);\n\n sum.plusEquals(phi);\n\n i++;\n }\n Matrix summation = sum.times(phiT);\n summation.timesEquals(beta); \n\n // alpha * I + beta * sum\n Matrix sInv = alphamatrixnew.plus(summation);\n return sInv;\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "MatrixElement(int edgesQuantity) {\r\n\t\tthis.edgesQuantity = edgesQuantity;\r\n\t}", "static Matrix vectorize(Matrix input) {\n int m = input.getRowDimension();\n int n = input.getColumnDimension();\n\n Matrix result = new Matrix(m * n, 1);\n for (int p = 0; p < n; p++) {\n for (int q = 0; q < m; q++) {\n result.set(p * m + q, 0, input.get(q, p));\n }\n }\n return result;\n }", "public Matrix xMatrixTranspose(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeansTranspose.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }", "private void setMToIdentity()\n\t\t{\n\t\t\tfor(rowNumber = 0; rowNumber < 4; rowNumber++)\n\t\t\t\tfor(int column = 0; column < 4; column++)\n\t\t\t\t{\n\t\t\t\t\tif(rowNumber == column)\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 0;\n\t\t\t\t}\n\t\t\ttransform = new Transform3D(mElements);\n\t\t\trowNumber = 0;\n\t\t}", "public void setSubMatrix(int i, int j, double[][] subMatrix){\r\n \t int k = subMatrix.length;\r\n \t int l = subMatrix[0].length;\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[i+p][j+q] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "protected Matrix symmetrize(Matrix lower) {\r\n Matrix upper = lower;\r\n for(int i = 0; i < upper.getRowCount(); i++) {\r\n int index = i;\r\n upper.getAndSet(i, r -> {\r\n for(int j = index + 1; j < r.length; j++) {\r\n r[j] = lower.get(j, index);\r\n }\r\n });\r\n }\r\n return upper;\r\n }", "public void setQuantidade(int quantos);", "public Matrix xMatrix(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeans.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public Matriz( int lin, int col )\n {\n if(lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Quantidade invalida. \" );\n } //end\n else\n {\n table = new Object[lin][col];\n } //end se\n }", "public Mondrian(int numQI, int k){\n\t\tthis.numQI = numQI;\n\t\tthis.k = k;\n\t\tanoynmizedPartition = new ArrayList<double[]>();\n\t\tclusterSet = new ArrayList<ArrayList<double[]>>();\n\t}", "public void setIzq(int izq) {\r\n\t\tthis.izq = izq;\r\n\t}", "public void setQuantum(int v) {\n this.quantum = v;\n }", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "@Override\n\tpublic void setIQ(double IQ) {\n\n\t}", "protected void expand() {\n matrix = matrix.power(e);\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public int getQuantite() {\r\n return quantite;\r\n }", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public void setQuantity(int quant){\n\t\t// store into the instance variable quantity the value of the parameter quant\n\t\tquantity = quant;\n\t}", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "int getQuantite();", "int getQuantite();", "public void setQuantidade(Integer quantidade) { this.quantidade = quantidade; }", "protected void initQMark() {\n\t\tINF = calcMaxCapPlus1();\n\t\tmarkVertice(srcId, new Tuple4(NULL_DIRECTION, NO_PRED, INF, false));\n\t}", "public Accelerate(double[] in, long _time) {\n\t\tacc = new Vector3D(in);\n\t\ttime.setTime(_time);\n\t}", "public void set(float[] matrix) {\n System.arraycopy(matrix, 0, this.matrix, 0, 16);\n }", "public void setEqualizer(float[] equalizer) {\n \t\tSystem.arraycopy(equalizer, 0, this.equalizer , 0, 32);\n \t}", "private static Query newMultiDimIntSetQuery(String field, final int numDims, int... valuesIn)\n throws IOException {\n if (valuesIn.length % numDims != 0) {\n throw new IllegalArgumentException(\n \"incongruent number of values: valuesIn.length=\"\n + valuesIn.length\n + \" but numDims=\"\n + numDims);\n }\n\n // Pack all values:\n byte[][] packedValues = new byte[valuesIn.length / numDims][];\n for (int i = 0; i < packedValues.length; i++) {\n byte[] packedValue = new byte[numDims * Integer.BYTES];\n packedValues[i] = packedValue;\n for (int dim = 0; dim < numDims; dim++) {\n IntPoint.encodeDimension(valuesIn[i * numDims + dim], packedValue, dim * Integer.BYTES);\n }\n }\n\n // Sort:\n Arrays.sort(\n packedValues,\n new Comparator<byte[]>() {\n @Override\n public int compare(byte[] a, byte[] b) {\n return Arrays.compareUnsigned(a, 0, a.length, b, 0, a.length);\n }\n });\n\n final BytesRef value = new BytesRef();\n value.length = numDims * Integer.BYTES;\n\n return new PointInSetQuery(\n field,\n numDims,\n Integer.BYTES,\n new PointInSetQuery.Stream() {\n int upto;\n\n @Override\n public BytesRef next() {\n if (upto >= packedValues.length) {\n return null;\n }\n value.bytes = packedValues[upto];\n upto++;\n return value;\n }\n }) {\n @Override\n protected String toString(byte[] value) {\n assert value.length == numDims * Integer.BYTES;\n StringBuilder sb = new StringBuilder();\n for (int dim = 0; dim < numDims; dim++) {\n if (dim > 0) {\n sb.append(',');\n }\n sb.append(Integer.toString(IntPoint.decodeDimension(value, dim * Integer.BYTES)));\n }\n\n return sb.toString();\n }\n };\n }", "public Matrix inverse(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = this.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \t\treturn invmat;\r\n \t}", "@Test\n public void testSetA() {\n final double expected[] = getMatrix().getA();\n final Matrix33d m = new Matrix33d();\n m.setA(Arrays.copyOf(expected, expected.length));\n for (int i = 0; i < expected.length; i++) {\n assertEquals(m.getA()[i], expected[i]);\n }\n }", "public void setMatrixForItem(int n, float[] matrix) {\n mController.setMatrixForItem(n, matrix);\n }", "static void setIdentityM(float[] sm, int smOffset) {\n for (int i = 0; i < 16; i++) {\n sm[smOffset + i] = 0;\n }\n for (int i = 0; i < 16; i += 5) {\n sm[smOffset + i] = 1.0f;\n }\n }", "public static Matrix asin(Matrix matrix)\n {\n double[][] internal = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n double[][] M = matrix.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (M[i][j] <= 1.0d || M[i][j] >= -1.0d)\n {\n C[i][j] = Math.asin(M[i][j]);\n }\n else\n {\n C[i][j] = Double.NaN;\n }\n }\n }\n return X;\n }", "public void setProductQuantity (Product key, int quant) {\n\t\tm_prodList.remove(key);\n\t\tm_prodList.put(key,new Integer(quant));\n\n\t}", "public void setSimplexOperation(int n,int m,RealMatrix phase,boolean isMaximization)\r\n\t{\n\t\tthis.m=m;\r\n\t\tthis.n=n;\r\n\t\tthis.isMaximization=isMaximization;\r\n\t\t// there can be some bugs dueto the Z included into matrix. If there is a bug due to the z we should change write op.\r\n\t\t//simplexTable=initMatrix;\r\n\t\tsimplexTable=phase;\r\n\t\t\r\n\t}", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "private void inicializaQuadricula(EstadoAmbiente estado) {\n\t\tfor(int i = 0 ; i < this.quadricula.length ; i++) {\n\t\t\tfor (int j = 0 ; j < this.quadricula[0].length ; j++) {\n\t\t\t\tthis.quadricula[i][j] = estado;\n\t\t\t}\n\t\t}\t\t\n\t}", "public void setIndx(int indx){\n this.indx = indx;\n }", "public SubsetTableImpl(Column[] col) {\n\t\tsuper(col);\n\t\t//ANCA added 2 lines below\n\t\tint numRows = super.getNumRows();\n\t\tthis.subset = new int[numRows];\n\t\t//ANCA took this out: this.subset = new int [this.getNumRows()];\n\t\tfor (int i = 0; i < this.getNumRows(); i++) {\n\t\t\tsubset[i] = i;\n\t\t}\n\t}", "long getQuantite();", "void setOrderCapacity(OrderCapacity inOrderCapacity);", "Matrix(BigInteger[][] matrix) {\n this.nrOfRows = matrix.length;\n this.nrOfCols = matrix[0].length;\n this.inner = matrix;\n }", "private void arretes_fY(){\n\t\tthis.cube[49] = this.cube[46]; \n\t\tthis.cube[46] = this.cube[48];\n\t\tthis.cube[48] = this.cube[52];\n\t\tthis.cube[52] = this.cube[50];\n\t\tthis.cube[50] = this.cube[49];\n\t}", "abstract void expandVarArray(MatrixVariableI var);", "public void matrizAdjunta (){\n float tablaA[][]= getMatriz();\n setMatrizAdjunta(new float[3][3]);\n getMatrizAdjunta()[0][0]=(tablaA[1][1]*tablaA[2][2]) - (tablaA[1][2]*tablaA[2][1]);\n getMatrizAdjunta()[0][1]=-((tablaA[0][1]*tablaA[2][2]) - (tablaA[0][2]*tablaA[2][1]));\n getMatrizAdjunta()[0][2]=(tablaA[0][1]*tablaA[1][2]) - (tablaA[0][2]*tablaA[1][1]);\n \n getMatrizAdjunta()[1][0]=-((tablaA[1][0]*tablaA[2][2]) - (tablaA[1][2]*tablaA[2][0]));\n getMatrizAdjunta()[1][2]=-((tablaA[0][0]*tablaA[1][2]) - (tablaA[0][2]*tablaA[1][0]));\n getMatrizAdjunta()[1][1]=(tablaA[0][0]*tablaA[2][2]) - (tablaA[0][2]*tablaA[2][0]);\n \n getMatrizAdjunta()[2][0]=(tablaA[1][0]*tablaA[2][1]) - (tablaA[1][1]*tablaA[2][0]);\n getMatrizAdjunta()[2][1]=-((tablaA[0][0]*tablaA[2][1]) - (tablaA[0][1]*tablaA[2][0]));\n getMatrizAdjunta()[2][2]=(tablaA[0][0]*tablaA[1][1]) - (tablaA[0][1]*tablaA[1][0]);\n mostrarMatriz(getMatrizAdjunta(),\"Matriz adjunta\");\n }", "public void setCurrentQuantity(int currentQuantity) {\n this.currentQuantity = currentQuantity;\n }", "@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n final Matrix33d m = new Matrix33d();\n m.setA(junk);\n\n m.identity();\n final double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n if (i == 0 || i == 4 || i == 8) {\n assertEquals(a[i], 1D);\n } else {\n assertEquals(a[i], 0D);\n }\n }\n }", "public HPFModel(RealMatrix umat, RealMatrix imat,\n KeyIndex uidx, KeyIndex iidx) {\n super(umat, imat, uidx, iidx);\n }", "void setDisplayQuantity(BigDecimal inDisplayQuantity);", "private void setMultipliersArraySize(int i) {\r\n\t\tp_multiplier_name = new String[i];\r\n\t\tp_multiplier_value = new Double[i];\r\n\t\tp_multiplier_description = new String[i];\r\n\t}", "public void setMatrix(Estados[][] matrix) {\n this.matrix = matrix;\n }", "public void setSubMatrix(int[] row, int[] col, double[][] subMatrix){\r\n \tint n=row.length;\r\n \tint m=col.length;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[row[p]][col[q]] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "public void setInseamQty(Number value) {\n setAttributeInternal(INSEAMQTY, value);\n }", "@Override\n\tpublic void setNodeMatrix(int nodeIndex, int matrixIndex, double[] matrix) {\n// \tSystem.out.println(\"old:\"+Arrays.toString(\n// \tArrayUtils.subarray(matrices[0][nodeIndex], matrixIndex * matrixSize, matrixIndex * matrixSize + matrixSize)\n// \t));\n// \tSystem.out.println(\"new:\"+Arrays.toString(matrix));\n System.arraycopy(matrix, 0, matrices[currentMatricesIndices[nodeIndex]][nodeIndex],\n matrixIndex * matrixSize, matrixSize);\n }", "private float[] _book_unquantize( int n, int[] sparsemap ) {\n int j,k,count=0;\n float[] r = null;\n if(mapType==1 || mapType==2){\n int quantvals;\n float mindel=_float32_unpack(q_min);\n float delta=_float32_unpack(q_delta);\n r= new float[ n * dim ];\n\n /* maptype 1 and 2 both use a quantized value vector, but\n different sizes */\n switch(mapType){\n case 1: {\n /* most of the time, entries%dimensions == 0, but we need to be\n well defined. We define that the possible vales at each\n scalar is values == entries/dim. If entries%dim != 0, we'll\n have 'too few' values (values*dim<entries), which means that\n we'll have 'left over' entries; left over entries use zeroed\n values (and are wasted). So don't generate codebooks like\n that */\n quantvals = (int)Math.floor( Math.pow( (double)entries, ((double)1)/((double)dim) ) );\n\n for(j=0;j<entries;j++) {\n\t if((sparsemap != null && (lengthList[j] != 0)) || sparsemap == null ){\n float last=0.f;\n int indexdiv=1;\n for(k=0;k<dim;k++){\n int index= (j/indexdiv)%quantvals;\n float val=quantlist[index];\n//System.out.println( \"a\" + (int)(val * 1000) + \" \" + index );\n val=fabs(val)*delta+mindel+last;\n//System.out.println( \"d\" + (int)(delta * 1000) + \" \" + (int)(mindel * 1000) );\n if(q_sequencep != 0)last=val;\t \n//System.out.println( (int)(val * 1000) );\n if(sparsemap != null) {\n r[sparsemap[count]*dim+k]=val;\n// System.out.println( \"sparsemap \" + sparsemap[count] );\n } else {\n r[count*dim+k]=val;\n }\n indexdiv*=quantvals;\n }\n count++;\n }\n }\n break;\n }\n case 2: {\n for(j=0;j<entries;j++){\n if((sparsemap != null && lengthList[j] != 0) || sparsemap == null ){\n\t float last=0.f;\n\t \n\t for(k=0;k<dim;k++) {\n float val=quantlist[j*dim+k];\n//System.out.println( \"a\" + (int)(val * 1000) + \" \" + (j*dim+k));\n\n val=fabs(val)*delta+mindel+last;\n//System.out.println( \"d\" + (int)(delta * 1000) + \" \" + (int)(mindel * 1000) );\n if(q_sequencep != 0)last=val;\n//System.out.println( (int)(val * 1000) );\n if(sparsemap != null)\n r[sparsemap[count]*dim+k]=val;\n else\n r[count*dim+k]=val;\n }\n count++;\n }\n }\n break;\n }\n }\n }\n return(r);\n }", "private void setObjective() throws IloException{\n\n IloLinearNumExpr expr = this.cplex.linearNumExpr();\n int i = 0;\n for(IloNumVar xi : x){\n expr.addTerm(xi, this.c[i]);\n i++;\n }\n this.objective = this.cplex.addMinimize(expr);\n }", "public void mo23181a(Canvas canvas, Matrix matrix, int i) {\n }", "protected void rebuildRateMatrix(double[][] rate, double[] parameters)\t{\n // Q matrix\n rate[0][1] = 0.610810; rate[0][2] = 0.569079;\n rate[0][3] = 0.821500; rate[0][4] = 1.141050;\n rate[0][5] = 1.011980; rate[0][6] = 1.756410;\n rate[0][7] = 1.572160; rate[0][8] = 0.354813;\n rate[0][9] = 0.219023; rate[0][10] = 0.443935;\n rate[0][11] = 1.005440; rate[0][12] = 0.989475;\n rate[0][13] = 0.233492; rate[0][14] = 1.594890;\n rate[0][15] = 3.733380; rate[0][16] = 2.349220;\n rate[0][17] = 0.125227; rate[0][18] = 0.268987;\n rate[0][19] = 2.221870;\n\n rate[1][2] = 0.711690; rate[1][3] = 0.165074;\n rate[1][4] = 0.585809; rate[1][5] = 3.360330;\n rate[1][6] = 0.488649; rate[1][7] = 0.650469;\n rate[1][8] = 2.362040; rate[1][9] = 0.206722;\n rate[1][10] = 0.551450; rate[1][11] = 5.925170;\n rate[1][12] = 0.758446; rate[1][13] = 0.116821;\n rate[1][14] = 0.753467; rate[1][15] = 1.357640;\n rate[1][16] = 0.613776; rate[1][17] = 1.294610;\n rate[1][18] = 0.423612; rate[1][19] = 0.280336;\n\n rate[2][3] = 6.013660; rate[2][4] = 0.296524;\n rate[2][5] = 1.716740; rate[2][6] = 1.056790;\n rate[2][7] = 1.253910; rate[2][8] = 4.378930;\n rate[2][9] = 0.615636; rate[2][10] = 0.147156;\n rate[2][11] = 3.334390; rate[2][12] = 0.224747;\n rate[2][13] = 0.110793; rate[2][14] = 0.217538;\n rate[2][15] = 4.394450; rate[2][16] = 2.257930;\n rate[2][17] = 0.078463; rate[2][18] = 1.208560;\n rate[2][19] = 0.221176;\n\n rate[3][4] = 0.033379; rate[3][5] = 0.691268;\n rate[3][6] = 6.833400; rate[3][7] = 0.961142;\n rate[3][8] = 1.032910; rate[3][9] = 0.043523;\n rate[3][10] = 0.093930; rate[3][11] = 0.533362;\n rate[3][12] = 0.116813; rate[3][13] = 0.052004;\n rate[3][14] = 0.472601; rate[3][15] = 1.192810;\n rate[3][16] = 0.417372; rate[3][17] = 0.146348;\n rate[3][18] = 0.363243; rate[3][19] = 0.169417;\n\n rate[4][5] = 0.109261; rate[4][6] = 0.023920;\n rate[4][7] = 0.341086; rate[4][8] = 0.275403;\n rate[4][9] = 0.189890; rate[4][10] = 0.428414;\n rate[4][11] = 0.083649; rate[4][12] = 0.437393;\n rate[4][13] = 0.441300; rate[4][14] = 0.122303;\n rate[4][15] = 1.560590; rate[4][16] = 0.570186;\n rate[4][17] = 0.795736; rate[4][18] = 0.604634;\n rate[4][19] = 1.114570;\n\n rate[5][6] = 6.048790; rate[5][7] = 0.366510;\n rate[5][8] = 4.749460; rate[5][9] = 0.131046;\n rate[5][10] = 0.964886; rate[5][11] = 4.308310;\n rate[5][12] = 1.705070; rate[5][13] = 0.110744;\n rate[5][14] = 1.036370; rate[5][15] = 1.141210;\n rate[5][16] = 0.954144; rate[5][17] = 0.243615;\n rate[5][18] = 0.252457; rate[5][19] = 0.333890;\n\n rate[6][7] = 0.630832; rate[6][8] = 0.635025;\n rate[6][9] = 0.141320; rate[6][10] = 0.172579;\n rate[6][11] = 2.867580; rate[6][12] = 0.353912;\n rate[6][13] = 0.092310; rate[6][14] = 0.755791;\n rate[6][15] = 0.782467; rate[6][16] = 0.914814;\n rate[6][17] = 0.172682; rate[6][18] = 0.217549;\n rate[6][19] = 0.655045;\n\n rate[7][8] = 0.276379; rate[7][9] = 0.034151;\n rate[7][10] = 0.068651; rate[7][11] = 0.415992;\n rate[7][12] = 0.194220; rate[7][13] = 0.055288;\n rate[7][14] = 0.273149; rate[7][15] = 1.486700;\n rate[7][16] = 0.251477; rate[7][17] = 0.374321;\n rate[7][18] = 0.114187; rate[7][19] = 0.209108;\n\n rate[8][9] = 0.152215; rate[8][10] = 0.555096;\n rate[8][11] = 0.992083; rate[8][12] = 0.450867;\n rate[8][13] = 0.756080; rate[8][14] = 0.771387;\n rate[8][15] = 0.822459; rate[8][16] = 0.525511;\n rate[8][17] = 0.289998; rate[8][18] = 4.290350;\n rate[8][19] = 0.131869;\n\n rate[9][10] = 3.517820; rate[9][11] = 0.360574;\n rate[9][12] = 4.714220; rate[9][13] = 1.177640;\n rate[9][14] = 0.111502; rate[9][15] = 0.353443;\n rate[9][16] = 1.615050; rate[9][17] = 0.234326;\n rate[9][18] = 0.468951; rate[9][19] = 8.659740;\n\n rate[10][11] = 0.287583; rate[10][12] = 5.375250;\n rate[10][13] = 2.348200; rate[10][14] = 0.462018;\n rate[10][15] = 0.382421; rate[10][16] = 0.364222;\n rate[10][17] = 0.740259; rate[10][18] = 0.443205;\n rate[10][19] = 1.997370;\n\n rate[11][12] = 1.032220; rate[11][13] = 0.098843;\n rate[11][14] = 0.619503; rate[11][15] = 1.073780;\n rate[11][16] = 1.537920; rate[11][17] = 0.152232;\n rate[11][18] = 0.147411; rate[11][19] = 0.342012;\n\n rate[12][13] = 1.320870; rate[12][14] = 0.194864;\n rate[12][15] = 0.556353; rate[12][16] = 1.681970;\n rate[12][17] = 0.570369; rate[12][18] = 0.473810;\n rate[12][19] = 2.282020;\n\n rate[13][14] = 0.179896; rate[13][15] = 0.606814;\n rate[13][16] = 0.191467; rate[13][17] = 1.699780;\n rate[13][18] = 7.154480; rate[13][19] = 0.725096;\n\n rate[14][15] = 1.786490; rate[14][16] = 0.885349;\n rate[14][17] = 0.156619; rate[14][18] = 0.239607;\n rate[14][19] = 0.351250;\n\n rate[15][16] = 4.847130; rate[15][17] = 0.578784;\n rate[15][18] = 0.872519; rate[15][19] = 0.258861;\n\n rate[16][17] = 0.126678; rate[16][18] = 0.325490;\n rate[16][19] = 1.547670;\n\n rate[17][18] = 2.763540; rate[17][19] = 0.409817;\n\n rate[18][19] = 0.347826;\n }", "private static Matrix makeXMat(int nDataPoints, int nTerms, Vector xV){\n Matrix matrix = new Matrix(nDataPoints, nTerms);\n for (int row = 1; row <= nDataPoints; row++){\n matrix.putValue(row,1, new BigDecimal(1.0));\n for (int col = 2; col <= nTerms; col++)\n matrix.putValue(row , col, \n matrix.getValue(row, col - 1).multiply(\n xV.getValue(row)));\n }\n return matrix;\n }", "@Override\n\tpublic void setRow(int i, IDoubleVector setToMe) throws OutOfBoundsException {\n\n\t}", "public final void setIdentity() {\n \t\n this.m00 = 1.0F;\n this.m01 = 0.0F;\n this.m02 = 0.0F;\n this.m10 = 0.0F;\n this.m11 = 1.0F;\n this.m12 = 0.0F;\n this.m20 = 0.0F;\n this.m21 = 0.0F;\n this.m22 = 1.0F;\n }", "@Override\n public Matrix dct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20 = 0, tmpm21 = 0, tmpm22 = 0, tmpm23 = 0, tmpm24 = 0, tmpm25 = 0, tmpm26 = 0, tmpm27 = 0;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n\n for (int i = 0; i < SIZE; i++) { // HT\n\n tmpm0 = in.getInt(my + i, mx + 0);\n tmpm1 = in.getInt(my + i, mx + 1);\n tmpm2 = in.getInt(my + i, mx + 2);\n tmpm3 = in.getInt(my + i, mx + 3);\n tmpm4 = in.getInt(my + i, mx + 4);\n tmpm5 = in.getInt(my + i, mx + 5);\n tmpm6 = in.getInt(my + i, mx + 6);\n tmpm7 = in.getInt(my + i, mx + 7);\n\n tmpm20 = tmpm0 + tmpm7;\n tmpm27 = tmpm0 - tmpm7;\n tmpm21 = tmpm1 + tmpm6;\n tmpm26 = tmpm1 - tmpm6;\n tmpm22 = tmpm2 + tmpm5;\n tmpm25 = tmpm2 - tmpm5;\n tmpm23 = tmpm3 + tmpm4;\n tmpm24 = tmpm3 - tmpm4;\n\n double outmyi[] = out[my + i];\n\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n tmpm4 = tmpm24;\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm7 = tmpm27;\n outmyi[mx + 0] = (tmpm0 + tmpm1) * Z4;\n outmyi[mx + 4] = (tmpm0 - tmpm1) * Z4;\n outmyi[mx + 2] = (tmpm2 * Z6) + (tmpm3 * Z2);\n outmyi[mx + 6] = (tmpm3 * Z6) - (tmpm2 * Z2);\n tmpm24 = tmpm4 + tmpm5;\n tmpm27 = tmpm7 + tmpm6;\n tmpm25 = tmpm4 - tmpm5;\n tmpm26 = tmpm7 - tmpm6;\n outmyi[mx + 1] = (tmpm24 * Z7) + (tmpm27 * Z1);\n outmyi[mx + 5] = (tmpm25 * Z3) + (tmpm26 * Z5);\n outmyi[mx + 7] = (tmpm27 * Z7) - (tmpm24 * Z1);\n outmyi[mx + 3] = (tmpm26 * Z3) - (tmpm25 * Z5);\n }\n\n for (int i = 0; i < SIZE; i++) { // VT\n tmpm20 = out[my + 0][mx + i] + out[my + 7][mx + i];\n tmpm27 = out[my + 0][mx + i] - out[my + 7][mx + i];\n tmpm21 = out[my + 1][mx + i] + out[my + 6][mx + i];\n tmpm26 = out[my + 1][mx + i] - out[my + 6][mx + i];\n tmpm22 = out[my + 2][mx + i] + out[my + 5][mx + i];\n tmpm25 = out[my + 2][mx + i] - out[my + 5][mx + i];\n tmpm23 = out[my + 3][mx + i] + out[my + 4][mx + i];\n tmpm24 = out[my + 3][mx + i] - out[my + 4][mx + i];\n\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n tmpm4 = tmpm24;\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm7 = tmpm27;\n out[my + 0][mx + i] = (tmpm0 + tmpm1) * Z4;\n out[my + 4][mx + i] = (tmpm0 - tmpm1) * Z4;\n out[my + 2][mx + i] = (tmpm2 * Z6) + (tmpm3 * Z2);\n out[my + 6][mx + i] = (tmpm3 * Z6) - (tmpm2 * Z2);\n tmpm24 = tmpm4 + tmpm5;\n tmpm27 = tmpm7 + tmpm6;\n tmpm25 = tmpm4 - tmpm5;\n tmpm26 = tmpm7 - tmpm6;\n out[my + 1][mx + i] = (tmpm24 * Z7) + (tmpm27 * Z1);\n out[my + 5][mx + i] = (tmpm25 * Z3) + (tmpm26 * Z5);\n out[my + 7][mx + i] = (tmpm27 * Z7) - (tmpm24 * Z1);\n out[my + 3][mx + i] = (tmpm26 * Z3) - (tmpm25 * Z5);\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "static void productoEscalarMatriz() {\r\n\r\n System.out.println(\"PRODUCTO ESCALAR X MATRIZ \\n\");\r\n setup(false);\r\n String valor = inputDialog(\"Inserte un escalar\", \"Escalar\", JOptionPane.INFORMATION_MESSAGE);\r\n int escalar = Integer.parseInt(valor);\r\n matrizA.productoEscalarMatriz(escalar);\r\n messageDialog(\"La matriz resultante al multiplicar por el escalar \" + escalar + \", es: \\n\" + matrizA.datosMatrizNumeros(), \"Producto escalar\", 3);\r\n\r\n }", "Quantity initQuantity(Quantity iQuantity)\n {\n iQuantity.updateElementValue(\"Quantity\");\n return iQuantity;\n }", "public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}", "public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }", "public void set(double[] ad);", "@Override\n public void setQuick(int row, int column, double value) {\n base.setQuick(rowPivot[row], columnPivot[column], value);\n }", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "private List<ProductQuantity> getQuantities() {\n List<ProductQuantity> quantities = new ArrayList<>();\n for (int i = 1; i <= QUANTITY_MAX; i++) {\n ProductQuantity q = new ProductQuantity(i, i + \"x\");\n quantities.add(q);\n }\n return quantities;\n }", "public void setArray(int i, Array x);", "public void setSubMatrix(int i, int j, int k, int l, double[][] subMatrix){\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[i+p][j+q] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "public void setQ(int q) {\n/* 590 */ getCOSObject().setInt(COSName.Q, q);\n/* */ }", "public void set(final int index, final BigDecimal element) {\n ensureCapacity(index + 1); // capacity is one more than index\n cache[index] = element;\n }", "@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }", "public double Ix() {\r\n\t\tdouble ix = 0;\r\n\t\tfor(int i = 0;i < liczbaPunktow;i++) {\r\n\t\t\tix = ix + A[i].getMasa() * (Math.pow((XYZC[1] - A[i].getPozY()),2) + Math.pow((XYZC[2] - A[i].getPozZ()),2));\r\n\t\t}\r\n\t\treturn ix;\r\n\t}", "void setIVA(float iva);", "public abstract void recalcNormalizationExtrema();", "void setStockArray(int i, stockFilePT102.StockDocument.Stock stock);", "public Matrix Q (double t, double dt, EstSTM x);", "public void setQuantidade(double quantidade) {\n this.quantidade = quantidade;\n }", "@Override\n public void applyTransformToOrigin(INDArray origin,int i) {\n if(origin instanceof IComplexNumber) {\n IComplexNDArray c2 = (IComplexNDArray) origin;\n IComplexNumber transformed = apply(origin,getFromOrigin(origin,i),i);\n c2.putScalar(i,transformed);\n }\n else {\n float f = apply(origin,getFromOrigin(origin,i),i);\n origin.putScalar(i, f);\n }\n\n }", "public void setPrices(int[][] prices) {\n for (int i = 0, n = 4; i < n; i++) {\n for (int j = 0, m = 4; j < m; j++) {\n\tthis.prices[i][j] = prices[i][j];\n }\n }\n }", "private void iniciaReferencia(int qtdLinha){\n referenciaFrequencia = new int[qtdConjunto][];\n referenciaTempo = new int[qtdConjunto][];\n for (int i = 0; i < referenciaFrequencia.length; i++) {\n \treferenciaFrequencia[i] = new int[qtdLinha];\n \treferenciaTempo[i] = new int[qtdLinha];\n for (int j = 0; j < referenciaFrequencia[i].length; j++) {\n\t\t\t\treferenciaFrequencia[i][j] = 0;\n\t\t\t\treferenciaTempo[i][j] = 0;\n\t\t\t}\n }\n }", "public void setIniter(Initializer initer)\r\n\t{\r\n\t\tif (parent != null)\r\n\t\t\t((ParamComputeUnit) parent).initer = initer;\r\n\t}", "public purchaseDesign()\n {\n priceArray = new int[5][4];\n }", "public void linearize(){\n Object []lin=new Object[size];\n int k=start;\n for(int i=0;i<size;i++){\n lin[i]=cir[k];\n k=(k+1)%cir.length;\n }\n cir=new Object[size];\n for(int i=0;i<size;i++){\n cir[i]=lin[i];\n }\n }", "public DynamicModelPart setU(int[] u) {\n this.u = u;\n return this;\n }", "public void setUniverse(byte[][] input)\n\t{\n\t\tfor(int row =0; row<input.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column =0; column<input[row].length; column++)\n\t\t\t{\n\t\t\t\t//assign value from input array to currentversion\n\t\t\t\tthis.currentVersion[row][column] = input[row][column];\n\t\t\t}\n\t\t}\n\t}", "public AgileSet(double initialCurrentSize) {\n currentSize = initialCurrentSize;\n }" ]
[ "0.69671065", "0.66101027", "0.6097214", "0.5542436", "0.53414214", "0.532959", "0.52619505", "0.5124968", "0.49501252", "0.4946119", "0.49299797", "0.49288806", "0.48265484", "0.4823559", "0.47997817", "0.47969702", "0.47605067", "0.47565842", "0.4746874", "0.4735555", "0.47275725", "0.47136685", "0.4704577", "0.47045648", "0.47041562", "0.46356666", "0.4629839", "0.46197596", "0.46164948", "0.46115994", "0.4605067", "0.4605067", "0.45850372", "0.4578361", "0.4571772", "0.45680982", "0.45680463", "0.45672002", "0.45645607", "0.45587406", "0.45353958", "0.45249408", "0.45244834", "0.45232496", "0.45200917", "0.45173627", "0.45043582", "0.44954896", "0.44901913", "0.44870126", "0.448292", "0.44819376", "0.44626084", "0.44624308", "0.44478127", "0.44405437", "0.4436853", "0.44352192", "0.4430953", "0.44303015", "0.44221202", "0.44164714", "0.44139302", "0.44083703", "0.44057262", "0.44038653", "0.43984896", "0.4397226", "0.4395389", "0.4392584", "0.43835172", "0.43828288", "0.4375192", "0.4374748", "0.43743882", "0.4366302", "0.43612832", "0.43607628", "0.43555734", "0.43498692", "0.4348321", "0.43461058", "0.43396312", "0.4339002", "0.43383747", "0.4326481", "0.43227106", "0.4321014", "0.43174422", "0.43174323", "0.43148348", "0.43130547", "0.43056673", "0.42974865", "0.42943397", "0.42941087", "0.4292475", "0.4292274", "0.42910793", "0.42852083" ]
0.65518844
2
Set Default Inter Quantize Matrix
void setDefaultInterQuantMatrix() { for (int i=0;i<interQuantMatrix.length;i++) interQuantMatrix[i] = 16; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDefaultIntraQuantMatrix()\n {\n for (int i=0;i<defaultIntraQuantMatrix.length;i++)\n intraQuantMatrix[i] = defaultIntraQuantMatrix[i];\n }", "void setIntraQuantMatrix(BufferedBitStream stream) throws InterruptedException\n {\n for (int i=0;i<defaultIntraQuantMatrix.length;i++)\n intraQuantMatrix[i] = stream.getBits(8);\n }", "public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "void setInterQuantMatrix(BufferedBitStream stream) throws InterruptedException\n {\n for (int i=0;i<interQuantMatrix.length;i++)\n interQuantMatrix[i] = stream.getBits(8);\n }", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public final void setIdentity() {\n \t\n this.m00 = 1.0F;\n this.m01 = 0.0F;\n this.m02 = 0.0F;\n this.m10 = 0.0F;\n this.m11 = 1.0F;\n this.m12 = 0.0F;\n this.m20 = 0.0F;\n this.m21 = 0.0F;\n this.m22 = 1.0F;\n }", "public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }", "public void setDefaultCardMatrix(float[] matrix) {\n mController.setDefaultCardMatrix(matrix);\n }", "public static Mat2 initIdentity(int size) {\n\t\tdouble[][] data = new double[size][size];\n\t\tfor(int i=0; i<size; i++) {\n\t\t\tfor(int j=0; j<size; j++) {\n\t\t\t\tdata[i][j] = 0;\n\t\t\t\tif(i==j) data[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(data);\n\t}", "private void setMToIdentity()\n\t\t{\n\t\t\tfor(rowNumber = 0; rowNumber < 4; rowNumber++)\n\t\t\t\tfor(int column = 0; column < 4; column++)\n\t\t\t\t{\n\t\t\t\t\tif(rowNumber == column)\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 0;\n\t\t\t\t}\n\t\t\ttransform = new Transform3D(mElements);\n\t\t\trowNumber = 0;\n\t\t}", "@NativeType(\"uint16_t\")\n public short use_default_scaling_matrix_mask() { return nuse_default_scaling_matrix_mask(address()); }", "public void setQuantite(int quantite) {\r\n this.quantite = quantite;\r\n }", "protected void initQMark() {\n\t\tINF = calcMaxCapPlus1();\n\t\tmarkVertice(srcId, new Tuple4(NULL_DIRECTION, NO_PRED, INF, false));\n\t}", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "protected SimpleMatrix() {}", "public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ this.placeholder = _placeholder_DefaultValue_xjal();\n/* 68: */ }", "public Mondrian(int numQI, int k){\n\t\tthis.numQI = numQI;\n\t\tthis.k = k;\n\t\tanoynmizedPartition = new ArrayList<double[]>();\n\t\tclusterSet = new ArrayList<ArrayList<double[]>>();\n\t}", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public void setInitialValue(Complex i) {\r\n initialValue = i;\r\n }", "public Matrix P0 ();", "public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 0;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 0;\t\n \n }", "public void setDefaultSettings()\n {\n this.IndexerEffort = 0;\n this.indexZIPFiles = true;\n this.thumbnailsMatrix = \"64\";\n this.SaveThumbnails = false;\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n final Matrix33d m = new Matrix33d();\n m.setA(junk);\n\n m.identity();\n final double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n if (i == 0 || i == 4 || i == 8) {\n assertEquals(a[i], 1D);\n } else {\n assertEquals(a[i], 0D);\n }\n }\n }", "public IMU()\n {\n this(Axis.kZ, AHRSAlgorithm.kComplementary);\n }", "@Override\n\tpublic void setIQ(double IQ) {\n\n\t}", "MatrixParameter createMatrixParameter();", "public Matrix4f() {\n setIdentity();\n }", "public DoubleMatrixDataset() {\r\n }", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "public InfLinearAxis() {\n }", "public void setSimplexOperation(int n,int m,RealMatrix phase,boolean isMaximization)\r\n\t{\n\t\tthis.m=m;\r\n\t\tthis.n=n;\r\n\t\tthis.isMaximization=isMaximization;\r\n\t\t// there can be some bugs dueto the Z included into matrix. If there is a bug due to the z we should change write op.\r\n\t\t//simplexTable=initMatrix;\r\n\t\tsimplexTable=phase;\r\n\t\t\r\n\t}", "static void setIdentityM(float[] sm, int smOffset) {\n for (int i = 0; i < 16; i++) {\n sm[smOffset + i] = 0;\n }\n for (int i = 0; i < 16; i += 5) {\n sm[smOffset + i] = 1.0f;\n }\n }", "protected void initSupportedIntensityMeasureParams() {\n\n\t\t// Create saParam:\n\t\tDoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n\t\tTreeSet set = new TreeSet();\n\t\tEnumeration keys = coefficientsBJF.keys();\n\t\twhile (keys.hasMoreElements()) {\n\t\t\tBJF_1997_AttenRelCoefficients coeff = (BJF_1997_AttenRelCoefficients)\n\t\t\tcoefficientsBJF.get(keys.nextElement());\n\t\t\tif (coeff.period >= 0) {\n\t\t\t\tset.add(new Double(coeff.period));\n\t\t\t}\n\t\t}\n\t\tIterator it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tperiodConstraint.addDouble( (Double) it.next());\n\t\t}\n\t\tperiodConstraint.setNonEditable();\n\t\tsaPeriodParam = new PeriodParam(periodConstraint);\n\t\tsaDampingParam = new DampingParam();\n\t\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\t\tsaParam.setNonEditable();\n\n\t\t// Create PGA Parameter (pgaParam):\n\t\tpgaParam = new PGA_Param();\n\t\tpgaParam.setNonEditable();\n\n\t\t// Create PGV Parameter (pgvParam):\n\t\tpgvParam = new PGV_Param();\n\t\tpgvParam.setNonEditable();\n\n\t\t// The MMI parameter\n\t\tmmiParam = new MMI_Param();\n\n\t\t// Add the warning listeners:\n\t\tsaParam.addParameterChangeWarningListener(listener);\n\t\tpgaParam.addParameterChangeWarningListener(listener);\n\t\tpgvParam.addParameterChangeWarningListener(listener);\n\n\t\t// create supported list\n\t\tsupportedIMParams.clear();\n\t\tsupportedIMParams.addParameter(saParam);\n\t\tsupportedIMParams.addParameter(pgaParam);\n\t\tsupportedIMParams.addParameter(pgvParam);\n\t\tsupportedIMParams.addParameter(mmiParam);\n\n\t}", "public static void initialize(int[][] grid, int defaultValue) {\n if (grid == null) {\n return;\n }\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[i].length; j++) {\n grid[i][j] = defaultValue;\n }\n }\n }", "Quantity initQuantity(Quantity iQuantity)\n {\n iQuantity.updateElementValue(\"Quantity\");\n return iQuantity;\n }", "public Matrix4f SetMatrixToIdentityAndGet() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t\n\tthis :\n\t The self matrix set to identity\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n\t\n\treturn this;\n \n }", "@Override\n public void convertToDefaultValueOps() {\n\n }", "private void resetMatrix() {\n mSuppMatrix.reset();\n setImageViewMatrix(getDrawMatrix());\n checkMatrixBounds();\n }", "public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}", "public void setToIdentity() {\r\n\t\tthis.set(new AffineTransform3D());\r\n\t}", "public void setTableToDefault() {\n TableColumnModel tcm = table.getColumnModel();\n\n for (int i = 0; i < msbQTM.getColumnCount(); i++) {\n tcm.getColumn(i).setPreferredWidth(-1);\n }\n\n table.setColumnModel(tcm);\n }", "public Matrix3f() {\n\t\n \tthis.setZero();\n }", "public void initDefaultValues() {\n }", "public void SetDefaultParams() {\n OCCwrapJavaJNI.BRepAlgo_NormalProjection_SetDefaultParams(swigCPtr, this);\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public void setQuantum(int v) {\n this.quantum = v;\n }", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public PCA(){\n super.trunc = 4;\n }", "private void setXscale() {\n\t}", "public void initialize(VectorSet orig) {\n\t\t\n\t}", "public void setMatrixForItem(int n, float[] matrix) {\n mController.setMatrixForItem(n, matrix);\n }", "public void setImag(double imag) {this.imag = imag;}", "public void setToDefault();", "private static void setImageViewScaleTypeMatrix(ImageView imageView) {\n /**\n * PhotoView sets it's own ScaleType to Matrix, then diverts all calls\n * setScaleType to this.setScaleType automatically.\n */\n if (null != imageView && !(imageView instanceof IPhotoView)) {\n if (!ScaleType.MATRIX.equals(imageView.getScaleType())) {\n imageView.setScaleType(ScaleType.MATRIX);\n }\n }\n }", "public void setIm(double im) {\r\n this.im = im;\r\n }", "public Matrix xMatrix(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeans.times(1.0/Math.sqrt(denom));\n return mat;\n }", "private int[][] initialStateMatrix() {\n return new int[][]{{2,1,-1,3,0,-1},\n {2,-1,-1,3,-1,-1},\n {2,-1,5,4,8,-1},\n {4,-1,-1,-1,-1,-1},\n {4,-1,5,-1,8,-1},\n {7,6,-1,-1,-1,-1},\n {7,-1,-1,-1,-1,-1},\n {7,-1,-1,-1,8,-1},\n {-1,-1,-1,-1,8,-1}};\n }", "public HPFModel(RealMatrix umat, RealMatrix imat,\n KeyIndex uidx, KeyIndex iidx) {\n super(umat, imat, uidx, iidx);\n }", "@Override\n\tprotected void initDefaultCommand() {\n\t\tfor(int i=0; i<10; i++){\n\t\t\tlimSwitches[i]= new DigitalInput(i);\n\t\t}\n\t\t\n\t\tlowerLeft.setInverted(true);\n\t\tintakeMotor.setInverted(true);\n\t\t\n\t}", "protected CategoricalMatrixImpl(Document document) {\r\n\t\tsuper(document,\"Standard\");\r\n\t}", "public void useCovarianceMatrix(){\n this.covRhoOption = true;\n }", "protected void calibrateMetaModel(final int currentParamNo) {\r\n\t\tCalcfc optimization=new Calcfc() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic double compute(int m, int n, double[] x, double[] constrains) {\r\n\t\t\t\tdouble objective=0;\r\n\t\t\t\tMetaModelParams=x;\r\n\t\t\t\tfor(int i:params.keySet()) {\r\n\t\t\t\t\tobjective+=Math.pow(calcMetaModel(0, params.get(i))-simData.get(i),2)*calcEuclDistanceBasedWeight(params, i,currentParamNo);\r\n\t\t\t\t}\r\n\t\t\t\treturn objective;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t};\r\n\t\tdouble[] x=new double[this.noOfMetaModelParams]; \r\n\t\tfor(int i=0;i<this.noOfMetaModelParams;i++) {\r\n\t\t\tx[i]=0;\r\n\t\t}\r\n\t CobylaExitStatus result = Cobyla.findMinimum(optimization, this.noOfMetaModelParams, 0, x,0.5,Math.pow(10, -6) ,3, 1500);\r\n\t this.MetaModelParams=x;\r\n\t}", "public AgileSet(double initialCurrentSize) {\n currentSize = initialCurrentSize;\n }", "public Matrix getInversematrixS()\n {\n // Build alpha * I\n double [][] alphainvmatrix;\n alphainvmatrix = new double[x + 1][x + 1];\n for(int i = 0; i < x + 1; i++)\n {\n alphainvmatrix[i][i] = alpha;\n\n }\n Matrix alphamatrixnew = new Matrix(alphainvmatrix);\n\n // calculate summation\n Matrix sum = new Matrix(x + 1, 1);\n int i = 1;\n while (i <= arraylistofprices.size() - 1) {\n phimatrix(i);\n\n sum.plusEquals(phi);\n\n i++;\n }\n Matrix summation = sum.times(phiT);\n summation.timesEquals(beta); \n\n // alpha * I + beta * sum\n Matrix sInv = alphamatrixnew.plus(summation);\n return sInv;\n }", "public void setIzq(int izq) {\r\n\t\tthis.izq = izq;\r\n\t}", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "private void inititalzeAnimalMatrixCounter() {\r\n\t\tCounterProperties cp = new CounterProperties();\r\n\t\tcp.set(AnimationPropertiesKeys.FILLED_PROPERTY, true);\r\n\t\tcp.set(AnimationPropertiesKeys.FILL_PROPERTY, Color.BLUE);\r\n\t\tcounter = lang.newCounter(mainMatrix);\r\n\t\tlang.newCounterView(counter, new Offset(200, 0, \"header\", AnimalScript.DIRECTION_NW), cp, true, true);\r\n\t}", "public A151843(final int... inits) {\n mInits = inits;\n mFaj0 = mInits[3];\n mFaj1 = mInits[4];\n }", "public void updateIM() {\n\t\tScalarIMR imr = imrGuiBean.getSelectedIMR_Instance();\n//\t\timtGuiBean.setIM(imr,imr.getSupportedIntensityMeasuresIterator()) ;\n\t}", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }", "private void setStartValues() {\n startValues = new float[9];\n mStartMatrix = new Matrix(getImageMatrix());\n mStartMatrix.getValues(startValues);\n calculatedMinScale = minScale * startValues[Matrix.MSCALE_X];\n calculatedMaxScale = maxScale * startValues[Matrix.MSCALE_X];\n }", "protected void init() {\n \t\r\n ratios.put(1, 32.0f);\r\n ratios.put(2, 16.0f);\r\n ratios.put(3, 8.0f);\r\n ratios.put(4, 4.0f);\r\n ratios.put(5, 2.0f);\r\n ratios.put(6, 1.0f);\r\n }", "protected void init(int nbColumns, int nbRows, T defaultValue) {\n\t\tsetNbColumns(nbColumns);\n\t\tsetNbRows(nbRows);\n\t\t\n\t\tmatrix = new ArrayList<>(nbColumns);\n\t\t\n\t\tfor (int i = 0; i < nbColumns; i++)\n\t\t{\n\t\t\tmatrix.add(new ArrayList<>(nbRows));\n\t\t\tfor (int j = 0; j < nbRows; j++)\n\t\t\t{\n\t\t\t\tmatrix.get(i).add(defaultValue);\n\t\t\t\tlistener.OnCellChanged(i, j, defaultValue);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }", "private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\n }", "private void setObjective() throws IloException{\n\n IloLinearNumExpr expr = this.cplex.linearNumExpr();\n int i = 0;\n for(IloNumVar xi : x){\n expr.addTerm(xi, this.c[i]);\n i++;\n }\n this.objective = this.cplex.addMinimize(expr);\n }", "public Matrix33() {\r\n // empty\r\n }", "public void useCorrelationMatrix(){\n this.covRhoOption = false;\n }", "public final void setIdentity() {\n m00 = 1f;\n m11 = 1f;\n m22 = 1f;\n m33 = 1f;\n\n m01 = 0f;\n m02 = 0f;\n m03 = 0f;\n m10 = 0f;\n m12 = 0f;\n m13 = 0f;\n m20 = 0f;\n m21 = 0f;\n m23 = 0f;\n m30 = 0f;\n m31 = 0f;\n m32 = 0f;\n }", "public autorisationCollabInterditeHolder(autorisation.AutorisationPackage.autorisationCollabInterdite initial)\n {\n value = initial;\n }", "public Matrix xMatrixTranspose(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeansTranspose.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public QRDecompositionAdapter(MatrixAdapter matrix)\n\t{\n\t\tsuper(matrix);\n\t}", "protected void setToDefault(){\n\n\t}", "public void setDefaultParameters() {\n\t\toptions = 0;\n\t\toutBits = null;\n\t\ttext = new byte[0];\n\t\tyHeight = 3;\n\t\taspectRatio = 0.5f;\n\t}", "public void setEqualizer(float[] equalizer) {\n \t\tSystem.arraycopy(equalizer, 0, this.equalizer , 0, 32);\n \t}", "private void setMultipliersArraySize(int i) {\r\n\t\tp_multiplier_name = new String[i];\r\n\t\tp_multiplier_value = new Double[i];\r\n\t\tp_multiplier_description = new String[i];\r\n\t}", "public void setMatrix(ArrayList<double[]> m, int _rows, int _cols) {\n rows = _rows;\n cols = _cols;\n matrix = m;\n }", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "MatrixElement(int edgesQuantity) {\r\n\t\tthis.edgesQuantity = edgesQuantity;\r\n\t}", "private void setDefaultMode(GlobalState gs) {\n center = gs.cnt;\n double diagonal = gs.vDist * cos(gs.phi);\n double z = sin(gs.phi) * gs.vDist;\n double x = diagonal * cos(gs.theta);\n double y = diagonal * sin(gs.theta);\n \n eye = new Vector(x, y, z);\n \n }", "public void initQTable() {\r\n\t\tString bound = \"\";\r\n\t\tint edge=(int) Math.sqrt(QLearningPara.DIM_MAP);\r\n\t\t\r\n\t\tfor(int i=0;i<QLearningPara.DIM_MAP;i++){\r\n\t\t\tfor(int j=0;j<4.;j++) {\r\n\t\t\t\tbound = String.valueOf(i);\r\n\t\t\t\tif(i%edge == 0 || i==0)\r\n\t\t\t\t\tqTable[i][2]=-900;//block moovLeft when we are on the left side\r\n\t\t\t\tif(i<edge)\r\n\t\t\t\t\tqTable[i][0]=-900; //block moovUp when we are on the top line\r\n\t\t\t\tif(i>=90) \r\n\t\t\t\t\tqTable[i][1]=-900; //block moovDown when we are on the lowest line\t\r\n\t\t\t\tif (i>=edge-1) { \r\n\t\t\t\t\tif (i == edge-1)\r\n\t\t\t\t\t\tqTable[i][3]=-900; // block moovRight when we are on the right side of the first line\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if(bound.substring(1).equals(\"9\"))\r\n\t\t\t\t\t\tqTable[i][3]=-900; //block moovRight when we are on the right side of the other lines\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\tqTable[i][j]=0; //default value\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void initMatrixCursor() {\n // if (mMatrixCursor != null) mMatrixCursor.close();\n mMatrixCursor = new MatrixCursor(BIND_PROJECTION, LIST_CAPACITY);\n mMatrixCursor.addRow(new String[] {\n \"1\", getResources().getString(R.string.voicemail), \"\", \"\", \"\", \"\"\n });\n mQueryTimes = SPEED_DIAL_MIN;\n }", "static private double[][] initMatrix(double[][] c) {\n final int N = c.length;\n final double value = 1 / Math.sqrt(2.0);\n\n for (int i = 1; i < N; i++) {\n for (int j = 1; j < N; j++) {\n c[i][j] = 1;\n }\n }\n\n for (int i = 0; i < N; i++) {\n c[i][0] = value;\n c[0][i] = value;\n }\n c[0][0] = 0.5;\n return c;\n }", "public void InitScaling() {\n\tc2.InitScaling();\n\tc3.InitScaling();\n\tc1.InitScaling();\n\tc3.CalcPrev();\n\tc3.UpdateAllNoCoord();\n }" ]
[ "0.78731793", "0.55062854", "0.5404718", "0.53340966", "0.53306997", "0.52908856", "0.52744013", "0.52253246", "0.51974607", "0.51877445", "0.51803344", "0.5105055", "0.5103904", "0.5083465", "0.5079648", "0.5050295", "0.49509412", "0.49166682", "0.48565954", "0.4847656", "0.48408863", "0.4821456", "0.48134193", "0.48004752", "0.47910386", "0.4774711", "0.47743565", "0.4762704", "0.4754302", "0.4751338", "0.47414884", "0.47222173", "0.47214264", "0.47198072", "0.47176778", "0.46633965", "0.46545425", "0.46398693", "0.4636693", "0.46323612", "0.46224985", "0.46190488", "0.46184877", "0.4616719", "0.4611491", "0.46067327", "0.45913422", "0.4583567", "0.45747292", "0.45699927", "0.45696396", "0.45631266", "0.45503297", "0.45454535", "0.45391545", "0.45343903", "0.45246324", "0.45244786", "0.45217094", "0.4520703", "0.45182407", "0.45143306", "0.45138168", "0.45111978", "0.45037216", "0.45028663", "0.44981474", "0.44941106", "0.44905365", "0.44896212", "0.44895124", "0.4486971", "0.44836786", "0.44804382", "0.44775692", "0.4466689", "0.44649565", "0.44470248", "0.44427806", "0.4442535", "0.44424185", "0.44332713", "0.4431015", "0.4416454", "0.44140673", "0.44035435", "0.44007543", "0.43967435", "0.43954217", "0.43954164", "0.4394268", "0.43926835", "0.43925685", "0.43917117", "0.43896523", "0.43850523", "0.43820935", "0.4377767", "0.4374235", "0.43742263" ]
0.8014084
0
Set Inter Quantize Matrix
void setInterQuantMatrix(BufferedBitStream stream) throws InterruptedException { for (int i=0;i<interQuantMatrix.length;i++) interQuantMatrix[i] = stream.getBits(8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDefaultIntraQuantMatrix()\n {\n for (int i=0;i<defaultIntraQuantMatrix.length;i++)\n intraQuantMatrix[i] = defaultIntraQuantMatrix[i];\n }", "void setDefaultInterQuantMatrix()\n {\n for (int i=0;i<interQuantMatrix.length;i++)\n interQuantMatrix[i] = 16;\n }", "void setIntraQuantMatrix(BufferedBitStream stream) throws InterruptedException\n {\n for (int i=0;i<defaultIntraQuantMatrix.length;i++)\n intraQuantMatrix[i] = stream.getBits(8);\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "private void setMToIdentity()\n\t\t{\n\t\t\tfor(rowNumber = 0; rowNumber < 4; rowNumber++)\n\t\t\t\tfor(int column = 0; column < 4; column++)\n\t\t\t\t{\n\t\t\t\t\tif(rowNumber == column)\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 0;\n\t\t\t\t}\n\t\t\ttransform = new Transform3D(mElements);\n\t\t\trowNumber = 0;\n\t\t}", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}", "public Mondrian(int numQI, int k){\n\t\tthis.numQI = numQI;\n\t\tthis.k = k;\n\t\tanoynmizedPartition = new ArrayList<double[]>();\n\t\tclusterSet = new ArrayList<ArrayList<double[]>>();\n\t}", "public void setSubMatrix(int i, int j, double[][] subMatrix){\r\n \t int k = subMatrix.length;\r\n \t int l = subMatrix[0].length;\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[i+p][j+q] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "static Matrix vectorize(Matrix input) {\n int m = input.getRowDimension();\n int n = input.getColumnDimension();\n\n Matrix result = new Matrix(m * n, 1);\n for (int p = 0; p < n; p++) {\n for (int q = 0; q < m; q++) {\n result.set(p * m + q, 0, input.get(q, p));\n }\n }\n return result;\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public Matrix getInversematrixS()\n {\n // Build alpha * I\n double [][] alphainvmatrix;\n alphainvmatrix = new double[x + 1][x + 1];\n for(int i = 0; i < x + 1; i++)\n {\n alphainvmatrix[i][i] = alpha;\n\n }\n Matrix alphamatrixnew = new Matrix(alphainvmatrix);\n\n // calculate summation\n Matrix sum = new Matrix(x + 1, 1);\n int i = 1;\n while (i <= arraylistofprices.size() - 1) {\n phimatrix(i);\n\n sum.plusEquals(phi);\n\n i++;\n }\n Matrix summation = sum.times(phiT);\n summation.timesEquals(beta); \n\n // alpha * I + beta * sum\n Matrix sInv = alphamatrixnew.plus(summation);\n return sInv;\n }", "public static Mat2 initIdentity(int size) {\n\t\tdouble[][] data = new double[size][size];\n\t\tfor(int i=0; i<size; i++) {\n\t\t\tfor(int j=0; j<size; j++) {\n\t\t\t\tdata[i][j] = 0;\n\t\t\t\tif(i==j) data[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(data);\n\t}", "MatrixElement(int edgesQuantity) {\r\n\t\tthis.edgesQuantity = edgesQuantity;\r\n\t}", "public void setMatrix(ArrayList<double[]> m, int _rows, int _cols) {\n rows = _rows;\n cols = _cols;\n matrix = m;\n }", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "public void setQuantite(int quantite) {\r\n this.quantite = quantite;\r\n }", "static void setIdentityM(float[] sm, int smOffset) {\n for (int i = 0; i < 16; i++) {\n sm[smOffset + i] = 0;\n }\n for (int i = 0; i < 16; i += 5) {\n sm[smOffset + i] = 1.0f;\n }\n }", "private void setIMUParameters(){\n BNO055IMU.Parameters parameters = getIMUParameters();\n imu.initialize(parameters);\n }", "@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n final Matrix33d m = new Matrix33d();\n m.setA(junk);\n\n m.identity();\n final double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n if (i == 0 || i == 4 || i == 8) {\n assertEquals(a[i], 1D);\n } else {\n assertEquals(a[i], 0D);\n }\n }\n }", "public void setSimplexOperation(int n,int m,RealMatrix phase,boolean isMaximization)\r\n\t{\n\t\tthis.m=m;\r\n\t\tthis.n=n;\r\n\t\tthis.isMaximization=isMaximization;\r\n\t\t// there can be some bugs dueto the Z included into matrix. If there is a bug due to the z we should change write op.\r\n\t\t//simplexTable=initMatrix;\r\n\t\tsimplexTable=phase;\r\n\t\t\r\n\t}", "private Matriks Transpose(){\r\n\t\tMatriks Mhasil = new Matriks(KolEff,BrsEff);\r\n\t\tfor(int i=0;i<BrsEff;i++){\r\n\t\t\tfor(int j=0;j<KolEff;j++){\r\n\t\t\t\tMhasil.Elmt[j][i] = this.Elmt[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Mhasil;\r\n\t}", "public void setMatrixForItem(int n, float[] matrix) {\n mController.setMatrixForItem(n, matrix);\n }", "public void sample()\n\t{\n\t\tint nd = interval.numDimensions();\n\n\t\t// the order in which mpicbg expects\n\t\tp = new double[ nd ][ (int) N ];\n\t\tq = new double[ nd ][ (int) N ];\n\n\t\tdouble[] src = new double[ nd ];\n\t\tdouble[] tgt = new double[ nd ];\n\n\t\tint i = 0;\n\t\tIntervalIterator it = new IntervalIterator( interval );\n\t\twhile ( it.hasNext() )\n\t\t{\n\t\t\tit.fwd();\n\t\t\tit.localize( src );\n\t\t\txfm.apply( src, tgt );\n\n\t\t\tfor ( int d = 0; d < nd; d++ )\n\t\t\t{\n\t\t\t\tp[ d ][ i ] = src[ d ];\n\t\t\t\tq[ d ][ i ] = tgt[ d ];\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public void mo23181a(Canvas canvas, Matrix matrix, int i) {\n }", "public final void setIdentity() {\n \t\n this.m00 = 1.0F;\n this.m01 = 0.0F;\n this.m02 = 0.0F;\n this.m10 = 0.0F;\n this.m11 = 1.0F;\n this.m12 = 0.0F;\n this.m20 = 0.0F;\n this.m21 = 0.0F;\n this.m22 = 1.0F;\n }", "@Override\n public void applyTransformToOrigin(INDArray origin,int i) {\n if(origin instanceof IComplexNumber) {\n IComplexNDArray c2 = (IComplexNDArray) origin;\n IComplexNumber transformed = apply(origin,getFromOrigin(origin,i),i);\n c2.putScalar(i,transformed);\n }\n else {\n float f = apply(origin,getFromOrigin(origin,i),i);\n origin.putScalar(i, f);\n }\n\n }", "private static Matrix makeXMat(int nDataPoints, int nTerms, Vector xV){\n Matrix matrix = new Matrix(nDataPoints, nTerms);\n for (int row = 1; row <= nDataPoints; row++){\n matrix.putValue(row,1, new BigDecimal(1.0));\n for (int col = 2; col <= nTerms; col++)\n matrix.putValue(row , col, \n matrix.getValue(row, col - 1).multiply(\n xV.getValue(row)));\n }\n return matrix;\n }", "protected void expand() {\n matrix = matrix.power(e);\n }", "public Matrix xMatrixTranspose(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeansTranspose.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public void setMatrix(Estados[][] matrix) {\n this.matrix = matrix;\n }", "@Before\n public void setUp() throws Exception {\n myM = new Matrix();\n /** matrix1 = new int[4][4];\n for (int i = 0; i < matrix1.length; i++) {\n for (int j = 0; j < matrix1[0].length; j++) {\n if( i == j) {\n matrix1[i][j] = 1;\n }\n }\n }\n matrix2 = new int[6][6];\n for (int i = 0; i < matrix2.length; i++) {\n for (int j = 0; j < matrix2[0].length; j++) {\n matrix2[i][j] = i;\n }\n }\n matrix3 = new int[3][4];\n for (int i = 0; i < matrix3.length; i++) {\n for (int j = 0; j < matrix3[0].length; j++) {\n if( i == j) {\n matrix3[i][j] = 1;\n }\n\n }\n } **/\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "protected Matrix symmetrize(Matrix lower) {\r\n Matrix upper = lower;\r\n for(int i = 0; i < upper.getRowCount(); i++) {\r\n int index = i;\r\n upper.getAndSet(i, r -> {\r\n for(int j = index + 1; j < r.length; j++) {\r\n r[j] = lower.get(j, index);\r\n }\r\n });\r\n }\r\n return upper;\r\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "public void updateIM() {\n\t\tScalarIMR imr = imrGuiBean.getSelectedIMR_Instance();\n//\t\timtGuiBean.setIM(imr,imr.getSupportedIntensityMeasuresIterator()) ;\n\t}", "private static Query newMultiDimIntSetQuery(String field, final int numDims, int... valuesIn)\n throws IOException {\n if (valuesIn.length % numDims != 0) {\n throw new IllegalArgumentException(\n \"incongruent number of values: valuesIn.length=\"\n + valuesIn.length\n + \" but numDims=\"\n + numDims);\n }\n\n // Pack all values:\n byte[][] packedValues = new byte[valuesIn.length / numDims][];\n for (int i = 0; i < packedValues.length; i++) {\n byte[] packedValue = new byte[numDims * Integer.BYTES];\n packedValues[i] = packedValue;\n for (int dim = 0; dim < numDims; dim++) {\n IntPoint.encodeDimension(valuesIn[i * numDims + dim], packedValue, dim * Integer.BYTES);\n }\n }\n\n // Sort:\n Arrays.sort(\n packedValues,\n new Comparator<byte[]>() {\n @Override\n public int compare(byte[] a, byte[] b) {\n return Arrays.compareUnsigned(a, 0, a.length, b, 0, a.length);\n }\n });\n\n final BytesRef value = new BytesRef();\n value.length = numDims * Integer.BYTES;\n\n return new PointInSetQuery(\n field,\n numDims,\n Integer.BYTES,\n new PointInSetQuery.Stream() {\n int upto;\n\n @Override\n public BytesRef next() {\n if (upto >= packedValues.length) {\n return null;\n }\n value.bytes = packedValues[upto];\n upto++;\n return value;\n }\n }) {\n @Override\n protected String toString(byte[] value) {\n assert value.length == numDims * Integer.BYTES;\n StringBuilder sb = new StringBuilder();\n for (int dim = 0; dim < numDims; dim++) {\n if (dim > 0) {\n sb.append(',');\n }\n sb.append(Integer.toString(IntPoint.decodeDimension(value, dim * Integer.BYTES)));\n }\n\n return sb.toString();\n }\n };\n }", "@Test\n public void testSetA() {\n final double expected[] = getMatrix().getA();\n final Matrix33d m = new Matrix33d();\n m.setA(Arrays.copyOf(expected, expected.length));\n for (int i = 0; i < expected.length; i++) {\n assertEquals(m.getA()[i], expected[i]);\n }\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "public void set(float[] matrix) {\n System.arraycopy(matrix, 0, this.matrix, 0, 16);\n }", "@Override\n\tpublic void setIQ(double IQ) {\n\n\t}", "public void setImageViewMatrix(Matrix matrix) {\n setImageMatrix(matrix);\n if (this.A != null) {\n RectF b2 = b(matrix);\n if (b2 != null) {\n this.A.a(b2);\n }\n }\n }", "@Override\n public Matrix dct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20 = 0, tmpm21 = 0, tmpm22 = 0, tmpm23 = 0, tmpm24 = 0, tmpm25 = 0, tmpm26 = 0, tmpm27 = 0;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n\n for (int i = 0; i < SIZE; i++) { // HT\n\n tmpm0 = in.getInt(my + i, mx + 0);\n tmpm1 = in.getInt(my + i, mx + 1);\n tmpm2 = in.getInt(my + i, mx + 2);\n tmpm3 = in.getInt(my + i, mx + 3);\n tmpm4 = in.getInt(my + i, mx + 4);\n tmpm5 = in.getInt(my + i, mx + 5);\n tmpm6 = in.getInt(my + i, mx + 6);\n tmpm7 = in.getInt(my + i, mx + 7);\n\n tmpm20 = tmpm0 + tmpm7;\n tmpm27 = tmpm0 - tmpm7;\n tmpm21 = tmpm1 + tmpm6;\n tmpm26 = tmpm1 - tmpm6;\n tmpm22 = tmpm2 + tmpm5;\n tmpm25 = tmpm2 - tmpm5;\n tmpm23 = tmpm3 + tmpm4;\n tmpm24 = tmpm3 - tmpm4;\n\n double outmyi[] = out[my + i];\n\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n tmpm4 = tmpm24;\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm7 = tmpm27;\n outmyi[mx + 0] = (tmpm0 + tmpm1) * Z4;\n outmyi[mx + 4] = (tmpm0 - tmpm1) * Z4;\n outmyi[mx + 2] = (tmpm2 * Z6) + (tmpm3 * Z2);\n outmyi[mx + 6] = (tmpm3 * Z6) - (tmpm2 * Z2);\n tmpm24 = tmpm4 + tmpm5;\n tmpm27 = tmpm7 + tmpm6;\n tmpm25 = tmpm4 - tmpm5;\n tmpm26 = tmpm7 - tmpm6;\n outmyi[mx + 1] = (tmpm24 * Z7) + (tmpm27 * Z1);\n outmyi[mx + 5] = (tmpm25 * Z3) + (tmpm26 * Z5);\n outmyi[mx + 7] = (tmpm27 * Z7) - (tmpm24 * Z1);\n outmyi[mx + 3] = (tmpm26 * Z3) - (tmpm25 * Z5);\n }\n\n for (int i = 0; i < SIZE; i++) { // VT\n tmpm20 = out[my + 0][mx + i] + out[my + 7][mx + i];\n tmpm27 = out[my + 0][mx + i] - out[my + 7][mx + i];\n tmpm21 = out[my + 1][mx + i] + out[my + 6][mx + i];\n tmpm26 = out[my + 1][mx + i] - out[my + 6][mx + i];\n tmpm22 = out[my + 2][mx + i] + out[my + 5][mx + i];\n tmpm25 = out[my + 2][mx + i] - out[my + 5][mx + i];\n tmpm23 = out[my + 3][mx + i] + out[my + 4][mx + i];\n tmpm24 = out[my + 3][mx + i] - out[my + 4][mx + i];\n\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n tmpm4 = tmpm24;\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm7 = tmpm27;\n out[my + 0][mx + i] = (tmpm0 + tmpm1) * Z4;\n out[my + 4][mx + i] = (tmpm0 - tmpm1) * Z4;\n out[my + 2][mx + i] = (tmpm2 * Z6) + (tmpm3 * Z2);\n out[my + 6][mx + i] = (tmpm3 * Z6) - (tmpm2 * Z2);\n tmpm24 = tmpm4 + tmpm5;\n tmpm27 = tmpm7 + tmpm6;\n tmpm25 = tmpm4 - tmpm5;\n tmpm26 = tmpm7 - tmpm6;\n out[my + 1][mx + i] = (tmpm24 * Z7) + (tmpm27 * Z1);\n out[my + 5][mx + i] = (tmpm25 * Z3) + (tmpm26 * Z5);\n out[my + 7][mx + i] = (tmpm27 * Z7) - (tmpm24 * Z1);\n out[my + 3][mx + i] = (tmpm26 * Z3) - (tmpm25 * Z5);\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public void setSubMatrix(int i, int j, int k, int l, double[][] subMatrix){\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[i+p][j+q] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "public void setIntensity (short[][] intensity)\r\n {\r\n\tthis.intensity = intensity;\r\n }", "public void matrizAdjunta (){\n float tablaA[][]= getMatriz();\n setMatrizAdjunta(new float[3][3]);\n getMatrizAdjunta()[0][0]=(tablaA[1][1]*tablaA[2][2]) - (tablaA[1][2]*tablaA[2][1]);\n getMatrizAdjunta()[0][1]=-((tablaA[0][1]*tablaA[2][2]) - (tablaA[0][2]*tablaA[2][1]));\n getMatrizAdjunta()[0][2]=(tablaA[0][1]*tablaA[1][2]) - (tablaA[0][2]*tablaA[1][1]);\n \n getMatrizAdjunta()[1][0]=-((tablaA[1][0]*tablaA[2][2]) - (tablaA[1][2]*tablaA[2][0]));\n getMatrizAdjunta()[1][2]=-((tablaA[0][0]*tablaA[1][2]) - (tablaA[0][2]*tablaA[1][0]));\n getMatrizAdjunta()[1][1]=(tablaA[0][0]*tablaA[2][2]) - (tablaA[0][2]*tablaA[2][0]);\n \n getMatrizAdjunta()[2][0]=(tablaA[1][0]*tablaA[2][1]) - (tablaA[1][1]*tablaA[2][0]);\n getMatrizAdjunta()[2][1]=-((tablaA[0][0]*tablaA[2][1]) - (tablaA[0][1]*tablaA[2][0]));\n getMatrizAdjunta()[2][2]=(tablaA[0][0]*tablaA[1][1]) - (tablaA[0][1]*tablaA[1][0]);\n mostrarMatriz(getMatrizAdjunta(),\"Matriz adjunta\");\n }", "protected void rebuildRateMatrix(double[][] rate, double[] parameters)\t{\n // Q matrix\n rate[0][1] = 0.610810; rate[0][2] = 0.569079;\n rate[0][3] = 0.821500; rate[0][4] = 1.141050;\n rate[0][5] = 1.011980; rate[0][6] = 1.756410;\n rate[0][7] = 1.572160; rate[0][8] = 0.354813;\n rate[0][9] = 0.219023; rate[0][10] = 0.443935;\n rate[0][11] = 1.005440; rate[0][12] = 0.989475;\n rate[0][13] = 0.233492; rate[0][14] = 1.594890;\n rate[0][15] = 3.733380; rate[0][16] = 2.349220;\n rate[0][17] = 0.125227; rate[0][18] = 0.268987;\n rate[0][19] = 2.221870;\n\n rate[1][2] = 0.711690; rate[1][3] = 0.165074;\n rate[1][4] = 0.585809; rate[1][5] = 3.360330;\n rate[1][6] = 0.488649; rate[1][7] = 0.650469;\n rate[1][8] = 2.362040; rate[1][9] = 0.206722;\n rate[1][10] = 0.551450; rate[1][11] = 5.925170;\n rate[1][12] = 0.758446; rate[1][13] = 0.116821;\n rate[1][14] = 0.753467; rate[1][15] = 1.357640;\n rate[1][16] = 0.613776; rate[1][17] = 1.294610;\n rate[1][18] = 0.423612; rate[1][19] = 0.280336;\n\n rate[2][3] = 6.013660; rate[2][4] = 0.296524;\n rate[2][5] = 1.716740; rate[2][6] = 1.056790;\n rate[2][7] = 1.253910; rate[2][8] = 4.378930;\n rate[2][9] = 0.615636; rate[2][10] = 0.147156;\n rate[2][11] = 3.334390; rate[2][12] = 0.224747;\n rate[2][13] = 0.110793; rate[2][14] = 0.217538;\n rate[2][15] = 4.394450; rate[2][16] = 2.257930;\n rate[2][17] = 0.078463; rate[2][18] = 1.208560;\n rate[2][19] = 0.221176;\n\n rate[3][4] = 0.033379; rate[3][5] = 0.691268;\n rate[3][6] = 6.833400; rate[3][7] = 0.961142;\n rate[3][8] = 1.032910; rate[3][9] = 0.043523;\n rate[3][10] = 0.093930; rate[3][11] = 0.533362;\n rate[3][12] = 0.116813; rate[3][13] = 0.052004;\n rate[3][14] = 0.472601; rate[3][15] = 1.192810;\n rate[3][16] = 0.417372; rate[3][17] = 0.146348;\n rate[3][18] = 0.363243; rate[3][19] = 0.169417;\n\n rate[4][5] = 0.109261; rate[4][6] = 0.023920;\n rate[4][7] = 0.341086; rate[4][8] = 0.275403;\n rate[4][9] = 0.189890; rate[4][10] = 0.428414;\n rate[4][11] = 0.083649; rate[4][12] = 0.437393;\n rate[4][13] = 0.441300; rate[4][14] = 0.122303;\n rate[4][15] = 1.560590; rate[4][16] = 0.570186;\n rate[4][17] = 0.795736; rate[4][18] = 0.604634;\n rate[4][19] = 1.114570;\n\n rate[5][6] = 6.048790; rate[5][7] = 0.366510;\n rate[5][8] = 4.749460; rate[5][9] = 0.131046;\n rate[5][10] = 0.964886; rate[5][11] = 4.308310;\n rate[5][12] = 1.705070; rate[5][13] = 0.110744;\n rate[5][14] = 1.036370; rate[5][15] = 1.141210;\n rate[5][16] = 0.954144; rate[5][17] = 0.243615;\n rate[5][18] = 0.252457; rate[5][19] = 0.333890;\n\n rate[6][7] = 0.630832; rate[6][8] = 0.635025;\n rate[6][9] = 0.141320; rate[6][10] = 0.172579;\n rate[6][11] = 2.867580; rate[6][12] = 0.353912;\n rate[6][13] = 0.092310; rate[6][14] = 0.755791;\n rate[6][15] = 0.782467; rate[6][16] = 0.914814;\n rate[6][17] = 0.172682; rate[6][18] = 0.217549;\n rate[6][19] = 0.655045;\n\n rate[7][8] = 0.276379; rate[7][9] = 0.034151;\n rate[7][10] = 0.068651; rate[7][11] = 0.415992;\n rate[7][12] = 0.194220; rate[7][13] = 0.055288;\n rate[7][14] = 0.273149; rate[7][15] = 1.486700;\n rate[7][16] = 0.251477; rate[7][17] = 0.374321;\n rate[7][18] = 0.114187; rate[7][19] = 0.209108;\n\n rate[8][9] = 0.152215; rate[8][10] = 0.555096;\n rate[8][11] = 0.992083; rate[8][12] = 0.450867;\n rate[8][13] = 0.756080; rate[8][14] = 0.771387;\n rate[8][15] = 0.822459; rate[8][16] = 0.525511;\n rate[8][17] = 0.289998; rate[8][18] = 4.290350;\n rate[8][19] = 0.131869;\n\n rate[9][10] = 3.517820; rate[9][11] = 0.360574;\n rate[9][12] = 4.714220; rate[9][13] = 1.177640;\n rate[9][14] = 0.111502; rate[9][15] = 0.353443;\n rate[9][16] = 1.615050; rate[9][17] = 0.234326;\n rate[9][18] = 0.468951; rate[9][19] = 8.659740;\n\n rate[10][11] = 0.287583; rate[10][12] = 5.375250;\n rate[10][13] = 2.348200; rate[10][14] = 0.462018;\n rate[10][15] = 0.382421; rate[10][16] = 0.364222;\n rate[10][17] = 0.740259; rate[10][18] = 0.443205;\n rate[10][19] = 1.997370;\n\n rate[11][12] = 1.032220; rate[11][13] = 0.098843;\n rate[11][14] = 0.619503; rate[11][15] = 1.073780;\n rate[11][16] = 1.537920; rate[11][17] = 0.152232;\n rate[11][18] = 0.147411; rate[11][19] = 0.342012;\n\n rate[12][13] = 1.320870; rate[12][14] = 0.194864;\n rate[12][15] = 0.556353; rate[12][16] = 1.681970;\n rate[12][17] = 0.570369; rate[12][18] = 0.473810;\n rate[12][19] = 2.282020;\n\n rate[13][14] = 0.179896; rate[13][15] = 0.606814;\n rate[13][16] = 0.191467; rate[13][17] = 1.699780;\n rate[13][18] = 7.154480; rate[13][19] = 0.725096;\n\n rate[14][15] = 1.786490; rate[14][16] = 0.885349;\n rate[14][17] = 0.156619; rate[14][18] = 0.239607;\n rate[14][19] = 0.351250;\n\n rate[15][16] = 4.847130; rate[15][17] = 0.578784;\n rate[15][18] = 0.872519; rate[15][19] = 0.258861;\n\n rate[16][17] = 0.126678; rate[16][18] = 0.325490;\n rate[16][19] = 1.547670;\n\n rate[17][18] = 2.763540; rate[17][19] = 0.409817;\n\n rate[18][19] = 0.347826;\n }", "Matrix(BigInteger[][] matrix) {\n this.nrOfRows = matrix.length;\n this.nrOfCols = matrix[0].length;\n this.inner = matrix;\n }", "public Matrix Q (double t, double dt, EstSTM x);", "abstract void expandVarArray(MatrixVariableI var);", "public static Matrix asin(Matrix matrix)\n {\n double[][] internal = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n double[][] M = matrix.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (M[i][j] <= 1.0d || M[i][j] >= -1.0d)\n {\n C[i][j] = Math.asin(M[i][j]);\n }\n else\n {\n C[i][j] = Double.NaN;\n }\n }\n }\n return X;\n }", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public QRDecompositionAdapter(MatrixAdapter matrix)\n\t{\n\t\tsuper(matrix);\n\t}", "private void inflate(DMatrixRMaj M){\n Equation eq = new Equation();\n eq.alias(M, \"M\", this.inflationPow, \"p\");\n\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n eq.process(\"M(i,:) = M(i,:) .^ p\");\n\n }\n\n }", "public Matrix(int[][] array){\n this.matriz = array;\n }", "@Override\n public void transform(IDoubleArray in, IDoubleArray out)\n {\n // if necessary, flatten input data\n if (in.columns() != 1)\n {\n in = doublesNew.array(in.getArray());\n }\n\n // subtract mean\n IDoubleArray x = alg.subtract(in, moments.getMean());\n \n // make a row\n if (x.rows() > 1)\n x = alg.transposeToNew(x);\n \n IDoubleArray y = alg.product(x, evecTICA);\n int d = Math.min(in.size(),out.size());\n for (int i=0; i<d; i++)\n out.set(i, y.get(i));\n }", "public Matrix xMatrix(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeans.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public void setMatrix(double[][] matrix) {\n this.matrix = matrix;\n }", "private int[] setMatrixConvo(int whatMask , int size) {\n int[] res = new int[size*size];\n\n // Prewitt\n if (whatMask == 3) {\n res[0] = -1;\n res[1] = -1;\n res[2] = -1;\n res[6] = 1;\n res[7] = 1;\n res[8] = 1;\n }\n\n // Gaussian\n else if (whatMask == 2) {\n int aoe = (size - 1)/2;\n for (int maskLine = 0; maskLine < size; maskLine++) {\n for (int n = 0; n < size; n++) {\n res[maskLine + size * n] = (int) gauss((Math.abs(aoe-maskLine)+Math.abs(aoe-n))/(size*size), size);\n }\n }\n }\n\n //Prewitt\n else if (whatMask == 0) {\n res[0] = -1;\n res[2] = 1;\n res[3] = -1;\n res[5] = 1;\n res[6] = -1;\n res[8] = 1;\n }\n\n //Blur by average\n else if (whatMask == 1) {\n for (int i = 0; i < size*size; i++){\n res[i] = 1;\n }\n }\n\n // Sharpening contours\n else if (whatMask == 4) {\n res[1] = -1;\n res[3] = -1;\n res[4] = 5;\n res[5] = -1;\n res[7] = -1;\n }\n return res;\n }", "@Test\n @DependsOnMethod(\"testDimensionReduction\")\n public void testDimensionAugmentation() throws TransformException {\n transform = new ProjectiveTransform(Matrices.create(4, 3, new double[] {\n 0, 1, 0,\n 1, 0, 0,\n 0, 0, 0,\n 0, 0, 1}));\n\n assertInstanceOf(\"inverse\", CopyTransform.class, transform.inverse());\n verifyTransform(new double[] {2,3, 6,0, 2, Double.NaN},\n new double[] {3,2,0, 0,6,0, Double.NaN, 2, 0});\n }", "private void resetMatrix() {\n mSuppMatrix.reset();\n setImageViewMatrix(getDrawMatrix());\n checkMatrixBounds();\n }", "public void setToInt(int arg0, int arg1, double arg2) {\n\t\tmat_[arg0][arg1] = arg2;\n\t}", "public void adaptProductVector() {\t\t\r\n\t\tHashMap<Integer, Integer> neighboursAdaption = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tdouble threshold = Parameters.adaptationThreshold / 100.0;\r\n\t\tint neighbours = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\tneighboursAdaption.put(i, 0);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Object o: network.getAdjacent(this)) {\t\t\r\n\t\t\tif (o instanceof Customer) {\r\n\t\t\t\tCustomer c = (Customer)o;\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\t\t\tint count = neighboursAdaption.get(i);\r\n\t\t\t\t\tif (c.getDemandVector()[i] == 1) {\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tneighboursAdaption.put(i, count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tneighbours++;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\tif ((double)neighboursAdaption.get(i) / neighbours >= threshold ) {\r\n\t\t\t\tdemandVector[i] = 1;\r\n\t\t\t}\r\n\t\t}\t\t \r\n\t}", "public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}", "public Matriz( int lin, int col )\n {\n if(lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Quantidade invalida. \" );\n } //end\n else\n {\n table = new Object[lin][col];\n } //end se\n }", "private void setObjective() throws IloException{\n\n IloLinearNumExpr expr = this.cplex.linearNumExpr();\n int i = 0;\n for(IloNumVar xi : x){\n expr.addTerm(xi, this.c[i]);\n i++;\n }\n this.objective = this.cplex.addMinimize(expr);\n }", "private void convoluteMatrix(){\n\t\tDoubleFFT_2D fft = new DoubleFFT_2D(CELL_SIDE_COUNT,CELL_SIDE_COUNT);\n\t\tdouble[][] convolutedDoubles = Complex.complexToDoubleArray2D(convolutedMatrix);\n\t\tfft.complexForward(convolutedDoubles);\n\t\tconvolutedMatrix = Complex.doubleToComplexArray2D(convolutedDoubles); //F(B C F^-1(Q)) Pg. 182 Lee[05]\n\t}", "public Matrix4f SetMatrixToIdentityAndGet() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t\n\tthis :\n\t The self matrix set to identity\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n\t\n\treturn this;\n \n }", "public Matrix(int[][] array)\n {\n matrix = array;\n }", "MatrixParameter createMatrixParameter();", "public void setQuantum(int v) {\n this.quantum = v;\n }", "public double[][] getIdentityMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = 1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}", "@Override\n\tpublic void setRow(int i, IDoubleVector setToMe) throws OutOfBoundsException {\n\n\t}", "void IFFT(COMPLEX []xin,int N)\n {\n int LH,m,i,j,l,le,B,ip,w_index;\n COMPLEX t1 = new COMPLEX(), t2 = new COMPLEX();\n\n if ( !InitW( N ) ) return;\n\n l=N;\n m=0;\n while (l == 0)\n {\n \tl>>=1;\n m++;\n }\n \t\n\n for (l=m;l>=1;l--)\n {\n le = (int)(1<<l);\n B = (le>>1);\n for (j=0;j<=B-1;j++)\n {\n w_index = (1<<(m-l))*j;\n for (i=j;i<=N-1;i=i+le)\n {\n ip=i+B;\n t1.real=(xin[i].real+xin[ip].real);\n t1.image=(xin[i].image+xin[ip].image);\n t2.real=(xin[i].real-xin[ip].real);\n t2.image=(xin[i].image-xin[ip].image);\n xin[ip].real=t2.real*W_FFT[w_index].real+t2.image*W_FFT[w_index].image;\n xin[ip].image=t2.image*W_FFT[w_index].real-t2.real*W_FFT[w_index].image;\n xin[i]=t1;\n }\n }\n }\n\n /* output reverse */\n for (LH=j=N>>1, i=1, m=N-2; i<=m; i++)\n {\n if (i<j){t1=xin[j]; xin[j]=xin[i]; xin[i]=t1;}\n l=LH;\n while (j>=l){j-=l; l>>=1;}\n j+=l;\n }\n\n /* scale output */\n for (i=0; i<N; i++)\n {\n \n //Log.i(TAG, \"IFFT: \" + i + \",\" + Double.toString(xin[i].real) + \",\" + Double.toString(xin[i].image)); \n \t\n xin[i].real/=N;\n xin[i].image/=N;\n }\n }", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "public interface IMatrixMultiplicator {\n\n\t/**\n\t * Multiplies two matrixes and returns the result in a new matrix \n\t * \n\t * @param matrixA first matrix\n\t * @param matrixB second matrix \n\t * @return result of the multiplication\n\t */\n\tpublic long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);\n\t \n\t\n}", "public Matriks(double[][] Elmt){\r\n\t\tBrsEff = Elmt.length;\r\n\t\tKolEff = Elmt[0].length;\r\n\t\tthis.Elmt = new double[BrsEff][KolEff];\r\n\t\tfor(int i=0;i<BrsEff;i++){\r\n\t\t\tfor(int j=0;j<KolEff;j++){\r\n\t\t\t\tthis.Elmt[i][j] = Elmt[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Matrix3D(double[] d1) {\n super(3,3);\n int k = -1;\n for (int i=0 ; i<3 ; i++) { // loop over rows\n for (int j=0 ; j<3 ; j++) { // loop over columns\n k++;\n set(i,j,d1[k]); // d[i][j] = d1[k];\n }\n }\n }", "public double[] Interpolasi(Matriks input, int n, double x){\r\n\t\tdouble[] result = new double[n+2]; // Menyimpan koefisien polinom hasil interpolasi polinom dan hasil taksiran pada indeks terakhir\r\n\t\tMatriks M = new Matriks(n+1, n+2);\r\n\t\tint l = 0;\r\n\t\tint m = 0;\r\n\r\n\t\t// Mengubah masukan menjadi matriks augmented\r\n\t\tfor(int i=0; i<n+1; i++){\r\n\t\t\tfor(int j=0; j<n+2; j++){\r\n\t\t\t\tif(j==n+1){\r\n\t\t\t\t\tM.Elmt[i][j] = input.Elmt[l++][1];\r\n\t\t\t\t} else if(j==0){\r\n\t\t\t\t\tM.Elmt[i][j] = 1;\r\n\t\t\t\t} else{\r\n\t\t\t\t\tM.Elmt[i][j] = 1;\r\n\t\t\t\t\tfor(int k=0; k<j; k++){\r\n\t\t\t\t\t\tM.Elmt[i][j] *= input.Elmt[m][0];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm++;\r\n\t }\r\n\t\t\r\n\t\tdouble[] polinom = Matriks.Gauss(M);\r\n\r\n\t\tdouble taksiran = polinom[0];\r\n\r\n\t\t// Menghitung nilai taksiran dari hasil interpolasi polinom\r\n\t\tfor(int i=1; i<n+1; i++){\r\n\t\t\tdouble temp = x;\r\n\t\t\tfor(int j=1; j<i; j++){\r\n\t\t\t\ttemp *= x;\r\n\t\t\t}\r\n\t\t\ttaksiran += polinom[i] * temp;\r\n\t\t}\r\n\r\n\t\tfor(int i=0; i<n+1; i++){\r\n\t\t\tresult[i] = polinom[i];\r\n\t\t}\r\n\t\tresult[n+1] = taksiran;\r\n\t\treturn result;\r\n\t}", "public interface IMatrix {\n\n /**\n * Set coefficient\n * @param y row (0..height-1)\n * @param x column (0..width-1)\n * @param v value\n */\n public void set(int y, int x, double v);\n /**\n * Get coefficient from matrix, by returning coeff[y*width + x].\n * @param y row (0..height-1)\n * @param x column (0..width-1)\n * @return coefficient\n */\n public double get(int y, int x);\n\n /**\n * Clear matrix to zeros\n */\n public void clear();\n\n /**\n * Get array of coefficients.\n * They are indexed by [y*height + x].\n * Not all classes support this method.\n * @return array of coefficients\n */\n public double[] coeff();\n\n /**\n * Get width of matrix\n * @return width\n */\n public int width();\n\n /**\n * Get height of matrix\n * @return height\n */\n public int height();\n}", "static void productoEscalarMatriz() {\r\n\r\n System.out.println(\"PRODUCTO ESCALAR X MATRIZ \\n\");\r\n setup(false);\r\n String valor = inputDialog(\"Inserte un escalar\", \"Escalar\", JOptionPane.INFORMATION_MESSAGE);\r\n int escalar = Integer.parseInt(valor);\r\n matrizA.productoEscalarMatriz(escalar);\r\n messageDialog(\"La matriz resultante al multiplicar por el escalar \" + escalar + \", es: \\n\" + matrizA.datosMatrizNumeros(), \"Producto escalar\", 3);\r\n\r\n }", "public void setImageViewMatrix(Matrix matrix) {\n ImageView imageView = getImageView();\n if (imageView != null) {\n checkImageViewScaleType();\n imageView.setImageMatrix(matrix);\n if (this.mMatrixChangeListener != null) {\n RectF displayRect = getDisplayRect(matrix);\n if (displayRect != null) {\n this.mMatrixChangeListener.onMatrixChanged(displayRect);\n }\n }\n }\n }", "public void setIm(double im) {\r\n this.im = im;\r\n }", "public void setImag(double imag) {this.imag = imag;}", "public void setScale(ExpressionData md, int col)\n\t{\n\t\tswitch(SCALE_MODE)\n\t\t\t{\n\t\t\tcase SCALE_MATRIX:\n\t\t\t//\tSystem.out.println(\"Changing scale to mode MATRIX\");\n\t\t\t\tminExp=md.min;\n\t\t\t\tmaxExp=md.max;\n\t\t\t\tavgExp=md.average;\n\t\t\t\tmedianExp=md.median;\n\t\t\t\tbreak;\n\t\t\tcase SCALE_CONDITION:\n\t\t\t//\tSystem.out.println(\"Changing scale to mode CONDITION\");\n\t\t\t\tminExp=md.minCols[col];\n\t\t\t\tmaxExp=md.maxCols[col];\n\t\t\t\tavgExp=md.averageCols[col];\n\t\t\t\tmedianExp=md.medianCols[col];\n\t\t\t\tbreak;\n\t\t\tcase SCALE_ONTOLOGY:\n\t\t\t\t//System.out.println(\"Changing scale to mode ONTOLOGY\");\n\t\t\t\tminExp=1000000000;\n\t\t\t\tmaxExp=-1000000000;\n\t\t\t\tavgExp=0;\n\t\t\t\tcontAvgExp=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t//System.out.println(\"Mapping expression for \"+md.getColumnLabel(col)+\" in scale mode \"+SCALE_MODE);\n\t\t\n\t\t\n\t\tif(SCALE_MODE==SCALE_ONTOLOGY)\n\t\t\tavgExp/=contAvgExp;\n\t\t}", "public void setIzq(int izq) {\r\n\t\tthis.izq = izq;\r\n\t}", "public long[][] smultiply(int i){\n\t\tint sl = this.mat.length; //jumps to method sideLength to obtain the side length n of the matrix A\n\t\t//the global record contains an array of columns, where each column is an array of row elements. i.e.\n\t\t//the record contains the transpose of matrix A, where every row in the record is a column in A\n\t\t//a temporary 2D array tempMatA, and is made equal to the transpose of A\n\t\tlong[][] tempMatA = transpose(this.mat);\n\t\tlong[][] tempMat2 = new long[sl][sl]; //creates a temporary 2D matrix of the same size as tempMatA\n\t\tlong[][] outMat = new long[sl][sl];\n\t\t\n\t\tif (i > 1){\n\t\t\t//see for loop explanation in class \"Matrix3x3flat\"+\n\t\t\tfor (int j = 1; j < i; j ++){ //loops until j == input variable i.\n\t\t\t\t//j == 1 because matrix multiplication will occur on the first loop, so if i == 2, tempMat2 == A^3, not A^2\n\t\t\t\tfor (int a = 0; a < 3; a++){ //loops until a == side length of A\n\t\t\t\t\tfor (int b = 0; b < 3; b++){ //loops until b == side length of A\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++){ //loops until c == side length of A\n\t\t\t\t\t\t\ttempMat2[a][b] = tempMat2[a][b] + (tempMatA[a][c] * tempMatA[c][b]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//returns tempMat2 as output matrix\n\t\t\toutMat = copy(tempMat2, outMat);\n\t\t}\n\t\t//returns A as output matrix, since A^1 = A\n\t\telse if (i == 1){\n\t\t\toutMat = copy(tempMatA, outMat);\n\t\t}\n\t\t//returns a 3x3 matrix filled with ones if i == 0\n\t\t//A^0 = 1\n\t\telse if (i == 0){\n\t\t\tfor (int m = 0; m < 3; m++){\n\t\t\t\tfor (int n = 0; n < 3; n++){\n\t\t\t\t\tif (m == n){\n\t\t\t\t\t\toutMat[m][n] = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\toutMat[m][n] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//return matrix must be re-transposed to return a the proper format of 2D array for the global array\n\t\toutMat = transpose(outMat);\n\t\treturn outMat;\n\t}", "public static Matrix Identity(int n) {\n List<List<Double>> backingArray = get2DListOfSize(n);\n for(int i = 0; i < n; i++)\n backingArray.get(i).set(i, 1d);\n return new Matrix(backingArray);\n }", "private void setStartValues() {\n startValues = new float[9];\n mStartMatrix = new Matrix(getImageMatrix());\n mStartMatrix.getValues(startValues);\n calculatedMinScale = minScale * startValues[Matrix.MSCALE_X];\n calculatedMaxScale = maxScale * startValues[Matrix.MSCALE_X];\n }", "protected void initQMark() {\n\t\tINF = calcMaxCapPlus1();\n\t\tmarkVertice(srcId, new Tuple4(NULL_DIRECTION, NO_PRED, INF, false));\n\t}", "private void setMultipliersArraySize(int i) {\r\n\t\tp_multiplier_name = new String[i];\r\n\t\tp_multiplier_value = new Double[i];\r\n\t\tp_multiplier_description = new String[i];\r\n\t}", "public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }", "public Accelerate(double[] in, long _time) {\n\t\tacc = new Vector3D(in);\n\t\ttime.setTime(_time);\n\t}", "public void set(double[] ad);", "public void setPrices(int[][] prices) {\n for (int i = 0, n = 4; i < n; i++) {\n for (int j = 0, m = 4; j < m; j++) {\n\tthis.prices[i][j] = prices[i][j];\n }\n }\n }", "public void setArray(int i, Array x);", "public void set(int x, int y, int elem){\n matriz[x][y] = elem;\n }" ]
[ "0.6615782", "0.66129744", "0.62921387", "0.558368", "0.5518877", "0.53708935", "0.52342325", "0.52259666", "0.51316094", "0.512504", "0.5112171", "0.50711775", "0.5057484", "0.50503886", "0.50106907", "0.49963376", "0.4971023", "0.496672", "0.49657324", "0.49458152", "0.49416572", "0.49388164", "0.4929698", "0.4906682", "0.48953095", "0.48933882", "0.48901147", "0.48815203", "0.4871063", "0.48611322", "0.48609", "0.48531356", "0.48324528", "0.48035353", "0.48004127", "0.4799062", "0.47802725", "0.4771041", "0.47510502", "0.47463635", "0.47459605", "0.4729801", "0.4722034", "0.47195506", "0.47139907", "0.47113264", "0.47085795", "0.47070086", "0.46952143", "0.46676907", "0.46630093", "0.4650904", "0.46458516", "0.46344072", "0.4631829", "0.46284974", "0.46177453", "0.46124974", "0.46103036", "0.46038586", "0.4600914", "0.4597504", "0.45961416", "0.4586624", "0.45812523", "0.45806724", "0.45719457", "0.4559467", "0.45592216", "0.45573735", "0.45550656", "0.45524913", "0.45498222", "0.4545835", "0.45424795", "0.45383435", "0.45307052", "0.4527939", "0.4520377", "0.45100674", "0.45067614", "0.45059294", "0.45053515", "0.4501239", "0.44983727", "0.44978973", "0.44968677", "0.44903827", "0.44899023", "0.4483593", "0.4482757", "0.447406", "0.44733903", "0.44726878", "0.4470333", "0.4466479", "0.44637886", "0.44595343", "0.44591373", "0.44510844" ]
0.6289649
3
Set the Picture type
void setPictureType ( int code ) { pictureType = code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPicType(Integer picType) {\n this.picType = picType;\n }", "public void changePicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(type == \"generic\") {\n //add the new picture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"picture\"){\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n }", "public abstract void setImageFormat(String format);", "public void setTypePhoto(String typePhoto) {\r\n this.typePhoto = typePhoto;\r\n }", "void setFormat(ImageFormat format);", "protected void setPic() {\n }", "public void setType(int choice) {\r\n\r\n\t\tswitch(choice) {\r\n\t\tcase 0:\r\n\t\t\tif((int)(Math.random()*10)>=5) {\r\n\t\t\t\ttype = 2;\r\n\t\t\t}else {\r\n\t\t\t\ttype = 1;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1: type = 1;\r\n\t\t\tbreak;\r\n\t\tcase 2: type = 2;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\r\n\t\ttry {\r\n\t\t\tif(type == 1) {\r\n\t\t\t\timg = ImageIO.read(getClass().getClassLoader().getResource(\"ReinforceTp1.PNG\"));\r\n\t\t\t}else if(type ==2) {\r\n\t\t\t\timg = ImageIO.read(getClass().getClassLoader().getResource(\"ReinforceTp2.PNG\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.img = img.getScaledInstance(img.getWidth(null)/scaleFactor, img.getHeight(null)/scaleFactor, Image.SCALE_SMOOTH);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"image of Reinforce is missing\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Integer getPicType() {\n return picType;\n }", "private int getPictureType()\n {\n return pictureType;\n }", "private void setImage(ActorType type) {\n switch (type) {\n case TREE: image = new Image(\"src/res/images/tree.png\"); break;\n case GOLDENTREE: image = new Image(\"src/res/images/gold-tree.png\"); break;\n case STOCKPILE: image = new Image(\"src/res/images/cherries.png\"); break;\n case HOARD: image = new Image(\"src/res/images/hoard.png\"); break;\n case PAD: image = new Image(\"src/res/images/pad.png\"); break;\n case FENCE: image = new Image(\"src/res/images/fence.png\"); break;\n case SIGNUP: image = new Image(\"src/res/images/up.png\"); break;\n case SIGNDOWN: image = new Image(\"src/res/images/down.png\"); break;\n case SIGNLEFT: image = new Image(\"src/res/images/left.png\"); break;\n case SIGNRIGHT: image = new Image(\"src/res/images/right.png\"); break;\n case POOL: image = new Image(\"src/res/images/pool.png\"); break;\n case GATHERER: image = new Image(\"src/res/images/gatherer.png\"); break;\n case THIEF: image = new Image(\"src/res/images/thief.png\"); break;\n default: System.err.println(\"error: no preset image for this actor type: \"+type.toString());\n }\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "public void setFileType(FileType typ) {\n fileType = typ;\n }", "public void setPictureFormat(int pixel_format) {\n String s = cameraFormatForPixelFormat(pixel_format);\n if (s == null) {\n throw new IllegalArgumentException();\n }\n\n set(\"picture-format\", s);\n }", "public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"picture\") {\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }\n }", "public void setImageTypeID(int value) {\r\n this.imageTypeID = value;\r\n }", "void setType(Type type)\n {\n this.type = type;\n }", "void setType(java.lang.String type);", "void setImage(String image);", "public void setFileType(TFileType type) {\n\n\t\tthis.type = type;\n\t}", "public void setProfilePicture(BufferedImage newPicture)\n {\n\n picture = newPicture;\n }", "private void setScanType(ImageView.ScaleType scanType) {\n if (mImageView != null) {\n mImageView.setScaleType(scanType);\n }\n }", "void lSetImage(Image img);", "@Override\n\tpublic void setPaintType(int type) {\n\t\tthis.shapeType = type;\n\t}", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "public void setPicture(String picture) {\n this.picture = picture;\n }", "public void setType(Type t) {\n type = t;\n }", "public String getTypePhoto() {\r\n return typePhoto;\r\n }", "ImageType getType();", "public abstract void setType();", "private void setMediaAssetScaleTypeValue(int value) {\n mediaAssetScaleType_ = value;\n }", "final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }", "public void setType(ShapeType ty) {\n\t\t\ttype.set(ty);\n\t\t}", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "@Override\n\tpublic int getImageType() {\n\t\treturn imageType;\n\t}", "public void setStaticPicture(String path);", "void setType(String type) {\n this.type = type;\n }", "private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }", "public void setMediaType(java.lang.String mediaType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MEDIATYPE$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MEDIATYPE$18);\n }\n target.setStringValue(mediaType);\n }\n }", "public final native void setType(String type) /*-{\n this.setType(type);\n }-*/;", "public void setMediaType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}", "public void setType(Type t) {\n\t\ttype = t;\n\t}", "public void setType(String type) {\n if (this.type == null)\n this.type = type;\n else throw new IllegalStateException(\"Chip already has a type.\");\n }", "void setClassType(String classType);", "private void setPhotoAttcher() {\n\n }", "public void setType(URI type) {\n this.type = type;\n }", "public void setType(String name){\n\t\ttype = name;\n\t}", "public void setType(String type){\n \tthis.type = type;\n }", "public void setType(int type) {\n type_ = type;\n }", "public void setType(int t){\n this.type = t;\n }", "public void setFileType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setType(Type type){\n\t\tthis.type = type;\n\t}", "void setImageFromSpec(ImageProvider spec);", "public void setType (String typ) {\n type = typ;\n }", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType(int type)\n {\n editor.putInt(KEY_TYPE, type);\n // commit changes\n editor.commit();\n Log.d(TAG,\"user type modified in pref\");\n }", "public void setType(int type) {\r\n this.type = type;\r\n }", "public void setType(int type) {\r\n this.type = type;\r\n }", "public void setType (int type) {\n this.type = type;\n }", "public void setType (int type) {\n this.type = type;\n }", "void setDataType(int type );", "public void setPicture(javax.activation.DataHandler param) {\r\n localPictureTracker = param != null;\r\n\r\n this.localPicture = param;\r\n }", "public void setType(int type) {\n \t\tbrowserType = type;\n \t\tif (type == FILE_BROWSER) {\n \t\t\tdialogLabel = Messages.RemoteResourceBrowser_fileLabel;\n \t\t\tsetTitle(Messages.RemoteResourceBrowser_fileTitle);\n \t\t} else if (type == DIRECTORY_BROWSER) {\n \t\t\tdialogLabel = Messages.RemoteResourceBrowser_directoryLabel;\n \t\t\tsetTitle(Messages.RemoteResourceBrowser_directoryTitle);\n \t\t} else {\n \t\t\tdialogLabel = Messages.RemoteResourceBrowser_resourceLabel;\n \t\t\tsetTitle(Messages.RemoteResourceBrowser_resourceTitle);\n \t\t}\n \t}", "public void setType(int atype)\n {\n type = atype;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "@Override\n\tpublic void setType(String type) {\n\t}", "public void setType(String type){\n this.type = type;\n }", "public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}", "public void setType(int t) {\r\n\t\ttype = t;\r\n\t}", "public void setType( int type ) {\r\n typ = type;\r\n }", "@Test\n public void setGetPicture() {\n final CourseType courseType = new CourseType();\n final String PICTURE = \"pic\";\n courseType.setPicture(PICTURE);\n\n assertSame(PICTURE, courseType.getPicture());\n }", "protected void saveImage(String type) {\n\t\tint height = 793;\n\t\tint width = 1120; \n\t\t\n\t\tAdvancedFileChooser fileChooser = new AdvancedFileChooser();\n\t\t\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t\tint returnVal = fileChooser.showSaveDialog(chartPanel);\n\t\n\t\tFile filePath = null;\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tfilePath = fileChooser.getSelectedFile();\n\t\t}\n\t\t\n\t\tString tempPath = filePath.getAbsolutePath().toUpperCase();\n\t\t\n\t\ttry{\n\t\t\tif(type.equals(\"PNG\")){\n\t\t\t\tif(!tempPath.endsWith(\".PNG\"))\n\t\t\t\t\tfilePath = new File(tempPath+\".PNG\");\n\t\t\t\tChartUtilities.saveChartAsPNG(filePath, getChart(), width, height);\n\t\t\t}else if(type.equals(\"JPEG\")){\n\t\t\t\tif(!tempPath.endsWith(\".JPEG\"))\n\t\t\t\t\tfilePath = new File(tempPath+\".JPEG\");\n\t\t\t\tChartUtilities.saveChartAsJPEG(filePath, getChart(), width, height);\n\t\t\t}\n\t\t}catch(IOException ie){\n\t\t\t\n\t\t}\n\t\n\t}", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(int nType) { m_nType = nType; }", "private void setMediaAssetScaleType(com.whensunset.wsvideoeditorsdk.model.MediaAssetScaleType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n mediaAssetScaleType_ = value.getNumber();\n }", "public void setFileType(Integer fileType) {\n this.fileType = fileType;\n }", "public void setType(String newValue);", "public void setType(String newValue);", "public static void setMediaType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, MEDIATYPE, value);\r\n\t}", "public void setPicture(ParseFile file){\n put(KEY_PICTURE, file);\n }", "public final void setType(String type){\n\t\tthis.type = type;\t\n\t}", "public void setType( String type )\n {\n this.type = type;\n }", "private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }", "public void setType(int type) {\n this.type = type;\n }", "private void setImage(Bitmap image) {\n }", "public static void setType(int type) {\n\t\t\tGamePreferences.type = type;\n\t\t}", "public void setType(String type)\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\tif (type == null || type.equals(\"\")) {\n\t\t\t\tif (typeElement != null)\n\t\t\t\t\tmediaElement.removeChild(typeElement);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (typeElement == null) {\n\t\t\t\t\ttypeElement = document.createElement(TYPE_ELEMENT_NAME);\n\t\t\t\t\tmediaElement.appendChild(typeElement);\n\t\t\t\t}\n\t\t\t\ttypeElement.setTextContent(type);\n\t\t\t}\n\t\t}", "private void setType(String type) {\n mType = type;\n }", "public void setFileType(edu.umich.icpsr.ddi.FileTypeType fileType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().find_element_user(FILETYPE$8, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().add_element_user(FILETYPE$8);\n }\n target.set(fileType);\n }\n }", "public void set_type(String t)\n {\n type =t;\n }", "public void setMimeType(java.lang.String mimeType) {\n _courseImage.setMimeType(mimeType);\n }" ]
[ "0.7464305", "0.69569147", "0.6935429", "0.67556983", "0.6747403", "0.67241544", "0.6703912", "0.6681097", "0.66521555", "0.6457404", "0.6288501", "0.6288501", "0.6288501", "0.6174155", "0.617048", "0.61602974", "0.6107754", "0.6073489", "0.6056877", "0.6044199", "0.6033056", "0.60143596", "0.6005278", "0.60051906", "0.6003754", "0.59985644", "0.59809214", "0.596508", "0.5922147", "0.59182596", "0.59064144", "0.59006995", "0.5891079", "0.58855945", "0.58783084", "0.58659464", "0.5851315", "0.58444214", "0.5841758", "0.5841339", "0.58408254", "0.5832489", "0.583092", "0.5830244", "0.58295393", "0.5818376", "0.58154315", "0.581167", "0.5807327", "0.5804944", "0.5799359", "0.57961106", "0.57909214", "0.5781896", "0.5781848", "0.5773811", "0.57728666", "0.57527655", "0.57489187", "0.57489187", "0.5747343", "0.5747343", "0.57469386", "0.5744592", "0.5731712", "0.5729981", "0.57274294", "0.57274294", "0.57274294", "0.57244986", "0.57242256", "0.57190716", "0.5717446", "0.5714517", "0.5711321", "0.5708219", "0.5705392", "0.5705392", "0.5705392", "0.5705392", "0.5705392", "0.5705392", "0.5695984", "0.56909937", "0.56859094", "0.5684108", "0.5684108", "0.5679827", "0.56792915", "0.56790715", "0.56773764", "0.56722546", "0.5670704", "0.5669398", "0.56667346", "0.56560975", "0.5654522", "0.56530637", "0.56526273", "0.5641564" ]
0.82571197
0
Set the Forward Vector's full_pel
void setFullPelForwardVector(int value) { forwardVector.setFullPel(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setFullPelBackwardVector(int value)\n {\n backwardVector.setFullPel(value);\n }", "public void setFocalPoints() {\n Equation e = new Equation();\n // read the refractive index and the curvature radius from the sliders and divide their slider values by 100\n double index = indexSlider.getValue() / 100;\n double radius = radiusSlider.getValue() / 100;\n // calls the focalLength method from the equation class and bring the index and radius as the parameters\n focalLength = e.focalLength(index, radius);\n\n // set the X coordinates of focal point one and focal point two\n // focal point one is on the left side of the lens\n // X = X of lensCenter - focal Length\n // focal point two is on the right side of the lens\n // X = X of lensCenter + focal Length\n focalOne.setLayoutX(lensCenterX - (focalLength * 100));\n focalTwo.setLayoutX(lensCenterX + (focalLength * 100));\n }", "void setupPointScaleFree() {\n\t\tbeginOffsetP.set(P);\n\n\t\tleftOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[0];\n\t\trightOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[1];\n\t\tleftOppositeLine.resetLockPoints(P);\n\t\trightOppositeLine.resetLockPoints(P);\n\t\tbeginP.set(P);\n\t\tbeginOffsetP.set(P);\n\n\t\tbeginOffset.set(P); // lock the beginning position of the\n\t\t\t\t\t\t\t// offset vector\n\t\tbeginOffsetP.set(point[selectedPoint].position); // lock the beginning\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of the vector to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// be transformed\n\n\t\tleftOppositeLine.isOnThisSideOfLine = leftOppositeLine.checkLineSide(P); // check\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// which\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// side\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mirror\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// are\n\t\trightOppositeLine.isOnThisSideOfLine = rightOppositeLine.checkLineSide(P);\n\t}", "public void perpendicular() {\r\n\t\tset(y, x * -1);\r\n\t}", "public void setTranslationVel(Vector3f vec, int xform) {\n\t\tm_xforms[xform].m_translateVel.set(vec);\n\t}", "void resetMotionVector()\n {\n forwardVector.resetMotionVector();\n backwardVector.resetMotionVector();\n }", "protected void setForceNormalVector() {\n\t\tvn = forceNormalVector(v1, v2);\n\t}", "public void setLeftVector(Vector u) throws IncorrectSpaceException {\n if (u.getSpace() != outputSpace) {\n throw new IncorrectSpaceException();\n }\n this.u = u;\n }", "public void setAsSelf(Vector3 vector) {\n\t\tthis.x = vector.x;\n\t\tthis.y = vector.y;\n\t\tthis.z = vector.z;\n\t}", "public FullPositionVector(Longitude _long, Latitude lat)\n {\n\tset_long(_long);\n\tsetLat(lat);\n }", "public void setVector(nvo_coords.CoordsType vector) {\n this.vector = vector;\n }", "public void resetPuck() {\n this.puck.setPosition(new Point(this.center_point));\n }", "public void setVectorFlippedV(final boolean selected) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setVectorFlippedV(selected);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}", "public Vector330Class(){\n this.x = 0;\n this.y = 0;\n }", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "public final void setToPoint(Vector toPoint) {\n\t\ttransform.setToPoint(toPoint);\n\t}", "void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}", "public final void setFromPoint(Vector fromPoint) {\n\t\ttransform.setFromPoint(fromPoint);\n\t}", "public abstract Vector4fc set(float d);", "public void setPoint( Float point ) {\n this.point = point;\n }", "public abstract Vector4fc set(int component, float value);", "public void setVectorFlippedH(final boolean selected) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setVectorFlippedH(selected);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}", "public void frontUp(){\n frontSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "private void moveToNewPosition(float tpf) {\r\n\t\tif (linearVelocity == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tVector3f previousSpeed = linearVelocity;\r\n\t\tVector3f pos = targetSpatial.getLocalTranslation().clone();\r\n\t\tpos.addLocal(linearVelocity.mult(tpf));\r\n\t\tfloat oldX = targetSpatial.getLocalTranslation().x;\r\n\t\tfloat oldY = targetSpatial.getLocalTranslation().y;\r\n\t\ttargetSpatial.setLocalTranslation(pos);\r\n\t\ttargetSpatial.updateWorldVectors();\r\n\t\tfloat newX = targetSpatial.getLocalTranslation().x;\r\n\t\tfloat newY = targetSpatial.getLocalTranslation().y;\r\n\t\t\r\n\t\tif (FastMath.abs(previousSpeed.x) < FastMath.abs(linearVelocity.x)) {\r\n\t\t\tif (linearVelocity.x < 0) {\r\n\t\t\t\tlinearVelocity.setX(-FastMath.abs(previousSpeed.x));\r\n\t\t\t} else {\r\n\t\t\t\tlinearVelocity.setX(FastMath.abs(previousSpeed.x));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (FastMath.abs(previousSpeed.y) < FastMath.abs(linearVelocity.y)) {\r\n\t\t\tif (linearVelocity.y < 0) {\r\n\t\t\t\tlinearVelocity.setY(-FastMath.abs(previousSpeed.y));\r\n\t\t\t} else {\r\n\t\t\t\tlinearVelocity.setY(FastMath.abs(previousSpeed.y));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (listeners != null) {\r\n\t\t\tfor (int i = 0; i < listeners.size(); i++) {\r\n\t\t\t\tif (listeners.get(i) != null) {\r\n\t\t\t\t\tlisteners.get(i).itemFlicked(this, targetSpatial, newX,\r\n\t\t\t\t\t\t\tnewY, oldX, oldY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "private void setInitialBallVelocity() {\n\t\tvx = rgen.nextDouble(1.0, 3.0);\n\t\tif (rgen.nextBoolean(0.5)) vx = -vx;\n\t\t\n\t\tvy = 3;\n\t}", "private void moveForward(double length) {\n\t\tsens.setXPos(sens.getXPos() + (Math.cos(Math.toRadians(sens.getDirection())) * length));\n\t\tsens.setYPos(sens.getYPos() + (Math.sin(Math.toRadians(sens.getDirection())) * length));\n\t}", "public void setPt(java.lang.Float value) {\n this.pt = value;\n }", "public void setFull(boolean full)\n {\n this.full = full;\n }", "public void setVector(float x, float y)\n {\n speedVector.x = x / 5;\n speedVector.y = y / 5;\n if((mag = speedVector.x * speedVector.x + speedVector.y * speedVector.y) > 1)\n {\n mag = FloatMath.sqrt(mag);\n speedVector.x /= mag;\n speedVector.y /= mag;\n }\n }", "public LorentzVector(LorentzVector vect){\n\t\tthis.vector = new Vector3(vect.px(), vect.py(), vect.pz());\n\t\tthis.energy = vect.e();\n\t}", "public void setPosition(Vector vector) {\n x = (int) vector.getX();\n y = (int) vector.getY();\n\n repaint();\n }", "public void pin() {\n this.pin = new Vec(this.pos);\n }", "public void moveOneStep() {\r\n\r\n // detects what direction the ball moves and switches it.\r\n double xDirection, yDirection;\r\n if (v.getDx() < 0) {\r\n xDirection = -r;\r\n } else {\r\n xDirection = r;\r\n }\r\n if (v.getDy() < 0) {\r\n yDirection = -r;\r\n } else {\r\n yDirection = r;\r\n }\r\n // if the ball is in the paddle because they move towards each other, the ball moves to the top of the paddle.\r\n Rectangle danger;\r\n // finding the paddle.\r\n for (Collidable c: environment.getCollidables()) {\r\n if (c.getCollisionRectangle().getUpperLeft().getY() == 550) {\r\n danger = c.getCollisionRectangle();\r\n // moving the ball up if its in the paddle.\r\n if (center.getY() > danger.getUpperLeft().getY()\r\n && center.getX() > danger.getUpperLeft().getX()\r\n && center.getX() < danger.getUpperRight().getX()) {\r\n this.center = new Point(center.getX(), danger.getUpperLeft().getY() - r);\r\n }\r\n }\r\n }\r\n Line yTrajectory = new Line(center.getX(), center.getY() + yDirection,\r\n center.getX() + v.getDx(), center.getY() + yDirection + v.getDy());\r\n Line xTrajectory = new Line(center.getX() + xDirection, center.getY(),\r\n center.getX() + v.getDx() + xDirection, center.getY() + v.getDy());\r\n // the collision is on the y field.\r\n if (environment.getClosestCollision(yTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(yTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(yTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(this.center.getX(),\r\n bangedPoint.getY() - yDirection - v.getDy());\r\n }\r\n // the collision is on the x field.\r\n if (environment.getClosestCollision(xTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(xTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(xTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(bangedPoint.getX() - xDirection - v.getDx(),\r\n this.center.getY());\r\n }\r\n this.center = this.getVelocity().applyToPoint(this.center);\r\n }", "public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }", "public void limpaPontos() {\n\t\tthis.pontos = new ArrayList<Point>();\n\t}", "public void lower() {\n fangSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "@Override\n public void initialize() {\n setPoint = (((targetAngle + driveSubsystem.getHeading() + 180) % 360) - 180);\n }", "void setForward(boolean isForward);", "public void setFloat() {\n \t\tthis.leftMotor.stop();\n \t\tthis.rightMotor.stop();\n \t\tthis.leftMotor.flt(true);\n \t\tthis.rightMotor.flt(true);\n \t}", "public void moveOneStep() {\n // special case - the ball is inside the paddle\n Map<Integer, Point> result = movingBlock.getCollisionRectangle().insideRectangle(this.center);\n if (result != null) {\n // getting a pair information of:\n // A point: the new point of the center outside the paddle\n // An Integer: 1 if it's on the right, -1 if on the left\n for (Integer direction : result.keySet()) {\n // setting the new center, and the new velocity, based on the result\n this.center = result.get(direction);\n this.setVelocity(Math.abs(this.getVelocity().getX()) * direction, -Math.abs(this.getVelocity().getY()));\n }\n // normal case - the ball is not inside the paddle\n } else {\n // getting the line trajectory\n Line trajectory = new Line(this.center, this.getVelocity().applyToPoint(this.center));\n // getting the collision info\n CollisionInfo info = this.gameEnvironment.getClosestCollision(trajectory);\n int count = 0;\n // while this info is not null\n while (info != null) {\n // changing the velocity of the ball\n // notify the object it has been hit\n this.setVelocity(info.collisionObject().hit(this, info.collisionPoint(), this.getVelocity()));\n // getting the update trajectory and info (while they're not null!)\n trajectory = new Line(this.center, this.getVelocity().applyToPoint(this.center));\n info = this.gameEnvironment.getClosestCollision(trajectory);\n // if the count is 3, it means we are into an infinite loop!\n // oppose the velocity and break\n if (count == 3) {\n this.setVelocity(-this.getVelocity().getX(), -this.getVelocity().getY());\n break;\n }\n count++;\n }\n this.center = this.getVelocity().applyToPoint(this.center);\n }\n }", "@Override\n public void setValue(Point3D value) {\n this.velocity = value;\n }", "public boolean relaxVelocity()\n {\n return adjustToVelocity( preferedVelocity );\n }", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public void setFirst(V vv) {\n\t\t\tthis.v = vv;\n\t\t}", "public void setMotor_lin_target_velocity(float motor_lin_target_velocity) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 128, motor_lin_target_velocity);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 120, motor_lin_target_velocity);\n\t\t}\n\t}", "public void homogenize() {\n\t\tif (DoubleComparison.eq(w, 0)){\n\t\t\tthrow new RuntimeException(\"Can't homogenize points at infinity (last component zero)\");\n\t\t}\n\n\t\tthis.x = x / w;\n\t\tthis.y = y / w;\n\t\tthis.z = z / w;\n\t\tthis.w = 1;\n\t}", "public static Vector4 forward()\n {\n return new Vector4(0,0,1,0);\n }", "public void setVec(float[] vec) {\n this.vec = vec;\n }", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public void setPuntosFwd(double value) {\r\n this.puntosFwd = value;\r\n }", "@Override\n protected void resetVariables(){\n super.resetVariables();\n pointUp = false;\n }", "private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}", "public void setVelocity(Velocity v) {\r\n this.vel = v;\r\n }", "@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }", "public Vector4d set(Vector4d o) {\n\t\tx = o.x; y = o.y; z = o.z; w = o.w;\n\t\treturn this;\n\t}", "private void fillVector()\r\n {\r\n // The x and y coordinates of a point\r\n int xPoint;\r\n int yPoint;\r\n \r\n // The x and y coordinates of a point with the displacement of the plot \r\n // origin from the component origin taken into consideration\r\n int xPointOffset, yPointOffset;\r\n \r\n // The point to be stored in the vector\r\n SPlotPoint plotPoint;\r\n\r\n\r\n // Get the max of the data types to figure out how to scale plot\r\n maxX_ = (new Double(xData_.getMax())).intValue();\r\n maxY_ = (new Double(yData_.getMax())).intValue();\r\n \r\n // Want max axes to be max of 200. Need to calculate the scaling factor\r\n xFactor_ = maxX_/MAX_AXIS_LENGTH;\r\n yFactor_ = maxY_/MAX_AXIS_LENGTH;\r\n \r\n // Extract x and y values, generate SPlotPoints and store in vector\r\n for (int i = 0; i < xSize_; i++)\r\n {\r\n xPoint = (int)(xData_.getValue(i) / xFactor_);\r\n yPoint = (int)(yData_.getValue(i) / yFactor_); \r\n\r\n\r\n // The xy coordinates where to plot the point (after taking the \r\n // offset btn the plot origin and the component origin into account\r\n xPointOffset = xPoint+OFFSET;\r\n yPointOffset = yPoint+OFFSET;\r\n \r\n // Generate SPlotPoints and store in vector\r\n plotPoint = new SPlotPoint(xPointOffset,\r\n yPointOffset);\r\n \r\n // Set the id of the scatter plot point (corresponds to the row\r\n // number in the .dbf\r\n // Must add one to compensate for geodata starting at 1 and vector\r\n // index starting at 0\r\n plotPoint.setId(i+1);\r\n \r\n pointVector_.addElement(plotPoint);\r\n }\r\n }", "Lover(float _x, float _y, float m, float t, float _s, float _G) { //loc.x,loc.y,mass,topspeed,drawVectorSize\n location = new PVector(_x, _y);\n velocity = new PVector(0,0);\n acceleration = new PVector (0,0);\n mass = m;\n topspeed = t;\n diameter = 3*mass;\n drawVectorSize = _s;\n G = _G;\n //fill (255,0,0);\n }", "public void moveOneStep() {\n\n //computing the predicted trajectory\n Line trajectory = computeTrajectory();\n\n //checking the borders\n if (reachedBorder(trajectory)) {\n return;\n }\n\n //getting the closest collision info\n //CollisionInfo collisionInfo = this.gameEnvironment.getClosestCollision(trajectory);\n CollisionInfo collisionInfo = this.gameLevel.getEnvironment().getClosestCollision(trajectory);\n\n if (collisionInfo != null && collisionInfo.collisionObject() != null) {\n\n //changing the velocity according to the collision info (point, type of collidiable\n // and position on the collidable)\n Velocity newVelocity =\n collisionInfo.collisionObject().hit(this, collisionInfo.collisionPoint(), this.velocity);\n this.velocity = newVelocity;\n }\n\n //setting the next position of the center of the ball (new velocity after collision)\n this.center = this.getVelocity().applyToPoint(this.center);\n }", "public void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n acc.mult(0);\n }", "public void setTranslationVec(Vector3f vec) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_translate.set(vec);\n\t}", "public void setEndPoint(Point2D p)throws NoninvertibleTransformException{\n if(p == null){ //if given null it removes the point and path.\n end = null;\n fastestPath = null;\n removePointer(\"endPointIcon\");\n closeDirectionList();\n routePanel.getEndAddressField().setForeground(Color.gray);\n routePanel.getEndAddressField().setText(\"Enter end address\");\n return;\n }\n Insets x = getInsets(); //Recalibrate position for precision\n p.setLocation(p.getX(), p.getY() - x.top + x.bottom);\n end = transformPoint(p);\n\n addPointer(new MapPointer(end, \"endPointIcon\".intern()));\n if(end != null && start != null)\n findFastestRoute(start, end);\n repaint();\n }", "public synchronized void setVelocitySetpoint(DriveSignal signal, double leftFeed,\n double rightFeed) {\n if (RobotState.mDriveControlState == DriveControlState.PATH_FOLLOWING) {\n leftDrive.set(ControlMode.Velocity, signal.getLeftNativeVelTraj(), signal.getBrakeMode(),\n leftFeed);\n rightDrive.set(ControlMode.Velocity, signal.getRightNativeVelTraj(), signal.getBrakeMode(),\n rightFeed);\n } else {\n RobotState.mDriveControlState = DriveControlState.VELOCITY_SETPOINT;\n leftDrive.set(ControlMode.Velocity, signal.getLeftNativeVel(), signal.getBrakeMode());\n rightDrive.set(ControlMode.Velocity, signal.getRightNativeVel(), signal.getBrakeMode());\n }\n currentSetpoint = signal;\n }", "public void setVelocity(float x, float y)\n\t{\n\t\tthis.vel.x = x;\n\t\tthis.vel.y = y;\n\t}", "public void setX1()\n\t{\n\t\tthis.x[1] = this.x[0] - (this.length)/2;\n\t}", "public void set(Vec2 v) {\r\n\t\tx = v.x;\r\n\t\ty = v.y;\r\n\t}", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "public void setVelocity(float dummyX, float dummyZ){\n\t\t\n\t}", "public void forward() {\n forward(DEFAULT_SPEED);\n }", "@Override\n \tpublic void update() {\n \t\tif (!constructing) {\n \t\t\t// not constructing means the pellet is still traveling through\n \t\t\t// space\n \n \t\t\t// move the pellet\n \t\t\tVector3f.add(pos, vel, pos);\n \n \t\t\t// if it's too old, kill it\n \t\t\tif (Main.timer.getTime() - birthday > 5) {\n \t\t\t\talive = false;\n \t\t\t} else {\n \t\t\t\t// if the pellet is not dead yet, see if it intersected anything\n \n \t\t\t\t// did it hit another pellet?\n \t\t\t\tPellet neighbor_pellet = queryOtherPellets();\n \n \t\t\t\t// did it hit a line or plane?\n \t\t\t\tVector3f closest_point = queryScaffoldGeometry();\n \n \t\t\t\tif (neighbor_pellet != null) {\n \t\t\t\t\talive = false;\n \n\t\t\t\t\tif (neighbor_pellet == current_cycle.lastElement()){\n\t\t\t\t\t\tSystem.out.println(\"shot at same pellet\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\tif (!(neighbor_pellet instanceof PolygonPellet)) {\n \t\t\t\t\t\tMain.all_dead_pellets_in_world.add(neighbor_pellet);\n \t\t\t\t\t\tneighbor_pellet = new PolygonPellet(neighbor_pellet);\n \t\t\t\t\t\tMain.new_pellets_to_add_to_world.add(neighbor_pellet);\n \t\t\t\t\t}\n \n \t\t\t\t\t// if neighbor pellet's class is not PolygonPellet...\n \t\t\t\t\t// neighbor_pellet = new PolygonPellet(neighbor_pellet)\n \t\t\t\t\t// copy the position and stuff from the line/plane\n \t\t\t\t\t// pellet into the new polygon pellet\n \t\t\t\t\t// then go and add it to this cycle\n \t\t\t\t\t// hopefully it changes in the actual array of world\n \t\t\t\t\t// pellets\n \t\t\t\t\t// if not, remove that pellet from all world pelelts and\n \t\t\t\t\t// then add the new one to the end\n \n \t\t\t\t\tcurrent_cycle.add((PolygonPellet) neighbor_pellet);\n \t\t\t\t\tif (current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1)) {\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t\t} else {\n \t\t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t\t}\n \n \t\t\t\t} else if (closest_point != null) {\n \t\t\t\t\tSystem.out.println(\"pellet stuck to some geometry\");\n \t\t\t\t\tconstructing = true;\n \n \t\t\t\t\tpos.set(closest_point);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1))\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t} else if (Main.draw_points) {\n \t\t\t\t\t// if it's not dead yet and also didn't hit a\n \t\t\t\t\t// neighboring\n \t\t\t\t\t// pellet, look for nearby points in model\n \t\t\t\t\tint neighbors = queryKdTree(pos.x, pos.y, pos.z, radius);\n \n \t\t\t\t\t// is it near some points?!\n \t\t\t\t\tif (neighbors > 0) {\n \t\t\t\t\t\tconstructing = true;\n \t\t\t\t\t\tsetInPlace();\n \n \t\t\t\t\t\tsnapToCenterOfPoints();\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\t\tmakeLine();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (current_cycle.size() > 0)\n \t\t\t\t\tcurrent_cycle.get(0).setAsFirstInCycle();\n \n \t\t\t\tif (constructing == true) {\n \t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t}\n \t\t\t}\n \t\t} else {\n \t\t\t// the pellet has stuck... here we just give it a nice growing\n \t\t\t// bubble animation\n \t\t\tif (radius < max_radius) {\n \t\t\t\tradius *= 1.1;\n \t\t\t}\n \t\t}\n \t}", "public void moveOneStep() {\n if (velocity.getDx() < 0 && this.center.getX() - this.radius < bottomLeftBound) {\n this.setVelocity(-velocity.getDx(), velocity.getDy());\n } else if (velocity.getDx() > 0 && this.center.getX() + this.radius > bottomRightBound) {\n this.setVelocity(-velocity.getDx(), velocity.getDy());\n }\n if (velocity.getDy() < 0 && this.center.getY() - this.radius < topLeftBound) {\n this.setVelocity(velocity.getDx(), -velocity.getDy());\n } else if (velocity.getDy() > 0 && this.center.getY() + this.radius > topRightBound) {\n this.setVelocity(velocity.getDx(), -velocity.getDy());\n }\n this.center = this.getVelocity().applyToPoint(this.center);\n }", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "public void clearVelocity();", "public void setAngularVelocity(Vector3f vec) {\n rBody.setAngularVelocity(Converter.convert(vec, tempVec));\n rBody.activate();\n }", "@Override\n\tpublic void setOrientation(Vector o)\n\t{\n\t\tsuper.setOrientation(o);\n\t\tif (position != null && normal != null)\n\t\t{\n\t\t\toX = o.dup().norm();\n\t\t\toY = normal.cross(oX).norm();\n\t\t\toX = oY.cross(normal).norm();\n\t\t}\n\t}", "public abstract Vector4fc setComponent(int component, float value);", "public ColladaFloatVector() {\n super();\n }", "public FieldPoint() {\n setX( DEFAULT_VALUE );\n setY( DEFAULT_VALUE );\n }", "public void setStartPoint(Point2D p)throws NoninvertibleTransformException{\n if(p == null){\n start = null;\n fastestPath = null;\n removePointer(\"startPointIcon\");\n closeDirectionList();\n routePanel.getStartAddressField().setForeground(Color.gray);\n routePanel.getStartAddressField().setText(\"Enter start address\");\n return;\n }\n //Recalibrate position for precision\n Insets x = getInsets();\n p.setLocation(p.getX(), p.getY() - x.top + x.bottom);\n\n //Transform from screen coordinates to map Values.\n start = transformPoint(p);\n MapPointer startPoint = new MapPointer(start, \"startPointIcon\");\n addPointer(startPoint);\n if(end != null && start != null) //check if a route should be found.\n findFastestRoute(start, end);\n repaint();\n }", "public void setLinearVelocity(Vector3f vec) {\n rBody.setLinearVelocity(Converter.convert(vec, tempVec));\n rBody.activate();\n }", "private void setLinearVelocity() {\r\n\t\tif (movingElement.getWorldLocations().size() < 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<WorldCursorRecord> positions = movingElement.getWorldLocations();\r\n\t\tint lastIndex = positions.size() - 1;\r\n\t\tint nextLastIndex = lastIndex - 2;\r\n\t\tVector3f lastPosition = positions.get(lastIndex).worldLocation;\r\n\t\tlong lastTime = positions.get(lastIndex).time;\r\n\t\tVector3f nextLastPosition = positions.get(nextLastIndex).worldLocation;\r\n\t\tlong nextLastTime = positions.get(nextLastIndex).time;\r\n\t\tfloat diffTimeMS = (lastTime - nextLastTime) / 1000000f;\r\n\t\tlinearVelocity = lastPosition.subtract(nextLastPosition).mult(\r\n\t\t\t\t(1f / diffTimeMS) * 1000f);\r\n\t\tlinearVelocity.setZ(0);\r\n\t}", "public void setRotationVel(Vector3f vec, int xform) {\n\t\tm_xforms[xform].m_rotateVel.set(vec);\n\t}", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "public void setX(double x)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationX(x);\r\n\t\tAnchor.setX(x);\r\n\t}", "public void resetYVel() {\n this.yVel = 0;\n }", "public void setLinearVelocity (Vector2 v) {\n\t\ttmp.set(v.x, v.y);\n\t\tbody.setLinearVelocity(tmp);\n\t}", "@Override\n public Point addVector(float[] vector) {\n this.x += vector[0];\n this.y += vector[1];\n setHeight(getHeight()+ vector[2]);\n return this;\n }", "public void setInfiniteBoundingbox()\n\t{\n\t\tinf_bb = true;\n\t\tif (transfh != null) {\n\t\t\ttransfh.setInfiniteBoundingbox();\n\t\t}\n\t}", "public void setTranslationVec(Vector3f vec, int xform) {\n\t\tm_xforms[xform].m_translate.set(vec);\n\t}", "public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }", "void forward(float steps) {\n _x += _rotVector.x * steps;\n _y += _rotVector.y * steps;\n }", "public void setStartPoint(CartesianCoordinate startPoint) {\r\n\t\tthis.startPoint = startPoint;\r\n\t}", "private void setPointsAs0() {\n\n for (int counter = 0; counter < countOfPoints; counter++) {\n points[counter] = new Point(0,0);\n }\n\n }", "public synchronized void resetFOV()\n {\n setFOV(Math.toDegrees(MathUtil.QUARTER_PI));\n }", "public void setRotationVel(Vector3f vec) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_rotateVel.set(vec);\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "private void manejadorDesplazamientoVentana(JFrame frame) {\n\t\tframe.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent me) {\n\t\t\t\tpX = me.getX();\n\t\t\t\tpY = me.getY();\n\t\t\t}\n\t\t});\n\t\tframe.addMouseMotionListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDragged(MouseEvent me) {\n\t\t\t\tsetLocation(getLocation().x + me.getX() - pX, getLocation().y + me.getY() - pY);\n\t\t\t}\n\t\t});\n\t}", "public void setLength(Point e) {\r\n int Dx = Math.abs(this.origin.getX() - e.getX());\r\n int Dy = Math.abs(this.origin.getY() - e.getY());\r\n if (Dx > Dy) {\r\n this.length = Dx;\r\n } else { this.length = Dy; }\r\n }", "public void resetPose() {\n }" ]
[ "0.6963778", "0.6054927", "0.5760464", "0.5703884", "0.56204313", "0.5536059", "0.55313915", "0.55137515", "0.55039173", "0.5485805", "0.5368984", "0.5366793", "0.5261354", "0.5245055", "0.5242702", "0.52390146", "0.52223915", "0.5216517", "0.5189325", "0.5188077", "0.5182829", "0.51734996", "0.51515186", "0.51405764", "0.5139909", "0.5137576", "0.5132895", "0.51328266", "0.51308215", "0.5120319", "0.5112501", "0.51118153", "0.5109989", "0.51079226", "0.5082541", "0.50759757", "0.5073948", "0.5061409", "0.5053063", "0.5052034", "0.5048941", "0.50449646", "0.5040611", "0.5038341", "0.50320745", "0.50245607", "0.50224525", "0.5000422", "0.49933636", "0.49823117", "0.49822953", "0.4981995", "0.49809316", "0.49808943", "0.49768782", "0.49599075", "0.49519098", "0.49482533", "0.49444634", "0.49360943", "0.493453", "0.49342093", "0.49314958", "0.4925484", "0.49232006", "0.49181673", "0.49168795", "0.4912438", "0.4912147", "0.4904954", "0.4904303", "0.49041986", "0.48988146", "0.48974016", "0.4890719", "0.48843884", "0.4882845", "0.4882086", "0.48775983", "0.48770756", "0.48755863", "0.4864231", "0.48639882", "0.4851055", "0.48453906", "0.48419175", "0.48333123", "0.48270804", "0.48266137", "0.48261184", "0.48205006", "0.48183593", "0.4812314", "0.48086825", "0.48081017", "0.47996897", "0.479711", "0.47966555", "0.4793535", "0.47912905" ]
0.77206546
0
Set the Forward Vector's f_code
void setForwardFCode(int value) { forwardVector.setMotionFCode(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setBackwardFCode(int value)\n {\n backwardVector.setMotionFCode(value);\n }", "protected void setFunctionCode(int code) {\n m_FunctionCode = code;\n // setChanged(true);\n }", "public void mo3797c(float f) {\n this.f1455ad[0] = f;\n }", "void setFullPelForwardVector(int value)\n {\n forwardVector.setFullPel(value);\n }", "public void setCode(byte[] code);", "public void setVar86(java.lang.Float value) {\n this.var86 = value;\n }", "public abstract Vector4fc set(int component, float value);", "public void setRcode(float value) {\n this.rcode = value;\n }", "public void mo3802d(float f) {\n this.f1455ad[1] = f;\n }", "public void setX(float f)\n {\n fx = f;\n setMagnitude();\n }", "public abstract Vector4fc set(float d);", "void setFullPelBackwardVector(int value)\n {\n backwardVector.setFullPel(value);\n }", "public void mo3790b(float f) {\n this.f1444T = f;\n }", "public void set(int dim, float f)\n {\n switch(dim)\n {\n case 0:\n {\n fx = f;\n }\n case 1:\n {\n fy = f;\n }\n case 2:\n {\n fz = f;\n }\n default:\n {\n Log.d(\"debug1\", \"Bad Float Set to Vector.\");\n }\n }\n setMagnitude();\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar86(java.lang.Float value) {\n validate(fields()[87], value);\n this.var86 = value;\n fieldSetFlags()[87] = true;\n return this;\n }", "public abstract Vector4fc set(float x, float y, float z, float w);", "public void setF(){\n\t\tf=calculateF();\n\t}", "void setCode(String code);", "public void mo3777a(float f) {\n this.f1443S = f;\n }", "public void setFE(int newFE){\n this._FE=newFE;\n }", "public void setFaceValue(double f){\n\t\tface = f ;\n\t}", "public abstract Vector4fc setComponent(int component, float value);", "public final void mo3704f() {\n this.f1880a.f1299i = null;\n this.f1880a.f1302l = 0;\n super.mo3704f();\n }", "public void setVectorField(ImageDataFloat image) {\r\n\t\tthis.image = image;\r\n\t\tthis.rows = image.getRows();\r\n\t\tthis.cols = image.getCols();\r\n\t\tvectorField = null;\r\n\t}", "IPayerEntry setCode(CD value);", "public void mo25071f(int i) {\n this.f14802d = i;\n }", "public void mo458a(float f) throws RemoteException {\r\n this.f1766j = f;\r\n this.f1769m.mo335H();\r\n this.f1769m.mo401e(false);\r\n }", "public void setCode(Code code) {\n this.Code = code;\n }", "public void colores(int f) {\n this.f = f;\n }", "public Builder setFlightCarrierCodeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n flightCarrierCode_ = value;\n onChanged();\n return this;\n }", "public void mo12708a(float[] fArr) {\n if ((this.f13676o & 12) != 0) {\n fArr[0] = (this.f13671j + this.f13669h) - ((float) this.f13664c.itemView.getLeft());\n } else {\n fArr[0] = this.f13664c.itemView.getTranslationX();\n }\n if ((this.f13676o & 3) != 0) {\n fArr[1] = (this.f13672k + this.f13670i) - ((float) this.f13664c.itemView.getTop());\n } else {\n fArr[1] = this.f13664c.itemView.getTranslationY();\n }\n }", "protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}", "public void setDataCode(String dataCode);", "public void mo2747b(C0380e eVar, float f) {\n m1366j(eVar).mo2758a(f, eVar.mo2736a(), eVar.mo2737b());\n mo2752f(eVar);\n }", "public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}", "void setFunctionArray(int i, org.globus.swift.language.Function function);", "@Override\r\n\tpublic Buffer setFloat(int pos, float f) {\n\t\treturn null;\r\n\t}", "public void e(Float f) {\n ((b.b) this.b).e(f);\n }", "@Override\n public void apply$mcVF$sp (float arg0)\n {\n\n }", "public FloatByteMap(float[] f) {\n _clips = new Clips(f);\n }", "public void setFuncCode(Integer funcCode) {\n\t\tthis.funcCode = funcCode;\n\t}", "public void setCodeList(CodeList codeList) {\r\n\t\tthis.codeList = codeList;\r\n\t}", "public void setOpcode(int val);", "public void setF(boolean f) {\n\tthis.f = f;\n }", "public void mo2743a(C0380e eVar, float f) {\n m1366j(eVar).mo2757a(f);\n }", "public void mo3770E() {\n int i = this.f1434I;\n int i2 = this.f1435J;\n this.f1462ak = i;\n this.f1463al = i2;\n this.f1464am = (this.f1430E + i) - i;\n this.f1465an = (this.f1431F + i2) - i2;\n }", "public void setCode(String value) {\n setAttributeInternal(CODE, value);\n }", "public int set_code(String b);", "public com.example.DNSLog.Builder setRcode(float value) {\n validate(fields()[13], value);\n this.rcode = value;\n fieldSetFlags()[13] = true;\n return this;\n }", "private void m13817a(int i) {\n this.f11303c = i;\n this.f11304d = 0;\n }", "public void m9128n() {\r\n this.f6011m = bw.m10080b(this.f6011m, 0);\r\n }", "public final void mo9188b(float f) {\n if (C3135v.this.f9672a != null) {\n C3135v.this.f9672a.mo9586b(((C7853a) LiveSettingKeys.LIVE_BEAUTY_PARAM.mo10240a()).f21218b.f21222a * f);\n }\n }", "void setFunctionArray(org.globus.swift.language.Function[] functionArray);", "public final void m22596a(float f) {\n mo4385d(Float.floatToRawIntBits(f));\n }", "public void setCode(BizCodeEnum code) {\n this.code = code;\n }", "public void setVcode(short value) {\n this.vcode = value;\n }", "public void mo14476c() {\n super.mo14476c();\n this.f10138c = 0.0f;\n }", "public void setZ(float f)\n {\n fz = f;\n setMagnitude();\n }", "void setCode(LineLoader in) {\n code=in;\n }", "public void setFacing(short f) {\r\n\t\tfacing = f;\r\n\t\tworldObj.markBlockForUpdate(xCoord, yCoord, zCoord);\r\n\t}", "public float mo12728b(float f) {\n return f;\n }", "public final void setCode(java.lang.String code)\n\t{\n\t\tsetCode(getContext(), code);\n\t}", "private void setCurrentFacility(Point f){\n\t\t\n\t\t_currentFacility = f;\n\t\n\t}", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void mo8856a(C2896p pVar) {\n this.f8071b = pVar;\n }", "@Generated\n @Selector(\"setDirection:\")\n public native void setDirection(@ByValue CGVector value);", "public void mo22486a(@C0193h0 View view, float f) {\n }", "public final void mo8765a(float f) {\n }", "public void setFteReasonCode(java.lang.String param){\n localFteReasonCodeTracker = true;\n \n this.localFteReasonCode=param;\n \n\n }", "void setCode(Integer aCode);", "public Type setCode(BoundCodeDt<DataTypeEnum> theValue) {\n\t\tmyCode = theValue;\n\t\treturn this;\n\t}", "public void f() {\n Message q_ = q_();\n e.c().a(new f(255, a(q_.toByteArray())), getClass().getSimpleName(), i().a(), q_);\n }", "public void setTargetFrame(String f) {\r\n\t\t_targetFrame = f;\r\n\t}", "public void mo13879c(String str) {\n this.f5080f = str;\n }", "public void forward() {\n callFunction(\"forward\");\n }", "public Code(int codeIndex){\n //Evaluate code based on codeIndex with lexicographical order\n this.code = codeIndex + MIN_CODE;\n }", "public Type setCode(DataTypeEnum theValue) {\n\t\tgetCodeElement().setValueAsEnum(theValue);\n\t\treturn this;\n\t}", "public void mo38494a(int i) {\n this.f27233b = i;\n }", "private void m25426f() {\n C0396d.m1465a(this.f19104f).m1469a(this.f19111m, this.f19111m.m6587a());\n }", "public void mo21826b(float f, float f2, float f3, float f4) {\n this.f24532d.mo21981f(f, f2, f3, f4);\n }", "public void mo10476a(float f) {\n this.f5009b.mo10452a(f);\n this.f5010c.mo10452a(f);\n this.f5011d.mo10452a(f);\n this.f5012e.mo10452a(f);\n this.f5013f.mo10452a(f);\n BaseKeyframeAnimation<?, Float> aVar = this.f5014g;\n if (aVar != null) {\n aVar.mo10452a(f);\n }\n BaseKeyframeAnimation<?, Float> aVar2 = this.f5015h;\n if (aVar2 != null) {\n aVar2.mo10452a(f);\n }\n }", "public static Vector4 forward()\n {\n return new Vector4(0,0,1,0);\n }", "public void mo13878c(int i) {\n this.f5081g = i;\n }", "public final void mo9189c(float f) {\n if (C3135v.this.f9672a != null) {\n C3135v.this.f9672a.mo9588c(((C7853a) LiveSettingKeys.LIVE_BEAUTY_PARAM.mo10240a()).f21219c.f21222a * f);\n }\n }", "public void mo23338a() {\n super.mo23338a();\n this.f13125b.f13127a.add(this.f13201f);\n this.f13125b.f13135i.mo23556a(this.f13200e);\n this.f13125b.f13130d.add(this.f13203h);\n this.f13199d.mo23474a(this.f13202g);\n }", "public void setFeIF(double value) {\n _avTable.set(ATTR_FE_IF, value);\n }", "public FloatVector3D(float[] f)\n {\n fx = f[0];\n fy = f[1];\n fz = f[2];\n setMagnitude();\n }", "private void m4817m(float f) {\n this.f6595c.setAlpha(this.f6601i - f);\n }", "public void c(Float f) {\n ((b.b) this.b).c(f);\n }", "public void mo12742a(float f) {\n this.f13722q = f;\n }", "public void mo3901c(String str) {\n this.f773e = str;\n }", "public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void mo2192b(C0317d dVar, float f) {\n m1278j(dVar).mo2226c(f);\n }", "@Override\n\tpublic void setDataCode(java.lang.String dataCode) {\n\t\t_dictData.setDataCode(dataCode);\n\t}", "public void setBeginPosition(FPointType fpt) {\n fptStart.x = fpt.x;\n fptStart.y = fpt.y;\n }", "public void mo4361Y() {\n this.f3169c = -1;\n }", "public void mo3899b(boolean z) {\n this.f774f = z;\n }", "public Builder setCode(int value) {\n bitField0_ |= 0x00000001;\n code_ = value;\n onChanged();\n return this;\n }", "public void translateImplementation( Code code );" ]
[ "0.75643235", "0.6159975", "0.6042705", "0.60208845", "0.5891855", "0.5795755", "0.5747993", "0.57087445", "0.57082164", "0.5703943", "0.56972474", "0.5587535", "0.5528833", "0.5526641", "0.55242103", "0.55217826", "0.55045915", "0.5494474", "0.54796326", "0.53965425", "0.53820264", "0.5377063", "0.5357978", "0.53164375", "0.5308727", "0.5307134", "0.52923274", "0.52917355", "0.52810603", "0.52797186", "0.5278036", "0.5277937", "0.5273275", "0.5253054", "0.52524066", "0.52370095", "0.5207929", "0.52006185", "0.519993", "0.51961255", "0.5194923", "0.5192966", "0.51733005", "0.5162971", "0.5148076", "0.5135573", "0.51052165", "0.51051676", "0.50896716", "0.5088166", "0.5087933", "0.50869167", "0.50816333", "0.5080111", "0.507298", "0.5069684", "0.5068966", "0.5068595", "0.5067127", "0.5058093", "0.5053875", "0.504765", "0.50412905", "0.50372326", "0.50372326", "0.5030891", "0.5029458", "0.50294405", "0.50274473", "0.5026487", "0.5020421", "0.5017767", "0.5005", "0.5004372", "0.5003764", "0.49990842", "0.49957487", "0.49916396", "0.49880725", "0.49852768", "0.49848875", "0.49822772", "0.49821353", "0.4982064", "0.49727255", "0.4969198", "0.49651036", "0.49618912", "0.49552765", "0.49469605", "0.494498", "0.49446213", "0.49393964", "0.4939299", "0.49372518", "0.4937192", "0.49365813", "0.4931847", "0.49312946", "0.49298784" ]
0.8407321
0
Set the Backward Vector's full_pel
void setFullPelBackwardVector(int value) { backwardVector.setFullPel(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setFullPelForwardVector(int value)\n {\n forwardVector.setFullPel(value);\n }", "void setupPointScaleFree() {\n\t\tbeginOffsetP.set(P);\n\n\t\tleftOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[0];\n\t\trightOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[1];\n\t\tleftOppositeLine.resetLockPoints(P);\n\t\trightOppositeLine.resetLockPoints(P);\n\t\tbeginP.set(P);\n\t\tbeginOffsetP.set(P);\n\n\t\tbeginOffset.set(P); // lock the beginning position of the\n\t\t\t\t\t\t\t// offset vector\n\t\tbeginOffsetP.set(point[selectedPoint].position); // lock the beginning\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of the vector to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// be transformed\n\n\t\tleftOppositeLine.isOnThisSideOfLine = leftOppositeLine.checkLineSide(P); // check\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// which\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// side\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mirror\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// are\n\t\trightOppositeLine.isOnThisSideOfLine = rightOppositeLine.checkLineSide(P);\n\t}", "public void setVectorFlippedV(final boolean selected) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setVectorFlippedV(selected);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}", "public void perpendicular() {\r\n\t\tset(y, x * -1);\r\n\t}", "protected void setForceNormalVector() {\n\t\tvn = forceNormalVector(v1, v2);\n\t}", "public FullPositionVector(Longitude _long, Latitude lat)\n {\n\tset_long(_long);\n\tsetLat(lat);\n }", "public void setVector(nvo_coords.CoordsType vector) {\n this.vector = vector;\n }", "public void set(Vec2 v) {\r\n\t\tx = v.x;\r\n\t\ty = v.y;\r\n\t}", "public void setFocalPoints() {\n Equation e = new Equation();\n // read the refractive index and the curvature radius from the sliders and divide their slider values by 100\n double index = indexSlider.getValue() / 100;\n double radius = radiusSlider.getValue() / 100;\n // calls the focalLength method from the equation class and bring the index and radius as the parameters\n focalLength = e.focalLength(index, radius);\n\n // set the X coordinates of focal point one and focal point two\n // focal point one is on the left side of the lens\n // X = X of lensCenter - focal Length\n // focal point two is on the right side of the lens\n // X = X of lensCenter + focal Length\n focalOne.setLayoutX(lensCenterX - (focalLength * 100));\n focalTwo.setLayoutX(lensCenterX + (focalLength * 100));\n }", "public Vector330Class(){\n this.x = 0;\n this.y = 0;\n }", "public void setAsSelf(Vector3 vector) {\n\t\tthis.x = vector.x;\n\t\tthis.y = vector.y;\n\t\tthis.z = vector.z;\n\t}", "public void setFull(boolean full)\n {\n this.full = full;\n }", "public void setVectorFlippedH(final boolean selected) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setVectorFlippedH(selected);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}", "public void setLeftVector(Vector u) throws IncorrectSpaceException {\n if (u.getSpace() != outputSpace) {\n throw new IncorrectSpaceException();\n }\n this.u = u;\n }", "public LorentzVector(LorentzVector vect){\n\t\tthis.vector = new Vector3(vect.px(), vect.py(), vect.pz());\n\t\tthis.energy = vect.e();\n\t}", "public void resetPuck() {\n this.puck.setPosition(new Point(this.center_point));\n }", "private void setInitialBallVelocity() {\n\t\tvx = rgen.nextDouble(1.0, 3.0);\n\t\tif (rgen.nextBoolean(0.5)) vx = -vx;\n\t\t\n\t\tvy = 3;\n\t}", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "@Override\n\tpublic void setOrientation(Vector o)\n\t{\n\t\tsuper.setOrientation(o);\n\t\tif (position != null && normal != null)\n\t\t{\n\t\t\toX = o.dup().norm();\n\t\t\toY = normal.cross(oX).norm();\n\t\t\toX = oY.cross(normal).norm();\n\t\t}\n\t}", "public void pin() {\n this.pin = new Vec(this.pos);\n }", "public void returnDefualt() {\r\n this.x = (float)getWidth()/2;\r\n this.y = (float)getHeight()/2;\r\n notifyObservers(normelizeAilron(this.x), normelizeElevator(this.y));\r\n }", "public void setFlippedV(final boolean selected) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setFlippedV(selected);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}", "public void resetYVel() {\n this.yVel = 0;\n }", "public void setInfiniteBoundingbox()\n\t{\n\t\tinf_bb = true;\n\t\tif (transfh != null) {\n\t\t\ttransfh.setInfiniteBoundingbox();\n\t\t}\n\t}", "public void setTranslationVel(Vector3f vec, int xform) {\n\t\tm_xforms[xform].m_translateVel.set(vec);\n\t}", "void resetMotionVector()\n {\n forwardVector.resetMotionVector();\n backwardVector.resetMotionVector();\n }", "public void setRightVector(Vector v) throws IncorrectSpaceException {\n if (v.getSpace() != inputSpace) {\n throw new IncorrectSpaceException();\n }\n this.v = v;\n }", "public void setVelocity(Velocity v) {\r\n this.vel = v;\r\n }", "Lover(float _x, float _y, float m, float t, float _s, float _G) { //loc.x,loc.y,mass,topspeed,drawVectorSize\n location = new PVector(_x, _y);\n velocity = new PVector(0,0);\n acceleration = new PVector (0,0);\n mass = m;\n topspeed = t;\n diameter = 3*mass;\n drawVectorSize = _s;\n G = _G;\n //fill (255,0,0);\n }", "private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}", "public void clearVelocity();", "public void setMaximumPoint(BlockVector pt) {\r\n setMinMaxPoints(this.getMinimumPoint(), pt);\r\n }", "void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}", "public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }", "private void fillVector()\r\n {\r\n // The x and y coordinates of a point\r\n int xPoint;\r\n int yPoint;\r\n \r\n // The x and y coordinates of a point with the displacement of the plot \r\n // origin from the component origin taken into consideration\r\n int xPointOffset, yPointOffset;\r\n \r\n // The point to be stored in the vector\r\n SPlotPoint plotPoint;\r\n\r\n\r\n // Get the max of the data types to figure out how to scale plot\r\n maxX_ = (new Double(xData_.getMax())).intValue();\r\n maxY_ = (new Double(yData_.getMax())).intValue();\r\n \r\n // Want max axes to be max of 200. Need to calculate the scaling factor\r\n xFactor_ = maxX_/MAX_AXIS_LENGTH;\r\n yFactor_ = maxY_/MAX_AXIS_LENGTH;\r\n \r\n // Extract x and y values, generate SPlotPoints and store in vector\r\n for (int i = 0; i < xSize_; i++)\r\n {\r\n xPoint = (int)(xData_.getValue(i) / xFactor_);\r\n yPoint = (int)(yData_.getValue(i) / yFactor_); \r\n\r\n\r\n // The xy coordinates where to plot the point (after taking the \r\n // offset btn the plot origin and the component origin into account\r\n xPointOffset = xPoint+OFFSET;\r\n yPointOffset = yPoint+OFFSET;\r\n \r\n // Generate SPlotPoints and store in vector\r\n plotPoint = new SPlotPoint(xPointOffset,\r\n yPointOffset);\r\n \r\n // Set the id of the scatter plot point (corresponds to the row\r\n // number in the .dbf\r\n // Must add one to compensate for geodata starting at 1 and vector\r\n // index starting at 0\r\n plotPoint.setId(i+1);\r\n \r\n pointVector_.addElement(plotPoint);\r\n }\r\n }", "public PolygonPellet(List<Pellet> _pellets) {\n \t\tsuper(_pellets);\n \t\tpellet_type = Main.GunMode.POLYGON;\n \t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public final void setToPoint(Vector toPoint) {\n\t\ttransform.setToPoint(toPoint);\n\t}", "public void setEndPoint(Point2D p)throws NoninvertibleTransformException{\n if(p == null){ //if given null it removes the point and path.\n end = null;\n fastestPath = null;\n removePointer(\"endPointIcon\");\n closeDirectionList();\n routePanel.getEndAddressField().setForeground(Color.gray);\n routePanel.getEndAddressField().setText(\"Enter end address\");\n return;\n }\n Insets x = getInsets(); //Recalibrate position for precision\n p.setLocation(p.getX(), p.getY() - x.top + x.bottom);\n end = transformPoint(p);\n\n addPointer(new MapPointer(end, \"endPointIcon\".intern()));\n if(end != null && start != null)\n findFastestRoute(start, end);\n repaint();\n }", "public void limpaPontos() {\n\t\tthis.pontos = new ArrayList<Point>();\n\t}", "public Vect3 PerpL() {\n\t\treturn new Vect3(-y,x,0);\n\t}", "public boolean relaxVelocity()\n {\n return adjustToVelocity( preferedVelocity );\n }", "public Vector2d() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "@Override\n \tpublic void update() {\n \t\tif (!constructing) {\n \t\t\t// not constructing means the pellet is still traveling through\n \t\t\t// space\n \n \t\t\t// move the pellet\n \t\t\tVector3f.add(pos, vel, pos);\n \n \t\t\t// if it's too old, kill it\n \t\t\tif (Main.timer.getTime() - birthday > 5) {\n \t\t\t\talive = false;\n \t\t\t} else {\n \t\t\t\t// if the pellet is not dead yet, see if it intersected anything\n \n \t\t\t\t// did it hit another pellet?\n \t\t\t\tPellet neighbor_pellet = queryOtherPellets();\n \n \t\t\t\t// did it hit a line or plane?\n \t\t\t\tVector3f closest_point = queryScaffoldGeometry();\n \n \t\t\t\tif (neighbor_pellet != null) {\n \t\t\t\t\talive = false;\n \n\t\t\t\t\tif (neighbor_pellet == current_cycle.lastElement()){\n\t\t\t\t\t\tSystem.out.println(\"shot at same pellet\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\tif (!(neighbor_pellet instanceof PolygonPellet)) {\n \t\t\t\t\t\tMain.all_dead_pellets_in_world.add(neighbor_pellet);\n \t\t\t\t\t\tneighbor_pellet = new PolygonPellet(neighbor_pellet);\n \t\t\t\t\t\tMain.new_pellets_to_add_to_world.add(neighbor_pellet);\n \t\t\t\t\t}\n \n \t\t\t\t\t// if neighbor pellet's class is not PolygonPellet...\n \t\t\t\t\t// neighbor_pellet = new PolygonPellet(neighbor_pellet)\n \t\t\t\t\t// copy the position and stuff from the line/plane\n \t\t\t\t\t// pellet into the new polygon pellet\n \t\t\t\t\t// then go and add it to this cycle\n \t\t\t\t\t// hopefully it changes in the actual array of world\n \t\t\t\t\t// pellets\n \t\t\t\t\t// if not, remove that pellet from all world pelelts and\n \t\t\t\t\t// then add the new one to the end\n \n \t\t\t\t\tcurrent_cycle.add((PolygonPellet) neighbor_pellet);\n \t\t\t\t\tif (current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1)) {\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t\t} else {\n \t\t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t\t}\n \n \t\t\t\t} else if (closest_point != null) {\n \t\t\t\t\tSystem.out.println(\"pellet stuck to some geometry\");\n \t\t\t\t\tconstructing = true;\n \n \t\t\t\t\tpos.set(closest_point);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1))\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t} else if (Main.draw_points) {\n \t\t\t\t\t// if it's not dead yet and also didn't hit a\n \t\t\t\t\t// neighboring\n \t\t\t\t\t// pellet, look for nearby points in model\n \t\t\t\t\tint neighbors = queryKdTree(pos.x, pos.y, pos.z, radius);\n \n \t\t\t\t\t// is it near some points?!\n \t\t\t\t\tif (neighbors > 0) {\n \t\t\t\t\t\tconstructing = true;\n \t\t\t\t\t\tsetInPlace();\n \n \t\t\t\t\t\tsnapToCenterOfPoints();\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\t\tmakeLine();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (current_cycle.size() > 0)\n \t\t\t\t\tcurrent_cycle.get(0).setAsFirstInCycle();\n \n \t\t\t\tif (constructing == true) {\n \t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t}\n \t\t\t}\n \t\t} else {\n \t\t\t// the pellet has stuck... here we just give it a nice growing\n \t\t\t// bubble animation\n \t\t\tif (radius < max_radius) {\n \t\t\t\tradius *= 1.1;\n \t\t\t}\n \t\t}\n \t}", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "private void bounceOffVerticalWall() {\n vx = -vx;\n }", "void pointScaleFree() {\n\t\t// offsetP = PVector.sub(P, beginOffsetP); // get the offset (because\n\t\t// mouse isnt' exatly at the pressed point, there a little offset)\n\t\toffset = PVector.sub(P, beginOffset); // calculate the offset made by\n\t\t\t\t\t\t\t\t\t\t\t\t// mouseDrag -- subtract\n\t\t\t\t\t\t\t\t\t\t\t\t// beginOffset from P\n\t\toffsetP = PVector.add(beginOffsetP, offset); // reposition point A based\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the offset made\n\n\t\tleftOppositeLine.detectX(offsetP); // update X (dot product magic)\n\t\t\t\t\t\t\t\t\t\t\t// constantly\n\t\trightOppositeLine.detectX(offsetP); // update X (dot product magic)\n\t\t\t\t\t\t\t\t\t\t\t// constantly\n\n\t\tfloat scaleFactorRight, scaleFactorLeft;\n\t\tscaleFactorRight = rightOppositeLine.X.dist(offsetP) / rightOppositeLine.beginX.dist(beginOffsetP);\n\t\tscaleFactorLeft = leftOppositeLine.X.dist(offsetP) / leftOppositeLine.beginX.dist(beginOffsetP);\n\n\t\t// needs exaplainin drawing\n\t\tPVector tmpR = new PVector();\n\t\tPVector tmpL = new PVector();\n\n\t\tif (rightOppositeLine.isOnThisSideOfLine == rightOppositeLine.checkLineSide(offsetP)) {\n\t\t\tif (leftOppositeLine.isOnThisSideOfLine == leftOppositeLine.checkLineSide(offsetP)) {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginStart, rightOppositeLine.beginEnd);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginStart, leftOppositeLine.beginEnd);\n\t\t\t} else {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginEnd, rightOppositeLine.beginStart);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginStart, leftOppositeLine.beginEnd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (leftOppositeLine.isOnThisSideOfLine == leftOppositeLine.checkLineSide(offsetP)) {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginStart, rightOppositeLine.beginEnd);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginEnd, leftOppositeLine.beginStart);\n\t\t\t} else {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginEnd, rightOppositeLine.beginStart);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginEnd, leftOppositeLine.beginStart);\n\t\t\t}\n\t\t}\n\n\t\t// needs exaplainin drawing\n\n\t\ttmpL.mult(scaleFactorRight);\n\t\ttmpL.add(leftOppositeLine.end);\n\n\t\ttmpR.mult(scaleFactorLeft);\n\t\ttmpR.add(rightOppositeLine.end);\n\n\t\t// set left neigbor point\n\t\tpoint[neighbor(selectedPoint)[0]].position.set(tmpL);\n\n\t\t// set right neighbor point\n\t\tpoint[neighbor(selectedPoint)[1]].position.set(tmpR);\n\t\tpoint[selectedPoint].position.set(offsetP);\n\t\tselectedLine = -1; // disable line focus\n\t\tupdateGlobalLines();\n\t}", "public PVector getElbowPosition(){\n\t\treturn this.leap.map(this.arm.elbowPosition());\n\t}", "public void setLength(Point e) {\r\n int Dx = Math.abs(this.origin.getX() - e.getX());\r\n int Dy = Math.abs(this.origin.getY() - e.getY());\r\n if (Dx > Dy) {\r\n this.length = Dx;\r\n } else { this.length = Dy; }\r\n }", "private void arretes_fO(){\n\t\tthis.cube[40] = this.cube[37]; \n\t\tthis.cube[37] = this.cube[39];\n\t\tthis.cube[39] = this.cube[43];\n\t\tthis.cube[43] = this.cube[41];\n\t\tthis.cube[41] = this.cube[40];\n\t}", "public void setMotor_lin_target_velocity(float motor_lin_target_velocity) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 128, motor_lin_target_velocity);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 120, motor_lin_target_velocity);\n\t\t}\n\t}", "@Override\n public void setValue(Point3D value) {\n this.velocity = value;\n }", "public void setEqualTo(Vector v){ components = v.getVectorAsArray(); }", "public void reflektiereV(double pAnteil){\n vy = vy*(-pAnteil);\n }", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "public void setPosition(Vector vector) {\n x = (int) vector.getX();\n y = (int) vector.getY();\n\n repaint();\n }", "@Override\n public void initialize() {\n setPoint = (((targetAngle + driveSubsystem.getHeading() + 180) % 360) - 180);\n }", "public void setVector(float x, float y)\n {\n speedVector.x = x / 5;\n speedVector.y = y / 5;\n if((mag = speedVector.x * speedVector.x + speedVector.y * speedVector.y) > 1)\n {\n mag = FloatMath.sqrt(mag);\n speedVector.x /= mag;\n speedVector.y /= mag;\n }\n }", "public abstract Vector4fc set(int component, float value);", "public static native void OpenMM_AmoebaOutOfPlaneBendForce_setOutOfPlaneBendParameters(PointerByReference target, int index, int particle1, int particle2, int particle3, int particle4, double k);", "private void updateBoundary() {\n //pos = _newPos ;\n heading = myRoute.getCurrentHeading() ;\n //System.out.println(\"heading=\"+heading);\n Point vertex = new Point(0,0) ;\n vertex.x = length/2 ;\n vertex.y = width/2 ;\n boundary[0] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = width/2 ;\n boundary[1] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = -width/2 ;\n boundary[2] = transform(vertex) ;\n \n vertex.x = length/2 ;\n vertex.y = -width/2 ;\n boundary[3] = transform(vertex) ;\n for (int i=0; i<4; i++) {\n xpoints[i] = boundary[i].x ;\n ypoints[i] = boundary[i].y ;\n }\n }", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public void setBoundary(Position[] boundary) {\n\t\tPreconditions.checkArgument(boundary.length == 4, \"Boundary count must be 4.\");\n\t\tthis.boundary = boundary.clone();\n\t}", "private void reCalculateFullExtent(){\r\n\t\tif (graphics.size() > 0) {\r\n\t\t\tFGraphic g = (FGraphic) graphics.get(0);\r\n\t\t\tfullExtent = g.getGeom().getEnvelope();\r\n\t\t\tfor (int i = 1; i < graphics.size(); i++) {\r\n\t\t\t\tg = (FGraphic) graphics.get(i);\r\n\t\t\t\tEnvelope rAux = g.getGeom().getEnvelope();\r\n\r\n\t\t\t\tfullExtent.add(rAux);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setLocation(Vector location);", "public synchronized void setVelocitySetpoint(DriveSignal signal, double leftFeed,\n double rightFeed) {\n if (RobotState.mDriveControlState == DriveControlState.PATH_FOLLOWING) {\n leftDrive.set(ControlMode.Velocity, signal.getLeftNativeVelTraj(), signal.getBrakeMode(),\n leftFeed);\n rightDrive.set(ControlMode.Velocity, signal.getRightNativeVelTraj(), signal.getBrakeMode(),\n rightFeed);\n } else {\n RobotState.mDriveControlState = DriveControlState.VELOCITY_SETPOINT;\n leftDrive.set(ControlMode.Velocity, signal.getLeftNativeVel(), signal.getBrakeMode());\n rightDrive.set(ControlMode.Velocity, signal.getRightNativeVel(), signal.getBrakeMode());\n }\n currentSetpoint = signal;\n }", "public void moveOneStep() {\r\n\r\n // detects what direction the ball moves and switches it.\r\n double xDirection, yDirection;\r\n if (v.getDx() < 0) {\r\n xDirection = -r;\r\n } else {\r\n xDirection = r;\r\n }\r\n if (v.getDy() < 0) {\r\n yDirection = -r;\r\n } else {\r\n yDirection = r;\r\n }\r\n // if the ball is in the paddle because they move towards each other, the ball moves to the top of the paddle.\r\n Rectangle danger;\r\n // finding the paddle.\r\n for (Collidable c: environment.getCollidables()) {\r\n if (c.getCollisionRectangle().getUpperLeft().getY() == 550) {\r\n danger = c.getCollisionRectangle();\r\n // moving the ball up if its in the paddle.\r\n if (center.getY() > danger.getUpperLeft().getY()\r\n && center.getX() > danger.getUpperLeft().getX()\r\n && center.getX() < danger.getUpperRight().getX()) {\r\n this.center = new Point(center.getX(), danger.getUpperLeft().getY() - r);\r\n }\r\n }\r\n }\r\n Line yTrajectory = new Line(center.getX(), center.getY() + yDirection,\r\n center.getX() + v.getDx(), center.getY() + yDirection + v.getDy());\r\n Line xTrajectory = new Line(center.getX() + xDirection, center.getY(),\r\n center.getX() + v.getDx() + xDirection, center.getY() + v.getDy());\r\n // the collision is on the y field.\r\n if (environment.getClosestCollision(yTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(yTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(yTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(this.center.getX(),\r\n bangedPoint.getY() - yDirection - v.getDy());\r\n }\r\n // the collision is on the x field.\r\n if (environment.getClosestCollision(xTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(xTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(xTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(bangedPoint.getX() - xDirection - v.getDx(),\r\n this.center.getY());\r\n }\r\n this.center = this.getVelocity().applyToPoint(this.center);\r\n }", "public void setLesPoubelles(ArrayList<Poubelle> lesPoubelles) {\r\n\t\tthis.lesPoubelles = lesPoubelles;\r\n\t}", "public void setPosition(Vector2 p) {\n\t\tpos = p;\n\t}", "public void setVelocity(float dummyX, float dummyZ){\n\t\t\n\t}", "public abstract Vector4fc set(float d);", "public void setPoint( Float point ) {\n this.point = point;\n }", "public void changeVel(double xV, double yV){ \n this.xVel += xV;\n this.yVel += yV;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void mueveBala() {\n switch (direccion) {\n case NORTE:\n posY -= velocidadBala;\n break;\n case SUR:\n posY += velocidadBala;\n break;\n case ESTE:\n posX += velocidadBala;\n break;\n case OESTE:\n posX -= velocidadBala;\n break;\n }\n actualizaHitbox();\n }", "public void changePolyOriginal() {\n this.changePoly(this.aorg, this.borg, this.corg, this.dorg, this.yorg);\n }", "public void setAngularVelocity(Vector3f vec) {\n rBody.setAngularVelocity(Converter.convert(vec, tempVec));\n rBody.activate();\n }", "public void setVerHor(Coordinates currentVerHor);", "public void initElbow(){\r\n do{\r\n int currentElbowPosition = motorElbow.getCurrentPosition();\r\n posElbow = currentElbowPosition - DELTA_ELBOW;\r\n motorElbow.setTargetPosition(posElbow);\r\n motorElbow.setPower(POWER_ELBOW_SLOW);\r\n } while(!sensorElbow.isPressed());\r\n\r\n motorElbow.setPower(STOP);\r\n resetElbowEncoder();\r\n posElbow = 0;\r\n }", "protected Vertex() {\n\t\tisInDepot = false;\n\t}", "public void restrictVelocity() {\n\t\tif (velocity.x > MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = MAX_VELOCITY.x;\r\n\t\tif (velocity.y > MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = MAX_VELOCITY.y;\r\n\t\t\r\n\t\tif (velocity.x < -MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = -MAX_VELOCITY.x;\r\n\t\tif (velocity.y < -MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = -MAX_VELOCITY.y;\r\n\t}", "public Vector330Class(double x, double y){\n this.x = x;\n this.y = y;\n }", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "public void setFirst(V vv) {\n\t\t\tthis.v = vv;\n\t\t}", "public void zero() {\r\n\t\tthis.x = 0.0f;\r\n\t\tthis.y = 0.0f;\r\n\t}", "private void deplacerBall() {\n\t\tassert(f.getLevel() != null);\n\t\t\n\t\tLevel l = f.getLevel();\n\t\t\n\t\tif(l.getBall() == null ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(l.getType() == Type.AUTOMATIQUE) {\n\t\t\tif( l.getBall().getPosY()<f.getHauteurFenetre()*1/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(false);\n\t\t\t}\n\t\t\tif( l.getBall().getPosY()>f.getHauteurFenetre()*4/5) {//defilement vers le bas\n\t\t\t\tf.defilerEcranY(true);\n\t\t\t}\n\t\t\tif( l.getBall().getPosX()<f.getLargeurFenetre()*1/5) {//defilement vers la gauche\n\t\t\t\tf.defilerEcranX(true);\n\t\t\t}\n\t\t\tif( l.getBall().getPosX()>f.getLargeurFenetre()*4/5) {//defilement vers la droite\n\t\t\t\tf.defilerEcranX(false);\n\t\t\t}\n\t\t}else if(l.getType() == Type.INVERSE){\n\t\t\tif( l.getBall().getPosY()>f.getHauteurFenetre()*3/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(true);\n\t\t\t}\n\t\t}else {\n\t\t\tif( l.getBall().getPosY()<f.getHauteurFenetre()*2/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(l.getType() == Type.AUTOMATIQUE) {//mode automatique -> deplacement automatique\n\t\t\tl.getBall().deplacer();\n\t\t}else {\n\t\t\tl.getBall().deplacer();\n\t\t\tl.getBall().gravityY(l.gravityY());//la balle tombe selon la gravite\n\t\t}\n\t}", "public void setPoint(double point){\r\n this.point = point;\r\n }", "public void setLinearVelocity (Vector2 v) {\n\t\ttmp.set(v.x, v.y);\n\t\tbody.setLinearVelocity(tmp);\n\t}", "@NotNull\n private Coordinate flipV() {\n angle = -angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(this.centerPointCoordinate.getXCoordinate(),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(90 - angle))));\n return nextCenterPointCoordinate;\n }", "public void SetArea(double area) {\n OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_SetArea(swigCPtr, this, area);\n }", "public void resetUpperface() {\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setRaiseBrow(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setFurrowBrow(0);\n\t}", "public void setPt(java.lang.Float value) {\n this.pt = value;\n }", "@Override\n protected void resetVariables(){\n super.resetVariables();\n pointUp = false;\n }", "public void configVelocityControl() {\n leftDrive.configTeleopVelocity();\n rightDrive.configTeleopVelocity();\n }", "public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }", "public void setVelocity(float x, float y)\n\t{\n\t\tthis.vel.x = x;\n\t\tthis.vel.y = y;\n\t}" ]
[ "0.7141013", "0.5900874", "0.57737917", "0.57143444", "0.57143205", "0.56202793", "0.5547624", "0.5493438", "0.5481252", "0.5478915", "0.54778904", "0.5470231", "0.5466687", "0.54318637", "0.5420866", "0.5334012", "0.5331164", "0.531791", "0.5301193", "0.52923745", "0.5268931", "0.52640945", "0.5252222", "0.5235669", "0.522691", "0.52223283", "0.521997", "0.5209534", "0.5208246", "0.5207415", "0.52053815", "0.5195366", "0.51940095", "0.5185724", "0.5180376", "0.5172362", "0.5158483", "0.51497227", "0.5148576", "0.514099", "0.51299673", "0.51273316", "0.5125285", "0.51126695", "0.51114917", "0.5109664", "0.51067895", "0.5097986", "0.50879717", "0.5079318", "0.5072623", "0.50718343", "0.50637484", "0.50609386", "0.505833", "0.5052299", "0.50486296", "0.5035011", "0.50307816", "0.502696", "0.50194913", "0.5012312", "0.500918", "0.5003257", "0.49983415", "0.49938226", "0.49864393", "0.49836633", "0.49787945", "0.49777648", "0.49766877", "0.49748018", "0.49705663", "0.4964272", "0.49620554", "0.49616644", "0.49616644", "0.49616644", "0.49604666", "0.49569696", "0.49546888", "0.49521786", "0.4949664", "0.49436155", "0.49381414", "0.49347764", "0.49345455", "0.4923528", "0.49216047", "0.49193415", "0.4917086", "0.49159312", "0.49107194", "0.49100018", "0.49093765", "0.49079734", "0.49013254", "0.48985246", "0.4898271", "0.48965824" ]
0.72528344
0
Set the Backward Vector's f_code
void setBackwardFCode(int value) { backwardVector.setMotionFCode(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setForwardFCode(int value)\n {\n forwardVector.setMotionFCode(value);\n }", "public void setCode(byte[] code);", "protected void setFunctionCode(int code) {\n m_FunctionCode = code;\n // setChanged(true);\n }", "public void setRcode(float value) {\n this.rcode = value;\n }", "public void mo3797c(float f) {\n this.f1455ad[0] = f;\n }", "public void mo3802d(float f) {\n this.f1455ad[1] = f;\n }", "void setCode(String code);", "void setFullPelBackwardVector(int value)\n {\n backwardVector.setFullPel(value);\n }", "public int set_code(String b);", "public void setCode(BizCodeEnum code) {\n this.code = code;\n }", "public void setFE(int newFE){\n this._FE=newFE;\n }", "public void setDataCode(String dataCode);", "public abstract Vector4fc set(int component, float value);", "public void mo3790b(float f) {\n this.f1444T = f;\n }", "IPayerEntry setCode(CD value);", "public void setFteReasonCode(java.lang.String param){\n localFteReasonCodeTracker = true;\n \n this.localFteReasonCode=param;\n \n\n }", "public void setCode(Code code) {\n this.Code = code;\n }", "public Type setCode(BoundCodeDt<DataTypeEnum> theValue) {\n\t\tmyCode = theValue;\n\t\treturn this;\n\t}", "public final void mo9188b(float f) {\n if (C3135v.this.f9672a != null) {\n C3135v.this.f9672a.mo9586b(((C7853a) LiveSettingKeys.LIVE_BEAUTY_PARAM.mo10240a()).f21218b.f21222a * f);\n }\n }", "public Builder setFlightCarrierCodeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n flightCarrierCode_ = value;\n onChanged();\n return this;\n }", "public void setF(){\n\t\tf=calculateF();\n\t}", "public void setVar86(java.lang.Float value) {\n this.var86 = value;\n }", "public void setFaceValue(double f){\n\t\tface = f ;\n\t}", "public void mo3777a(float f) {\n this.f1443S = f;\n }", "public void setCode(String value) {\n setAttributeInternal(CODE, value);\n }", "void setCode(Integer aCode);", "public abstract Vector4fc set(float d);", "public void setVcode(short value) {\n this.vcode = value;\n }", "public com.example.DNSLog.Builder setRcode(float value) {\n validate(fields()[13], value);\n this.rcode = value;\n fieldSetFlags()[13] = true;\n return this;\n }", "public void mo2747b(C0380e eVar, float f) {\n m1366j(eVar).mo2758a(f, eVar.mo2736a(), eVar.mo2737b());\n mo2752f(eVar);\n }", "public Type setCode(DataTypeEnum theValue) {\n\t\tgetCodeElement().setValueAsEnum(theValue);\n\t\treturn this;\n\t}", "public void mo6198b(float f, float f2) {\n this.f4750b.set(f, f2);\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar86(java.lang.Float value) {\n validate(fields()[87], value);\n this.var86 = value;\n fieldSetFlags()[87] = true;\n return this;\n }", "public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}", "protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}", "public void colores(int f) {\n this.f = f;\n }", "public final void mo3704f() {\n this.f1880a.f1299i = null;\n this.f1880a.f1302l = 0;\n super.mo3704f();\n }", "public final void mo9189c(float f) {\n if (C3135v.this.f9672a != null) {\n C3135v.this.f9672a.mo9588c(((C7853a) LiveSettingKeys.LIVE_BEAUTY_PARAM.mo10240a()).f21219c.f21222a * f);\n }\n }", "public void mo42982i() {\n this.f12193a = 0;\n this.f12194b = 0;\n this.f12195c = 0;\n this.f12196d.setNull();\n this.f12197e.mo42967b();\n this.f12198f.clear();\n }", "void setFullPelForwardVector(int value)\n {\n forwardVector.setFullPel(value);\n }", "public FloatByteMap(float[] f) {\n _clips = new Clips(f);\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void mo25071f(int i) {\n this.f14802d = i;\n }", "public abstract Vector4fc setComponent(int component, float value);", "void setCodiceFiscale(String codiceFiscale);", "public void setCodeList(CodeList codeList) {\r\n\t\tthis.codeList = codeList;\r\n\t}", "public void setFuncCode(Integer funcCode) {\n\t\tthis.funcCode = funcCode;\n\t}", "public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setF(boolean f) {\n\tthis.f = f;\n }", "private void mo3747b() {\n this.f1427B.add(this.f1490s);\n this.f1427B.add(this.f1491t);\n this.f1427B.add(this.f1492u);\n this.f1427B.add(this.f1493v);\n this.f1427B.add(this.f1495x);\n this.f1427B.add(this.f1496y);\n this.f1427B.add(this.f1497z);\n this.f1427B.add(this.f1494w);\n }", "public void mo14476c() {\n super.mo14476c();\n this.f10138c = 0.0f;\n }", "public void mo12708a(float[] fArr) {\n if ((this.f13676o & 12) != 0) {\n fArr[0] = (this.f13671j + this.f13669h) - ((float) this.f13664c.itemView.getLeft());\n } else {\n fArr[0] = this.f13664c.itemView.getTranslationX();\n }\n if ((this.f13676o & 3) != 0) {\n fArr[1] = (this.f13672k + this.f13670i) - ((float) this.f13664c.itemView.getTop());\n } else {\n fArr[1] = this.f13664c.itemView.getTranslationY();\n }\n }", "public void setFunction(SoSensorCB f) {\n\t\t func = f; \n\t}", "@Override\n public void onStateChanged(FormState fs, Object value) {\n\n switch (fs) {\n\n case FS_VALUE:\n\n code = (MCode) value;\n\n break;\n\n case FS_CREATE:\n\n setContentView(R.layout.formcode);\n\n break;\n case FS_UI_INIT:\n\n photo_view.setImageResource(code.drawable);\n\n txt_code.setText(code.code);\n\n break;\n\n }\n }", "public void set(int dim, float f)\n {\n switch(dim)\n {\n case 0:\n {\n fx = f;\n }\n case 1:\n {\n fy = f;\n }\n case 2:\n {\n fz = f;\n }\n default:\n {\n Log.d(\"debug1\", \"Bad Float Set to Vector.\");\n }\n }\n setMagnitude();\n }", "public void b(Float f) {\n ((b.b) this.b).b(f);\n }", "public void mo2192b(C0317d dVar, float f) {\n m1278j(dVar).mo2226c(f);\n }", "void setValue(byte value) {\n this.value = value;\n blockDrawables.get(selected).setValue(value);\n }", "public void mo458a(float f) throws RemoteException {\r\n this.f1766j = f;\r\n this.f1769m.mo335H();\r\n this.f1769m.mo401e(false);\r\n }", "public void setFabComp(String value) {\n setAttributeInternal(FABCOMP, value);\n }", "public void setFabComp(String value) {\n setAttributeInternal(FABCOMP, value);\n }", "public void mo558b(float f) throws RemoteException {\r\n this.f1764h = f;\r\n this.f1769m.mo401e(false);\r\n }", "public void setCode(String code){\n\t\tthis.code = code;\n\t}", "public void mo4361Y() {\n this.f3169c = -1;\n }", "public final void mo1641b() {\n super.mo1641b();\n this.f1472a = 0.0f;\n }", "public void setFECHAINICVAL(int value) {\n this.fechainicval = value;\n }", "public Builder setCode(int value) {\n bitField0_ |= 0x00000001;\n code_ = value;\n onChanged();\n return this;\n }", "public void setCode(String code)\n {\n this.code = code;\n }", "private void setCurrentFacility(Point f){\n\t\t\n\t\t_currentFacility = f;\n\t\n\t}", "public Builder setFBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n f_ = value;\n onChanged();\n return this;\n }", "public void mo38494a(int i) {\n this.f27233b = i;\n }", "public void mo3899b(boolean z) {\n this.f774f = z;\n }", "public void e(Float f) {\n ((b.b) this.b).e(f);\n }", "@Override\r\n\tpublic Buffer setFloat(int pos, float f) {\n\t\treturn null;\r\n\t}", "public void mo37873b() {\n C13262e eVar = C13262e.this;\n eVar.f34192f.mo38031a(eVar);\n }", "public void setFacing(short f) {\r\n\t\tfacing = f;\r\n\t\tworldObj.markBlockForUpdate(xCoord, yCoord, zCoord);\r\n\t}", "public void mo849b() {\n this.f619n.mo802c(this);\n }", "private void m3386b() {\n if (this.f2669c == null) {\n return;\n }\n if (this.f2672f || this.f2673g) {\n this.f2669c = this.f2669c.mutate();\n if (this.f2672f) {\n C0295a.m1050a(this.f2669c, this.f2670d);\n }\n if (this.f2673g) {\n C0295a.m1053a(this.f2669c, this.f2671e);\n }\n if (this.f2669c.isStateful()) {\n this.f2669c.setState(getDrawableState());\n }\n }\n }", "public void setBackFeeFlag(Character aBackFeeFlag) {\n backFeeFlag = aBackFeeFlag;\n }", "public void mo41170f() {\n this.f25421c.set(0);\n }", "public void mo9258g() {\n this.f1301l = EncodingUtils.m1912b(this.f1301l, 0);\n }", "public final void setCode(java.lang.String code)\n\t{\n\t\tsetCode(getContext(), code);\n\t}", "public void mo8856a(C2896p pVar) {\n this.f8071b = pVar;\n }", "void setCodes(Code[] codes);", "@Override\n\tpublic void setDataCode(java.lang.String dataCode) {\n\t\t_dictData.setDataCode(dataCode);\n\t}", "private void m13817a(int i) {\n this.f11303c = i;\n this.f11304d = 0;\n }", "final void mo6078b() {\n if (this.f2346p == null) {\n C0926z c0926z = this.f2341d == Integer.class ? f2331i : this.f2341d == Float.class ? f2332j : null;\n this.f2346p = c0926z;\n }\n if (this.f2346p != null) {\n this.f2342e.f2296f = this.f2346p;\n }\n }", "public void setVectorField(ImageDataFloat image) {\r\n\t\tthis.image = image;\r\n\t\tthis.rows = image.getRows();\r\n\t\tthis.cols = image.getCols();\r\n\t\tvectorField = null;\r\n\t}", "void setFunctionArray(int i, org.globus.swift.language.Function function);", "public void mo37873b() {\n try {\n C13262e.this.f34208v.mo38155a(this.f34214f, this.f34215g);\n } catch (IOException e) {\n C13262e.this.m34851a(e);\n }\n }", "public final void m14225a(cb cbVar) {\n this.f11869h.set(cbVar);\n }", "public void mo3792b(int i, int i2, int i3, float f) {\n this.f1477f = i;\n this.f1482k = i2;\n this.f1483l = i3;\n this.f1484m = f;\n if (f < 1.0f && this.f1477f == 0) {\n this.f1477f = 2;\n }\n }", "@Accessor(qualifier = \"code\", type = Accessor.Type.SETTER)\n\tpublic void setCode(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CODE, value);\n\t}", "private void m4817m(float f) {\n this.f6595c.setAlpha(this.f6601i - f);\n }", "public float mo12728b(float f) {\n return f;\n }", "public void mo2145b(int i) {\n this.f12262c = i;\n }", "public void setX(float f)\n {\n fx = f;\n setMagnitude();\n }", "public void mo8483f() {\n mo8472a((List<C1070b>) this.f3532b);\n mo8472a((List<C1070b>) this.f3533c);\n this.f3538h = 0;\n }", "public Code(int codeIndex){\n //Evaluate code based on codeIndex with lexicographical order\n this.code = codeIndex + MIN_CODE;\n }" ]
[ "0.7751717", "0.62571716", "0.6166785", "0.61579394", "0.6113395", "0.5890861", "0.5835803", "0.57732767", "0.57550263", "0.5651242", "0.5650977", "0.56208235", "0.559257", "0.5592557", "0.55855083", "0.5568876", "0.5566041", "0.5543752", "0.55327696", "0.5514462", "0.54955614", "0.54685694", "0.5461101", "0.54590476", "0.5453892", "0.54512745", "0.5443906", "0.5428428", "0.54035753", "0.53749985", "0.5365182", "0.53634375", "0.53559077", "0.5352777", "0.534874", "0.5343691", "0.5322354", "0.53159004", "0.5308301", "0.530418", "0.52922183", "0.52862906", "0.52862906", "0.52853924", "0.52762944", "0.5271856", "0.5257696", "0.5256216", "0.5251821", "0.5246719", "0.5246344", "0.5245919", "0.52416897", "0.5238872", "0.52385455", "0.5235518", "0.5231478", "0.5223393", "0.5199049", "0.51961404", "0.5195981", "0.5195981", "0.5190228", "0.51893985", "0.5181429", "0.51792485", "0.51792455", "0.5175804", "0.51729465", "0.516982", "0.5164948", "0.5163142", "0.5157398", "0.51529527", "0.51495904", "0.5140021", "0.51391536", "0.51280713", "0.51278704", "0.51265216", "0.51261634", "0.51242435", "0.51237667", "0.5122216", "0.5117828", "0.51141405", "0.51123685", "0.5106321", "0.51061296", "0.510319", "0.5100965", "0.5100586", "0.5092389", "0.5091881", "0.5085808", "0.5082814", "0.5079005", "0.5078587", "0.50779986", "0.507655" ]
0.7948792
0
Set the Quantizer Scale
void setQuantizerScale(int value) { quantizerScale = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setScale(float scale);", "void setScale(ScaleSelector sensor, int scaleNo);", "public void setScale(double value) {\n this.scale = value;\n }", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "@Override\n public void setScale(float scale) {\n this.scale = scale;\n }", "void setMaxScale(int value);", "public void setScale(float scale) {\n setLocalScale(scale);\n }", "public void setScale(float scale) {\n this.scale = scale;\n }", "public void setScale(float scale, int xform) {\n\t\tm_xforms[xform].m_scale = scale;\n\t}", "public void setScale(double n) {\n\n\t}", "public void setScale(double scale) {\r\n if (scale >= 0.1) {\r\n this.scale = scale;\r\n }\r\n }", "public void scale(double s);", "public final void setScale(float scale) {\n\t\n \tthis.svd(this);\n \tthis.mul(scale);\n }", "private void setScale() {\n this.particleScale = (1 - ((float) slowTime / 50)) * (1.5f * (float) offset);\n }", "void scale(double factor);", "public void setScale(Scale scale) {\n this.scale = scale;\n }", "public void setScale(double s){\n\t\tsetParameters(location, s);\n\t}", "public void setScale( float scale ) {\n\t\tthis.scale = scale;\n\t}", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "public void setScale(final double scale) {\r\n\t\tthis.scale = scale;\r\n\t}", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "@Override\n\tpublic void setScale(Vector3d scale) {\n\t\t\n\t}", "public void setScale(int indexInST, float time, Vector3f scale) {\n PointInTime toAdd=findTime(time);\n toAdd.setScale(indexInST,scale);\n }", "public void scale(Point P, int scaleFactor) {\n\n\n }", "public void setScale(float scale) {\n \t\tthis.scale = scale;\n \t\tupdateTransform();\n \t\tfireEvent(new ScalingEvent(scale));\n \t}", "public void setDrawScale(float x, float y) {\n \tdrawScale.set(x,y);\n }", "public void setScaleTo(Integer scaleTo)\n {\n getStateHelper().put(PropertyKeys.scaleTo, scaleTo);\n }", "public double getScale(){\n\t\treturn scale;\n\t}", "public void setScale(int scale) {\n\t\tif ((numberType == NumericFieldType.DOUBLE) && (scale <= 0)) {\n\t\t\tnumberType = NumericFieldType.INTEGER;\n\t\t}\n\t\tthis.scale = scale;\n\t\trequestRepaint();\n\t}", "public double getScale() {\n return scale;\n }", "void setFontScale(\n float s);", "public void setScale(double scale) {\n\t\tdouble tx = this.transform.getTranslateX();\n\t\tdouble ty = this.transform.getTranslateY();\n\t\tthis.transform.setToScale(scale, scale);\n\t\tthis.transform.translate(tx, ty);\n\t}", "public double getScale() {\r\n return scale;\r\n }", "void setScale(int objIndex,Vector3f scale){\n look[objIndex].setScale(scale);\n usedScale.set(objIndex);\n }", "public void setScale(double d) {\n\t\tdisp.setScale(d);\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public Builder setScaler(float value) {\n bitField0_ |= 0x00000001;\n scaler_ = value;\n onChanged();\n return this;\n }", "public double getScale() {\n return scale;\n }", "public int getScale() {\n return scale_;\n }", "@Override\n public float getScale() {\n return scale;\n }", "public float getScale();", "public int getScale() {\r\n return scale;\r\n }", "public final void setScale(float scalarX, float scalarY) {\n\t\tfinal Vector2 oldScale = this.scale();\n\t\tthis.scale(scalarX/oldScale.x, scalarY/oldScale.y);\n\t}", "public int getScale(){\n return scale;\n }", "int getScale();", "private void setXscale() {\n\t}", "public double getScale(\n )\n {return scale;}", "public void setGlobalScale(float newScale) {\n scale(new Vector3(newScale, newScale, newScale));\n }", "public double getScale() {\r\n\t\treturn scale;\r\n\t}", "public double getScale() {\n return this.scale;\n }", "public Integer getScale() {\n return _scale;\n }", "public Integer getScale() {\n return _scale;\n }", "public void setBSCA_SendTxtScale (String BSCA_SendTxtScale);", "public void setScaled(long _scaled) {\n\t\tscaled = _scaled;\n\t}", "private void updateScale() {\n target.setScaleX(scaleValue);\n target.setScaleY(scaleValue);\n }", "public float getScale() {\n\t\treturn scale;\n\t}", "public void setScaleFactor(float scaleFactor) {\n\t\ttrueCoreRadius *= scaleFactor;\n\t\ttruePetalRadius *= scaleFactor;\n\t\tcoreRadius = (int) trueCoreRadius;\n\t\tpetalRadius = (int) truePetalRadius;\n\t\tthis.scaleFactor *= scaleFactor;\n\t}", "public void setScale(ExpressionData md, int col)\n\t{\n\t\tswitch(SCALE_MODE)\n\t\t\t{\n\t\t\tcase SCALE_MATRIX:\n\t\t\t//\tSystem.out.println(\"Changing scale to mode MATRIX\");\n\t\t\t\tminExp=md.min;\n\t\t\t\tmaxExp=md.max;\n\t\t\t\tavgExp=md.average;\n\t\t\t\tmedianExp=md.median;\n\t\t\t\tbreak;\n\t\t\tcase SCALE_CONDITION:\n\t\t\t//\tSystem.out.println(\"Changing scale to mode CONDITION\");\n\t\t\t\tminExp=md.minCols[col];\n\t\t\t\tmaxExp=md.maxCols[col];\n\t\t\t\tavgExp=md.averageCols[col];\n\t\t\t\tmedianExp=md.medianCols[col];\n\t\t\t\tbreak;\n\t\t\tcase SCALE_ONTOLOGY:\n\t\t\t\t//System.out.println(\"Changing scale to mode ONTOLOGY\");\n\t\t\t\tminExp=1000000000;\n\t\t\t\tmaxExp=-1000000000;\n\t\t\t\tavgExp=0;\n\t\t\t\tcontAvgExp=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t//System.out.println(\"Mapping expression for \"+md.getColumnLabel(col)+\" in scale mode \"+SCALE_MODE);\n\t\t\n\t\t\n\t\tif(SCALE_MODE==SCALE_ONTOLOGY)\n\t\t\tavgExp/=contAvgExp;\n\t\t}", "public void setScale(float scaleXY) {\n internalGroup.setScale(scaleXY);\n dataTrait.scaleX = scaleXY;\n dataTrait.scaleY = scaleXY;\n resetSprite();\n }", "public float getScale()\n\t{\n\t\treturn scale;\n\t}", "public float getScale() {\n return this.scale;\n }", "public float getScale() {\n \t\treturn scale;\n \t}", "public void setDrawScale(Vector2 value) {\n \tsetDrawScale(value.x,value.y); \n\t}", "public void setScaleX(double aValue)\n{\n if(aValue==getScaleX()) return;\n repaint();\n firePropertyChange(\"ScaleX\", getRSS().scaleX, getRSS().scaleX = aValue, -1);\n}", "public void scale(float scalar) {\n\t\tthis.scale(scalar, scalar);\n\t}", "public void setScaleStart(double scaleStart) {\n\t\tm_dScaleStart = scaleStart;\n\t}", "public void setScaleXY(double sx, double sy) { setScaleX(sx); setScaleY(sy); }", "private void setMediaAssetScaleTypeValue(int value) {\n mediaAssetScaleType_ = value;\n }", "public void setScale(float x) {\n worldMatrix = math3d.mul(math3d.scaling(new vec3(x,x,x)), worldMatrix);\n }", "public void setScale(float xScale, float yScale) {\n\t\tthis.xScale = xScale;\n\t\tthis.yScale = yScale;\n\t}", "public void setScale(double scale) {\n double oldScale = scale;\n this.scale = scale;\n if (actor != null) {\n actor.SetScale(normalActorSize * scale);\n double[] x = new double[3];\n for (int i=0; i<3; i++) {\n axeTitleActor[i].SetScale(normalTitleSize * scale);\n for (int k=0; k<3; k++) x[k] = axeTitlePosition[i][k]*scale*normalActorSize;\n axeTitleActor[i].SetPosition(x);\n }\n }\n firePropertyChange(\"scale\", new Double(oldScale), new Double(scale));\n }", "protected void setScaleDenominator(double scaleDenominator) {\n this.scaleDenominator = scaleDenominator;\n }", "public void increaseTimescale() {\n\t\ttimeScaler = timeScaler>=5 ? 5 : timeScaler + TIMESCLALER_FACTOR;\n\t}", "public void setDecimalScale(int scale) {\n this.mScale = scale;\n }", "public PointDetails setScaling(double scale){\n\t\t\treturn setScaling(()->scale);\n\t\t}", "public int getScaleValue() {\r\n return ScaleValue;\r\n }", "void onScaleChange(float scaleFactor, float focusX, float focusY);", "public void rescale()\r\n\t{\n\t}", "public Configuration getScale() {\n return scale;\n }", "float getScaler();", "public final void set(float scale) {\n\tm00 = scale; m01 = 0.0f; m02 = 0.0f;\n\tm10 = 0.0f; m11 = scale; m12 = 0.0f;\n\tm20 = 0.0f; m21 = 0.0f; m22 = scale;\n }", "public void scale(float x, float y);", "@Override\n public void scale(double x, double y) {\n graphicsEnvironmentImpl.scale(canvas, x, y);\n }", "public void setSizeSQM(double value) {\n this.sizeSQM = value;\n }", "public TiledView setScales(AxisScale scale) {\n return setScales(scale,scale);\n }", "public void scale(float scale, float scale2) {\n\t\t\n\t}", "public void setQuality(float quality);", "private void Scale()\n {\n Song scale = new Song();\n scale.add(new Note(noteA1,WHOLE_NOTE/2));\n scale.add(new Note(noteBB1,WHOLE_NOTE/2));\n scale.add(new Note(noteB1,WHOLE_NOTE/2));\n scale.add(new Note(noteC1,WHOLE_NOTE/2));\n scale.add(new Note(noteCS1,WHOLE_NOTE/2));\n scale.add(new Note(noteD1,WHOLE_NOTE/2));\n scale.add(new Note(noteDS1,WHOLE_NOTE/2));\n scale.add(new Note(noteE1,WHOLE_NOTE/2));\n scale.add(new Note(noteF1,WHOLE_NOTE/2));\n scale.add(new Note(noteFS1,WHOLE_NOTE/2));\n scale.add(new Note(noteG1,WHOLE_NOTE/2));\n scale.add(new Note(noteGS1,WHOLE_NOTE/2));\n\n\n playSong(scale);\n }", "public void setCanScale(boolean scale){\n mScale = scale;\n }", "public void setCurrentScale(String currentScale) {\n this.currentScale = currentScale == null ? null : currentScale.trim();\n }", "public PointDetails setScaling(DoubleSupplier scale){\n\t\t\tthis.scale = scale;\n\t\t\treturn this;\n\t\t}", "public void autoscale()\n\t\t{\n\t\tdouble maxFC=1;\n\t\tdouble minP=-1;\n\t\t\n\t\tfor(int i=0;i<de.getNumGenes();i++)\n\t\t\t{\n\t\t\tdouble f=Math.abs(de.fc[i]);\n\t\t\tdouble p=de.logP[i];\n\t\t\tif(f>maxFC)\n\t\t\t\tmaxFC=f;\n\t\t\tif(p<minP)\n\t\t\t\tminP=p;\n\t\t\t}\n\t\tmaxFC*=1.2;\n\t\tminP*=1.2;\n\t\tscaleFC=1/maxFC;\n\t\tscaleP=-1/minP;\n\t\t}", "public void setScaleY(double aValue)\n{\n if(aValue==getScaleY()) return;\n repaint();\n firePropertyChange(\"ScaleY\", getRSS().scaleY, getRSS().scaleY = aValue, -1);\n}", "public void scale(double rhs) {\n\n\t\tthis.r *= rhs;\n\t\tthis.g *= rhs;\n\t\tthis.b *= rhs;\n\t}", "public void scale(double sx, double sy)\r\n\t{\r\n\t\t// System.out.println(\"scale\");\r\n\t}", "public Scale getScale() {\n return this.scale;\n }", "@Override\n\t\t\tpublic IFuzzySet scale(double scalar) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IFuzzySet scale(double scalar) {\n\t\t\t\treturn null;\n\t\t\t}", "public float spiderScaleAmount()\n {\nreturn 1F;\n }", "public void setScaleEnd(double scaleEnd) {\n\t\tm_dScaleEnd = scaleEnd;\n\t}", "public void beginScaling() {\n xScale = 1.0f;\n yScale = 1.0f;\n }" ]
[ "0.7690676", "0.73892444", "0.7182646", "0.7173733", "0.7166117", "0.71284944", "0.6999559", "0.699854", "0.696217", "0.6917842", "0.6906745", "0.6886988", "0.688206", "0.6862832", "0.68454456", "0.68177944", "0.68153006", "0.68027025", "0.6768872", "0.6697267", "0.6650287", "0.66409516", "0.65976036", "0.6583583", "0.6567877", "0.6556035", "0.65151244", "0.6476883", "0.6440458", "0.64271724", "0.6424943", "0.64063656", "0.6396515", "0.6390976", "0.6358742", "0.63573337", "0.63508934", "0.6348257", "0.63433635", "0.63292736", "0.63151777", "0.6309875", "0.62682503", "0.62676513", "0.6262772", "0.62520134", "0.6247085", "0.62314737", "0.62226474", "0.62217635", "0.62217635", "0.62044543", "0.6199797", "0.6193075", "0.6184273", "0.6176595", "0.6175468", "0.6171365", "0.6160197", "0.61558974", "0.6151206", "0.613976", "0.6138346", "0.6136303", "0.6129144", "0.6100051", "0.60865724", "0.6074003", "0.6057941", "0.60523987", "0.604821", "0.60389245", "0.6029376", "0.6028339", "0.60280615", "0.6014767", "0.60088986", "0.59991515", "0.5964763", "0.5964314", "0.5960059", "0.59597254", "0.5957568", "0.59544724", "0.5952947", "0.5952051", "0.5950877", "0.5948152", "0.59411466", "0.59379655", "0.5924834", "0.59220296", "0.5918294", "0.589163", "0.5889147", "0.5881065", "0.5881065", "0.58740675", "0.58661795", "0.5837759" ]
0.88365674
0
Reset the DCT dc past predictor
void resetDCPredictor() { dctDCYPast = 128*8; dctDCCrPast = 128*8; dctDCCbPast = 128*8; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resetVarD() {\n width = 0;\n height = 0;\n sizeY = 0;\n sizeCB = 0;\n sizeCR = 0;\n sizeYc = 0;\n sizeCBc = 0;\n sizeCRc = 0;\n iteradorFreq = 0;\n i = 0;\n FreqY = new HashMap<>();\n FreqCB = new HashMap<>();\n FreqCR = new HashMap<>();\n Ydes = new ArrayList<>();\n CBdes = new ArrayList<>();\n CRdes = new ArrayList<>();\n }", "@SuppressWarnings(\"NullAway\")\n\t\tpublic void reset() {\n\t\t\ttrackDoc = null;\n\t\t\tglobalDoc = null;\n\t\t\tpredicted.reset();\n\t\t\tobserved.reset();\n\t\t\tdoc_to_imagePixel.reset();\n\t\t}", "public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }", "private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }", "public void resetEnc(){\n EncX.reset();\n }", "public final void reset() {\n\n // Reset the output buffer\n out.reset();\n\n a=0x8000;\n c=0;\n b=0;\n if(b==0xFF)\n cT=13;\n else\n cT=12;\n resetCtxts();\n nrOfWrittenBytes = -1;\n delFF = false;\n\n nSaved = 0;\n }", "@Override\r\n\tpublic void reset() {\n\t\tthis.dcn = null;\r\n\t\tthis.pairs.clear();\r\n\t\tthis.successfulCount = 0;\r\n\t\tthis.failedCount = 0;\r\n\t\tthis.metrics.clear();\r\n\t}", "public void resetShoulderEncoder() {\r\n motorShoulder.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n motorShoulder.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n }", "public void reset ()\r\n\t{\r\n\t\tsuper.reset();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "@Override\n public void initialize() {\n drivetrain.resetEncoders();\n }", "public void resetEncoders() {\n m_frontLeft.resetEncoders();\n m_rearLeft.resetEncoders();\n m_frontRight.resetEncoders();\n m_rearRight.resetEncoders();\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}", "public void resetEncoders() {\n\t\tright.reset();\n\t\tleft.reset();\n\t}", "public void resetDX(){dx = 0;}", "public void resetElbowEncoder() {\r\n motorElbow.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n motorElbow.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n }", "public void resetAlphaValues();", "public void resetEncoder() {\n spark_encoder.setPosition(0);\n }", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void finalize(){\r\n srcImage = null;\r\n sigmas = null;\r\n xDataRound = null;\r\n yDataRound = null;\r\n zDataRound = null;\r\n super.finalize();\r\n }", "public void ResetClimbEncoders() {\n leftClamFoot.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightClamFoot.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "public void ResetArmEncoder() {\n armRotationMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }", "public void reset(){\n x = originalX;\n y = originalY;\n dx = originalDX;\n dy = originalDY;\n }", "protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }", "public final void resetCtxts(){\n System.arraycopy(initStates,0,I,0,I.length);\n ArrayUtil.intArraySet(mPS,0);\n }", "public void resetEncoders() {\n leftEncoder.setPosition(0);\n rightEncoder.setPosition(0);\n }", "public void resetDFA() {\n currentState = State.START;\n }", "public edu.pa.Rat.Builder clearConvolution() {\n fieldSetFlags()[2] = false;\n return this;\n }", "public void reset(){\n super.reset();\n this.troef = CardColor.NONE;\n }", "public void reset(){\n\t\t//int selectedColor = dots.getColor();\n\n\t\tfor (int i = 0; i < size; i++){\n\t\t\tfor (int j = 0; j < size; j++){\n\n\t\t\t\t\tdots[i][j].setColor(model.getColor(i,j));\n\t\t\t}\n\t\t}\n\t}", "public void resetCValue();", "public void reset() {\r\n\t\tcards.addAll(dealt);\r\n\t\tdealt.clear();\r\n\t}", "public void reset() {\n deadBlackCount = 0;\n deadWhiteCount = 0;\n deadRedCount = 0;\n deadBlueCount = 0;\n\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n fields[i][j].reset();\n }\n }\n }", "protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }", "private void reset() {\n // Init-values\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0;\n }\n\n // Random colors\n for (int i = 0; i < colors.length; i++) {\n colors[i] = Color.color(Math.random(), Math.random(), Math.random());\n }\n\n // mid = 1.\n cells[cells.length / 2] = 1;\n\n // Clearing canvas\n gc.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "void reset() ;", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void resetEncoders() {\n m_leftEncoder.setPosition(0);\n m_rightEncoder.setPosition(0);\n }", "void recompute () {\n current_part.t_Cl = current_part.t_Cd = current_part.t_Cm = null;\n computeFlowAndRegenPlot();\n }", "public void cleanCanvas() {\n\t\tclean = true;\n\t\tthis.invalidate();\n\t\t\n\t\t// adiciona ponto fict’cio para informar que o canvas foi limpo num dado momento\n\t\tif (toReplay) {\n\t\t\txs.add(-2.0f);\n\t\t\tys.add(-2.0f);\n\t\t\tcolors.add(mPaint.getColor());\n\t\t}\n\t}", "protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\n\t\tselectedCurves.clear();\n\t\thooveredCurves.clear();\n\t\tselectedPoints.clear();\n\t\thooveredPoints.clear();\n\t\tselectionTool.clear();\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public void deconvolute(Spectrum spectrum){\n//\t\tTimer time = new Timer();\n\t\tif(spectrum == null)\n\t\t\treturn;\n\t\tmatcher.setResolution(spectrum.resolution);\n\t\t\n\t\tPeakSet unassigned = spectrum.copy();\n\t\t\n\t\tif(spectrum.scanMode == 0)\n\t\t\tapplyCache(spectrum, unassigned);\n\t\tdeisotope(spectrum, unassigned);\n\t\tdechargeDeisotoped(spectrum);\n\t\tdecharge(spectrum, unassigned);\n//\t\tSystem.out.println(\"Took \" + time.ms() + \" ms for an MS\" + (spectrum.scanMode + 1));\n\t}", "private void reset() {\n }", "public void resetProcessed() {\r\n for (int x = 0; x < image.getWidth(); x++) {\r\n for (int y = 0; y < image.getHeight(); y++) {\r\n maskDone[x][y] = false;\r\n }\r\n }\r\n }", "public void reset() {\r\n\t\tready = false;\r\n\t\twitnessed_max_price = 0.0;\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++)\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] = 0.0;\r\n\t\t\r\n\t\tmarg_sum = 0;\r\n\t\t\r\n\t\tfor (HashMap<IntegerArray, double[]> p : this.prob)\r\n\t\t\tp.clear();\r\n\r\n\t\tfor (HashMap<IntegerArray, Integer> s : this.sum)\r\n\t\t\ts.clear();\r\n\t\t\r\n\t\tlog.clear();\r\n\t}", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void resetEdad()\r\n {\r\n this.edad = null;\r\n }", "public void reset() {\n\n\t}", "public void reset() {\n\t\treset(false);\n\t\tGraphvizUtils.setDotExecutable(null);\n\t}", "public void resetDriveEncoders() {\r\n motorLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n motorRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n\r\n motorLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n motorRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "public void stopImage() {\r\n\t\tint nComps = m_blocks.size();\r\n\t\tassert(nComps == 3);\r\n\t\t\r\n\t\t// Pack the DCT features\r\n\t\tIterator<double[][]> it1 = m_blocks.get(0).iterator();\r\n\t\tIterator<double[][]> it2 = m_blocks.get(1).iterator();\r\n\t\tIterator<double[][]> it3 = m_blocks.get(2).iterator();\t\t\t\t\r\n\r\n\t\tfor (int i = 0; i < m_blocks.get(0).size(); i++) {\r\n\t\t DataVec vec = new DataVec();\r\n\t\t \r\n\t\t\tdouble[][] Y = it1.next();\r\n\t\t\tdouble[][] Cb = it2.next();\r\n\t\t\tdouble[][] Cr = it3.next();\r\n\t\t\t\r\n\t\t\t// Only supports 4:4:4 JPEG format (maybe standard)\r\n\t\t\tassert(Cb.length == Y.length);\r\n\t\t\tassert(Cr.length == Y.length);\r\n\t\t\t\r\n\t\t\t// Zigzag scan\r\n\t\t\tfor (int z = 0; z < useDctFeature; z++) {\r\n\t\t\t\tint j = jpegNaturalOrder[z] / 8;\r\n\t\t\t\tint k = jpegNaturalOrder[z] % 8;\r\n\t\t\t\tvec.add(Y[j][k]);\r\n\t\t\t\tvec.add(Cb[j][k]);\r\n\t\t\t\tvec.add(Cr[j][k]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tm_feature.add(vec);\r\n\t\t}\r\n\r\n\t\t// Number of blocks\r\n\t\tint nBlocks = m_feature.size();\r\n\r\n\t\t// Cluster parameters\r\n\t\tfinal int paramClusterNum = 40; // if members > this number, then add to dictionary\r\n\t\tfinal int paramCountThres = 10; // if members > this number, then add to dictionary\r\n\r\n\t\t// Cluster\r\n\t\tCluster cluster = new Cluster(m_feature, 0, 1); // check min and max\r\n\t\tTriple<Integer[], Integer[], DataVec[]> res = cluster.cluster(System.out, \r\n\t\t\t\tparamClusterNum, 20);\r\n\t\tInteger[] groups = res.first;\r\n\t\tInteger[] memberCount = res.second;\r\n\t\tDataVec[] centroids = res.third;\r\n\r\n\t\t// Feature select\r\n\t\tfor (int i = 0; i < memberCount.length; i++) {\r\n\t\t if (memberCount[i] >= paramCountThres) {\r\n\t\t Vector<double[][]> block = dataVecToBlock(nComps, centroids[i]);\r\n\t\t m_blockArchive.add(block);\r\n\t\t }\r\n\t\t}\r\n\t}", "public final void resetCtxt(int c){\n I[c]=initStates[c];\n mPS[c] = 0;\n }", "@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}", "public void reset () {}", "public void reset(){\r\n \tif (resetdelay<=0){//if he didn't just die\r\n \t\tsetLoc(400,575);\r\n \t\timg = imgs[4];\r\n \t}\r\n }", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "private void desenhaCanoInferior(Canvas canvas) {\n canvas.drawBitmap(canoInferior, posicao, alturaCanoInferior, null);\n }", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "private void clearCanvas() {\n updateImageSize(mScale);\n }", "public void resetCarry() {\n\t\tset((byte) (get() & ~(1 << 4)));\n\t}", "public void zeroEncoder() {\n m_masterMotor.setSelectedSensorPosition(0);\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "public void reset(float x,float y,float noiseZ, float dx, float dy) {\n stepSize = random(MIN_STEP, MAX_STEP);\n\n location.x = prevLocation.x = x;\n location.y = prevLocation.y = y;\n acceleration.x = dx;//-2;\n acceleration.y = dy;\n life = 0;\n \n zNoise = noiseZ;\n }", "public void reset() {\n\r\n\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }" ]
[ "0.6341759", "0.61622924", "0.5991124", "0.5908236", "0.5884617", "0.5600638", "0.5577433", "0.557289", "0.55053246", "0.54421043", "0.53838897", "0.53753626", "0.53567153", "0.53537554", "0.53422415", "0.5337283", "0.53299516", "0.5323671", "0.5307828", "0.5298822", "0.5298129", "0.5258281", "0.5224014", "0.51975083", "0.5177195", "0.51593685", "0.51536506", "0.51536137", "0.5146963", "0.51318526", "0.5127061", "0.5103581", "0.5095427", "0.508504", "0.50835824", "0.50802124", "0.5072408", "0.50677735", "0.5045016", "0.5039666", "0.50392425", "0.50341296", "0.5031798", "0.5027317", "0.5020368", "0.50155765", "0.50026995", "0.50004745", "0.49957994", "0.49792516", "0.49688023", "0.49639267", "0.49611038", "0.49550307", "0.49513692", "0.4951086", "0.4943759", "0.4940187", "0.4919517", "0.4918747", "0.4918178", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49159122", "0.49140343", "0.49127287", "0.4912452", "0.49122623", "0.49122623", "0.49122623", "0.49122623", "0.490533", "0.490533", "0.49019247", "0.49013287", "0.48968422", "0.48968422", "0.48968422", "0.48968422", "0.48940042", "0.48940042", "0.48940042", "0.48940042" ]
0.8405523
0
If the Macro Block is bidirectional predicted
boolean isBidirPredicted() { return ((mbType & FORWARD)!=0) && ((mbType & BACKWARD)!=0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isBackwardPredicted()\n {\n return (mbType & BACKWARD)!=0;\n }", "boolean isForwardPredicted()\n {\n return ((mbType & FORWARD) != 0);\n }", "public boolean mo3882b() {\n return this.f3138s == 1;\n }", "boolean isMBIntra()\n {\n return ((mbType & INTRA) != 0);\n }", "public boolean isTibetan();", "public void alg_RUNCONVEYER(){\nBlock.value=false;\nSystem.out.println(\"run\");\n\n}", "public void alg_BLOCKCONVEYER(){\nBlock.value=true;\nSystem.out.println(\"block\");\n\n}", "boolean getOutputPartialsBeforeLanguageDecision();", "public final boolean mo18965b() {\n return false;\n }", "public boolean isTerm()\n {\n if (phase == 0)\n {\n return (loc.y == input.high_y);\n }\n if (phase == 3)\n {\n return (loc.y == input.high_y);\n\n }\n return false; \n\n }", "boolean m19263b() {\n return (getState() & 14) != 0;\n }", "boolean isBiasNeuron();", "@Override\n\t\tpublic boolean isPredictSecStructure() {\n\t\t\treturn false;\n\t\t}", "public abstract boolean mo9735b();", "boolean hasNewBlock();", "boolean hasNewBlock();", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "@Override\n public boolean isInstruction() {\n return true;\n }", "public boolean isInstruction() {\r\n return true;\r\n }", "public abstract boolean istAusgeliefert();", "public boolean handbrake() {\n if (getY() % symbolHeight == 0) return false;\n doBreak=true;\n return true;\n }", "public boolean mo2468b() {\n return false;\n }", "public boolean mo9735b() {\n return this.f9091i == this.f9090h;\n }", "public boolean mo8810b() {\n return false;\n }", "@Override\n\tpublic boolean canApply() {\n\t\tif ((this.alignment.getFlowA().getName().toLowerCase().contains(\"basic flow\") \n\t\t\t&& this.alignment.getFlowB().getName().toLowerCase().contains(\"basic flow\"))\n\t\t\t&& (this.alignment.getSimilarBlocksFromA().size()>1\n\t\t\t&& this.alignment.getSimilarBlocksFromB().size()>1)){\n\t\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasOutputPartialsBeforeLanguageDecision();", "@Override\n\tpublic boolean performsBlockAnimation() {\n\t\treturn false;\n\t}", "public boolean readBooleanNonBlock() {\n return (((readLongNonBlock() & 1) == 1) ? true : false);\n }", "boolean getB27();", "public boolean mo17610b() {\n return (this.f2616d == 0 && this.f2617e == 0) ? false : true;\n }", "public void mo11153b() {\n m48032c(false);\n }", "protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException\n {\n // Starting from the Macroblock type\n /* read macro block bit flags */\n/*\n swi*tch (getPictureType()) {\n\n case Picture.I_TYPE:\n getIMBType(stream);\n break;\n case Picture.P_TYPE:\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n break;\n case Picture.B_TYPE:\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n break;\n }\n*/\n int type = getPictureType();\n if (type == Picture.I_TYPE) {\n getIMBType(stream);\n } else if (type == Picture.P_TYPE) {\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n } else if (type == Picture.B_TYPE) {\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n }\n\n\n\n if (haveMBQuant())\n setQuantizerScale(stream.getBits(5));\n\n if (isForwardPredicted())\n forwardVector.getMotionVector(stream);\n\n if (isBackwardPredicted())\n backwardVector.getMotionVector(stream);\n\n if (haveMBPattern())\n getMBPattern(stream);\n else resetMBPattern();\n\n int i,j;\n\n // Clear the block data\n for (i=0;i<6;i++)\n for (j=0;j<64;j++)\n block[i][j] = 0;\n\n // Read DCT coefficients\n if (isMBIntra()) {\n\n for (i=0;i<4;i++) {\n dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream));\n IDCT.transform(block[i]);\n }\n\n dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream));\n IDCT.transform(block[4]);\n\n dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream));\n IDCT.transform(block[5]);\n\n } else {\n for (i=0;i<6;i++) {\n\n if ((codedBlockPattern & (1 << (5-i))) != 0) {\n\n getInterBlock(block[i], stream);\n IDCT.transform(block[i]);\n }\n }\n }\n\n if (getPictureType() == Picture.D_TYPE)\n stream.flushBits(1);\n // Parsing Macro Block finished!\n }", "private boolean m116916b() {\n return (this.f83728b == null && this.f83729c == 0) ? false : true;\n }", "public boolean mo64135b() {\n return false;\n }", "boolean hasRecode();", "public boolean isSequential(EdifCell cell) {\n return XilinxTools.isSequential(cell);\n }", "public boolean mo9735b() {\n return this.f9082i == this.f9080g && !mo9770j(1);\n }", "public boolean mo880l() {\n return this.f619n.mo821k();\n }", "@NonNull boolean canBreakWithHand();", "private boolean maybeBelowTracked(Block block) {\n\t\tif (Material.SOIL.equals(block.getType()) || // wheat, carrots, potatoes, beetroot, melon stalk, pumpkin stalk\n\t\t\t\tMaterial.NETHERRACK.equals(block.getType()) || // netherwart\n\t\t\t\tMaterial.SAND.equals(block.getType()) || // cactus, sugarcane\n\t\t\t\tMaterial.END_STONE.equals(block.getType())) { // chorus fruit \n\t\t\treturn true;\n\t\t}\n\t\tBlock up = block.getRelative(BlockFace.UP);\n\t\tif (Material.BROWN_MUSHROOM.equals(up.getType()) || Material.RED_MUSHROOM.equals(up.getType()) || // mushrooms\n\t\t\t\tMaterial.SAPLING.equals(up.getType())) { // saplings\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean mo56165b() {\n return false;\n }", "@Override\n public boolean detect() {\n \t slowDown();\n final MoveResult move = CurrentData.CALCULATED.tetromino.move;\n\t\t\t\t\t\tif (move.hasMove()) {\n final Tetromino moveTetromino = move.tetromino;\n final int y = QQRobot.findTetromino(moveTetromino, 3 + missingTetromino * 2);\n if (y == -1) {\n missingTetromino++;\n if (missingTetromino == 3) {\n // System.out.println(\"没找到块\" + nr + \"!\" + CurrentData.CALCULATED.tetromino.move + \", \"\n // + CurrentData.CALCULATED.tetromino + \", \"\n // + CurrentData.CALCULATED.tetromino.move.tetromino);\n // QQDebug.save(QQRobot.getScreen(), \"qqtetris_\" + nr);\n // nr++;\n throw new NoTetrominoFoundException(\"没找到块!\");\n // CurrentData.CALCULATED.tetromino.move.doMove();\n }\n } else {\n \t final int fallen = y - moveTetromino.y;\n if (fallen > 0) {\n // System.out.println(\"掉落:\" + fallen);\n moveTetromino.y = y;\n } \t \n \t if (move.clever) {\n \t \t if (firstScan) {\n \t \t firstScan = false;\n \t \t } else if (fallen > 0) {\n\t\t\t move.doMove(); \t \t \t \n \t \t }\n \t } else {\n\t\t move.doMove();\n \t }\n }\n }\n if (move.hasMove()) {\n return false;\n } else {\n // QQDebug.printBoard(CurrentData.CALCULATED.board);\n return true;\n }\n }", "public boolean mo1752b() {\n return true;\n }", "public boolean func_70601_bi() {\n/* 371 */ int var1 = MathHelper.func_76128_c((func_174813_aQ()).field_72338_b);\n/* */ \n/* 373 */ int var2 = MathHelper.func_76128_c(this.field_70165_t);\n/* 374 */ int var3 = MathHelper.func_76128_c(this.field_70161_v);\n/* 375 */ int var4 = this.field_70170_p.func_175699_k(new BlockPos(var2, var1, var3));\n/* 376 */ byte var5 = 7;\n/* */ \n/* 378 */ return (var4 > this.field_70146_Z.nextInt(var5)) ? false : super.func_70601_bi();\n/* */ }", "@java.lang.Override\n public boolean hasSigmoidCalibration() {\n return calibratorCase_ == 3;\n }", "private void m1939b() {\n int a = this.f2425b.mo5192a();\n if (a == RainbowPalette.f2751e ? C0530c.m1816a().mo4948c() : a == RainbowPalette.f2750d ? C0530c.m1816a().mo4949d() : C0530c.m1816a().mo4946b()) {\n this.f2429f.mo5203b();\n } else {\n this.f2429f.mo5201a();\n }\n }", "public boolean mo42152b() {\n return this.f12555a != null;\n }", "public boolean renderAsNormalBlock()\n\t {\n\t return false;\n\t }", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasSigmoidCalibration() {\n return calibratorCase_ == 3;\n }", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n if (!BoardUtils.isSameBoard(CurrentData.REAL.board, CurrentData.CALCULATED.board)) {\n this.boardChangeDetected++;\n if (this.boardChangeDetected == 3) {\n throw new UnexpectedBoardChangeException(\"找到变动!\");\n }\n }\n CurrentData.REAL.reset();\n QQRobot.findTetromino(RGB_MY_SPACE, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks, 5);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n boolean valid = false;\n if (CurrentData.REAL.tetromino.isValid()) {\n if (CurrentData.REAL.nextBlocks[1] == null) {\n this.missingFutures++;\n if (this.missingFutures == 3) {\n throw new NoFuturesFoundException(\"没找到预知块!\");\n }\n } else {\n valid = true;\n }\n } else {\n this.missingTetromino++;\n if (this.missingTetromino == 2000 / this.delayMillis) {\n throw new NoTetrominoFoundException(\"没找到游戏块!\");\n }\n }\n if (valid) {\n return true;\n } else {\n return false;\n }\n }", "public boolean mo253b() {\n return true;\n }", "private boolean factor() {\r\n return MARK(ATOM) && atom() && postops();\r\n }", "public final boolean mo29129b() {\n return (this.f19162b & 2) == 2;\n }", "public boolean renderAsNormalBlock()\r\n/* 166: */ {\r\n/* 167:184 */ return false;\r\n/* 168: */ }", "public final boolean mo4499BI() {\n AppMethodBeat.m2504i(26277);\n C43842b.m78623a(C43841a.cUn().tXt.tXK.tYz);\n AppMethodBeat.m2505o(26277);\n return true;\n }", "boolean getIsBcast();", "@Override\n\tpublic boolean isNotBreak() {\n\t\treturn false;\n\t}", "boolean hasSigmoidCalibration();", "public boolean mo11676b() {\n return true;\n }", "public final boolean mo8040b() {\n return ((Boolean) f6902a.mo8113b()).booleanValue();\n }", "public boolean b(IBlockAccess paramard, BlockPosition paramdt)\r\n/* 31: */ {\r\n/* 32:46 */ return true;\r\n/* 33: */ }", "public boolean renderAsNormalBlock(){\r\n return false;\r\n }", "public boolean mo9735b() {\n return this.f9074i == this.f9072g;\n }", "public boolean consumeImpulse()\n {\n\treturn modelStep();\n }", "public boolean hasObjective(){ return this.hasParameter(1); }", "public int hasBias() {\r\n\t\tif (bias != null) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public boolean getPinValue() {\n boolean ret = false;\n for (Boolean val : sourceBlocks.values())\n ret = ret | val;\n \n return ret;\n }", "public void mo1335b() {\n m18896a(false);\n }", "public boolean b() {\n/* 365 */ switch (this.h) {\n/* */ case 0:\n/* */ case 1:\n/* 368 */ return true;\n/* */ case 2:\n/* 370 */ return false;\n/* */ } \n/* 372 */ throw new IllegalArgumentException(\"Non JPEG 2000 part I component transformation\");\n/* */ }", "public boolean isBackward()\n {\n return (state == AnimationState.BACKWARD);\n }", "boolean hasHas_consequence();", "public boolean a()\n {\n return Block.TORCH.a();\n }", "public boolean renderAsNormalBlock()\n {\n return false;\n }", "public final boolean mo5182h() {\n return !(this.f9488l instanceof C0193hb);\n }", "boolean mo1293b() {\n return true;\n }", "public boolean renderAsNormalBlock()\r\n {\r\n return false;\r\n }", "private boolean m10268c(byte b) {\r\n int i = b & 15;\r\n if (i == 1 || i == 2) {\r\n return true;\r\n }\r\n return false;\r\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate boolean maybeSideTracked(Block block) {\n\t\tif (Material.LOG.equals(block.getType()) && block.getData() == 3) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean istBerechtigt() {\n\t\treturn true;\n\t}", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "boolean hasBbgSymbol();", "public boolean isActionBlock() {\n return false;\n }", "@Override\n\tpublic final boolean renderAsNormalBlock()\n\t{\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasClassIdSigmoidCalibrations() {\n return calibratorCase_ == 4;\n }", "public boolean isLastPhase ()\n {\n return true;\n }", "public abstract boolean mo66253b();", "public void changeHasMoveBoost()\r\n\t{\r\n\t\thasMoveBoost = !hasMoveBoost;\r\n\t}", "boolean hasAutomatic();", "Boolean getPartiallyCorrect();", "public final boolean mo38102b() {\n return this.f38813b.mo38201c();\n }", "@java.lang.Override\n public boolean hasClassIdSigmoidCalibrations() {\n return calibratorCase_ == 4;\n }", "public boolean isInline() {\n/* 54 */ return this.inline;\n/* */ }", "public boolean mo9235as() {\n return false;\n }", "public boolean getIsFlow() {\r\n return !isFlow.get();\r\n }", "private static boolean model_block_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"model_block_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = model_block_4_0_0(b, l + 1);\n if (!r) r = comment(b, l + 1);\n if (!r) r = consumeToken(b, EOL);\n exit_section_(b, m, null, r);\n return r;\n }" ]
[ "0.6396266", "0.6066403", "0.58455527", "0.56314075", "0.5594518", "0.5537884", "0.5492983", "0.5459701", "0.5432568", "0.54117423", "0.53964615", "0.53886133", "0.5336877", "0.5327598", "0.53176326", "0.53176326", "0.5312191", "0.5312191", "0.52881503", "0.52645046", "0.5259203", "0.5255694", "0.5239199", "0.5234665", "0.52243865", "0.520454", "0.51891667", "0.5181582", "0.51800096", "0.5159638", "0.5146696", "0.5135419", "0.5131623", "0.5120819", "0.5110527", "0.51094884", "0.5100629", "0.50848556", "0.50828916", "0.50800776", "0.50787115", "0.507615", "0.50735223", "0.5068968", "0.50679916", "0.50643486", "0.5062171", "0.50609344", "0.5058606", "0.50565416", "0.50565416", "0.50565416", "0.50565416", "0.5054658", "0.5054349", "0.5049935", "0.5046133", "0.5043478", "0.50414205", "0.5038867", "0.50345296", "0.5023778", "0.5022134", "0.50199133", "0.50176305", "0.50008583", "0.49993834", "0.49992076", "0.4997182", "0.4983414", "0.49811482", "0.49687156", "0.49628025", "0.496206", "0.49556693", "0.49486288", "0.49433276", "0.49431947", "0.49399194", "0.4939333", "0.4935148", "0.49349636", "0.493196", "0.4931404", "0.49313325", "0.49311393", "0.4930955", "0.49288613", "0.4927047", "0.49242046", "0.49241093", "0.49237436", "0.49219438", "0.49189982", "0.49181828", "0.4915505", "0.49148792", "0.49134907", "0.49133375", "0.4912697" ]
0.6687911
0
If the Macro Block is backward predicted
boolean isBackwardPredicted() { return (mbType & BACKWARD)!=0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBackward()\n {\n return (state == AnimationState.BACKWARD);\n }", "boolean isForwardPredicted()\n {\n return ((mbType & FORWARD) != 0);\n }", "boolean isBidirPredicted()\n {\n return ((mbType & FORWARD)!=0) && ((mbType & BACKWARD)!=0);\n }", "boolean previousStep();", "@Override\r\n\tprotected String doBackward(List<Emotion> b) {\n\t\treturn null;\r\n\t}", "@ActionTrigger(action=\"KEY-PRVBLK\", function=KeyFunction.PREVIOUS_BLOCK)\n\t\tpublic void spriden_PreviousBlock()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"INVALID_FUNCTION_MSG\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "public boolean isLastPhase ()\n {\n return true;\n }", "public void stepBackward(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\n\t\t//check to see if we are back to the first frame\n\t\tif(frameIndex == 0){ frameIndex = frames.length-1; }\n\t\telse{ frameIndex--; }\n\t\n\t\tframes[frameIndex].display();\n frames[frameIndex].clearDisplay();\n\t}", "public void stepBackward() {\n\t\tposition = backwardPosition();\n\t}", "public void moveBackward(boolean endWithBrake){\r\n \r\n Motor.B.rotate(-1*DEGREES_PER_TILE, true);//Accesses Motor thread\r\n Motor.C.rotate(-1*DEGREES_PER_TILE, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }", "public void alg_RUNCONVEYER(){\nBlock.value=false;\nSystem.out.println(\"run\");\n\n}", "private void parseBackward() {\r\n \t\tELOperandToken token;\r\n \t\tfState = STATE_INITIAL;\r\n \t\twhile ((token = getNextToken()) != ELOperandToken.EOF) {\r\n \t\t\tif (token.type == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||\r\n \t\t\t\t\ttoken.type == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||\r\n \t\t\t\t\ttoken.type == ELOperandToken.EL_METHOD_TOKEN ||\r\n \t\t\t\t\ttoken.type == ELOperandToken.EL_SEPARATOR_TOKEN) {\r\n \r\n \t\t\t\tfTokens.add(0, token);\r\n \t\t\t}\r\n \t\t}\r\n \t\t// set first token as variable\r\n \t\tfor (int i=0; i<fTokens.size(); i++) {\r\n \t\t\ttoken = fTokens.get(i);\r\n \t\t\tif(token.isNameToken()) {\r\n \t\t\t\ttoken.type = ELOperandToken.EL_VARIABLE_NAME_TOKEN;\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public Stmt getBackJumpStmt() {\r\n\t\treturn backJump;\r\n\t}", "private void trueRevertBlock() {\r\n\t\tthis.reverted = true;\r\n\t\tif (instances_.containsKey(this.block)) {\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> {\r\n\t\t\t\tTempBlock last = instances_.get(this.block).getLast();\r\n\t\t\t\tthis.block.setBlockData(last.newData); //Set the block to the next in line TempBlock\r\n\t\t\t});\r\n\t\t} else { //Set to the original blockstate\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> revertState());\r\n\t\t}\r\n\r\n\t\tREVERT_QUEUE.remove(this);\r\n\t\tif (this.revertTask != null) {\r\n\t\t\tthis.revertTask.run();\r\n\t\t}\r\n\r\n\t\tfor (TempBlock attached : attachedTempBlocks) {\r\n\t\t\tattached.revertBlock();\r\n\t\t}\r\n\t}", "@Override\n public void backward() {\n }", "public boolean hasBack() {\n if (index > 0) {\n return true;\n } else {\n return false;\n }\n }", "private boolean isLastFrame() {\n\t\treturn false;\r\n\t}", "public boolean canSeekBackwards() {\n/* 131 */ return true;\n/* */ }", "public void backward()\n\t{\n\t\tupdateState( MotorPort.BACKWARD);\n\t}", "protected void assertBackToState() {\n\t\tassertTrue(recorder.recorded(EC.TLC_BACK_TO_STATE));\n\t\tfinal List<Object> loop = recorder.getRecords(EC.TLC_BACK_TO_STATE);\n\t\tassertTrue(loop.size() > 0);\n\t}", "public boolean isLastFrame(){\r\n\t\t//to be implemented\r\n\t\treturn false;\r\n\t}", "private final boolean isBackwardsStart()\n {\n return (m_bufferOffset_ < 0 && m_source_.getIndex() == 0)\n || (m_bufferOffset_ == 0 && m_FCDStart_ <= 0);\n }", "@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }", "@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }", "@Test\n public void testBackwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.backwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public boolean inDelaySlot() {\r\n\t\treturn !empty() && backSteps.peek().inDelaySlot;\r\n\t}", "public boolean isTerm()\n {\n if (phase == 0)\n {\n return (loc.y == input.high_y);\n }\n if (phase == 3)\n {\n return (loc.y == input.high_y);\n\n }\n return false; \n\n }", "@Override\r\n\tpublic boolean canSeekBackward() {\n\t\treturn true;\r\n\t}", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "public boolean nextState() {\n\t\treturn false;\n\t}", "public void backStep() {\r\n\t\tif (engaged && !backSteps.empty()) {\r\n\t\t\tProgramStatement statement = ((BackStep) backSteps.peek()).ps;\r\n\t\t\tengaged = false; // GOTTA DO THIS SO METHOD CALL IN SWITCH WILL NOT\r\n\t\t\t\t\t\t\t\t// RESULT IN NEW ACTION ON STACK!\r\n\t\t\tdo {\r\n\t\t\t\tBackStep step = (BackStep) backSteps.pop();\r\n\t\t\t\t/*\r\n\t\t\t\t * System.out.println(\"backstep POP: action \"+step.action+\" pc \"\r\n\t\t\t\t * +mars.util.Binary.intToHexString(step.pc)+\r\n\t\t\t\t * \" source \"+((step.ps==null)? \"none\":step.ps.getSource())+\r\n\t\t\t\t * \" parm1 \"+step.param1+\" parm2 \"+step.param2);\r\n\t\t\t\t */\r\n\t\t\t\tif (step.pc != NOT_PC_VALUE) {\r\n\t\t\t\t\tRegisterFile.setProgramCounter(step.pc);\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tswitch (step.action) {\r\n\t\t\t\t\tcase MEMORY_RESTORE_RAW_WORD:\r\n\t\t\t\t\t\tGlobals.memory.setRawWord(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MEMORY_RESTORE_WORD:\r\n\t\t\t\t\t\tGlobals.memory.setWord(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MEMORY_RESTORE_HALF:\r\n\t\t\t\t\t\tGlobals.memory.setHalf(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MEMORY_RESTORE_BYTE:\r\n\t\t\t\t\t\tGlobals.memory.setByte(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase REGISTER_RESTORE:\r\n\t\t\t\t\t\tRegisterFile.updateRegister(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase PC_RESTORE:\r\n\t\t\t\t\t\tRegisterFile.setProgramCounter(step.param1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC0_REGISTER_RESTORE:\r\n\t\t\t\t\t\tCoprocessor0.updateRegister(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC1_REGISTER_RESTORE:\r\n\t\t\t\t\t\tCoprocessor1.updateRegister(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC1_CONDITION_CLEAR:\r\n\t\t\t\t\t\tCoprocessor1.clearConditionFlag(step.param1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC1_CONDITION_SET:\r\n\t\t\t\t\t\tCoprocessor1.setConditionFlag(step.param1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase DO_NOTHING:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// if the original action did not cause an exception this\r\n\t\t\t\t\t// will not either.\r\n\t\t\t\t\tSystem.out.println(\"Internal MARS error: address exception while back-stepping.\");\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t} while (!backSteps.empty() && statement == ((BackStep) backSteps.peek()).ps);\r\n\t\t\tengaged = true; // RESET IT (was disabled at top of loop -- see\r\n\t\t\t\t\t\t\t// comment)\r\n\t\t}\r\n\t}", "private boolean NOT(boolean b) {\r\n in = saves[--save];\r\n return !b;\r\n }", "@Override\n public boolean step() {\n return false;\n }", "public boolean checkPreviousBlock(JsonObject block){\n String init = \"0000000000000000000000000000000000000000000000000000000000000000\";\n\n if(BlockChain.isEmpty()){\n return block.get(\"PrevHash\").getAsString().equals(init);\n } else {\n for(branch b: BlockChain){\n if(block.get(\"PrevHash\").getAsString().equals(Hash.getHashString(b.last_block.toString()))) return true;\n }\n return false;\n }\n }", "@Override\r\n public boolean hasPrevious() {\n return returned.prev != header;\r\n }", "public boolean isBackedge() {\n\t\treturn isBackEdge;\r\n\t}", "@Override\n\tpublic boolean performsBlockAnimation() {\n\t\treturn false;\n\t}", "public int getBackward() {\n return this.backward;\n }", "public boolean getStop() {\n\t\treturn end == 5;\n\t}", "@Override\r\n\t\tpublic boolean hasPrevious() {\n\t\t\treturn false;\r\n\t\t}", "public void frameBackward()\n{\n stop();\n setTime(getTime() - getInterval());\n}", "@Override\r\n\tpublic boolean reverseAccrualIt() {\n\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean handbrake() {\n if (getY() % symbolHeight == 0) return false;\n doBreak=true;\n return true;\n }", "public boolean consumeImpulse()\n {\n\treturn modelStep();\n }", "public boolean reverseAnimate() {\n\t\treturn reverse;\n\t}", "@Override\n\tpublic boolean reverseAccrualIt() {\n\t\treturn false;\n\t}", "public String findBackward() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}", "public final boolean synpred105_InternalFin() {\r\n state.backtracking++;\r\n int start = input.mark();\r\n try {\r\n synpred105_InternalFin_fragment(); // can never throw exception\r\n } catch (RecognitionException re) {\r\n System.err.println(\"impossible: \"+re);\r\n }\r\n boolean success = !state.failed;\r\n input.rewind(start);\r\n state.backtracking--;\r\n state.failed=false;\r\n return success;\r\n }", "public boolean hasPrevious() {\r\n \treturn index > 0; \r\n }", "public boolean getBack()\n {\n return m_bBackLock;\n }", "private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}", "public boolean getMoveRemainingStartsBack()\r\n {\r\n return (m_moveRemainingStartsBack);\r\n }", "public boolean previousExpressionConstant() {\r\n return isConstant;\r\n }", "public boolean hasPrevious()\n {\n // TODO: implement this method\n return false;\n }", "public boolean hasPrevious() {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n\tpublic boolean stopLeft() {\n\t\tboolean rs = super.stopLeft();\n\t\tif(rs == true && this.y_dir == STOP){\n\t\t}\n\t\treturn rs;\n\t}", "boolean hasPrevious();", "boolean hasPrevious();", "boolean hasPrevious();", "boolean hasPrevious();", "public boolean goBack() {\n if(index > 0) {\n index--;\n return true;\n } else {\n return false;\n }\n }", "@Test\n public void shouldPredictByRotatingPreviousMoveInReverseDirection() {\n ReverseRotationStrategy strategy = new ReverseRotationStrategy();\n\n strategy.addHistory(Shape.ROCK, Shape.PAPER);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.ROCK.defeatedBy()));\n\n strategy.addHistory(Shape.ROCK, Shape.ROCK);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.SPOCK.defeatedBy()));\n }", "public boolean jumpMayBeChanged() {\n\t\treturn (subBlocks[1].jump != null || subBlocks[1].jumpMayBeChanged());\n\t}", "boolean hasLastAction();", "public boolean isForward()\n {\n return (state == AnimationState.FORWARD);\n }", "@Override\n\tpublic boolean isNotBreak() {\n\t\treturn false;\n\t}", "@Override\n\tpublic Object backward(Object grad_output) {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean isBackable() {\n\t\treturn false;\n\t}", "public boolean hasPrevious() \n\t{\n\t\tboolean res = false;\n\t\tif(actual != null) {\n\n\t\t\tif(esUltimo && actual != null)\n\t\t\t\tres=true;\n\t\t\telse {\n\t\t\t\tres = actual.darAnterior() != null;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }", "@Test\n\tpublic void testForwardStopLoss() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6649271, PositionType.ZERO_BASED),\n\t\t\t\t\"ACG\", \"CGTT\");\n\t\t// Note that the transcript here differs to the one Mutalyzer uses after the CDS.\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(10, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.2067_*2delinsCGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.*689Tyrext*25\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.STOPLOSS),\n\t\t\t\tannotation1.effects);\n\n\t\t// Replace stop codon by 6 nucleotides, non-frameshift case.\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6649270, PositionType.ZERO_BASED),\n\t\t\t\t\"ACT\", \"CGGTCG\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(10, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.2066_*1delinsCGGTCG\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.*689Serext*17\", annotation2.aaHGVSDescription);\n\t\t// Note that the transcript here differs to the one Mutalyzer uses after the CDS.\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION, VariantType.STOPLOSS),\n\t\t\t\tannotation2.effects);\n\n\t\t// Delete first base of stop codon, leads to complete loss.\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6649269, PositionType.ZERO_BASED),\n\t\t\t\t\"ACG\", \"CGGT\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(10, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.2065_2067delinsCGGT\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.*689Argext*16\", annotation3.aaHGVSDescription);\n\t\t// Note that the transcript here differs to the one Mutalyzer uses after the CDS.\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION, VariantType.STOPLOSS),\n\t\t\t\tannotation3.effects);\n\t}", "static boolean stop_instruction(String instruction){\n\t\tString code = instruction.split(\" \")[0];\n\t\tswitch(code){\n\t\tcase \"HLT\":\n\t\tcase \"RST\":\n\t\tcase \"RET\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "public void alg_BLOCKCONVEYER(){\nBlock.value=true;\nSystem.out.println(\"block\");\n\n}", "public boolean hasPrevious() {\n return position > 0;\n }", "public boolean getMoveCompletedEndsBack()\r\n {\r\n return (m_moveCompletedEndsBack);\r\n }", "Activity getTransformBackwardActivity();", "boolean isBiasNeuron();", "@Override\r\n\tpublic void stop() {\r\n\t\tcurrentModuleLabels = new ModuleLabels(module);\r\n\t\tif(checkExistanceLabels(currentModuleLabels,moduleLabels)){\r\n\t\t\tATRONController atronController = (ATRONController)module.getController();\r\n\t\t\tatronController.rotateDegrees(1);\r\n\t\t\tatronController.rotateDegrees(-1);\r\n\t\t}\r\n\t\t\r\n\t}", "public int[] getBackward() { return _backwardDiag; }", "boolean getOutputPartialsBeforeLanguageDecision();", "protected boolean isFinished() {\n \tif (Robot.clawElevator.getContainerHeight() == 0) {\n \t\treturn Robot.clawElevator.getLowerSwitch();\n \t} else {\n \t\treturn Robot.clawElevator.getLowerSwitch() || Robot.clawElevator.isAtIntemediateStop(Math.abs(Robot.clawElevator.getContainerHeight() - 3), false);\n \t}\n }", "public String getBackwardNode() {\r\n\t\ttry {\r\n\t\t\treturn path.getPreviousNode(procNode);\r\n\t\t} catch (Exception e) {return null; /* In case of an error!*/}\r\n\t}", "@Override\n\tpublic boolean stopRight() {\n\t\tboolean rs = super.stopRight();\n\t\tif(rs == true && this.y_dir == STOP){\t\t\t\n\t\t}\n\t\treturn rs;\n\t}", "public boolean isForward() {\n return true;\n }", "boolean hasStep();", "boolean hasStep();", "boolean hasStep();", "public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}", "public void jumpBack() {\n this.instructionList = this.stack.pop();\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "public boolean isTransition() {\n/* 4839 */ return this.isTransition;\n/* */ }", "K previous();", "public boolean getContinueFlag()\r\n {\r\n if (curTurn > 1) return false;\r\n return true;\r\n }", "public void brakeFailureStatus() {\n \tthis.brakeFailureActive = this.trainModelGUI.brakeFailStatus();\n }", "private boolean for_cond(){\n int save = position;\r\n boolean for_cond = false;\r\n\r\n if (getNextLexeme() == Lexeme.LP) {\r\n if(init()){\r\n if(log_exp() && getNextLexeme() == Lexeme.END){\r\n if(getNextLexeme() == Lexeme.VAR && assign_op()) {\r\n if (getNextLexeme() == Lexeme.RP) {\r\n for_cond = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n position = for_cond ? position : save;\r\n return for_cond;\r\n }", "private boolean isUnderground(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().isUnderground() == true){return true; }\n else{ return false; }\n }", "public boolean hasPrevious() {\n\t\tif(prevIndex > -1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isInverted() {\n/* 59 */ return ((getData() & 0x8) != 0);\n/* */ }", "public boolean isGoal() {\n if (blocks[dimension()-1][dimension()-1] != 0) return false;\n return hamming() == 0;\n }", "protected void sequence_BACKWARD(ISerializationContext context, BACKWARD semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.DEP_YIMPL__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.DEP_YIMPL__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.DEP_YIMPL__DISTANCE_CST) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.DEP_YIMPL__DISTANCE_CST));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.DEP_YIMPL__TEMPS_CST) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.DEP_YIMPL__TEMPS_CST));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getBACKWARDAccess().getNameBackwardKeyword_0_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getBACKWARDAccess().getDistanceCSTINTTerminalRuleCall_4_0(), semanticObject.getDistanceCST());\n\t\tfeeder.accept(grammarAccess.getBACKWARDAccess().getTempsCSTINTTerminalRuleCall_7_0(), semanticObject.getTempsCST());\n\t\tfeeder.finish();\n\t}" ]
[ "0.6458742", "0.63809854", "0.61890525", "0.6177451", "0.5823541", "0.5777023", "0.5740077", "0.56749946", "0.56156665", "0.5536502", "0.55280185", "0.55263674", "0.551976", "0.5494439", "0.54706645", "0.5463147", "0.54256415", "0.541205", "0.5397496", "0.5346185", "0.53397447", "0.53214514", "0.5281292", "0.5274104", "0.52671087", "0.5261727", "0.5251096", "0.5242008", "0.52401537", "0.5234699", "0.52321106", "0.52182853", "0.52173495", "0.5191866", "0.51855934", "0.5177318", "0.5176371", "0.5174835", "0.51734215", "0.516188", "0.5160406", "0.5151652", "0.5146659", "0.51459", "0.51397693", "0.51349056", "0.5132438", "0.5113304", "0.5112632", "0.50920606", "0.50852007", "0.5080301", "0.50762904", "0.5075463", "0.5073726", "0.50567067", "0.5048437", "0.5048437", "0.5048437", "0.5048437", "0.50386465", "0.5036864", "0.50317687", "0.5027625", "0.5020321", "0.50171775", "0.50159264", "0.5014087", "0.5004841", "0.49933815", "0.49868572", "0.4977037", "0.49692196", "0.49665204", "0.4961088", "0.49605727", "0.49594274", "0.49573082", "0.4950266", "0.49473417", "0.49364185", "0.4935139", "0.49346644", "0.49339536", "0.49336797", "0.49336797", "0.49336797", "0.49304703", "0.49287638", "0.4924395", "0.49189225", "0.49139062", "0.49102315", "0.49088925", "0.48969755", "0.48906428", "0.4889459", "0.4883923", "0.48833445", "0.48803598" ]
0.73029566
0
If the Macro Block is forward predicted
boolean isForwardPredicted() { return ((mbType & FORWARD) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isBackwardPredicted()\n {\n return (mbType & BACKWARD)!=0;\n }", "boolean isBidirPredicted()\n {\n return ((mbType & FORWARD)!=0) && ((mbType & BACKWARD)!=0);\n }", "public boolean consumeImpulse()\n {\n\treturn modelStep();\n }", "public boolean isTerm()\n {\n if (phase == 0)\n {\n return (loc.y == input.high_y);\n }\n if (phase == 3)\n {\n return (loc.y == input.high_y);\n\n }\n return false; \n\n }", "boolean previousStep();", "boolean hasTrainIdx();", "boolean hasSigmoidCalibration();", "@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }", "@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }", "public boolean hasObjective(){ return this.hasParameter(1); }", "boolean hasStep();", "boolean hasStep();", "boolean hasStep();", "boolean isBiasNeuron();", "public boolean hasTarget() { \n if (isReal) {\n return get(\"tv\") == 1; // cleaned return statement up\n } else {\n return hasTargetSim.getBoolean(false);\n }\n }", "public boolean getIsInfectedOnThisStep() {\n return isInfectedOnThisStep;\n }", "public boolean is_set_predictResult() {\n return this.predictResult != null;\n }", "private void makePrediction(int row) {\n \tif (row == 0) return;\n \tfor (int j = 0; j < width; j++) {\n\t \tIterator<Integer> hints = colHints.get(j).iterator();\n\t \tint blockSize = 0;\n\t \tint hint = hints.next();\n\t \tfor (int i = 0; i < row; i++) {\n\t \t\tif (matrix[i][j] == FILLED || preprocessed[i][j] == FILLED) {\n\t \t\t\tblockSize++;\n\t \t\t}\n\t \t\telse if (matrix[i][j] == EMPTY || preprocessed[i][j] == EMPTY) {\n\t \t\t\tif (blockSize > 0) hint = hints.hasNext() ? hints.next() : 0;\n\t \t\t\tblockSize = 0;\n\t \t\t}\n\t \t}\n\t \t// if a block already started and is not completed: this field certainly needs to be FILLED\n \t\tif (blockSize > 0 && blockSize < hint) {\n \t\t\tpredictions[row][j] = FILLED;\n \t\t}\n \t\t// if the block is exactly completed: next field is certainly EMTPY\n \t\telse if (blockSize == hint) {\n \t\t\tpredictions[row][j] = EMPTY;\n \t\t}\n \t\t// otherwise we cannot make a prediction\n \t\telse {\n \t\t\tpredictions[row][j] = UNKNOWN;\n \t\t}\n \t}\n }", "boolean getOutputPartialsBeforeLanguageDecision();", "public final boolean modstate_has_forecast () {\n\t\treturn modstate >= MODSTATE_FORECAST;\n\t}", "public boolean Step(){\n\t\t\t\t\tboolean Result = true;\t\t\t\t\t\t// A vegso eredmeny: Stabil-e az aramkor\n\t\t\t\t\t_TEST stack = new _TEST();\t\t\t\t\t/* TEST */\n\t\t\t\t\tstack.PrintHeader(ID,\"\",\"true:boolean\");\t/* TEST */\n\t\t\t\t\tPreviousValue = Count();\t\t\t\t\t// Megnezzuk az elso futas erredmenyet\n\t\t\t\t\tinv0.Count();\t\t\t\t//feedback[0].Count(), elso ciklus\n\t\t\t\t\tPreviousValue = Count();\t//feedback 0 es 1 kozt magat frissiti\n\t\t\t\t\tinv0.Count();\t\t\t\t//feedback[0].Count(), masodik ciklus\n\t\t\t\t\tPreviousValue = Count();\t//frissiti magat. itt instabilitasi teszt jon a proto-ban\n\n\t\t\t\t\tstack.PrintTail(ID,\"\",Result + \":boolean\");\t/* TEST */\n\t\t\t\t\treturn Result;\n\t\t\t\t}", "public boolean mo7629p() {\n return this.f4372b.size() > 0;\n }", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n if (!BoardUtils.isSameBoard(CurrentData.REAL.board, CurrentData.CALCULATED.board)) {\n this.boardChangeDetected++;\n if (this.boardChangeDetected == 3) {\n throw new UnexpectedBoardChangeException(\"找到变动!\");\n }\n }\n CurrentData.REAL.reset();\n QQRobot.findTetromino(RGB_MY_SPACE, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks, 5);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n boolean valid = false;\n if (CurrentData.REAL.tetromino.isValid()) {\n if (CurrentData.REAL.nextBlocks[1] == null) {\n this.missingFutures++;\n if (this.missingFutures == 3) {\n throw new NoFuturesFoundException(\"没找到预知块!\");\n }\n } else {\n valid = true;\n }\n } else {\n this.missingTetromino++;\n if (this.missingTetromino == 2000 / this.delayMillis) {\n throw new NoTetrominoFoundException(\"没找到游戏块!\");\n }\n }\n if (valid) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean isInstruction() {\n return true;\n }", "public boolean preaction() {\n\t\tboolean p = true;\r\n\t\tif(!model.setSCVBuilding(2*preactionTime+duration)) { // adding time before and after\r\n\t\t\tp = false;\r\n\t\t}\r\n\t\tif(p) {\r\n\t\t\t//System.out.println(model.printTime() + \" <SCActionBuilding> Preaction\");\r\n\t\t\tpreactionComplete=true;\r\n\t\t}\r\n\t\treturn p;\r\n\t\t\r\n\t}", "public void alg_RUNCONVEYER(){\nBlock.value=false;\nSystem.out.println(\"run\");\n\n}", "boolean isEstConditionne();", "public boolean isLastPhase ()\n {\n return true;\n }", "public boolean isInstruction() {\r\n return true;\r\n }", "public boolean modelStep()\n {\n\tint i;\n\tboolean last;\n\n\tif (manim==null) return false;\n\n\tGraphics grp = getGraphics();\n\tGeneration g = manim.nextGeneration();\n\tif (g==null) {\n\t modelStop();\n\t return false;\n\t}\n\n\tlast = (manim.snoopGeneration() == null);\n\tVectorIterator vi = new VectorIterator(g);\n\twhile (vi.hasNext()) {\n\t drawNode(grp,(Node)(vi.next()));\n\t}\n\n\treturn true;\n }", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "boolean hasEstimator();", "public boolean isForward() {\n return true;\n }", "boolean hasDecision();", "boolean hasDecision();", "@java.lang.Override\n public boolean hasSigmoidCalibration() {\n return calibratorCase_ == 3;\n }", "void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }", "boolean nextStep();", "@java.lang.Override\n public boolean hasSigmoidCalibration() {\n return calibratorCase_ == 3;\n }", "@Override\n public boolean detect() {\n \t slowDown();\n final MoveResult move = CurrentData.CALCULATED.tetromino.move;\n\t\t\t\t\t\tif (move.hasMove()) {\n final Tetromino moveTetromino = move.tetromino;\n final int y = QQRobot.findTetromino(moveTetromino, 3 + missingTetromino * 2);\n if (y == -1) {\n missingTetromino++;\n if (missingTetromino == 3) {\n // System.out.println(\"没找到块\" + nr + \"!\" + CurrentData.CALCULATED.tetromino.move + \", \"\n // + CurrentData.CALCULATED.tetromino + \", \"\n // + CurrentData.CALCULATED.tetromino.move.tetromino);\n // QQDebug.save(QQRobot.getScreen(), \"qqtetris_\" + nr);\n // nr++;\n throw new NoTetrominoFoundException(\"没找到块!\");\n // CurrentData.CALCULATED.tetromino.move.doMove();\n }\n } else {\n \t final int fallen = y - moveTetromino.y;\n if (fallen > 0) {\n // System.out.println(\"掉落:\" + fallen);\n moveTetromino.y = y;\n } \t \n \t if (move.clever) {\n \t \t if (firstScan) {\n \t \t firstScan = false;\n \t \t } else if (fallen > 0) {\n\t\t\t move.doMove(); \t \t \t \n \t \t }\n \t } else {\n\t\t move.doMove();\n \t }\n }\n }\n if (move.hasMove()) {\n return false;\n } else {\n // QQDebug.printBoard(CurrentData.CALCULATED.board);\n return true;\n }\n }", "boolean hasOutputPartialsBeforeLanguageDecision();", "public final boolean synpred5_Python() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred5_Python_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\n }\n boolean success = !state.failed;\n input.rewind(start);\n state.backtracking--;\n state.failed=false;\n return success;\n }", "public boolean isForward()\n {\n return (state == AnimationState.FORWARD);\n }", "boolean hasFirstFrame();", "public boolean mo8478c() {\n return this.f3532b.size() > 0;\n }", "public void train ()\t{\t}", "public boolean isGoal() {\n if (blocks[dimension()-1][dimension()-1] != 0) return false;\n return hamming() == 0;\n }", "boolean hasSigmoidParameters();", "public boolean mo29013c() {\n ValueAnimator valueAnimator = this.f19137e;\n return valueAnimator != null && valueAnimator.isStarted();\n }", "public boolean Step(){\n\t\t\t\t\tboolean Result = true;\t\t\t\t\t\t// A vegso eredmeny: Stabil-e az aramkor\n\t\t\t\t\t_TEST stack = new _TEST();\t\t\t\t\t/* TEST */\n\t\t\t\t\tstack.PrintHeader(ID,\"\",\"true:boolean\");\t/* TEST */\n\t\t\t\t\t//count magat\n\t\t\t\t\tPreviousValue = Count();\t\t\t\t\t// Megnezzuk az elso futas erredmenyet\n\t\t\t\t\t//feedback[0], elso kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//sajat maga, elso kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//feedback[0], masodik kor\n\t\t\t\t\tPreviousValue = Count();\n\t\t\t\t\t//ha bitt nem egyezne meg, az elozo prev.valueval, akkor instabil.\n\t\t\t\t\tstack.PrintTail(ID,\"\",Result + \":boolean\");\t/* TEST */\n\t\t\t\t\treturn Result;\n\t\t\t\t}", "public boolean mo3882b() {\n return this.f3138s == 1;\n }", "boolean isHiddenNeuron();", "private boolean for_cond(){\n int save = position;\r\n boolean for_cond = false;\r\n\r\n if (getNextLexeme() == Lexeme.LP) {\r\n if(init()){\r\n if(log_exp() && getNextLexeme() == Lexeme.END){\r\n if(getNextLexeme() == Lexeme.VAR && assign_op()) {\r\n if (getNextLexeme() == Lexeme.RP) {\r\n for_cond = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n position = for_cond ? position : save;\r\n return for_cond;\r\n }", "boolean hasTrainingDataType();", "public static boolean hasTarget() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tv\").getDouble(0) == 0 ? false : true;\n }", "private boolean checkTrainingCondition(){\n //if one sample validation was negative, so trainingCondition will be false.\n for(Sample s: samples){\n if(!s.getValidation())\n return false;\n }\n return true;\n }", "@Override\n\t\tpublic boolean isPredictSecStructure() {\n\t\t\treturn false;\n\t\t}", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "public boolean hasPredFor(String name) {\n boolean re = false;\n if (name != null && getPredictions() != null) {\n Prediction tmp = null;\n for (int i=0; i<getPredictions().size(); i++) {\n tmp = getPredictions().get(i);\n if (tmp.stop.equals(name)) {\n re = true;\n break;\n }\n }\n }\n return re;\n }", "boolean isInputNeuron();", "private static boolean bayesian() {\n\t\tSystem.out.println(\"BAYESIAN\");\n\t\t\n//\t\tFFNeuralNetwork ffnn = new FFNeuralNetwork(ActivationFunction.SIGMOID0p5,5,5);\n\t\tModelLearner modeler = new ModelLearnerHeavy(100, new int[] {}, new int[] {5},\n\t\t\t\tnew int[] {}, ActivationFunction.SIGMOID0p5, 10);\n\t\t\n\t\tCollection<DataPoint> data = new ArrayList<DataPoint>();\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,0,0,1,0})); // move right\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,1,0,0,0})); // move left\n\t\tdata.add(new DataPoint(new double[] {0,1,0,0,0}, new double[] {1,0,0,0,0})); // move left again\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,1,0,0})); // move back to center\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,0,0,0})); // disappear\n\t\t\n//\t\tControlPanel.learnFromBackPropagation(ffnn.getInputNodes(), ffnn.getOutputNodes(), data,\n//\t\t\t\t10000, 1,1,0,0,0,0);\n\t\tfor (DataPoint dp : data) {\n\t\t\tmodeler.observePreState(dp.getInput());\n\t\t\tmodeler.observePostState(dp.getOutput());\n\t\t\tmodeler.saveMemory();\n\t\t}\n\t\tmodeler.learnFromMemory(1.5,0.5,0, false, 1000);\n\t\tmodeler.getTransitionsModule().getNeuralNetwork().report(data);\n\t\t\n\t\tdouble[] foresight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 1, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0) && near(foresight[1],0.5) && near(foresight[2],0)\n\t\t\t\t&& near(foresight[3],0.5) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 1 ok\" : \"montecarlo 1 sucks\");\n\t\tforesight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 2, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0.5) && near(foresight[1],0) && near(foresight[2],0.25)\n\t\t\t\t&& near(foresight[3],0) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 2 ok\" : \"montecarlo 2 sucks\");\n\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "boolean isOutputNeuron();", "boolean isCalledNext();", "@Override\n\tpublic double classify(Example example) {\n\t\t// run forwards part of training algorithm on specific example\n\t\t// input to calculateForward method is ArrayList of examples, so\n\t\t// arbitrarily creating one in order to avoid duplicating code\n\t\tArrayList<Example> ex = new ArrayList<Example>();\n\t\tex.add(example);\n\t\tSystem.out.println(\"calculated: \" + calculateForward(ex).get(0) + \" label: \" + example.getLabel());\n\t\treturn (calculateForward(ex).get(0) > 0) ? 1.0 : -1.0;\n\t}", "public double isCurrent( )\n {\n // Implemented by student.\n }", "public boolean isBackward()\n {\n return (state == AnimationState.BACKWARD);\n }", "public boolean nextState() {\n\t\treturn false;\n\t}", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n CurrentData.REAL.reset();\n QQRobot.findBoard(RGB_MY_SPACE, CurrentData.REAL.board);\n QQRobot.findAndCleanBoard(CurrentData.REAL.board, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n\n if (CurrentData.REAL.tetromino.isValid()) {\n return true;\n } else {\n return false;\n }\n }", "public org.drip.state.identifier.ForwardLabel forwardLabel()\n\t{\n\t\torg.drip.state.identifier.FloaterLabel floaterLabel = floaterLabel();\n\n\t\treturn null != floaterLabel && floaterLabel instanceof org.drip.state.identifier.ForwardLabel ?\n\t\t\t(org.drip.state.identifier.ForwardLabel) floaterLabel : null;\n\t}", "boolean isTargetStatistic();", "public org.drip.state.identifier.ForwardLabel forwardLabel()\n\t{\n\t\treturn _lslForward;\n\t}", "public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }", "public boolean nextConditionMet() {\n return true;\n }", "public boolean getIsFlow() {\r\n return !isFlow.get();\r\n }", "public abstract boolean istAusgeliefert();", "public boolean lambda35(Object x) {\n return ((Scheme.applyToArgs.apply2(this.pred, x) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "boolean hasClassIdSigmoidCalibrations();", "boolean hasAutomatic();", "public boolean hasLightWork() {\n/* 48 */ if (this.skyEngine != null && this.skyEngine.hasLightWork()) {\n/* 49 */ return true;\n/* */ }\n/* 51 */ return (this.blockEngine != null && this.blockEngine.hasLightWork());\n/* */ }", "public boolean mo9735b() {\n return this.f9091i == this.f9090h;\n }", "@Override\n public String getName() {\n return \"ifTrue_BranchBeTraversed\";\n }", "boolean hasForecast();", "public boolean isJumping(){\n if (jumpState == 2)\n return true;\n return false;\n\n}", "@Override\n\tpublic boolean jump() {\n\t\tboolean rs = super.jump();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t\t\n\t}", "private boolean isMacro(int nextVal) throws java.io.IOException, IOException {\n\t\tif (nextVal == PREPROCESSING) {\n\t\t\tint pos = (int) reader.getFilePointer();\n\t\t\tthis.readUntilEndOfLine(nextVal);\n\t\t\tthis.seek(pos);\n\t\t\treturn !(next.matches(\"!procedure.*\") || next.matches(\"!function.*\"));\n\t\t}\n\t\treturn false;\n\t}", "public boolean inDelaySlot() {\r\n\t\treturn !empty() && backSteps.peek().inDelaySlot;\r\n\t}", "public boolean getIsTargetFound() {\n NetworkTableEntry tv = m_table.getEntry(\"tv\");\n double v = tv.getDouble(0);\n if (v == 0.0f){\n return false;\n }else {\n return true;\n }\n }", "@Override\n public boolean step() {\n return false;\n }", "public boolean advanceAction(ParamFrame frame) {\r\n\t\t\t\t\r\n\t\tprocess.compileDataset(progressBar, frame);\t\t\r\n\t\treturn true;\r\n\t}", "public boolean mo476k() {\r\n return this.f1772p;\r\n }", "public boolean hasStep() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public void alg_BLOCKCONVEYER(){\nBlock.value=true;\nSystem.out.println(\"block\");\n\n}", "public boolean isLastFrame(){\r\n\t\t//to be implemented\r\n\t\treturn false;\r\n\t}", "public boolean mo880l() {\n return this.f619n.mo821k();\n }", "public boolean hasForward() {\n if (index + 1 < history.size() && index >= 0) {\n return true;\n } else {\n return false;\n }\n }", "public synchronized boolean isOnTarget()\n {\n final String funcName = \"isOnTarget\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n boolean onTarget = false;\n\n if (noOscillation)\n {\n //\n // Don't allow oscillation, so if we are within tolerance or we pass target, just quit.\n // If setPointSign is positive, it means the target is \"forward\". So if currError <= tolerance,\n // it means we are either within tolerance or have passed the target.\n // If setPointSign is negative, it means the target is \"backward\". So if -currError <= tolerance,\n // it means we are either within tolerance or have passed the target.\n //\n if (currError * setPointSign <= tolerance)\n {\n onTarget = true;\n }\n }\n else if (Math.abs(currError) > tolerance)\n {\n settlingStartTime = TrcUtil.getCurrentTime();\n }\n else if (TrcUtil.getCurrentTime() >= settlingStartTime + settlingTime)\n {\n onTarget = true;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\", Boolean.toString(onTarget));\n }\n\n return onTarget;\n }", "@Override\n\tpublic boolean getLinearityChange()\n\t{\n\t\treturn hasRan;\n\t}", "protected boolean isFinished() {\n \tif (Math.abs(_finalTickTargetLeft - Robot.driveTrain.getEncoderLeft()) <= 0 &&\n \t\t\tMath.abs(_finalTickTargetRight - Robot.driveTrain.getEncoderRight()) <= 0)\n \t{\n \t\treturn true;\n \t}\n return false;\n }", "public boolean hasPassed()\n {\n if (y<=450.0f)\n return false;\n else\n return true;\n }" ]
[ "0.6582927", "0.62126213", "0.5855561", "0.58119583", "0.5809755", "0.5679889", "0.5647594", "0.5637653", "0.56019354", "0.5551766", "0.5544332", "0.5544332", "0.5544332", "0.5510054", "0.55057645", "0.5480604", "0.545939", "0.5446861", "0.53967726", "0.5385077", "0.5379195", "0.5373729", "0.5371445", "0.53688043", "0.535045", "0.53466713", "0.5339017", "0.53352565", "0.5334497", "0.5313169", "0.529759", "0.5292605", "0.5284713", "0.5246049", "0.5246049", "0.52230704", "0.5218767", "0.5218645", "0.5210504", "0.5208199", "0.51878273", "0.5186657", "0.5180698", "0.5179683", "0.5171713", "0.5170315", "0.5169108", "0.5156878", "0.51537514", "0.515121", "0.5146986", "0.5139391", "0.51290184", "0.512899", "0.5126907", "0.51205564", "0.5120372", "0.51153255", "0.5103241", "0.5102036", "0.50913674", "0.5080017", "0.5068633", "0.5061546", "0.5058277", "0.5055449", "0.5054068", "0.5047232", "0.5034731", "0.5030554", "0.5024961", "0.50216204", "0.50133926", "0.5011716", "0.50097495", "0.50078475", "0.5006559", "0.5004057", "0.50013626", "0.49960533", "0.499322", "0.49834734", "0.49817592", "0.49760422", "0.4974864", "0.497432", "0.49729264", "0.49725384", "0.4971986", "0.49624878", "0.49553585", "0.49521863", "0.49520805", "0.49501282", "0.49432722", "0.49423507", "0.49418604", "0.49417192", "0.49416727", "0.4941451" ]
0.7083185
0
If the Macro Block have Quantizer scale
boolean haveMBQuant() { return ((mbType & QUANT) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "boolean hasScaler();", "public boolean hasScale() { return hasScale; }", "public float spiderScaleAmount()\n {\nreturn 1F;\n }", "boolean hasQuality();", "boolean hasQuality();", "private boolean isWithInScale(Rule r) {\n return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)\n && ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);\n }", "boolean hasQualityMax();", "@java.lang.Override\n public boolean hasScaler() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "@java.lang.Override\n public boolean hasScaler() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "boolean isSetValueQuantity();", "boolean isSetValueRatio();", "Quality getQ();", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "boolean hasQuantity();", "int getQuantite();", "int getQuantite();", "public int getScale(){\n return scale;\n }", "public @UInt32 int getQuantizationBits();", "public double getScale() {\n return scale;\n }", "float getScaler();", "public int getScale() {\n return scale_;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkImageScale() {\n\t\tboolean flag = oTest.checkImageScale();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "long getQuantite();", "public Configuration getScale() {\n return scale;\n }", "int getScale();", "Quantifier createQuantifier();", "boolean isQuantification(Formula f);", "void setScale(ScaleSelector sensor, int scaleNo);", "public int getScale() {\r\n return scale;\r\n }", "@Test\n public void testSetContextByNumber() {\n Geldbetrag betrag = factory.setNumber(0.123456789).setCurrency(\"EUR\").create();\n assertEquals(9, betrag.getContext().getMaxScale());\n }", "void setMaxScale(int value);", "public int get_quantum() {\n\t\treturn quantum;\n\t}", "private int calculatePrice(int quantit,boolean b) {\n\n if(b==true)\n return quantit*10;\n else\n return quantit*5;\n }", "public void setScale(float scale);", "public void setCanScale(boolean scale){\n mScale = scale;\n }", "int tryScale(){\n int numAccepted = 0;\n \n for(int c=0; c<numCandScaleTuning; c++){\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accept\n numAccepted++;\n }\n \n return numAccepted;\n }", "public int getQuantum() {\n return quantum;\n }", "MeasureType getQuantity();", "public boolean qualityIsHigh()\n\t{\n\t\tint counter = 0;\n\t\tfor(int i = 0; i < quality.length(); i++) {\n\t\t\tif(quality.charAt(i) == '!') {\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\treturn counter >= 3;\n\t}", "public double getScale() {\r\n return scale;\r\n }", "boolean testMag(Tester t) {\n return t.checkExpect(this.p6.magnitude(), 1) && t.checkExpect(this.p7.magnitude(), 1)\n && t.checkExpect(this.p2.magnitude(), 150);\n }", "private static final boolean mpeg1_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tint max_slen1 = 0, max_slen2 = 0;\n\n\t\t/* maximum values */\n\t\tint[] tab;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t// assert(all_scalefactors_not_negative(scalefac, cod_info.sfbmax));\n\n\t\tint sfb;\n\t\tif( cod_info.block_type == Jencoder.SHORT_TYPE ) {\n\t\t\ttab = scale_short;\n\t\t\tif( cod_info.mixed_block_flag ) {\n\t\t\t\ttab = scale_mixed;\n\t\t\t}\n\t\t} else { /* block_type == 1,2,or 3 */\n\t\t\ttab = scale_long;\n\t\t\tif( ! cod_info.preflag ) {\n\t\t\t\tfor( sfb = 11; sfb < Jencoder.SBPSY_l; sfb++ ) {\n\t\t\t\t\tif( scalefac[sfb] < Jquantize_pvt.pretab[sfb] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( sfb == Jencoder.SBPSY_l ) {\n\t\t\t\t\tcod_info.preflag = true;\n\t\t\t\t\tfor( sfb = 11; sfb < Jencoder.SBPSY_l; sfb++ ) {\n\t\t\t\t\t\tscalefac[sfb] -= Jquantize_pvt.pretab[sfb];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor( sfb = 0; sfb < cod_info.sfbdivide; sfb++ ) {\n\t\t\tif( max_slen1 < scalefac[sfb]) {\n\t\t\t\tmax_slen1 = scalefac[sfb];\n\t\t\t}\n\t\t}\n\n\t\tfor( ; sfb < cod_info.sfbmax; sfb++) {\n\t\t\tif( max_slen2 < scalefac[sfb]) {\n\t\t\t\tmax_slen2 = scalefac[sfb];\n\t\t\t}\n\t\t}\n\n\t\t/* from Takehiro TOMINAGA <[email protected]> 10/99\n\t\t * loop over *all* posible values of scalefac_compress to find the\n\t\t * one which uses the smallest number of bits. ISO would stop\n\t\t * at first valid index */\n\t\tcod_info.part2_length = LARGE_BITS;\n\t\tfor( int k = 0; k < 16; k++ ) {\n\t\t\tif( max_slen1 < slen1_n[k] && max_slen2 < slen2_n[k]\n\t\t\t\t\t&& cod_info.part2_length > tab[k] ) {\n\t\t\t\tcod_info.part2_length = tab[k];\n\t\t\t\tcod_info.scalefac_compress = k;\n\t\t\t}\n\t\t}\n\t\treturn cod_info.part2_length == LARGE_BITS;\n\t}", "float getCostScale();", "public float getScale();", "public boolean hasQuality() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }", "ScaleType getScale();", "@Override\n public float getScale() {\n return scale;\n }", "public double getScale(){\n\t\treturn scale;\n\t}", "public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }", "public interface Scalable {\n public void scale(TimeTick base, double ratio);\n}", "public double getScaleX() { return _rss==null? 1 : _rss.scaleX; }", "public void visitScale( DevCat devCat ) {}", "public double getScale() {\n return scale;\n }", "public float getQuality();", "@Override\n\t\t\tpublic IFuzzySet scale(double scalar) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IFuzzySet scale(double scalar) {\n\t\t\t\treturn null;\n\t\t\t}", "public boolean testTilingscale(EIfcfillareastyletiles type) throws SdaiException;", "public boolean isScaleAhead() {\r\n\t\treturn robotStartPos == scalePos;\r\n\t}", "int getWrongScale();", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "public static boolean isSigned_quality() {\n return false;\n }", "@Override\n public boolean get()\n {\n return controller.getRawAxis( axisID ) > 0.75;\n }", "public Integer getHoldscale() {\r\n return holdscale;\r\n }", "public int getScaleValue() {\r\n return ScaleValue;\r\n }", "@Override\n\tpublic void handleScaledCFComponent(CFComponent component) {\n\n\t}", "public Integer getScale() {\n return _scale;\n }", "public Integer getScale() {\n return _scale;\n }", "public boolean isQuartzBlock() {\n return this.type == Type.QUARTZBLOCK;\n }", "bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }", "public boolean isSetPriceLimit();", "@Test\n @MediumTest\n public void singleFrameScaleSmokeTest() throws Exception {\n scaleSmokeTest(false);\n }", "boolean hasTemperatureScalingCalibration();", "private void loadSamplesWithScale() {\n\t\tpixelsPerSample = (int)(guiScale * 2);\n\t\t//pixelsPerSample = 10;\n\t\tassert(pixelsPerSample != 0);\n\t\t// Get the amount of samples that can be rendered in the display\n\t\tGSamplesInDisplay = displayWidth / pixelsPerSample;\n\t\tSystem.out.println(\"GSamplesInDisplay: \" + GSamplesInDisplay + \" - of \" + pixelsPerSample + \" pixel each\");\n\t\t// How Many Music Samples from the audio file do we want to 'show' in the window\n\t\t// Default 'all'\n\t\tint AUSamplesInWindow = (int) (loader.getStreamSampleLength()*scale);\n\t\tAUSamplesInGSample = AUSamplesInWindow / GSamplesInDisplay;\n\t\t\n\t\tassert(AUSamplesInGSample != 0); \n\t\t// Get how many pixels are per second\n\t\tsecondsInDisplay = AUSamplesInWindow / sampleRate; // Normally 44100\n\t\tSystem.out.println(\"Seconds Calculalted After: \" + secondsInDisplay);\n\t\t\n\t\tpixelsPerSecond = (displayWidth / secondsInDisplay);\n\t\tSystem.out.println(\"Pixels Per Second: \" + pixelsPerSecond);\n\t\tassert(pixelsPerSecond != 0);\n\t\t// Now Get the XEnd of what is resting to show from the music\n\t\t\n\t\t\n\t}", "public boolean isSuperGiant(){\r\n\t\tboolean flag = false;\r\n\t\tif ((getMass() >100) && (getSize()>100)){\r\n\t\t\tflag = true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private void m3985Q() {\n if (this.f3138s == 1 || !mo4323M()) {\n this.f3143x = this.f3142w;\n } else {\n this.f3143x = !this.f3142w;\n }\n }", "@Override\n\tpublic boolean canfitSmall() {\n\t\treturn true;\n\t}", "public boolean hasQualityMax() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }", "public boolean isSetPriceStd();", "public interface ScalingUtils$StatefulScaleType {\n Object m21594a();\n}", "boolean hasMetrics();", "boolean hasMetrics();", "public boolean hasQuality() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "public double getMinScale() {\n return minScale;\n }", "boolean hasMetricControl();", "protected boolean canSampleAlongCurve() { return false; }", "boolean isSetFractionalMinimum();", "private String getQuantityFromWeighScale() {\r\n // Read data from weigh scale through serial port\r\n\r\n // Convert data to string and return the value to calling function\r\n\r\n return \"1\";\r\n }", "public double getScale() {\n return this.scale;\n }", "public void setQuantite(int quantite) {\r\n this.quantite = quantite;\r\n }", "@Override\n protected void afterAttach(){\n\n float scaleE = (float) Math.pow(toValue, 1.0 / totalIterations);\n scaleTransform.updateValues(scaleE, scaleE, scaleE);\n }", "public float getGlobalScale() {\n // per convenzione se la scala deve essere su tutti e tre gli assi\n // allora si considera scale.x() per tutti gli assi\n return (float) scale.x();\n }", "public String getCurrentScale() {\n return currentScale;\n }", "public double getScaleY() { return _rss==null? 1 : _rss.scaleY; }", "private static final boolean mpeg2_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tfinal int max_sfac[] = new int[4];\n\t\tint[] partition_table;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t/*\n\t\t Set partition table. Note that should try to use table one,\n\t\t but do not yet...\n\t\t */\n\t\tfinal int table_number = cod_info.preflag ? 2 : 0;\n\n\t\tfor( int i = 0; i < 4; i++ ) {\n\t\t\tmax_sfac[i] = 0;\n\t\t}\n\n\t\tint row_in_table;\n\t\tif( cod_info.block_type == Jencoder.SHORT_TYPE ) {\n\t\t\trow_in_table = 1;\n\t\t\tpartition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];//[0];\n\t\t\tfor( int sfb = 0, partition = 0; partition < 4; partition++ ) {\n\t\t\t\tfinal int nr_sfb = partition_table[partition];\n\t\t\t\tfor( final int end = sfb + nr_sfb; sfb < end; ) {\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\trow_in_table = 0;\n\t\t\tpartition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];//[0];\n\t\t\tfor( int sfb = 0, partition = 0; partition < 4; partition++ ) {\n\t\t\t\tfinal int nr_sfb = partition_table[partition];\n\t\t\t\tfor( int i = 0; i < nr_sfb; i++, sfb++ ) {\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition] ) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint over = 0;\n\t\tfor( int partition = 0; partition < 4; partition++ ) {\n\t\t\tif( max_sfac[partition] > max_range_sfac_tab[table_number][partition] ) {\n\t\t\t\tover++;\n\t\t\t}\n\t\t}\n\t\tif( 0 == over ) {\n\t\t\tfinal int[] slen = cod_info.slen;// java\n\t\t\t/*\n\t\t\t Since no bands have been over-amplified, we can set scalefac_compress\n\t\t\t and slen[] for the formatter\n\t\t\t */\n\t\t\t// static final int log2tab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };\n\n\t\t\tcod_info.sfb_partition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];\n\n\t\t\t/* set scalefac_compress */\n\t\t\tfinal int slen1 = log2tab[ max_sfac[0] ];\n\t\t\tfinal int slen2 = log2tab[ max_sfac[1] ];\n\t\t\tfinal int slen3 = log2tab[ max_sfac[2] ];\n\t\t\tfinal int slen4 = log2tab[ max_sfac[3] ];\n\n\t\t\tslen[0] = slen1;\n\t\t\tslen[1] = slen2;\n\t\t\tslen[2] = slen3;\n\t\t\tslen[3] = slen4;\n\n\t\t\tswitch( table_number ) {\n\t\t\tcase 0:\n\t\t\t\tcod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4) + (slen3 << 2) + slen4;\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\tcod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2) + slen3;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tcod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tJutil.lame_errorf( gfc, \"intensity stereo not implemented yet\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t//}\n\t\t//if( 0 == over ) {\n\t\t\tcod_info.part2_length = slen1 * cod_info.sfb_partition_table[0];\n\t\t\tcod_info.part2_length += slen2 * cod_info.sfb_partition_table[1];\n\t\t\tcod_info.part2_length += slen3 * cod_info.sfb_partition_table[2];\n\t\t\tcod_info.part2_length += slen4 * cod_info.sfb_partition_table[3];\n\t\t}\n\t\treturn over != 0;\n\t}", "public float getScale() {\n \t\treturn scale;\n \t}", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "@Override\n public boolean isMaximum(){\n return super.isMaximum() || speciallyMaximized;\n }", "public TempScale getInputScale() {return inputScale;}" ]
[ "0.6541173", "0.6422094", "0.61340755", "0.58850724", "0.57901", "0.57901", "0.57705694", "0.56855994", "0.55942553", "0.5554574", "0.5548397", "0.5514187", "0.54098254", "0.53680307", "0.5265574", "0.5253669", "0.52226806", "0.52226806", "0.5181941", "0.51748806", "0.51623416", "0.51594317", "0.5148593", "0.51309776", "0.5118109", "0.5114058", "0.50962174", "0.50841933", "0.5079779", "0.5056577", "0.5046253", "0.50414026", "0.5030431", "0.5029242", "0.5026261", "0.50261474", "0.5019457", "0.5019231", "0.50122494", "0.5006161", "0.5000266", "0.49947387", "0.49806726", "0.49752238", "0.49668306", "0.49657667", "0.49621558", "0.49581864", "0.4956841", "0.49527878", "0.49507412", "0.4950673", "0.49421966", "0.4937144", "0.49367523", "0.49285406", "0.491956", "0.491956", "0.49140665", "0.49041274", "0.49019924", "0.48995745", "0.48967484", "0.48940557", "0.4893315", "0.489308", "0.4877207", "0.48756945", "0.48756945", "0.48611093", "0.48575765", "0.4856448", "0.48537624", "0.4841044", "0.484089", "0.48397595", "0.48384482", "0.4837213", "0.48358917", "0.4828579", "0.4826351", "0.4824813", "0.4824813", "0.48201522", "0.4817833", "0.48166698", "0.48166522", "0.4805841", "0.48002014", "0.47865322", "0.47831938", "0.4781338", "0.4781279", "0.47730783", "0.4772682", "0.4769261", "0.47674295", "0.47667605", "0.4756639", "0.47526652" ]
0.59327257
3
If the Macro Block is intra coded
boolean isMBIntra() { return ((mbType & INTRA) != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isMacro(int nextVal) throws java.io.IOException, IOException {\n\t\tif (nextVal == PREPROCESSING) {\n\t\t\tint pos = (int) reader.getFilePointer();\n\t\t\tthis.readUntilEndOfLine(nextVal);\n\t\t\tthis.seek(pos);\n\t\t\treturn !(next.matches(\"!procedure.*\") || next.matches(\"!function.*\"));\n\t\t}\n\t\treturn false;\n\t}", "public boolean isOriginatedFromMacro() {\n\t\treturn isOriginatedFromMacro;\n\t}", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "boolean hasCode();", "boolean hasCode();", "boolean hasCode();", "public boolean isInline() {\n\t\tif(this.mType == Code.Inline) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasNewBlock();", "boolean hasNewBlock();", "public boolean isInstr(){\n\t\t\tif (type == MemoryType.INSTR) {return true;\n\t\t\t} return false;\n\t\t}", "private boolean cpIdxIsCode(int cpIdx) {\n return ((constantPoolUtf8Entries[cpIdx - 1] & CODE_MASK) != 0);\n }", "boolean hasCodeName();", "private boolean isUnunsedMacro(final String message) {\n\t\treturn message.contains(\"Unused macro\"); //$NON-NLS-1$\n\t}", "@Override\n public boolean isInstruction() {\n return true;\n }", "public boolean isInline() {\n/* 54 */ return this.inline;\n/* */ }", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "public boolean hasCustomCodeSections() {\n\t\treturn m_customCodeSections != null && !m_customCodeSections.isEmpty();\n\t}", "public boolean isHighlightCurrentBlock(){\n return mHighlightCurrentBlock;\n }", "public boolean isInstruction() {\r\n return true;\r\n }", "public boolean isMasonNamedBlock() {\r\n\t\treturn specialTag==SpecialTag.MASON_NAMED_BLOCK;\r\n\t}", "private boolean asmPresentCheck(Vector frozen, Vector paraffin, int module) {\n SamplestatusAccessBean status = new SamplestatusAccessBean();\n\n try {\n //lookup paraffin status\n Enumeration statusEnum =\n status.findBySampleIDStatus((String) paraffin.get(module), FormLogic.SMPL_ASMPRESENT);\n if (statusEnum.hasMoreElements())\n return true;\n\n for (int i = (module * 6); i < ((module * 6) + 6); i++) {\n statusEnum = status.findBySampleIDStatus((String) frozen.get(i), FormLogic.SMPL_ASMPRESENT);\n if (statusEnum.hasMoreElements())\n return true;\n }\n }\n catch (RemoteException re) {\n }\n catch (FinderException fe) {\n }\n catch (NamingException ne) {\n }\n\n return false;\n\n }", "boolean hasContinuationToken();", "boolean hasBbgSymbol();", "private boolean isProgramHeader() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\t// Check if current token matches given syntax.\n\t\tif(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\t// Update scope key.\n\t\t\ttheSymbolTable.AddToScopeKey(theCurrentToken.TokenValue);\n\t\t\ttheTranslator = new Translator(theCurrentToken.TokenValue);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.IS)\n\t\t\t{\n\t\t\t\t// Update current symbol line number to be end of header. Header of program is position 0 (always).\n\t\t\t\ttheSymbolTable.CURR_SYMBOL.setLineNumber(theCurrentToken.TokenLineNumber);\n\t\t\t\t\n\t\t\t\t// Put symbol in table.\n\t\t\t\ttheTranslator.AddHeaderStrings(\"define i32 @main() {\");\n\t\t\t\ttheSymbolTable.PutSymbolInTable();\n\t\t\t\tisValid = true;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttheLogger.LogParseError(theCurrentToken);\n\t\t}\n\t\telse\n\t\t\ttheLogger.LogParseError(theCurrentToken);\n\t\treturn isValid;\n\t}", "protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException\n {\n // Starting from the Macroblock type\n /* read macro block bit flags */\n/*\n swi*tch (getPictureType()) {\n\n case Picture.I_TYPE:\n getIMBType(stream);\n break;\n case Picture.P_TYPE:\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n break;\n case Picture.B_TYPE:\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n break;\n }\n*/\n int type = getPictureType();\n if (type == Picture.I_TYPE) {\n getIMBType(stream);\n } else if (type == Picture.P_TYPE) {\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n } else if (type == Picture.B_TYPE) {\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n }\n\n\n\n if (haveMBQuant())\n setQuantizerScale(stream.getBits(5));\n\n if (isForwardPredicted())\n forwardVector.getMotionVector(stream);\n\n if (isBackwardPredicted())\n backwardVector.getMotionVector(stream);\n\n if (haveMBPattern())\n getMBPattern(stream);\n else resetMBPattern();\n\n int i,j;\n\n // Clear the block data\n for (i=0;i<6;i++)\n for (j=0;j<64;j++)\n block[i][j] = 0;\n\n // Read DCT coefficients\n if (isMBIntra()) {\n\n for (i=0;i<4;i++) {\n dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream));\n IDCT.transform(block[i]);\n }\n\n dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream));\n IDCT.transform(block[4]);\n\n dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream));\n IDCT.transform(block[5]);\n\n } else {\n for (i=0;i<6;i++) {\n\n if ((codedBlockPattern & (1 << (5-i))) != 0) {\n\n getInterBlock(block[i], stream);\n IDCT.transform(block[i]);\n }\n }\n }\n\n if (getPictureType() == Picture.D_TYPE)\n stream.flushBits(1);\n // Parsing Macro Block finished!\n }", "public boolean isInlineConstants() {\n return mInlineConstants;\n }", "private boolean macro(Macro m, Token orig)\r\n throws IOException,\r\n LexerException {\r\n Token tok;\r\n List<Argument> args;\r\n\r\n // System.out.println(\"pp: expanding \" + m);\r\n if (m.isFunctionLike()) {\r\n OPEN:\r\n for (;;) {\r\n tok = source_token();\r\n // System.out.println(\"pp: open: token is \" + tok);\r\n switch (tok.getType()) {\r\n case WHITESPACE:\t/* XXX Really? */\r\n\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n case NL:\r\n break;\t/* continue */\r\n\r\n case '(':\r\n break OPEN;\r\n default:\r\n source_untoken(tok);\r\n return false;\r\n }\r\n }\r\n\r\n // tok = expanded_token_nonwhite();\r\n tok = source_token_nonwhite();\r\n\r\n /* We either have, or we should have args.\r\n * This deals elegantly with the case that we have\r\n * one empty arg. */\r\n if (tok.getType() != ')' || m.getArgs() > 0) {\r\n args = new ArrayList<Argument>();\r\n\r\n Argument arg = new Argument();\r\n int depth = 0;\r\n boolean space = false;\r\n\r\n ARGS:\r\n for (;;) {\r\n // System.out.println(\"pp: arg: token is \" + tok);\r\n switch (tok.getType()) {\r\n case EOF:\r\n error(tok, \"EOF in macro args\");\r\n return false;\r\n\r\n case ',':\r\n if (depth == 0) {\r\n if (m.isVariadic()\r\n && /* We are building the last arg. */ args.size() == m.getArgs() - 1) {\r\n /* Just add the comma. */\r\n arg.addToken(tok);\r\n } else {\r\n args.add(arg);\r\n arg = new Argument();\r\n }\r\n } else {\r\n arg.addToken(tok);\r\n }\r\n space = false;\r\n break;\r\n case ')':\r\n if (depth == 0) {\r\n args.add(arg);\r\n break ARGS;\r\n } else {\r\n depth--;\r\n arg.addToken(tok);\r\n }\r\n space = false;\r\n break;\r\n case '(':\r\n depth++;\r\n arg.addToken(tok);\r\n space = false;\r\n break;\r\n\r\n case WHITESPACE:\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n case NL:\r\n /* Avoid duplicating spaces. */\r\n space = true;\r\n break;\r\n\r\n default:\r\n /* Do not put space on the beginning of\r\n * an argument token. */\r\n if (space && !arg.isEmpty())\r\n arg.addToken(Token.space);\r\n arg.addToken(tok);\r\n space = false;\r\n break;\r\n\r\n }\r\n // tok = expanded_token();\r\n tok = source_token();\r\n }\r\n /* space may still be true here, thus trailing space\r\n * is stripped from arguments. */\r\n\r\n if (args.size() != m.getArgs()) {\r\n if (m.isVariadic()) {\r\n if (args.size() == m.getArgs() - 1) {\r\n args.add(new Argument());\r\n } else {\r\n error(tok,\r\n \"variadic macro \" + m.getName()\r\n + \" has at least \" + (m.getArgs() - 1) + \" parameters \"\r\n + \"but given \" + args.size() + \" args\");\r\n return false;\r\n }\r\n } else {\r\n error(tok,\r\n \"macro \" + m.getName()\r\n + \" has \" + m.getArgs() + \" parameters \"\r\n + \"but given \" + args.size() + \" args\");\r\n /* We could replay the arg tokens, but I \r\n * note that GNU cpp does exactly what we do,\r\n * i.e. output the macro name and chew the args.\r\n */\r\n return false;\r\n }\r\n }\r\n\r\n for (Argument a : args) {\r\n a.expand(this);\r\n }\r\n\r\n // System.out.println(\"Macro \" + m + \" args \" + args);\r\n } else {\r\n /* nargs == 0 and we (correctly) got () */\r\n args = null;\r\n }\r\n\r\n } else {\r\n /* Macro without args. */\r\n args = null;\r\n }\r\n\r\n if (m == __LINE__) {\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(NUMBER,\r\n orig.getLine(), orig.getColumn(),\r\n Integer.toString(orig.getLine()),\r\n new NumericValue(10, Integer.toString(orig.getLine())))}\r\n ), true);\r\n } else if (m == __FILE__) {\r\n StringBuilder buf = new StringBuilder(\"\\\"\");\r\n String name = getSource().getName();\r\n if (name == null)\r\n name = \"<no file>\";\r\n for (int i = 0; i < name.length(); i++) {\r\n char c = name.charAt(i);\r\n switch (c) {\r\n case '\\\\':\r\n buf.append(\"\\\\\\\\\");\r\n break;\r\n case '\"':\r\n buf.append(\"\\\\\\\"\");\r\n break;\r\n default:\r\n buf.append(c);\r\n break;\r\n }\r\n }\r\n buf.append(\"\\\"\");\r\n String text = buf.toString();\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(STRING,\r\n orig.getLine(), orig.getColumn(),\r\n text, text)}\r\n ), true);\r\n } else if (m == __COUNTER__) {\r\n /* This could equivalently have been done by adding\r\n * a special Macro subclass which overrides getTokens(). */\r\n int value = this.counter++;\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(NUMBER,\r\n orig.getLine(), orig.getColumn(),\r\n Integer.toString(value),\r\n new NumericValue(10, Integer.toString(value)))}\r\n ), true);\r\n } else {\r\n push_source(new MacroTokenSource(m, args), true);\r\n }\r\n\r\n return true;\r\n }", "String getIfBegin();", "protected boolean isScriptBlock() {\n return this.scriptBlock;\n }", "boolean isSlimeChunk();", "private boolean checkInception(Item it1, String target){\n\t\tif (it1 == openContainer && target.startsWith(\"ContPos\")){\n\t\t\tdisplayMessage(\"INCEPTION FAILED. NICE TRY\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public boolean ifPeekIsBlockStmt() {\n\t\tif (ifPeek(\"IF_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"WHILE_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"FOR_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// **************\n\t\t// TODO\n\t\tif (ifPeekIsType()) {\n\t\t\treturn true;\n\t\t}\n\t\t// ***************\n\t\tif (ifPeek(\"RETURN_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"BREAK_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"CONT_\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasI13();", "public boolean isIsSc() {\n\t\treturn isSc;\n\t}", "public ArrayList<Byte> generateIfBlockCode(IfBlock ib) {\n if ((ib.getActions().getChildren().size() == 0) || (ib.getCondition().getChildren().size() == 0)\n || ib.getIfHolders().getChildren().size() == 0) {\n return null;\n }\n Block conBlock = (Block) ib.getCondition().getChildren().get(0);\n\n ArrayList<Byte> ifArr = generateByteList(ib.getIfHolders());\n ArrayList<Byte> elseArr = generateByteList(ib.getElseHolders());\n\n ArrayList<Byte> cmdArr = new ArrayList<>();\n //checking condition or sense\n char instruction = 'c';\n int address = conBlock.getCapability().getDevice().getAddress();\n char cmdChar = conBlock.getCapability().getExeCommand().charAt(0);\n char cmdChar1 = conBlock.getCapability().getExeCommand().charAt(1);\n\n char compType = conBlock.getCapability().getCompType().charAt(0);\n cmdArr.add((byte) instruction);\n cmdArr.add((byte) address);\n cmdArr.add((byte) compType);\n short respSize = Short.parseShort(conBlock.getCapability().getRespSize());\n byte[] respArr = shortToByteArray(respSize);\n cmdArr.add(respArr[0]);\n int refVal = Integer.parseInt(conBlock.getCapability().getRefValue());\n if (conBlock.getCapability().getType().equals(Capability.CAP_CONDITION)) {\n refVal = Integer.parseInt(conBlock.getTextField().getText());\n }\n byte[] refArr = intToByteArray(refVal);\n for (int i = 0; i < respSize; i++) {\n cmdArr.add(refArr[i]);\n }\n cmdArr.add((byte) cmdChar);\n cmdArr.add((byte) cmdChar1);\n short jumpAdd = (short) (ifArr.size() + 4 + cmdArr.size() + 3);\n byte[] jumpArr = shortToByteArray(jumpAdd);\n int counter = 3;\n for (byte b : jumpArr) {\n cmdArr.add(counter++, b);\n\n }\n //prepending command length parameter\n cmdArr.add(0, (byte) (cmdArr.size() + 1));\n\n //jump forward instruction\n ArrayList<Byte> jumpBytes = new ArrayList<>();\n instruction = 'j';\n jumpAdd = (short) (elseArr.size() + 4);\n jumpBytes.add((byte) instruction);\n jumpArr = shortToByteArray(jumpAdd);\n for (byte b : jumpArr) {\n jumpBytes.add(b);\n }\n //prepending command length parameter\n jumpBytes.add(0, (byte) (jumpBytes.size() + 1));\n\n //merging lists\n cmdArr.addAll(ifArr);\n cmdArr.addAll(jumpBytes);\n cmdArr.addAll(elseArr);\n\n return cmdArr;\n }", "boolean hasI15();", "boolean hasCustomBreak();", "boolean hasBlockInfo();", "boolean hasBlockInfo();", "public boolean mo3359c() {\n /*\n r4 = this;\n androidx.appcompat.widget.Toolbar r0 = r4.f2802a\n androidx.appcompat.widget.ActionMenuView r0 = r0.f466b\n r1 = 0\n r2 = 1\n if (r0 == 0) goto L_0x0022\n o1 r0 = r0.f305u\n if (r0 == 0) goto L_0x001e\n o1$c r3 = r0.f3457w\n if (r3 != 0) goto L_0x0019\n boolean r0 = r0.mo3824m()\n if (r0 == 0) goto L_0x0017\n goto L_0x0019\n L_0x0017:\n r0 = 0\n goto L_0x001a\n L_0x0019:\n r0 = 1\n L_0x001a:\n if (r0 == 0) goto L_0x001e\n r0 = 1\n goto L_0x001f\n L_0x001e:\n r0 = 0\n L_0x001f:\n if (r0 == 0) goto L_0x0022\n r1 = 1\n L_0x0022:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.C0661j3.mo3359c():boolean\");\n }", "public boolean isCommandBlock() {\n return this.type == Type.COMMANDBLOCK;\n }", "public boolean ci() {\n/* 84 */ return true;\n/* */ }", "private IbanMod97Check() {\n\t}", "@Override public boolean isCodeTask() { return true; }", "boolean isImmediate();", "private boolean isLoop() {\n return \"loop\".equalsIgnoreCase(data.substring(tokenStart, tokenStart + 4));\n }", "public boolean isInstruction() {\n\t\treturn this.operation instanceof MagicInstruction;\n\t}", "public boolean isThisType(byte[] block) {\n return block.length >= 8 && block[0] == 0 && block[1] == 0 &&\n block[2] == -1 && block[3] == -1 && block[4] == 105 &&\n block[5] == 109 && block[6] == 112 && block[7] == 114;\n }", "private boolean m10268c(byte b) {\r\n int i = b & 15;\r\n if (i == 1 || i == 2) {\r\n return true;\r\n }\r\n return false;\r\n }", "TACBlock optimise(TACBlock code);", "public boolean isMultiLine() {\n/* 1236 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\tpublic void visit(InstrumentBlock instrumentBlock) {\n\t\t\r\n\t}", "private boolean isProcedureHeader() throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\tSymbol aSymbol = new Symbol();\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\ttheSymbolTable.AddToScopeKey(theCurrentToken.TokenValue);\n\t\t\ttheSymbolTable.CURR_SYMBOL.setLineNumber(theCurrentToken.TokenLineNumber);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.LEFT_PARENTHESIS)\n\t\t\t{\n\t\t\t\tif(theNextToken.TokenType != TokenType.RIGHT_PARENTHESIS)\n\t\t\t\t{\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tif(isParameterList())\n\t\t\t\t\t{\n\t\t\t\t\t\tupdateToken();\n\t\t\t\t\t\tif(theCurrentToken.TokenType == TokenType.RIGHT_PARENTHESIS)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\ttheSymbolTable.CreateSymbolsForProcedureParameters();\n\t\t\t\t\t\t\taSymbol = theSymbolTable.CURR_SYMBOL;\n\t\t\t\t\t\t\ttheSymbolTable.PutSymbolInTable();\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TODO: Revisit.\n\t\t\t\ttheTranslator.HoldIncompleteData();\n\t\t\t\ttheTranslator.ProcedureDeclarationBuilder(theSymbolTable.ReturnScopeKeyForTranslation(), aSymbol);\n\t\t\t\t// TODO: add parameters to proc body.\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "public void checkBlock(BlockPos debug1) {\n/* 29 */ if (this.blockEngine != null) {\n/* 30 */ this.blockEngine.checkBlock(debug1);\n/* */ }\n/* 32 */ if (this.skyEngine != null) {\n/* 33 */ this.skyEngine.checkBlock(debug1);\n/* */ }\n/* */ }", "public boolean isQuartzBlock() {\n return this.type == Type.QUARTZBLOCK;\n }", "public boolean isCompiled() {\n return state == State.COMPILED || state == State.CHECKED\n || state == State.GRAVEYARD;\n }", "private static boolean forInPart_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"forInPart_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = forInPart_0_0(b, l + 1);\n r = r && consumeToken(b, IN);\n r = r && expression(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "private boolean m17898a() {\n C2028e a = C2253z.m9680a(this._context, true);\n if (a == null) {\n return false;\n }\n C1846e i = a.mo5285i();\n if (i != null) {\n return i.mo4705m();\n }\n return false;\n }", "public boolean hasOpCode() {\n return result.hasOpCode();\n }", "private boolean quickVerify(Location loc)\n {\n //quickly check if 2 blocks above this is clear\n Block oneAbove = loc.getBlock();\n Block twoAbove = oneAbove.getRelative(BlockFace.UP, 1);\n return oneAbove.getType().equals(Material.AIR) && twoAbove.getType().equals(Material.AIR);\n }", "boolean hasI11();", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "public boolean mo3882b() {\n return this.f3138s == 1;\n }", "private boolean not_completeScorboard(int no_of_instruct) {\n\n\t\tboolean comp;\n\t\tcomp = false;\n\t\tfor (int p = 0; p < no_of_instruct; p++) {\n\t\t\tif ((lstInstructionsScorboard.get(p).getStatus() != EnumInstructionStatus.complete))\n\t\t\t\tcomp = true;\n\t\t}\n\t\treturn comp;\n\t}", "private boolean m13818a() {\n this.f11302b.m8364a(0);\n int c = this.f11302b.m8373c(24);\n if (c != 1) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Unexpected start code prefix: \");\n stringBuilder.append(c);\n Log.w(\"PesReader\", stringBuilder.toString());\n this.f11310j = -1;\n return false;\n }\n this.f11302b.m8370b(8);\n c = this.f11302b.m8373c(16);\n this.f11302b.m8370b(5);\n this.f11311k = this.f11302b.m8376e();\n this.f11302b.m8370b(2);\n this.f11306f = this.f11302b.m8376e();\n this.f11307g = this.f11302b.m8376e();\n this.f11302b.m8370b(6);\n this.f11309i = this.f11302b.m8373c(8);\n if (c == 0) {\n this.f11310j = -1;\n } else {\n this.f11310j = ((c + 6) - 9) - this.f11309i;\n }\n return true;\n }", "@Test\n @Tag(\"bm1000\")\n public void testETAMACRO() {\n CuteNetlibCase.doTest(\"ETAMACRO.SIF\", \"-755.7152312325337\", \"258.71905646302014\", NumberContext.of(7, 4));\n }", "public PKMacro getOriginMacro() {\n\t\treturn originMacro;\n\t}", "private boolean isCustomRenderer(ModelBlock p_177587_1_) {\n/* 741 */ if (p_177587_1_ == null)\n/* */ {\n/* 743 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 747 */ ModelBlock var2 = p_177587_1_.getRootModel();\n/* 748 */ return (var2 == MODEL_ENTITY);\n/* */ }", "boolean hasRecode();", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "boolean hasByteCode();", "private static boolean forInPart_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"forInPart_1\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = forInPart_1_0(b, l + 1);\n r = r && forInPart_1_1(b, l + 1);\n r = r && outerPattern(b, l + 1);\n r = r && consumeToken(b, IN);\n r = r && expression(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "public boolean isComplexRedstone(IBlockData iblockdata) {\n/* 248 */ return true;\n/* */ }", "boolean canBuildBlock(Tile t);", "public boolean isMainline();", "public boolean isMacroBase()\n {\n if ( data != null || users.isEmpty() )\n {\n return false;\n }\n for ( User u : users )\n {\n RemoteConfiguration config = null;\n boolean hasMacro = false;\n if ( u.db == null || u.db == DeviceButton.noButton || u.db.getUpgrade() == null \n || ( config = u.db.getUpgrade().getRemoteConfig() ) == null )\n {\n return false;\n }\n for ( Macro macro : config.getMacros() )\n {\n for( User mu : macro.getUsers() )\n {\n if ( mu.equals( u ) )\n {\n hasMacro = true;\n break;\n }\n }\n if ( hasMacro )\n {\n break;\n }\n }\n if ( !hasMacro )\n {\n return false;\n }\n }\n return true;\n }", "public void Inverse_macroblock_partition_scanning_process(){\n\t\tx=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,0);\n\t\ty=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,1);\n\n\t}", "public abstract boolean mo9735b();", "public boolean renderAsNormalBlock()\r\n/* 166: */ {\r\n/* 167:184 */ return false;\r\n/* 168: */ }", "boolean isInterpreted() {\n return isInterpreted;\n }", "public boolean hasContinuationToken() {\n return instance.hasContinuationToken();\n }", "public static boolean m94911a() {\n return m94917b((Context) BaseApplication.get(), f65698a, false);\n }", "private static boolean onPart_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"onPart_1\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, ON);\n r = r && type(b, l + 1);\n r = r && onPart_1_2(b, l + 1);\n r = r && block(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "public boolean mo4841a() {\n return true;\n }", "public boolean c()\r\n/* 56: */ {\r\n/* 57: 77 */ return false;\r\n/* 58: */ }", "public boolean i()\r\n/* 46: */ {\r\n/* 47:50 */ return true;\r\n/* 48: */ }", "boolean isProcessingInstruction(Object object);", "private boolean isCondition() {\n return line.startsWith(\"if \") || line.startsWith(\"else \") ||\n line.startsWith(\"if(\") || line.equals(\"else\");\n }", "public abstract boolean mo9737c();", "@Override\n public boolean isCodeComplete() {\n\n Tree iterator = root;\n\n return iterator.isCodeComplete(encodingArray.size());\n }", "private boolean isInBlock(int number, int row, int col) {\n\t\trow = row - (row % 3);\n\t\tcol = col - (col % 3);\n\n\t\tfor (int i = row; i < row + 3; i++) {\n\t\t\tfor (int j = col; j < col + 3; j++) {\n\t\t\t\tif (getNumber(i, j) == number) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasCodeName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "private String blocklessIf(String block) {\n\t\tint semicolonpos = block.indexOf(';');\n\t\tint blockstartpos = block.indexOf('{');\n\t\tif(semicolonpos>-1 && semicolonpos<blockstartpos || blockstartpos ==-1)\n\t\t{\n\t\t\tString tmp = block.substring(0, semicolonpos+1);\n\t\t\tString tmp2 = tmp.substring(0,tmp.lastIndexOf(\")\")+1);\n\t\t\tString correction = tmp.replace(tmp2, tmp2+\"{\")+\"}\";\n\t\t\tblock = block.replace(tmp, correction);\n\t\t}\n\t\treturn block;\n\t}", "boolean isCodeMixed(String text) {\n String[] tokens = text.split(\"\\\\s+\");\r\n for (String word : tokens) {\r\n String nword = word.toLowerCase();\r\n if (keywords.containsKey(nword))\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean isVcheck (JPLine plinesucc)\n\t{\n\t\tJPLine pline = plines.lower(plinesucc);\n\t\tif (pline == null) return false;\n\t\tif (pline.len != 2) return false;\n\t\tJPLine pred = plines.lower(pline);\n\t\tif (pred == null) return false;\n\t\treturn (pred.flag0 & 0x64) == 0x24; // branch instruction that is itself covered and not start of source code statement\n\t}", "public boolean hasRcode() {\n return fieldSetFlags()[13];\n }", "public boolean comprobar(){\r\n boolean ind=false;\r\n switch(this.opc){\r\n case 1:\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n if(mfacil[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case 2:\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n if(mmedio[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case 3:\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n if(mdificil[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n return ind;\r\n }", "private boolean m25425c() {\n return this.f19110l.m6581e().m6512j() != null;\n }" ]
[ "0.6290604", "0.5823452", "0.5783222", "0.55749613", "0.55749613", "0.55749613", "0.5546713", "0.55387175", "0.55387175", "0.54812896", "0.5455842", "0.53953385", "0.5390106", "0.5346957", "0.53450525", "0.5325139", "0.5325139", "0.5301539", "0.527924", "0.5263989", "0.5250225", "0.52189744", "0.520464", "0.5199337", "0.5181828", "0.51787215", "0.51749253", "0.5148405", "0.5147772", "0.5115534", "0.51091534", "0.5101703", "0.5101475", "0.5099035", "0.5088526", "0.5085399", "0.50721544", "0.5060995", "0.5060159", "0.5055006", "0.5055006", "0.50373095", "0.50243515", "0.5011973", "0.5008752", "0.49974257", "0.4993684", "0.49860805", "0.4984705", "0.49825606", "0.49783587", "0.4965231", "0.49651146", "0.49649024", "0.49645197", "0.49465254", "0.49437603", "0.49437052", "0.49369675", "0.49200585", "0.4905917", "0.49024275", "0.49016014", "0.49012387", "0.49009445", "0.48811385", "0.4877878", "0.48755467", "0.4874087", "0.48693228", "0.4866054", "0.48617312", "0.4861071", "0.48596397", "0.48593757", "0.4858148", "0.48579672", "0.48548996", "0.48537856", "0.48533434", "0.48468205", "0.48426706", "0.4842062", "0.4837606", "0.4836334", "0.48318547", "0.48285174", "0.48203057", "0.48183185", "0.48175332", "0.4807983", "0.48004955", "0.47983813", "0.47958976", "0.479415", "0.47930858", "0.47902194", "0.47822008", "0.47811195", "0.4778726" ]
0.58522224
1
Reset the Motion Vector
void resetMotionVector() { forwardVector.resetMotionVector(); backwardVector.resetMotionVector(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void reset(){\n\t\tif(motor.isMoving())\n\t\t\treturn;\n\t\tmotor.rotateTo(0);\n\t}", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "public void clearVelocity();", "protected void resetMotion(){\n \tisMoving = false;\n \tframesForCurrentMove = 0;\n \ttargetMainCellCoordinates = getCurrentMainCellCoordinates();\n }", "public void resetXMovement() {\n this.xVel = 0;\n this.xTargetSpeed = 0;\n }", "public void resetYVel() {\n this.yVel = 0;\n }", "@Override\n\tpublic void reset() {\n\t\tsuper.reset();\n\t\tmSpeed = 0.0;\n\t\tmGoalAngle = 0.0;\n\t\tmCurrentAngle = mNavigation.getHeadingInDegrees();\n\t}", "public void clearAngularVelocity();", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "public void clearMovement( )\r\n {\r\n this.setVerticalAcceleration( 0.0f );\r\n this.setHorizontalAcceleration( 0.0f );\r\n this.setVerticalVelocity( 0.0f );\r\n this.setHorizontalVelocity( 0.0f );\r\n }", "void resetPositions() {\n position = new PVector(Constants.width/2, Constants.height/2);\n velocity = new PVector();\n acceleration = new PVector();\n bullets = new ArrayList<Bullet>();\n rotation = 0;\n }", "public void Reset(){\n py = 0f;\n }", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "private void reset() {\n\t\tmVelocityTracker.clear();\n\t\tmSwiping = false;\n\t\tmAbleToSwipe = false;\n\t}", "public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "void resetForce();", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}", "public void reset(int x, int y) {\n ball.relocate(x, y);\n velX = 0;\n velY = 0;\n }", "public void reset () {\n if (!this.on) {\n return;\n }\n\n this.currentSensorValue = 0;\n }", "void setMotion(Vec3 motion);", "public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}", "public void reset() {\n position = 0;\n }", "public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}", "public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }", "public void reset() {\n\t\tmCenterOfProjection = new Vector3f(0, 0, 15);\n\t\tmLookAtPoint = new Vector3f(0, 0, 0);\n\t\tmUpVector = new Vector3f(0, 1, 0);\n\t\tmCameraMatrix = new Matrix4f();\n\t\tthis.update();\n\t}", "public void resetPosition() {\n\t\tposition = new double[3];\n\t\tgyroOffset = 0;\n\t}", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "public void resetDrag(){\n\t\tsetCurrentPosition( new Point(0,0) );\n\t\tsetScale(1);\n\t\tlengthsYShift = defaultYShift;\n\t}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public void resetPose() {\n }", "public void resetMove() {\n pointer = 0;\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void reset() {\r\n \ts.set(Constants.FRAME_WIDTH/2, Constants.FRAME_HEIGHT/2);\r\n \tshootdelay=500;\r\n \tbulletlife = 20;\r\n }", "public static void zero_acceleration( Body body ) {\r\n body.currentState.ax = 0;\r\n body.currentState.ay = 0;\r\n body.currentState.az = 0;\r\n }", "public void resetX() {this.startX = 0f;}", "public void reset(){\n value = 0;\n }", "public synchronized void reset()\n\t{\n\t\tm_elapsed = 0;\n\t}", "public void reset(){\n x = originalX;\n y = originalY;\n dx = originalDX;\n dy = originalDY;\n }", "private void resetRotationAxisToOrigin()\n\t{\n\t\tdouble newSpeed = this.currentMomentMass * getRotation() /\n\t\t\t\tthis.defaultMomentMass;\n\t\t\n\t\t// Changes back to normal rotation\n\t\tthis.currentRotationAxis = new Point2D.Double(getOriginX(), getOriginY());\n\t\tsetRotation(newSpeed);\n\t}", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "@Override\n public void resetAccelY()\n {\n }", "public void resetMoveCtr() {\n\t\t\n\t\t moveCtr=0;\n\t}", "@Override\n public void reset() {\n this.posx = 0;\n this.posy = 0;\n this.rad = 0;\n this.property = new Property();\n this.property.setColor(new Color(Color.BLUE));\n }", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "public void reset()\n {\n currentPosition = 0;\n }", "public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}", "public void reverseXVelocity() {\n xVelocity *= -1;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "void resetAngle();", "public void reset() {\n reset(animateOnReset);\n }", "public VectorIterator<E> reset() {\n\t\tthis.idx = 0;\n\t\tthis.length = vector.size();\n\t\treturn this;\n\t}", "public void resetGyro(){\n //TODO:Reset the gyro(zero it)\n }", "public void reset() {\n mRotationAngle = 0;\n mIsScheduled = false;\n unscheduleSelf(this);\n invalidateSelf();\n }", "protected void reInitialize() {\n leftSpeed = 0;\n rightSpeed = 0;\n leftPosition = 0;\n rightPosition = 0;\n }", "private void resetRayo() {\n rayo.setX(getWidth() / 2 - 10);\n rayo.setY(getHeight() - player.getHeight() - 50);\n }", "public void resetGyro () {\n gyro.reset();\n }", "public void zero() {\r\n\t\tthis.x = 0.0f;\r\n\t\tthis.y = 0.0f;\r\n\t}", "public void reset(float x,float y,float noiseZ, float dx, float dy) {\n stepSize = random(MIN_STEP, MAX_STEP);\n\n location.x = prevLocation.x = x;\n location.y = prevLocation.y = y;\n acceleration.x = dx;//-2;\n acceleration.y = dy;\n life = 0;\n \n zNoise = noiseZ;\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tsuper.reset();\r\n\t\tresetMomentObservation();\r\n\t\texpectations.reset();\r\n\t}", "public void zeroHeading() {\n gyro.reset();\n gyro.zeroYaw();\n }", "public void reset(float x, float y){\n\t\tvisible = true;\n\t\ttimeLived = 0;\n\t\tDEAD = false;\n\t\t\n\t\tbody.setActive(true);\n\t\t\n\t\timpulseX = MathUtils.random(-IMPULSE_POWER, IMPULSE_POWER);\n\t\timpulseY = MathUtils.random(0, IMPULSE_POWER);\n\t\t\n\t\tbody.setTransform(x, y, 0);\n\t\t\n\t\tbody.applyLinearImpulse(impulseX, impulseY, 0, 0, true);\n\t}", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "public void resetBird() { //at object collision i.e. game-over\n\t\tx = 100;\n\t\ty = 100;\t\n\t\tyVel = 0;\n\t\tgravity = 0;\t\n\t\t}", "void Reset() {\n lq = 0;\n ls = 0;\n }", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "synchronized void reset() {\n\n // no change if called before getValue() or called twice\n lastValue = currValue = startValue;\n }", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }", "private void reset() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\treactantAmt[i] = 0;\n\t\t\tproductAmt[i] = 0;\n\t\t\treactantMM[i] = 0;\n\t\t\tproductMM[i] = 0;\n\t\t\treactantMoles[i] = 0;\n\t\t\tproductMoles[i] = 0;\n\t\t\tfinalMolReactant[i] = 0;\n\t\t\tfinalMolProduct[i] = 0;\n\t\t\tremove();\n\t\t}\n\t}", "private static void resetVehicle() {\n Vehicle vehicle = MavDemo1.getVehicle();\n VehicleControl engineBody = vehicle.getVehicleControl();\n\n float[] angles = new float[3];\n engineBody.getPhysicsRotation().toAngles(angles);\n Vector3f location = engineBody.getPhysicsLocation();\n\n vehicle.removeFromPhysicsSpace();\n vehicle.warpAllBodies(location, angles[1]);\n if (vehicle.contactTest()) {\n Vector3f newLocation = location.add(0f, 1f, 0f);\n for (int iteration = 0; iteration < 9; ++iteration) {\n vehicle.warpAllBodies(newLocation, angles[1]);\n if (vehicle.contactTest()) {\n break;\n }\n Vector3f offset = generator.nextVector3f();\n offset.multLocal(0.1f * (iteration + 1));\n newLocation.addLocal(offset);\n }\n }\n vehicle.addToPhysicsSpace();\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "void stop() {\n this.currentDirection = 0;\n this.currentVelocity = 0;\n }", "public void reset()\n\t{\n\t\t\n\t\tif (lifeCount > 1)\n\t\t{\n\t\t\tthis.setCollisionOn(false);\n\t\t\tthis.setEingabe(false);\n\t\t\tthis.reduceLifeCount();\n\t\t\timg.setRotation(0);\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY + 105);\n\t\t\tthis.spdX = startSpdX;\n\t\t\tthis.setSpdY(-60);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tsetRupeesInBag(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t * When Gameover\n\t\t\t */\n\t\t\t\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tthis.reduceLifeCount();\n\t\t}\n\t}", "protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }", "public void reset()\r\n\t{\r\n\t\ttimer.stop();\r\n\t\ttimer.reset();\r\n\t\tautoStep = 0;\r\n\t}", "public void reset() {\r\n minX = null;\r\n maxX = null;\r\n minY = null;\r\n maxY = null;\r\n\r\n minIn = null;\r\n maxIn = null;\r\n\r\n inverted = false;\r\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "@Override\n public void reset() {\n mMoveButtonActive = true;\n mMoveButtonPressed = false;\n mFireButtonPressed = false;\n droidHitPoints = 0;\n totalKillCollectPoints = 0;\n totalCollectNum = 0;\n// mCoinCount = 0;\n// mRubyCount = 0;\n mTotalKillCollectPointsDigits[0] = 0;\n mTotalKillCollectPointsDigits[1] = -1;\n mTotalCollectNumDigits[0] = 0;\n mTotalCollectNumDigits[1] = -1;\n totalKillCollectPointsDigitsChanged = true;\n totalCollectNumDigitsChanged = true;\n// mCoinDigits[0] = 0;\n// mCoinDigits[1] = -1;\n// mRubyDigits[0] = 0;\n// mRubyDigits[1] = -1;\n// mCoinDigitsChanged = true;\n// mRubyDigitsChanged = true;\n \n levelIntro = false;\n// mLevelIntro = false;\n \n mFPS = 0;\n mFPSDigits[0] = 0;\n mFPSDigits[1] = -1;\n mFPSDigitsChanged = true;\n mShowFPS = false;\n for (int x = 0; x < mDigitDrawables.length; x++) {\n mDigitDrawables[x] = null;\n }\n// mXDrawable = null;\n mFadePendingEventType = GameFlowEvent.EVENT_INVALID;\n mFadePendingEventIndex = 0;\n }", "public void resetDX(){dx = 0;}", "public void zeroSpeed() {\n controlRotator.proportionalSpeedSetter(0.0);\n }", "private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n startAngles = lastAngles;\n globalAngle = 0;\n }", "public void zeroHeading() {\n m_gyro.reset();\n }", "public void reset() {\n\t\t// Reset the SwipeTile's state data.\n\t\tstartTime = System.nanoTime();\n\t\t// Reset the Tile's State.\n\t\ttileState = defaultTileState;\n\t\t// Reset the opacity\n\t\topacity = 1;\n\t\t// Refresh the arrow's Texture.\n\t\trefreshArrow();\n\t}", "public void reset() { \r\n stop(); \r\n if (midi) \r\n sequencer.setTickPosition(0); \r\n else \r\n clip.setMicrosecondPosition(0); \r\n audioPosition = 0; \r\n progress.setValue(0); \r\n }", "public void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n\n }", "public static void variableReset() {\n\t\tLogic.pieceJumped = 0;\n\t\tLogic.bool = false;\n\t\tLogic.curComp = null;\n\t\tLogic.prevComp = null;\n\t\tLogic.jumpedComp = null;\n\t\tLogic.ydiff = 0;\n\t\tLogic.xdiff = 0;\n\t\tLogic.jumping = false;\n\t\tmultipleJump = false;\n\t\t\n\t}", "void reset() {\n myIsJumping = myNoJumpInt;\n setRefPixelPosition(myInitialX, myInitialY);\n setFrameSequence(FRAME_SEQUENCE);\n myScoreThisJump = 0;\n // at first the cowboy faces right:\n setTransform(TRANS_NONE);\n }", "public void resetPhase();", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "public void reset()\n\t{\n\t\tassociations = new Vector<Association>();\n\t\tif(hotspots != null)\n\t\t{\n\t\t\tfor(int i=0; i < hotspots.size(); i++)\n\t\t\t{\n\t\t\t\thotspots.elementAt(i).bound = null;\n\t\t\t\thotspots.elementAt(i).setHighlighted(false);\n\t\t\t}\n\t\t}\n\n\t\tif(movableObjects != null)\n\t\t{\n\t\t\tfor(int i=0; i < movableObjects.size(); i++)\n\t\t\t{\n\t\t\t\tmovableObjects.elementAt(i).resetPos();\n\t\t\t\tmovableObjects.elementAt(i).bound = null;\n\t\t\t}\n\t\t}\n\t\tuser_responses=0;\n\t\tmov = null;\n\t\tstart = null;\n\t\tmpos = null;\n\t\tsetFeedback();\n\t\trepaint();\n\t}", "public void resetAngle() {\n\t\tnavx.zeroYaw();\n\t}", "private void resetAngle()\n {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n }", "public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}" ]
[ "0.763107", "0.7590391", "0.7281384", "0.7255986", "0.71722937", "0.70829916", "0.70046866", "0.69889903", "0.6917795", "0.6879101", "0.6856196", "0.68262935", "0.68210423", "0.67826444", "0.6777189", "0.6771882", "0.6757872", "0.67440283", "0.6734218", "0.6709489", "0.6693367", "0.66665787", "0.66491747", "0.6616343", "0.65678537", "0.65656555", "0.65579075", "0.65349054", "0.6517095", "0.6508566", "0.64974004", "0.64890254", "0.6445674", "0.6429978", "0.64239967", "0.64106935", "0.6403454", "0.6395218", "0.6391099", "0.6389771", "0.63814044", "0.63777655", "0.6374051", "0.63724464", "0.6360603", "0.63569635", "0.6353908", "0.6343771", "0.6314627", "0.6293789", "0.6291057", "0.6290912", "0.6261293", "0.6257141", "0.62566566", "0.6232362", "0.6232019", "0.6229051", "0.62175685", "0.6189687", "0.6177846", "0.6167211", "0.6164252", "0.614949", "0.61361533", "0.61309236", "0.6130111", "0.61288977", "0.6125828", "0.6117624", "0.61167365", "0.6110468", "0.6103133", "0.6097171", "0.60925585", "0.60917526", "0.60915625", "0.6089965", "0.60815", "0.60774", "0.6072478", "0.6055657", "0.6053521", "0.6041884", "0.6041786", "0.60405385", "0.60403556", "0.6039082", "0.6029644", "0.6028982", "0.60023886", "0.60022306", "0.59967124", "0.5991346", "0.5988651", "0.5987621", "0.5983519", "0.5982067", "0.5981084", "0.597387" ]
0.88071805
0
Get the block data
int[][] getData() { return block; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "byte getBlockData();", "public final ByteBlock getData() { return data; }", "public byte[] getDataBlock() {\n return serialize;\n }", "public byte[][][] getBlockDatas() {\n \t\treturn this.blockDatas;\n \t}", "@Override\n public Object getData() {\n return blockValues.toString();\n }", "abstract public ByteString getBlocksBuffer();", "public Block getBlock(int index){\n\t\treturn ds[index];\n\t}", "protected Block getBlock() {\r\n return this.block;\r\n }", "public final ByteBlock getRvData() {\n return rvData;\n }", "phaseI.Hdfs.BlockLocations getBlockInfo();", "alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo();", "public ByteArrayList getData() {\n return DataBuffer.this.getData();\n }", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "public Response getBlock(int row) {\n return blockList.get(row);\n }", "byte[] getData() {\n return data;\n }", "public byte[] getData() {\n/* 91 */ return (this.pbData == null) ? null : this.pbData.getByteArray(0L, this.cbData);\n/* */ }", "public byte[] getData() {\n return this.data;\n }", "public Block getBlock()\n {\n return block;\n }", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "public byte[] getData() {\n return data;\n }", "Object getRawData();", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "public byte[] getData() {\n\treturn null;\n }", "com.google.protobuf.ByteString getData(int index);", "com.google.protobuf.ByteString getData(int index);", "public Block getObj()\n\t{\n\t\treturn block;\n\t}", "public long getData() {\n return data;\n }", "public byte getData() {\n return data;\n }", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "phaseI.Hdfs.BlockLocations getNewBlock();", "public alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo() {\n if (blockInfoBuilder_ == null) {\n return blockInfo_;\n } else {\n return blockInfoBuilder_.getMessage();\n }\n }", "public Object getData(){\n\t\treturn this.data;\n\t}", "public byte[] getData();", "public byte[] getData() {\n try {\n int n2 = (int)this.len.get();\n if (this.buf == null) {\n return null;\n }\n if (n2 <= this.buf.length) return this.buf.get(n2);\n Log.w(TAG, \"getData: expected length (\" + n2 + \") > buffer length (\" + this.buf.length + \")\");\n throw new IllegalArgumentException(\"Blob:getData - size is larger than the real buffer length\");\n }\n catch (Exception exception) {\n Log.e(TAG, \"getData exception!\");\n exception.printStackTrace();\n return null;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public Map<Long, Block> getBlocks() {\n\t\treturn this.blocks;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public byte[] getData() {\n return ByteExtensions.clone(this.data);\n }", "public byte getData() {\n return this.data;\n }", "public byte[] getByteData() { return bytedata; }", "public alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo() {\n return blockInfo_;\n }", "public ByteArrayList getData() {\n if (data.isEmpty()) {\n throw new IndexOutOfBoundsException(\"No data available!\");\n }\n return data.remove(0);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public byte[] GetBytes() {\n return data;\n }", "public byte[] getData() {\n if (this.length==0) {\n return new byte[0];\n }\n return data;\n }", "BlockStore getBlockStore();", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public FileChunkReference getFileData() {\n return fileData;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public synchronized Object getData() {\n return data;\n }", "public DataBlock() {\n headerPointer = 0;\n datasPointer = size - 1;\n serialize = new byte[size];\n }", "public int getBlock(){\n return this.position.getCurrentBlock();\n }", "public ByteBuffer getData() {\r\n\t\tByteBuffer buffer = null;\r\n\t\tbuffer = new ByteBuffer(messageData);\r\n\t\treturn buffer;\r\n\t}", "public byte[] getData()\r\n/* 38: */ {\r\n/* 39: 98 */ byte[] data = new byte[18];\r\n/* 40: */ \r\n/* 41:100 */ int options = 0;\r\n/* 42:102 */ if (this.promptBoxVisible) {\r\n/* 43:104 */ options |= PROMPT_BOX_VISIBLE_MASK;\r\n/* 44: */ }\r\n/* 45:107 */ if (this.promptBoxAtCell) {\r\n/* 46:109 */ options |= PROMPT_BOX_AT_CELL_MASK;\r\n/* 47: */ }\r\n/* 48:112 */ if (this.validityDataCached) {\r\n/* 49:114 */ options |= VALIDITY_DATA_CACHED_MASK;\r\n/* 50: */ }\r\n/* 51:117 */ IntegerHelper.getTwoBytes(options, data, 0);\r\n/* 52: */ \r\n/* 53:119 */ IntegerHelper.getFourBytes(this.objectId, data, 10);\r\n/* 54: */ \r\n/* 55:121 */ IntegerHelper.getFourBytes(this.numDVRecords, data, 14);\r\n/* 56: */ \r\n/* 57:123 */ return data;\r\n/* 58: */ }", "public int getBlockId() {\n return blockId;\n \n }", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public BigDecimal getBlockHeight() {\n return blockHeight;\n }", "java.lang.String getData();", "public JsonObject raw_block() {\n \tJsonObject block = new JsonObject();\n \tblock.addProperty(\"BlockID\", blockId);\n \tif(!BlockChain.isEmpty())\n \t block.addProperty(\"PrevHash\", Hash.getHashString(getLongestBranch().last_block.toString()));\n \telse {\n \t\tblock.addProperty(\"PrevHash\", \"0000000000000000000000000000000000000000000000000000000000000000\");\n \t}\n \tblock.addProperty(\"Nonce\", \"00000000\");\n block.addProperty(\"MinerID\", \"Server\"+String.format(\"%02d\", minerId));\n \n \tJsonArray newTxPool = new JsonArray();\n \tJsonArray transactions = new JsonArray();\n \tint N = TxPool_new.size();\n \tint i;\n \tfor (i=0; i<N && i<50; i++) {\n \t\ttransactions.add(TxPool_new.get(i));\n \t\t//TxPool_used.add(TxPool_new.get(i));\n \t}\n \tfor (; i<N; i++)\n \t\tnewTxPool.add(TxPool_new.get(i));\n \tblock.add(\"Transactions\", transactions);\n\n \treturn block;\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }" ]
[ "0.80276066", "0.7836027", "0.77059174", "0.76159364", "0.74348044", "0.68212324", "0.6814268", "0.67701536", "0.6753543", "0.66969997", "0.66936255", "0.65381056", "0.6510521", "0.6510521", "0.6510521", "0.6510521", "0.6484447", "0.64708763", "0.6452896", "0.64507514", "0.6443457", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.6439214", "0.64369285", "0.63841665", "0.63826483", "0.63760644", "0.6375031", "0.6375031", "0.63682747", "0.6334108", "0.63288295", "0.6327211", "0.6326279", "0.6311936", "0.6288172", "0.6286743", "0.6279839", "0.62639487", "0.62639487", "0.62639487", "0.62639487", "0.6256644", "0.6255401", "0.6255401", "0.6255401", "0.6255401", "0.62507707", "0.6241389", "0.62407887", "0.62389475", "0.6237021", "0.62309134", "0.62309134", "0.623015", "0.6227059", "0.62251526", "0.6223025", "0.621873", "0.6211748", "0.6211748", "0.6211748", "0.6211748", "0.6211748", "0.62110084", "0.6204475", "0.6203516", "0.6203516", "0.6203516", "0.62021255", "0.6201472", "0.6201472", "0.6201472", "0.6201472", "0.6201472", "0.6195692", "0.61767536", "0.61737347", "0.61693364", "0.6161506", "0.614508", "0.61396396", "0.61327773", "0.61327773", "0.6129082", "0.61181206", "0.61176074", "0.61174977", "0.61174977" ]
0.7521796
4
Get the Picture type
private int getPictureType() { return pictureType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getPicType() {\n return picType;\n }", "ImageType getType();", "public static String getType() {\n type = getProperty(\"type\");\n if (type == null) type = \"png\";\n return type;\n }", "public final String getImageType() {\n String imageType = null;\n\n if (this.url != null) {\n imageType = this.url.substring(this.url.lastIndexOf(\".\") + 1);\n }\n\n return imageType;\n }", "@Override\n\tpublic int getImageType() {\n\t\treturn imageType;\n\t}", "public String getTypePhoto() {\r\n return typePhoto;\r\n }", "public int getPictureFormat() {\n return pixelFormatForCameraFormat(get(\"picture-format\"));\n }", "public native int getImageType() throws MagickException;", "ImageFormat getFormat();", "public String Type()\t{\r\n\t\treturn BrickFinder.getDefault().getType();\r\n\t}", "boolean isImageType();", "public abstract String getImageFormat();", "private String getTipoImage(String nameImage) {\n\t\tString retorno = \"\";\n\t\tString[] textoSeparado = nameImage.split(\"\\\\.\");\n\n\t\tif (textoSeparado != null && textoSeparado.length != 0)\n\t\t\tswitch (textoSeparado[textoSeparado.length - 1]) {\n\t\t\tcase \"jpg\":\n\t\t\t\tretorno = \"image/jpeg\";\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\tretorno = \"image/png\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretorno = \"image/\" + textoSeparado[textoSeparado.length - 1];\n\t\t\t}\n\n\t\treturn retorno;\n\t}", "void setPictureType ( int code )\n {\n pictureType = code;\n }", "com.google.protobuf.ByteString getPicture();", "public static String type2pic(int type) {\r\n\t\tswitch(type) {\r\n\t\t\tcase CW_TRADITIONAL:\treturn CW_PIC_TRADITIONAL;\r\n\t\t\tcase CW_MULTI:\t\t\treturn CW_PIC_MULTI;\r\n\t\t\tcase CW_VIRTUAL:\t\treturn CW_PIC_VIRTUAL;\r\n\t\t\tcase CW_LETTERBOX:\t\treturn CW_PIC_LETTERBOX;\r\n\t\t\tcase CW_EVENT:\t\t\treturn CW_PIC_EVENT;\r\n\t\t\tcase CW_QUIZ:\t\t\treturn CW_PIC_QUIZ;\r\n\t\t\tcase CW_UNKNOWN:\t\treturn CW_PIC_UNKNOWN;\r\n\t\t\tcase CW_MOVING:\t\t\treturn CW_PIC_MOVING;\r\n\t\t\tcase CW_DRIVE_IN:\t\treturn CW_PIC_DRIVE_IN;\r\n\t\t\tcase CW_WEBCAM:\t\t\treturn CW_PIC_WEBCAM;\r\n\t\t\tcase CW_LOCATIONLESS:\treturn CW_PIC_LOCATIONLESS;\r\n\t\t\tcase CW_CITO:\t\t\treturn CW_PIC_CITO;\r\n\t\t\tcase CW_EARTH:\t\t\treturn CW_PIC_EARTH;\r\n\t\t\tcase CW_MEGA_EVENT:\t\treturn CW_PIC_MEGA_EVENT;\r\n\t\t\tcase CW_WHERIGO:\t return CW_PIC_WHERIGO;\r\n\t\t\tcase CW_PARKING:\t\treturn CW_PIC_PARKING;\r\n\t\t\tcase CW_STAGE_OF_MULTI:\treturn CW_PIC_STAGE_OF_MULTI;\r\n\t\t\tcase CW_QUESTION:\t\treturn CW_PIC_QUESTION;\r\n\t\t\tcase CW_FINAL:\t\t\treturn CW_PIC_FINAL;\r\n\t\t\tcase CW_TRAILHEAD:\t\treturn CW_PIC_TRAILHEAD;\r\n\t\t\tcase CW_REFERENCE:\t\treturn CW_PIC_REFERENCE;\r\n\t\t\tdefault:\t\treturn \"no_picture.png\";\r\n\t\t}\r\n\t}", "public void testGetType() {\n CLImage instance = new CLImage();\n String expResult = \"image\";\n String result = instance.getType();\n assertEquals(expResult, result);\n }", "public void setPicType(Integer picType) {\n this.picType = picType;\n }", "@RestrictTo(Scope.LIBRARY_GROUP)\n public int getImageFormat() {\n return mImageFormat;\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getFileType(){\n\t\treturn type;\n\t}", "boolean isMotionImageryType();", "boolean isPictureFormatSupported(int format);", "public int getImageFormat() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch image format from cleaned up swapchain!\");\n }\n return this.imageFormat;\n }", "lanyotech.cn.park.protoc.CommonProtoc.PARKINGPICTURE getPictureGenre();", "public java.lang.String getMimeType() {\n return _courseImage.getMimeType();\n }", "String getTileType();", "public ImageIcon getImage(String type) {\n if (type.equals(\"Ant\"))\n return AntImage.getInstance();\n else if (type.equals(\"Bug\"))\n return BugImage.getInstance();\n return null;\n }", "boolean isImageTileType();", "public Bitmap getBitmap(char objectType){\n int index;\n\n switch (objectType){\n\n case '.': index = 0; break;\n case '1': index = 1; break;\n case 'p': index = 2; break;\n default: index = 0; break;\n }\n\n return bitmapsArray[index];\n }", "public ImageFormatProperties getFormat() {\n return this.format;\n }", "public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}", "public String getPicture() {\r\n return picture;\r\n }", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public java.lang.String getMediaType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MEDIATYPE$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(MEDIATYPE$18);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public abstract String typeIcon();", "String kind();", "String kind();", "public int getQuestionType()\n\t{\n\t\treturn Question.PICTURE_RESPONSE;\n\t}", "public com.google.protobuf.ByteString getPicture() {\n return picture_;\n }", "public int getFileShapeType() {\n return fileShapeType;\n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();" ]
[ "0.7884457", "0.77582616", "0.7506323", "0.7289983", "0.70948464", "0.7055148", "0.7053442", "0.70415825", "0.69112176", "0.6712545", "0.66797256", "0.6657728", "0.6539128", "0.6485133", "0.64104843", "0.63516736", "0.6307274", "0.6254452", "0.6225672", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.6217336", "0.61733115", "0.616864", "0.61603713", "0.6154644", "0.6101757", "0.61015457", "0.6088677", "0.6080713", "0.6069154", "0.6045762", "0.6045431", "0.6023446", "0.6020745", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.6015697", "0.60054827", "0.59946555", "0.5994295", "0.5994295", "0.5994295", "0.5994295", "0.5994295", "0.5994295", "0.5994295", "0.5994295", "0.5975679", "0.5975601", "0.5975601", "0.5958043", "0.59489465", "0.5948048", "0.59328234", "0.59328234", "0.59328234", "0.59328234", "0.59328234", "0.59328234", "0.59328234" ]
0.79860175
0
Get one Intra coded Block
private int getIntraBlock( int block[], BufferedBitStream stream, int dctDCPast, int dcValue) throws InterruptedException { int i, position; int data0,data1; int code, temp[]; int blocktemp; boolean endOfBlock = false; block[0] = dctDCPast + (dcValue * 8); i = 0; while ( ! endOfBlock ) { { // DCT Next Coefficient decode code = stream.showBits(17); if (code >= 2048) temp = DCTCoefficientTable[code >>> 8]; else if (code >= 256) temp = DCTCoefficientTable[ (code >>> 3) + 512]; else temp = DCTCoefficientTable[ (code) + 768]; if (temp[0] == ESC) { // More decoding stream.flushBits(temp[2]); int run = stream.getBits(6); int value = stream.showBits(16); if ((value & 0xFF00) == 0x8000) { stream.flushBits(16); value = (value | 0xFFFFFF00); } else if ((value & 0xFF00) == 0x0000) { stream.flushBits(16); value = (value & 0x000000FF); } else { stream.flushBits(8); value = (value << 16) >> 24; } data0 = run; data1 = value; } else { stream.flushBits(temp[2]); data0 = temp[0]; data1 = temp[1]; } } // End of DCT Next Coeffcient decode if (data0 != EOB) { i = i + data0 + 1; position = zigzag[i]; blocktemp = data1 * quantizerScale * intraQuantMatrix[i] / 8; if ((blocktemp & 1) == 0) if (blocktemp > 0) blocktemp -= 1; else if (blocktemp < 0) blocktemp += 1; if (blocktemp > 2047) blocktemp = 2047; else if (blocktemp < -2048) blocktemp = -2048; block[position] = blocktemp; } else endOfBlock = true; } return block[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Block getBlock() {\r\n return this.block;\r\n }", "public Block getBlock(int index){\n\t\treturn ds[index];\n\t}", "Block getBlock(String congName, String blockName, String blockNumber);", "public Block getBlock()\n {\n return block;\n }", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "Block getBlockByNumber(long number);", "public int getBlock(){\n return this.position.getCurrentBlock();\n }", "public Block getBlock() {\n return (Block)getChild(0);\n }", "public Block getBlock(int i) {\n\t\treturn Block.getBlock(id(i));\n\t}", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "public Block getObj()\n\t{\n\t\treturn block;\n\t}", "@NotNull\r\n Block getBlock(int x, int y, int z);", "int getBlockNumber();", "int getBlockNumber();", "public ProductionBlock getSpecificProductionBlock(int id);", "protected ASPBlock getBizWfBlock()\n {\n return headblk;\n }", "@Override\n\tpublic int getBlockNum() {\n\t\treturn 0;\n\t}", "public Block getBlock(int x, int y){\n\t\tIterator iterator = blocks.iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tBlock b = (Block) iterator.next();\n\t\t\tif ((b.getX()==x)&&(b.getY()==y)) {\n\t\t\t\treturn b;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public short getBlock(final int aX, final int aY)\r\n\t{\r\n\t\treturn mBlocks[aX][aY];\r\n\t}", "public Block getBlockByID(Integer blockID){\n for (Block block : this.blocks) {\n if(block.getID().equals(blockID))\n {\n return block;\n }\n }\n return null;\n }", "byte getBlockData();", "int getBlockId();", "public Block getBlockNoTransform() {\n return (Block)getChildNoTransform(0);\n }", "@Deprecated public Block getBlock(){\n return this.block!=null?this.block.build():null;\n }", "Block getHiveBlock();", "Block createBlock();", "public int getBlockId() {\n return blockId;\n \n }", "protected BlockStmt currentBlock() {\n return enclosingBlocks.peekFirst();\n }", "public Block getBlockNoTransform() {\n return (Block) getChildNoTransform(0);\n }", "private Block getBlockAt(int x, int y, int z) {\n\t\ttry {\n\t\t\tbyte blockId = blockIDArray[x][y][z];\n\t\t\treturn new Block(x, y, z, BlockType.fromID(blockId), this);\n\t\t} catch(IndexOutOfBoundsException e) { return new Block(x, y, z, BlockType.AIR, this); }\n\t}", "Optional<CacheBlock> getCacheBlock(int index);", "Block getBlockByHash(byte[] hash);", "@Override\n public Block getBlock() {\n Block b = null;\n while (b == null) {\n boolean noMoreBlocks = blocks.isEmpty();\n if (!noMoreBlocks) {\n b = blocks.poll();\n }\n\n if (noMoreBlocks || b == null) {\n synchronized (BlocksPool.class) { // can be easily changed to lock-free\n if (blocks.isEmpty()) {\n alloc(newAllocBlocks);\n }\n }\n }\n }\n return b;\n }", "public Block accessBlock(int i){\n\t\treturn blocks[i]; \n\t}", "@ASTNodeAnnotation.Child(name=\"Block\")\n public Block getBlock() {\n return (Block) getChild(0);\n }", "public MemoryBlock getBlock(int index) {\n\t\tif (( index < 1 ) || ( index > size - 1 ))\n\t\t\tthrow new IllegalArgumentException();\n\t\t return getNode(index).block;\n\t\t \n\t}", "public Block getBlockBelow() {\r\n\t\tif(onGround) {\r\n\t\t\tVector4f hitbox = getHitBox(worldPos);\r\n\t\t\tfloat x = hitbox.x + (hitbox.z - hitbox.x) / 2f;\r\n\t\t\tfloat y = hitbox.y - 0.1f;\r\n\t\t\tBlock b = BlockManager.getBlock(new Vector2f(x, y));\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }", "public Response getBlock(int row) {\n return blockList.get(row);\n }", "public IGUIBlock getHighlightedBlock() {\n Block highlightedBlock = blockHandler.getPA().getNextBlockInProgram();\n return (highlightedBlock != null) ? blockLink.getGUIBlockFromBlock(highlightedBlock) : null;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public Block getBlock(String id) {\n\t\treturn this.blocks.get(Long.valueOf(id));\n\t}", "alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo();", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public Block getLatestBlock() {\n int totalLength = blockChain.size();\n return this.blockChain.get(totalLength - 1);\n }", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public Block getFrom() {\n\t\t\treturn Block.getBlockById(fromId);\n\t\t}", "RclBlock createRclBlock();", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "phaseI.Hdfs.BlockLocations getNewBlock();", "LocalMaterialData getSurfaceBlock();", "public int GetID()\n {\n return blockType.GetID();\n }", "public abstract int getNextBlock(int block) throws IOException;", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n return newBlock_;\n }", "BlockStore getBlockStore();", "public Block getBlock(Point point) {\n\t\treturn maze[point.x][point.y];\n\t}", "alluxio.proto.journal.File.NewBlockEntry getNewBlock();", "@Override\n public CssDeclarationBlockNode getBlock() {\n return (CssDeclarationBlockNode) super.getBlock();\n }", "BAnyBlock createBAnyBlock();", "public Block getStart () {\n\t\treturn start;\n\t}", "private Data getNextBlock() {\n Connection con = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n con = DbConnectionManager.getConnection();\n // Get the current ID from the database.\n pstmt = con.prepareStatement(LOAD_ID);\n pstmt.setInt(1, type);\n rs = pstmt.executeQuery();\n\n long currentID = 1;\n if (rs.next()) {\n currentID = rs.getLong(1);\n }\n else {\n createNewID(con, type);\n }\n DbConnectionManager.fastcloseStmt(rs, pstmt);\n\n // Increment the id to define our block.\n long newID = currentID + blockSize;\n // The WHERE clause includes the last value of the id. This ensures\n // that an update will occur only if nobody else has performed an\n // update first.\n pstmt = con.prepareStatement(UPDATE_ID);\n pstmt.setLong(1, newID);\n pstmt.setInt(2, type);\n pstmt.setLong(3, currentID);\n // Check to see if the row was affected. If not, some other process\n // already changed the original id that we read. This code should be\n // called under a lock, so this is not supposed to happen. Throw a\n // very verbose error if it does.\n if (pstmt.executeUpdate() == 1) {\n final Data result = new Data(currentID, newID);\n sequenceBlocks.put(type, result);\n return result;\n } else {\n throw new IllegalStateException(\"Failed at attempt to obtain an ID, aborting...\");\n }\n }\n catch (SQLException e) {\n Log.error(\"An exception occurred while trying to obtain new sequence values from the database for type {}\", type, e);\n throw new IllegalStateException(\"Failed at attempt to obtain an ID, aborting...\", e);\n }\n finally {\n DbConnectionManager.closeConnection(rs, pstmt, con);\n }\n }", "public String generateBlock(){\n return null;\n }", "public String getBlockStart () {\n return BLOCK_START_PREFIX + objectName + BLOCK_START_SUFFIX;\n }", "LocalMaterialData getGroundBlock();", "ByteBlockInfo getBlockInfo(BigInteger index, int fieldOffset) {\n\t\tSortedMap<BigInteger, BlockInfo> tailMap = blockInfoMap.tailMap(index);\n\t\tif (tailMap.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tBlockInfo blockInfo = tailMap.get(tailMap.firstKey());\n\t\tBigInteger byteIndex = index.multiply(bytesInLine).add(BigInteger.valueOf(fieldOffset));\n\t\tif ((byteIndex.compareTo(blockInfo.blockStart) >= 0) &&\n\t\t\t(byteIndex.compareTo(blockInfo.blockEnd) < 0)) {\n\t\t\treturn new ByteBlockInfo(blockInfo.block, byteIndex.subtract(blockInfo.blockStart));\n\t\t}\n\t\treturn null;\n\t}", "public final ScHtmlIdIF findBlockWrapper()\n {\n if ( isBlockWrapper() )\n return (ScHtmlIdIF)this;\n\n if ( hasParent() )\n return getParent().findBlockWrapper();\n\n return null;\n }", "public BBlock getBlockAtXY(int x, int y) {\n for (BBlock block : this) {\n if ((x >= block.getX() && x <= block.getX() + block.getWith()) &&\n (y >= block.getY() && y <= block.getY() + block.getHeight())) {\n return block;\n }\n }\n return null;\n }", "@SideOnly(Side.CLIENT)\r\n\tpublic EnumWorldBlockLayer getBlockLayer()\r\n\t{\r\n\t\treturn EnumWorldBlockLayer.CUTOUT_MIPPED;\r\n\t}", "public Block getBlock(final int x, final int y, final int z) {\n\t\tif(y < 0 || y > 255)\n\t\t\treturn Blocks.air;\n\t\t\n\t\tfinal int arrayX = (x >> 4) - this.chunkX;\n\t\tfinal int arrayZ = (z >> 4) - this.chunkZ;\n\t\tassert (arrayX >= 0 && arrayX < this.dimX && arrayZ >= 0 && arrayZ < this.dimZ);\n\t\t// if (l >= 0 && l < this.dimX && i1 >= 0 && i1 < this.dimZ)\n\t\treturn this.chunkArray[arrayX + arrayZ * this.dimX].getBlock(x & 15, y, z & 15);\n\t}", "protected Node getBlockNode(Node parent)\n {\n for (int i=0; i<parent.jjtGetNumChildren(); i++) {\n if (parent.jjtGetChild(i) instanceof ASTBlock)\n return parent.jjtGetChild(i);\n }\n return null;\n }", "public Block instance(int paramInt)\r\n/* 194: */ {\r\n/* 195:225 */ return instance().setData(a, bds.b(paramInt)).setData(b, (paramInt & 0x8) > 0 ? bdu.b : bdu.a);\r\n/* 196: */ }", "public ItemDefinition getBlock(int id) {\n\t\treturn itemsArray[id];\n\t}", "public BlockType getType()\n {\n return blockType;\n }", "int getBlockNumber(int x, int y);", "public alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo() {\n return blockInfo_;\n }", "public Block returnStart() {\n\t\treturn start;\n\t}", "BlockConstant createBlockConstant();", "public BlockStmt\ngetInitiationPart();", "public static Block getInst(int row1, int col1, int row2, int col2) {\n\t\tLocation topLeft = Location.getInst(row1, col1);\n\t\tint length2 = row2 - row1 + 1;\n\t\tint width2 = col2 - col1 + 1;\n\t\treturn getInst(topLeft, (short) length2, (short) width2);\n\t}", "@SideOnly(Side.CLIENT)\n\tpublic BlockRenderLayer getBlockLayer() {\n\t\treturn BlockRenderLayer.SOLID;\n\t}", "phaseI.Hdfs.BlockLocations getBlockInfo();", "public ItemDefinition getBlock(String name) {\n\t\tfor (ItemDefinition def : itemsArray)\n\t\t{\n\t\t\tif (def != null)\n\t\t\t\tif (def.getName().equalsIgnoreCase(name))\n\t\t\t\t\treturn def;\n\t\t}\n\t\treturn null;\n\t}", "public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}", "public Block() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t\tthis.point_BlockTopRight = null;\r\n\t\tthis.point_BlockDownleft = null;\r\n\t\tthis.setpoint_BlockTopLeft(null);\r\n\t\tthis.IDBloack = 0;\r\n\t\tthis.type = \"\";\r\n\t}", "public alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo() {\n if (blockInfoBuilder_ == null) {\n return blockInfo_;\n } else {\n return blockInfoBuilder_.getMessage();\n }\n }", "public EJCoreBlockProperties getMappedBlock()\n {\n return _mappedBlock;\n }", "public Block get (int x, int y, int z) {\n\t\treturn maze.get(x*size*size + y*size + z);\n\t}", "public abstract void generateNextBlock();", "public Block getBlockAt(Location location) {\n\t\treturn getBlockAt(location.getX(), location.getY(), location.getZ());\n\t}", "public Short getClBlockup() {\r\n\t\treturn clBlockup;\r\n\t}", "public Icon getIcon()\n {\n return this.blockIcon;\n }", "String getBlockName() {\n return this.blockName;\n }", "@Override\n public OffsetRange getBlockRange() {\n return blockRange;\n }", "protected org.bukkit.block.Sign getSignBlock() {\r\n if (this.getBlock() == null) return null;\r\n \r\n return (org.bukkit.block.Sign) this.getBlock().getState();\r\n }", "public Object getSynchBlock ()\n\t{\n\t\treturn synchBlock;\n\t}", "public Block getBlock(int blockX, int blockY) throws Exception{\n\t\tif(blockX > getBlockSize() || blockY > getBlockSize())\n\t\t\tthrow new Exception(\"Index out of bounds\");\n\n\t\treturn blocks[blockX][blockY];\n\t}", "public BlockType getMainItem()\n {\n BlockType main = null;\n Integer amount = -1;\n\n for (Map.Entry<BlockType, Integer> item : getContent().entrySet())\n {\n if (item.getValue() > amount)\n {\n amount = item.getValue();\n main = item.getKey();\n }\n }\n\n return main;\n }", "abstract public ByteString getBlocksBuffer();" ]
[ "0.71834", "0.7161985", "0.7122854", "0.7026025", "0.69415754", "0.6940942", "0.69215846", "0.69210726", "0.6919953", "0.69038737", "0.6893172", "0.6718846", "0.66931033", "0.6649665", "0.6649665", "0.6523154", "0.65199447", "0.65087545", "0.65064013", "0.64841884", "0.64731616", "0.6462657", "0.64482665", "0.6429613", "0.63916165", "0.6388391", "0.6388218", "0.63864744", "0.63859856", "0.6354167", "0.6348055", "0.6337449", "0.63155866", "0.63136107", "0.6301516", "0.62902725", "0.6284691", "0.6283587", "0.62809086", "0.6264445", "0.6258675", "0.62580055", "0.62580055", "0.62258536", "0.6201011", "0.6200453", "0.6200453", "0.62002033", "0.619643", "0.61842203", "0.61754596", "0.61636114", "0.61573815", "0.6120912", "0.61057687", "0.61020756", "0.60985357", "0.6096893", "0.6085505", "0.6077964", "0.6074175", "0.6066414", "0.60460496", "0.6037888", "0.602281", "0.6021222", "0.5977153", "0.597227", "0.59708565", "0.5966939", "0.5956657", "0.59562916", "0.59509856", "0.5944873", "0.59441376", "0.5941383", "0.59367484", "0.59325373", "0.5919549", "0.5906564", "0.5869264", "0.5861209", "0.5851866", "0.5802712", "0.5796009", "0.5785985", "0.578464", "0.5777274", "0.57752967", "0.57674897", "0.5765969", "0.5755328", "0.5755277", "0.57440996", "0.5741477", "0.574037", "0.57247764", "0.56957686", "0.5691323", "0.5669793", "0.5662967" ]
0.0
-1
Get one Inter Coded Block
private void getInterBlock(int block[], BufferedBitStream stream) throws InterruptedException { int i, position; int blocktemp=0; int data[] = new int[2]; int data0, data1; int sign = 0; int code, temp[]; boolean endOfBlock = false; i = -1; getDCTCoeffFirst(data, stream); data0 = data[0]; data1 = data[1]; do { i = i + data0 + 1; position = zigzag[i]; if ( data1 > 0 ) sign = 1; else sign = -1; blocktemp = ((2 * data1 + sign) * quantizerScale * interQuantMatrix[i])/16; if ((blocktemp & 1) == 0) if (blocktemp > 0) blocktemp -= 1; else if (blocktemp < 0) blocktemp += 1; if (blocktemp > 2047) blocktemp = 2047; else if (blocktemp < -2048) blocktemp = -2048; block[position] = blocktemp; { // DCT Next Coefficient decode code = stream.showBits(17); if (code >= 2048) temp = DCTCoefficientTable[code >>> 8]; else if (code >= 256) temp = DCTCoefficientTable[ (code >>> 3) + 512]; else temp = DCTCoefficientTable[ (code) + 768]; if (temp[0] == ESC) { // More decoding stream.flushBits(temp[2]); int run = stream.getBits(6); int value = stream.showBits(16); if ((value & 0xFF00) == 0x8000) { stream.flushBits(16); value = (value | 0xFFFFFF00); } else if ((value & 0xFF00) == 0x0000) { stream.flushBits(16); value = (value & 0x000000FF); } else { stream.flushBits(8); value = (value << 16) >> 24; } data0 = run; data1 = value; } else { stream.flushBits(temp[2]); data0 = temp[0]; data1 = temp[1]; } } // End of DCT Next Coeffcient decode } while (data0 != EOB); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "protected Block getBlock() {\r\n return this.block;\r\n }", "int getBlockNumber();", "int getBlockNumber();", "public Block getBlock()\n {\n return block;\n }", "Block getBlock(String congName, String blockName, String blockNumber);", "public int getBlock(){\n return this.position.getCurrentBlock();\n }", "Block getBlockByNumber(long number);", "public Block getBlock()\n\t{\n\t\treturn this.block;\n\t}", "public Block getBlock(int index){\n\t\treturn ds[index];\n\t}", "public Block getBlock() {\n\t\treturn this.block;\n\t}", "int getBlockId();", "public ProductionBlock getSpecificProductionBlock(int id);", "public Block getBlock() {\n return (Block)getChild(0);\n }", "public Block getObj()\n\t{\n\t\treturn block;\n\t}", "public int GetID()\n {\n return blockType.GetID();\n }", "public Block getBlock(int i) {\n\t\treturn Block.getBlock(id(i));\n\t}", "public int getBlockId() {\n return blockId;\n \n }", "Block getHiveBlock();", "@Override\n\tpublic int getBlockNum() {\n\t\treturn 0;\n\t}", "public IGUIBlock getHighlightedBlock() {\n Block highlightedBlock = blockHandler.getPA().getNextBlockInProgram();\n return (highlightedBlock != null) ? blockLink.getGUIBlockFromBlock(highlightedBlock) : null;\n }", "protected ASPBlock getBizWfBlock()\n {\n return headblk;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "public static int getBlockNum() {\n\t\treturn (blockContext.blockNum);\n\t}", "public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }", "protected BlockStmt currentBlock() {\n return enclosingBlocks.peekFirst();\n }", "byte getBlockData();", "public int getBlockNumber() {\n return blockNumber_;\n }", "public int getBlockNumber() {\n return blockNumber_;\n }", "Block createBlock();", "public abstract int getNextBlock(int block) throws IOException;", "public Block getBlockByID(Integer blockID){\n for (Block block : this.blocks) {\n if(block.getID().equals(blockID))\n {\n return block;\n }\n }\n return null;\n }", "public Response getBlock(int row) {\n return blockList.get(row);\n }", "public BlockType getType()\n {\n return blockType;\n }", "public Block getBlockNoTransform() {\n return (Block)getChildNoTransform(0);\n }", "@NotNull\r\n Block getBlock(int x, int y, int z);", "Block getBlockByHash(byte[] hash);", "public Block getStart () {\n\t\treturn start;\n\t}", "public Block getBlock(String id) {\n\t\treturn this.blocks.get(Long.valueOf(id));\n\t}", "@Deprecated public Block getBlock(){\n return this.block!=null?this.block.build():null;\n }", "public Block accessBlock(int i){\n\t\treturn blocks[i]; \n\t}", "public Block getBlockNoTransform() {\n return (Block) getChildNoTransform(0);\n }", "public Block getBlock(int x, int y){\n\t\tIterator iterator = blocks.iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tBlock b = (Block) iterator.next();\n\t\t\tif ((b.getX()==x)&&(b.getY()==y)) {\n\t\t\t\treturn b;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@SideOnly(Side.CLIENT)\r\n\tpublic EnumWorldBlockLayer getBlockLayer()\r\n\t{\r\n\t\treturn EnumWorldBlockLayer.CUTOUT_MIPPED;\r\n\t}", "public String generateBlock(){\n return null;\n }", "public BlockStmt\ngetInitiationPart();", "phaseI.Hdfs.BlockLocations getNewBlock();", "@Override\n public Block getBlock() {\n Block b = null;\n while (b == null) {\n boolean noMoreBlocks = blocks.isEmpty();\n if (!noMoreBlocks) {\n b = blocks.poll();\n }\n\n if (noMoreBlocks || b == null) {\n synchronized (BlocksPool.class) { // can be easily changed to lock-free\n if (blocks.isEmpty()) {\n alloc(newAllocBlocks);\n }\n }\n }\n }\n return b;\n }", "public Block getLatestBlock() {\n int totalLength = blockChain.size();\n return this.blockChain.get(totalLength - 1);\n }", "public final ScHtmlIdIF findBlockWrapper()\n {\n if ( isBlockWrapper() )\n return (ScHtmlIdIF)this;\n\n if ( hasParent() )\n return getParent().findBlockWrapper();\n\n return null;\n }", "public short getBlock(final int aX, final int aY)\r\n\t{\r\n\t\treturn mBlocks[aX][aY];\r\n\t}", "public String getBlockStart () {\n return BLOCK_START_PREFIX + objectName + BLOCK_START_SUFFIX;\n }", "private Data getNextBlock() {\n Connection con = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n con = DbConnectionManager.getConnection();\n // Get the current ID from the database.\n pstmt = con.prepareStatement(LOAD_ID);\n pstmt.setInt(1, type);\n rs = pstmt.executeQuery();\n\n long currentID = 1;\n if (rs.next()) {\n currentID = rs.getLong(1);\n }\n else {\n createNewID(con, type);\n }\n DbConnectionManager.fastcloseStmt(rs, pstmt);\n\n // Increment the id to define our block.\n long newID = currentID + blockSize;\n // The WHERE clause includes the last value of the id. This ensures\n // that an update will occur only if nobody else has performed an\n // update first.\n pstmt = con.prepareStatement(UPDATE_ID);\n pstmt.setLong(1, newID);\n pstmt.setInt(2, type);\n pstmt.setLong(3, currentID);\n // Check to see if the row was affected. If not, some other process\n // already changed the original id that we read. This code should be\n // called under a lock, so this is not supposed to happen. Throw a\n // very verbose error if it does.\n if (pstmt.executeUpdate() == 1) {\n final Data result = new Data(currentID, newID);\n sequenceBlocks.put(type, result);\n return result;\n } else {\n throw new IllegalStateException(\"Failed at attempt to obtain an ID, aborting...\");\n }\n }\n catch (SQLException e) {\n Log.error(\"An exception occurred while trying to obtain new sequence values from the database for type {}\", type, e);\n throw new IllegalStateException(\"Failed at attempt to obtain an ID, aborting...\", e);\n }\n finally {\n DbConnectionManager.closeConnection(rs, pstmt, con);\n }\n }", "public Block returnStart() {\n\t\treturn start;\n\t}", "public Block instance(int paramInt)\r\n/* 194: */ {\r\n/* 195:225 */ return instance().setData(a, bds.b(paramInt)).setData(b, (paramInt & 0x8) > 0 ? bdu.b : bdu.a);\r\n/* 196: */ }", "String getBlockPolicy();", "public Object getSynchBlock ()\n\t{\n\t\treturn synchBlock;\n\t}", "public int getRenderBlockPass(){\r\n return 1;\r\n }", "private int findCursorBlock() {\n List<BlockLine> blocks = mSpanner == null ? null : mSpanner.getColors().getBlocks();\n if(blocks == null || blocks.isEmpty()) {\n return -1;\n }\n return findCursorBlock(blocks);\n }", "@ASTNodeAnnotation.Child(name=\"Block\")\n public Block getBlock() {\n return (Block) getChild(0);\n }", "BAnyBlock createBAnyBlock();", "CommandBlock getCaseOne();", "RclBlock createRclBlock();", "int getBlockNumber(int x, int y);", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "int getTotalBlockNum();", "public static Block getInstance(short id) {\n return getInstance(id, (byte) 0);\n }", "phaseI.Hdfs.BlockLocations getBlockInfo();", "public Block getBlockBelow() {\r\n\t\tif(onGround) {\r\n\t\t\tVector4f hitbox = getHitBox(worldPos);\r\n\t\t\tfloat x = hitbox.x + (hitbox.z - hitbox.x) / 2f;\r\n\t\t\tfloat y = hitbox.y - 0.1f;\r\n\t\t\tBlock b = BlockManager.getBlock(new Vector2f(x, y));\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Short getClBlockup() {\r\n\t\treturn clBlockup;\r\n\t}", "public Block getBlock(Point point) {\n\t\treturn maze[point.x][point.y];\n\t}", "protected Node getBlockNode(Node parent)\n {\n for (int i=0; i<parent.jjtGetNumChildren(); i++) {\n if (parent.jjtGetChild(i) instanceof ASTBlock)\n return parent.jjtGetChild(i);\n }\n return null;\n }", "public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}", "public MemoryBlock getBlock(int index) {\n\t\tif (( index < 1 ) || ( index > size - 1 ))\n\t\t\tthrow new IllegalArgumentException();\n\t\t return getNode(index).block;\n\t\t \n\t}", "Optional<CacheBlock> getCacheBlock(int index);", "@Override\n public CssDeclarationBlockNode getBlock() {\n return (CssDeclarationBlockNode) super.getBlock();\n }", "alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo();", "private Block getBlockFromRecord(GameLogsRecord record) {\n JsonObject json = JsonParser.parseString(record.getMessage()).getAsJsonObject();\n // If Block logs are incomplete, the missing values are the default 0\n // This should only occur for games that were played before\n // TODO: date of setting up infrastructure commit 96b2fde on the server\n int x = 0, y = 0, z = 0;\n if (json.has(\"x\")) {\n x = json.get(\"x\").getAsInt();\n } else {\n logger.error(\"Missing x value for block at {}: {}\", json, record.getTimestamp());\n }\n if (json.has(\"y\")) {\n y = json.get(\"y\").getAsInt();\n } else {\n logger.error(\"Missing y value for block at {}: {}\", json, record.getTimestamp());\n }\n if (json.has(\"z\")) {\n z = json.get(\"z\").getAsInt();\n } else {\n logger.error(\"Missing z value for block at {}: {}\", json, record.getTimestamp());\n }\n return new Block(x, y, z);\n }", "String getBlockName() {\n return this.blockName;\n }", "public ItemDefinition getBlock(String name) {\n\t\tfor (ItemDefinition def : itemsArray)\n\t\t{\n\t\t\tif (def != null)\n\t\t\t\tif (def.getName().equalsIgnoreCase(name))\n\t\t\t\t\treturn def;\n\t\t}\n\t\treturn null;\n\t}", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "public ItemDefinition getBlock(int id) {\n\t\treturn itemsArray[id];\n\t}", "public Block getFrom() {\n\t\t\treturn Block.getBlockById(fromId);\n\t\t}", "@SideOnly(Side.CLIENT)\n\tpublic BlockRenderLayer getBlockLayer() {\n\t\treturn BlockRenderLayer.SOLID;\n\t}", "LocalMaterialData getSurfaceBlock();", "public int getFreeBlock()\n {\n int freeBlock = this.freeList; // Set freeBlock to the head of the freeList\n if(freeBlock != -1) // Check to see if the freeBlock is in use\n {\n byte[] block = new byte[512];\n SysLib.rawread(freeBlock, block); // Read data from freeBlock\n this.freeList = SysLib.bytes2int(block, 0); // Move the head of the freeList to the next block\n SysLib.int2bytes(0, block, 0);\n SysLib.rawwrite(freeBlock, block);\n }\n\n return freeBlock;\n }", "public int getFreeBlock(){\n \n if(freeList == -1){\n return -1;\n }\n\n //Retrieve the free block \n byte[] data = new byte[512];\n SysLib.rawread(freeList, data);\n\n \n //Update the freelist\n int freeBlock = freeList;\n freeList = SysLib.bytes2int(data, 0);\n SysLib.int2bytes(0,data,0);\n SysLib.rawwrite(freeBlock,data);\n\n return freeBlock;\n }", "public abstract void generateNextBlock();", "alluxio.proto.journal.File.NewBlockEntry getNewBlock();", "abstract public ByteString getBlocksBuffer();", "LocalMaterialData getGroundBlock();", "public String getRemoteBlock(String hash){\n getBlock = true;\n getBlockHash = hash;\n try{\n synchronized(this){\n this.wait();\n }\n } catch(InterruptedException e){\n // nothing happens here\n }\n getBlock = false;\n if(remoteBlocks.containsKey(hash))\n return remoteBlocks.get(hash);\n else{\n return \"notfound\";\n }\n }", "Block getTryBlock();", "private Buffer findExistingBuffer(Block blk) {\n //=====================================CS4432-Project1=====================\n //lookup the block from the list of all buffers, and if we can find a frame number\n //we should return that buffer\n if (buffers.get(blk) != null){\n //get the frame number\n int frame = buffers.get(blk);\n\n //since we were looking up the buffer, we need to reorder our LRU array if\n //the block searched for is unpinned\n if (!bufferpool[frame].isPinned()){\n if (replacementPolicy.equalsIgnoreCase(\"LRU\")) {\n int location = leastRecentlyUsedArray.indexOf(frame);\n if (location != -1){\n //remove and re-add at the end of the array\n leastRecentlyUsedArray.remove(location);\n leastRecentlyUsedArray.add(frame);\n }\n }\n }\n\n //return the existing buffer\n return bufferpool[frame];\n }\n //we could not find the frame number (ie. it does not exist) so return null\n return null;\n }", "private Block getBlockAt(int x, int y, int z) {\n\t\ttry {\n\t\t\tbyte blockId = blockIDArray[x][y][z];\n\t\t\treturn new Block(x, y, z, BlockType.fromID(blockId), this);\n\t\t} catch(IndexOutOfBoundsException e) { return new Block(x, y, z, BlockType.AIR, this); }\n\t}", "public Integer get(String name){\n\t\treturn blocks.getLast().get(name);\n\t}", "public String nextBlockNumber()\n\t{\n\t\tblockNumber++;\n\t\treturn (\"\" + blockNumber);\n\t}", "public static Block getTargetBlock(LivingEntity entity, int maxDistance) throws CommandException {\n BlockIterator iterator = new BlockIterator(entity, maxDistance);\n while (iterator.hasNext()) {\n Block foundBlock = iterator.next();\n if (foundBlock.getType() != Material.AIR) {\n return foundBlock;\n }\n }\n throw new CommandException(\"You aren't looking at a block (or out of range)\");\n }", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n return newBlock_;\n }", "public OutlookAttachmentBlockLevel getBlockLevel()\n {\n return getConstant(\"BlockLevel\", OutlookAttachmentBlockLevel.class);\n }" ]
[ "0.72165567", "0.70829976", "0.7016294", "0.7016294", "0.69820935", "0.69456893", "0.68907464", "0.68890697", "0.68440807", "0.6840249", "0.6794779", "0.6783225", "0.6768443", "0.67212087", "0.66635966", "0.6576113", "0.65607166", "0.65535915", "0.65494883", "0.65430796", "0.6509557", "0.648539", "0.64820796", "0.64820796", "0.6470037", "0.6451238", "0.64167434", "0.63950634", "0.63941157", "0.63941157", "0.6381396", "0.63368905", "0.63216525", "0.62964475", "0.6293379", "0.6277781", "0.62580097", "0.62401235", "0.6235652", "0.6235446", "0.62121135", "0.6209592", "0.6200265", "0.6183977", "0.6173863", "0.61685264", "0.61674803", "0.6165203", "0.61620826", "0.6154091", "0.612649", "0.6111563", "0.6106625", "0.6091953", "0.60814935", "0.60783327", "0.60698456", "0.6065346", "0.6046918", "0.603498", "0.60313725", "0.6025035", "0.60100406", "0.60034984", "0.5985331", "0.59825355", "0.5981135", "0.59491605", "0.5943359", "0.59418815", "0.5934613", "0.59270245", "0.5905464", "0.5901799", "0.5892832", "0.58924335", "0.5884792", "0.58804274", "0.5872575", "0.587168", "0.58682597", "0.5865947", "0.5852727", "0.5849365", "0.58472633", "0.58132434", "0.58107406", "0.5804863", "0.5788124", "0.5766146", "0.57610834", "0.5759185", "0.57573885", "0.57541776", "0.5751626", "0.57475555", "0.5735832", "0.57204866", "0.57102686", "0.57026356", "0.56970304" ]
0.0
-1
If have coded Macro Block pattern
private boolean haveMBPattern() { return ((mbType & PATTERN) !=0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean macro(Macro m, Token orig)\r\n throws IOException,\r\n LexerException {\r\n Token tok;\r\n List<Argument> args;\r\n\r\n // System.out.println(\"pp: expanding \" + m);\r\n if (m.isFunctionLike()) {\r\n OPEN:\r\n for (;;) {\r\n tok = source_token();\r\n // System.out.println(\"pp: open: token is \" + tok);\r\n switch (tok.getType()) {\r\n case WHITESPACE:\t/* XXX Really? */\r\n\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n case NL:\r\n break;\t/* continue */\r\n\r\n case '(':\r\n break OPEN;\r\n default:\r\n source_untoken(tok);\r\n return false;\r\n }\r\n }\r\n\r\n // tok = expanded_token_nonwhite();\r\n tok = source_token_nonwhite();\r\n\r\n /* We either have, or we should have args.\r\n * This deals elegantly with the case that we have\r\n * one empty arg. */\r\n if (tok.getType() != ')' || m.getArgs() > 0) {\r\n args = new ArrayList<Argument>();\r\n\r\n Argument arg = new Argument();\r\n int depth = 0;\r\n boolean space = false;\r\n\r\n ARGS:\r\n for (;;) {\r\n // System.out.println(\"pp: arg: token is \" + tok);\r\n switch (tok.getType()) {\r\n case EOF:\r\n error(tok, \"EOF in macro args\");\r\n return false;\r\n\r\n case ',':\r\n if (depth == 0) {\r\n if (m.isVariadic()\r\n && /* We are building the last arg. */ args.size() == m.getArgs() - 1) {\r\n /* Just add the comma. */\r\n arg.addToken(tok);\r\n } else {\r\n args.add(arg);\r\n arg = new Argument();\r\n }\r\n } else {\r\n arg.addToken(tok);\r\n }\r\n space = false;\r\n break;\r\n case ')':\r\n if (depth == 0) {\r\n args.add(arg);\r\n break ARGS;\r\n } else {\r\n depth--;\r\n arg.addToken(tok);\r\n }\r\n space = false;\r\n break;\r\n case '(':\r\n depth++;\r\n arg.addToken(tok);\r\n space = false;\r\n break;\r\n\r\n case WHITESPACE:\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n case NL:\r\n /* Avoid duplicating spaces. */\r\n space = true;\r\n break;\r\n\r\n default:\r\n /* Do not put space on the beginning of\r\n * an argument token. */\r\n if (space && !arg.isEmpty())\r\n arg.addToken(Token.space);\r\n arg.addToken(tok);\r\n space = false;\r\n break;\r\n\r\n }\r\n // tok = expanded_token();\r\n tok = source_token();\r\n }\r\n /* space may still be true here, thus trailing space\r\n * is stripped from arguments. */\r\n\r\n if (args.size() != m.getArgs()) {\r\n if (m.isVariadic()) {\r\n if (args.size() == m.getArgs() - 1) {\r\n args.add(new Argument());\r\n } else {\r\n error(tok,\r\n \"variadic macro \" + m.getName()\r\n + \" has at least \" + (m.getArgs() - 1) + \" parameters \"\r\n + \"but given \" + args.size() + \" args\");\r\n return false;\r\n }\r\n } else {\r\n error(tok,\r\n \"macro \" + m.getName()\r\n + \" has \" + m.getArgs() + \" parameters \"\r\n + \"but given \" + args.size() + \" args\");\r\n /* We could replay the arg tokens, but I \r\n * note that GNU cpp does exactly what we do,\r\n * i.e. output the macro name and chew the args.\r\n */\r\n return false;\r\n }\r\n }\r\n\r\n for (Argument a : args) {\r\n a.expand(this);\r\n }\r\n\r\n // System.out.println(\"Macro \" + m + \" args \" + args);\r\n } else {\r\n /* nargs == 0 and we (correctly) got () */\r\n args = null;\r\n }\r\n\r\n } else {\r\n /* Macro without args. */\r\n args = null;\r\n }\r\n\r\n if (m == __LINE__) {\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(NUMBER,\r\n orig.getLine(), orig.getColumn(),\r\n Integer.toString(orig.getLine()),\r\n new NumericValue(10, Integer.toString(orig.getLine())))}\r\n ), true);\r\n } else if (m == __FILE__) {\r\n StringBuilder buf = new StringBuilder(\"\\\"\");\r\n String name = getSource().getName();\r\n if (name == null)\r\n name = \"<no file>\";\r\n for (int i = 0; i < name.length(); i++) {\r\n char c = name.charAt(i);\r\n switch (c) {\r\n case '\\\\':\r\n buf.append(\"\\\\\\\\\");\r\n break;\r\n case '\"':\r\n buf.append(\"\\\\\\\"\");\r\n break;\r\n default:\r\n buf.append(c);\r\n break;\r\n }\r\n }\r\n buf.append(\"\\\"\");\r\n String text = buf.toString();\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(STRING,\r\n orig.getLine(), orig.getColumn(),\r\n text, text)}\r\n ), true);\r\n } else if (m == __COUNTER__) {\r\n /* This could equivalently have been done by adding\r\n * a special Macro subclass which overrides getTokens(). */\r\n int value = this.counter++;\r\n push_source(new FixedTokenSource(\r\n new Token[]{new Token(NUMBER,\r\n orig.getLine(), orig.getColumn(),\r\n Integer.toString(value),\r\n new NumericValue(10, Integer.toString(value)))}\r\n ), true);\r\n } else {\r\n push_source(new MacroTokenSource(m, args), true);\r\n }\r\n\r\n return true;\r\n }", "DefineBlock createDefineBlock();", "private boolean isMacro(int nextVal) throws java.io.IOException, IOException {\n\t\tif (nextVal == PREPROCESSING) {\n\t\t\tint pos = (int) reader.getFilePointer();\n\t\t\tthis.readUntilEndOfLine(nextVal);\n\t\t\tthis.seek(pos);\n\t\t\treturn !(next.matches(\"!procedure.*\") || next.matches(\"!function.*\"));\n\t\t}\n\t\treturn false;\n\t}", "protected void getMacroBlock(BufferedBitStream stream) throws InterruptedException\n {\n // Starting from the Macroblock type\n /* read macro block bit flags */\n/*\n swi*tch (getPictureType()) {\n\n case Picture.I_TYPE:\n getIMBType(stream);\n break;\n case Picture.P_TYPE:\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n break;\n case Picture.B_TYPE:\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n break;\n }\n*/\n int type = getPictureType();\n if (type == Picture.I_TYPE) {\n getIMBType(stream);\n } else if (type == Picture.P_TYPE) {\n getPMBType(stream);\n if (!isForwardPredicted())\n resetMotionVector();\n if (!isMBIntra())\n resetDCPredictor();\n } else if (type == Picture.B_TYPE) {\n getBMBType(stream);\n if (isMBIntra())\n resetMotionVector();\n else\n resetDCPredictor();\n }\n\n\n\n if (haveMBQuant())\n setQuantizerScale(stream.getBits(5));\n\n if (isForwardPredicted())\n forwardVector.getMotionVector(stream);\n\n if (isBackwardPredicted())\n backwardVector.getMotionVector(stream);\n\n if (haveMBPattern())\n getMBPattern(stream);\n else resetMBPattern();\n\n int i,j;\n\n // Clear the block data\n for (i=0;i<6;i++)\n for (j=0;j<64;j++)\n block[i][j] = 0;\n\n // Read DCT coefficients\n if (isMBIntra()) {\n\n for (i=0;i<4;i++) {\n dctDCYPast = getIntraBlock(block[i],stream, dctDCYPast,getDCLuminance(stream));\n IDCT.transform(block[i]);\n }\n\n dctDCCbPast = getIntraBlock(block[4],stream, dctDCCbPast,getDCChrominance(stream));\n IDCT.transform(block[4]);\n\n dctDCCrPast = getIntraBlock(block[5],stream, dctDCCrPast,getDCChrominance(stream));\n IDCT.transform(block[5]);\n\n } else {\n for (i=0;i<6;i++) {\n\n if ((codedBlockPattern & (1 << (5-i))) != 0) {\n\n getInterBlock(block[i], stream);\n IDCT.transform(block[i]);\n }\n }\n }\n\n if (getPictureType() == Picture.D_TYPE)\n stream.flushBits(1);\n // Parsing Macro Block finished!\n }", "private String blocklessIf(String block) {\n\t\tint semicolonpos = block.indexOf(';');\n\t\tint blockstartpos = block.indexOf('{');\n\t\tif(semicolonpos>-1 && semicolonpos<blockstartpos || blockstartpos ==-1)\n\t\t{\n\t\t\tString tmp = block.substring(0, semicolonpos+1);\n\t\t\tString tmp2 = tmp.substring(0,tmp.lastIndexOf(\")\")+1);\n\t\t\tString correction = tmp.replace(tmp2, tmp2+\"{\")+\"}\";\n\t\t\tblock = block.replace(tmp, correction);\n\t\t}\n\t\treturn block;\n\t}", "public T caseDefineFunctionLikeMacro(DefineFunctionLikeMacro object)\n\t{\n\t\treturn null;\n\t}", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "@Override\r\n\tpublic void visit(BlockExpression blockExpression) {\n\r\n\t}", "private Token define()\r\n throws IOException,\r\n LexerException {\r\n Token tok = source_token_nonwhite();\r\n if (tok.getType() != IDENTIFIER) {\r\n error(tok, \"Expected identifier\");\r\n return source_skipline(false);\r\n }\r\n /* if predefined */\r\n\r\n String name = tok.getText();\r\n if (\"defined\".equals(name)) {\r\n error(tok, \"Cannot redefine name 'defined'\");\r\n return source_skipline(false);\r\n }\r\n\r\n Macro m = new Macro(getSource(), name);\r\n List<String> args;\r\n\r\n tok = source_token();\r\n if (tok.getType() == '(') {\r\n tok = source_token_nonwhite();\r\n if (tok.getType() != ')') {\r\n args = new ArrayList<String>();\r\n ARGS:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case IDENTIFIER:\r\n args.add(tok.getText());\r\n break;\r\n case ELLIPSIS:\r\n // Unnamed Variadic macro\r\n args.add(\"__VA_ARGS__\");\r\n // We just named the ellipsis, but we unget the token\r\n // to allow the ELLIPSIS handling below to process it.\r\n source_untoken(tok);\r\n break;\r\n case NL:\r\n case EOF:\r\n error(tok,\r\n \"Unterminated macro parameter list\");\r\n return tok;\r\n default:\r\n error(tok,\r\n \"error in macro parameters: \"\r\n + tok.getText());\r\n return source_skipline(false);\r\n }\r\n tok = source_token_nonwhite();\r\n switch (tok.getType()) {\r\n case ',':\r\n break;\r\n case ELLIPSIS:\r\n tok = source_token_nonwhite();\r\n if (tok.getType() != ')')\r\n error(tok,\r\n \"ellipsis must be on last argument\");\r\n m.setVariadic(true);\r\n break ARGS;\r\n case ')':\r\n break ARGS;\r\n\r\n case NL:\r\n case EOF:\r\n /* Do not skip line. */\r\n error(tok,\r\n \"Unterminated macro parameters\");\r\n return tok;\r\n default:\r\n error(tok,\r\n \"Bad token in macro parameters: \"\r\n + tok.getText());\r\n return source_skipline(false);\r\n }\r\n tok = source_token_nonwhite();\r\n }\r\n } else {\r\n assert tok.getType() == ')' : \"Expected ')'\";\r\n args = Collections.emptyList();\r\n }\r\n\r\n m.setArgs(args);\r\n } else {\r\n /* For searching. */\r\n args = Collections.emptyList();\r\n source_untoken(tok);\r\n }\r\n\r\n /* Get an expansion for the macro, using indexOf. */\r\n boolean space = false;\r\n boolean paste = false;\r\n int idx;\r\n\r\n /* Ensure no space at start. */\r\n tok = source_token_nonwhite();\r\n EXPANSION:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case EOF:\r\n break EXPANSION;\r\n case NL:\r\n break EXPANSION;\r\n\r\n case CCOMMENT:\r\n case CPPCOMMENT:\r\n /* XXX This is where we implement GNU's cpp -CC. */\r\n // break;\r\n case WHITESPACE:\r\n if (!paste)\r\n space = true;\r\n break;\r\n\r\n /* Paste. */\r\n case PASTE:\r\n space = false;\r\n paste = true;\r\n m.addPaste(new Token(M_PASTE,\r\n tok.getLine(), tok.getColumn(),\r\n \"#\" + \"#\", null));\r\n break;\r\n\r\n /* Stringify. */\r\n case '#':\r\n if (space)\r\n m.addToken(Token.space);\r\n space = false;\r\n Token la = source_token_nonwhite();\r\n if (la.getType() == IDENTIFIER\r\n && ((idx = args.indexOf(la.getText())) != -1)) {\r\n m.addToken(new Token(M_STRING,\r\n la.getLine(), la.getColumn(),\r\n \"#\" + la.getText(),\r\n Integer.valueOf(idx)));\r\n } else {\r\n m.addToken(tok);\r\n /* Allow for special processing. */\r\n source_untoken(la);\r\n }\r\n break;\r\n\r\n case IDENTIFIER:\r\n if (space)\r\n m.addToken(Token.space);\r\n space = false;\r\n paste = false;\r\n idx = args.indexOf(tok.getText());\r\n if (idx == -1)\r\n m.addToken(tok);\r\n else\r\n m.addToken(new Token(M_ARG,\r\n tok.getLine(), tok.getColumn(),\r\n tok.getText(),\r\n Integer.valueOf(idx)));\r\n break;\r\n\r\n default:\r\n if (space)\r\n m.addToken(Token.space);\r\n space = false;\r\n paste = false;\r\n m.addToken(tok);\r\n break;\r\n }\r\n tok = source_token();\r\n }\r\n\r\n if (getFeature(Feature.DEBUG))\r\n LOG.info(\"Defined macro \" + m);\r\n addMacro(m);\r\n\r\n return tok;\t/* NL or EOF. */\r\n\r\n }", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "private static void registerBlock(Block b)\n\t{\n\t}", "private void compileIfHelper() throws IOException {\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileExpression();\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileStatements();\n printToken();\n getNextToken();\n if (currentToken.equals(ELSE_TAG)) {\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileStatements();\n printToken();\n getNextToken();\n }\n }", "boolean supportsAnonymousBlocks();", "public Rule itBlock()\n \t{\n \t\treturn sequence(BRACKET_L, zeroOrMore(stmt()), BRACKET_R);\n \t}", "public Macro(Object name) {\n super(name);\n }", "private XDOM prepareWikiMacroContent(MacroTransformationContext context)\n {\n XDOM xdom = this.content.clone();\n\n // Macro code segment is always parsed into a separate xdom document. Now if this code segment starts with\n // another macro block, it will always be interpreted as a block macro regardless of the current wiki macro's\n // context (because as far as the nested macro is concerned, it starts on a new line). This will introduce\n // unnecessary paragraph elements when the wiki macro is used inline, so we need to force such opening macro\n // blocks to behave as inline macros if the wiki macro is used inline.\n if (context.isInline()) {\n List<Block> children = xdom.getChildren();\n if (children.size() > 0 && children.get(0) instanceof MacroBlock) {\n MacroBlock old = (MacroBlock) children.get(0);\n MacroBlock replacement = new MacroBlock(old.getId(), old.getParameters(), old.getContent(), true);\n xdom.replaceChild(replacement, old);\n }\n }\n\n return xdom;\n }", "private String generateMacro(){\r\n\t\tString code=\"\";\r\n\t\tcode += \"#include <assert.h>\\n\";\r\n\t\tcode += \"#include \\\"osek.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"oil.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"readyQ.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"kernel.h\\\"\\n\";\r\n\t\treturn code;\r\n\t}", "public interface Block5<A, B, C, D, E, R> {\n\n /**\n * Invokes this block.\n * \n * @param a block argument number 1.\n * @param b block argument number 2.\n * @param c block argument number 3.\n * @param e block argument number 5.\n * @return the block return value.\n */\n @Mapping(\"run:param:param:param:param:\")\n R run(A a, B b, C c, D d, E e);\n}", "@Test\n void shouldExpandTokenMacro() {\n WorkflowJob job = createPipelineWithWorkspaceFilesWithSuffix(\"checkstyle1.xml\", \"checkstyle2.xml\");\n\n configureToken(job, \"checkstyle1\");\n\n AnalysisResult baseline = scheduleBuildAndAssertStatus(job, Result.SUCCESS);\n verifyConsoleLog(baseline, 3, 0, 0);\n\n configureToken(job, \"checkstyle2\");\n\n AnalysisResult result = scheduleBuildAndAssertStatus(job, Result.SUCCESS);\n\n verifyConsoleLog(result, 4, 3, 2);\n }", "final public void block() throws ParseException {\n jj_consume_token(35);\n jj_consume_token(BLOCK);\n label_3:\n while (true) {\n if (jj_2_35(4)) {\n ;\n } else {\n break label_3;\n }\n jj_consume_token(34);\n }\n if (jj_2_36(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(36);\n }", "CommandBlock getCaseSharp();", "void compileIf() {\n\n tagBracketPrinter(IF_TAG, OPEN_TAG_BRACKET);\n try {\n compileIfHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(IF_TAG, CLOSE_TAG_BRACKET);\n }", "public void testSpecificBody(){\n $method $m = $method.of().$body(new Object(){ void m(Object $any$) { \n System.out.println($any$); \n }});\n \n class C {\n public void g(){\n System.out.println(1);\n } \n public void t(){\n // A comment is ignored when matching\n System.out.println( \"Some text \"); \n } \n } \n assertNotNull($m.firstIn(C.class));\n assertNotNull($m.selectFirstIn(C.class).is(\"any\", 1));\n assertEquals(2, $m.listIn(C.class).size()); \n }", "public Macro(Object name, Procedure expander2) {\n super(name);\n Object obj;\n new QuoteExp(expander2);\n this.expander = obj;\n }", "public ArrayList<Byte> generateIfBlockCode(IfBlock ib) {\n if ((ib.getActions().getChildren().size() == 0) || (ib.getCondition().getChildren().size() == 0)\n || ib.getIfHolders().getChildren().size() == 0) {\n return null;\n }\n Block conBlock = (Block) ib.getCondition().getChildren().get(0);\n\n ArrayList<Byte> ifArr = generateByteList(ib.getIfHolders());\n ArrayList<Byte> elseArr = generateByteList(ib.getElseHolders());\n\n ArrayList<Byte> cmdArr = new ArrayList<>();\n //checking condition or sense\n char instruction = 'c';\n int address = conBlock.getCapability().getDevice().getAddress();\n char cmdChar = conBlock.getCapability().getExeCommand().charAt(0);\n char cmdChar1 = conBlock.getCapability().getExeCommand().charAt(1);\n\n char compType = conBlock.getCapability().getCompType().charAt(0);\n cmdArr.add((byte) instruction);\n cmdArr.add((byte) address);\n cmdArr.add((byte) compType);\n short respSize = Short.parseShort(conBlock.getCapability().getRespSize());\n byte[] respArr = shortToByteArray(respSize);\n cmdArr.add(respArr[0]);\n int refVal = Integer.parseInt(conBlock.getCapability().getRefValue());\n if (conBlock.getCapability().getType().equals(Capability.CAP_CONDITION)) {\n refVal = Integer.parseInt(conBlock.getTextField().getText());\n }\n byte[] refArr = intToByteArray(refVal);\n for (int i = 0; i < respSize; i++) {\n cmdArr.add(refArr[i]);\n }\n cmdArr.add((byte) cmdChar);\n cmdArr.add((byte) cmdChar1);\n short jumpAdd = (short) (ifArr.size() + 4 + cmdArr.size() + 3);\n byte[] jumpArr = shortToByteArray(jumpAdd);\n int counter = 3;\n for (byte b : jumpArr) {\n cmdArr.add(counter++, b);\n\n }\n //prepending command length parameter\n cmdArr.add(0, (byte) (cmdArr.size() + 1));\n\n //jump forward instruction\n ArrayList<Byte> jumpBytes = new ArrayList<>();\n instruction = 'j';\n jumpAdd = (short) (elseArr.size() + 4);\n jumpBytes.add((byte) instruction);\n jumpArr = shortToByteArray(jumpAdd);\n for (byte b : jumpArr) {\n jumpBytes.add(b);\n }\n //prepending command length parameter\n jumpBytes.add(0, (byte) (jumpBytes.size() + 1));\n\n //merging lists\n cmdArr.addAll(ifArr);\n cmdArr.addAll(jumpBytes);\n cmdArr.addAll(elseArr);\n\n return cmdArr;\n }", "public static BlockExpression block(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BlockExpression block(Expression expression0, Expression expression1, Expression expression2, Expression expression3, Expression expression4) { throw Extensions.todo(); }", "public T caseBlock(Block object) {\r\n\t\treturn null;\r\n\t}", "private IfElement _if(String expression, CodeElement... body)\n {\n return _ifElse(expression, Arrays.asList(body), null);\n }", "TACBlock optimise(TACBlock code);", "private void loadBlock(boolean getsBlock, SkinnyMethodAdapter mv) {\n if (getsBlock) {\n mv.visitVarInsn(ALOAD, BLOCK_INDEX);\n }\n }", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private void Conditional(){\n\t\tLogicOR();\n\t\t\n\t\tfor(;;){\n\t\t\tif(eat(\"for\")){\n\t\t\t\tInlineFor();\n\t\t\t}else if(eat(\"if\")){\n\t\t\t\tExpression();\n\t\t\t\tif(eat(\"else\"))\n\t\t\t\t\tConditional();\n\t\t\t}else if(eat(\"defined\") || eat(\"!defined\"));\n\t\t\telse for(;;){\n\t\t\t\tif(eat(\"?\")){\n\t\t\t\t\tExpression();\n\t\t\t\t\tassert_eat(\":\");\n\t\t\t\t\tConditional();\n\t\t\t\t}else return;\n\t\t\t}\n\t\t}\n\t}", "@Test(expected = SyntaxErrorException.class)\n public void saveMacro() throws Exception{\n\t macroParser.saveMacro(\"! +\");\n }", "public static BlockExpression block(Expression expression0, Expression expression1, Expression expression2, Expression expression3) { throw Extensions.todo(); }", "Term compileTemplateMeta(Term exp){\t\t\r\n\t\tTerm t;\r\n\t\tif (exp.isFunction()){\r\n\t\t\tt = Term.function(exp.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tt = Term.create(exp.getName());\r\n\t\t}\r\n\t\tboolean isIF = isIF(exp);\r\n\t\tint count = 0;\r\n\t\t\r\n\t\tfor (Expression ee : exp.getArgs()){\r\n\t\t\tif (count == 0 && isIF){\r\n\t\t\t\t// not compile the test of if(test, then, else)\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tee = compileTemplate(ee);\r\n\t\t\t}\r\n\t\t\tcount++;\r\n\t\t\tt.add(ee);\r\n\t\t}\r\n\t\t\r\n t.setArg(exp.getArg());\r\n\t\tt.setModality(exp.getModality());\r\n\t\tt.setDistinct(exp.isDistinct());\r\n\t\treturn t;\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(InstrumentBlock instrumentBlock) {\n\t\t\r\n\t}", "public T caseDefineObjectMacro(DefineObjectMacro object)\n\t{\n\t\treturn null;\n\t}", "public static BlockExpression block(Expression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "protected final /* synthetic */ java.lang.Object run() {\n /*\n r4 = this;\n r0 = 1;\n r1 = 0;\n r2 = com.tencent.mm.plugin.appbrand.b.c.this;\n r2 = r2.chu();\n r3 = com.tencent.mm.plugin.appbrand.b.c.this;\n r3 = r3.iKh;\n if (r2 != r3) goto L_0x0022;\n L_0x000e:\n r2 = com.tencent.mm.plugin.appbrand.b.c.this;\n r2 = r2.iKh;\n r2 = r2.iKy;\n r2 = r2 & 1;\n if (r2 <= 0) goto L_0x0020;\n L_0x0018:\n r2 = r0;\n L_0x0019:\n if (r2 == 0) goto L_0x0022;\n L_0x001b:\n r0 = java.lang.Boolean.valueOf(r0);\n return r0;\n L_0x0020:\n r2 = r1;\n goto L_0x0019;\n L_0x0022:\n r0 = r1;\n goto L_0x001b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.b.c.5.run():java.lang.Object\");\n }", "private void processMacro( String text, Sink sink )\n throws XmlPullParserException\n {\n String s = text.substring( text.indexOf( '{' ) + 1, text.indexOf( '}' ) );\n s = escapeForMacro( s );\n String[] params = StringUtils.split( s, \"|\" );\n String macroName = params[0];\n\n Map<String, Object> parameters = new HashMap<>();\n for ( int i = 1; i < params.length; i++ )\n {\n String[] param = StringUtils.split( params[i], \"=\" );\n if ( param.length == 1 )\n {\n throw new XmlPullParserException( \"Missing 'key=value' pair for macro parameter: \" + params[i] );\n }\n\n String key = unescapeForMacro( param[0] );\n String value = unescapeForMacro( param[1] );\n parameters.put( key, value );\n }\n\n MacroRequest request = new MacroRequest( sourceContent, new Xhtml5Parser(), parameters, getBasedir() );\n\n try\n {\n executeMacro( macroName, request, sink );\n }\n catch ( MacroExecutionException e )\n {\n throw new XmlPullParserException( \"Unable to execute macro in the document: \" + macroName );\n }\n catch ( MacroNotFoundException me )\n {\n throw new XmlPullParserException( \"Macro not found: \" + macroName );\n }\n }", "GmMacro createGmMacro(Element element);", "boolean supportsParamsInAnonymousBlocks();", "void compileSubroutine() {\n tagBracketPrinter(SUB_TAG, OPEN_TAG_BRACKET);\n try {\n compileSubroutineHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(SUB_TAG, CLOSE_TAG_BRACKET);\n\n }", "GmMacro createGmMacro(GmMacro source);", "protected String codeBlockSource(Block block) {\n block.removeFirstOperation(); // aload_0\n block.removeFirstOperation(); // aload_1\n block.removeFirstOperation(); // iload_2\n block.removeFirstOperation(); // invokespecial <init>\n\n if (getTopBlock().getOperations().size() == 1 &&\n getTopBlock().getOperations().get(0) instanceof ReturnView) {\n return null;\n }\n\n return super.codeBlockSource(block);\n }", "private static boolean blockBody_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"blockBody_0\")) return false;\n blockBody_0_0(b, l + 1);\n return true;\n }", "GmMacro createGmMacro(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "public Snippet visit(IfStatement n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+\"if(\"+f2.returnTemp+\")\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp;\n\t n.block.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t if(f5!=null){\n\t \t\ttPlasmaCode+=f5.returnTemp;\n\t \t\t}\n\t return _ret;\n\t }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "@Test\n @Tag(\"bm1000\")\n public void testETAMACRO() {\n CuteNetlibCase.doTest(\"ETAMACRO.SIF\", \"-755.7152312325337\", \"258.71905646302014\", NumberContext.of(7, 4));\n }", "public Snippet visit(SwitchEntry n, Snippet argu) {\n\t Snippet _ret=null;\n\t Snippet f0 = n.switchLabel.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\n\t\t\tint temp = currentBlock; \n\t \n\t \n\t currentBlock = ++blockId;\n\n\t\t\t\n\n\t\t\tcurrentBlock = temp;\n\t\t\t_ret.returnTemp = f0.returnTemp+\":\";\n\t\t\ttPlasmaCode += generateTabs(blockDepth)+ _ret.returnTemp;\n\t\t\t//f2.returnTemp;\n\t\t\t n.block.accept(this, argu);\n\t return _ret;\n\t }", "private static boolean onPart_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"onPart_1\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, ON);\n r = r && type(b, l + 1);\n r = r && onPart_1_2(b, l + 1);\n r = r && block(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "protected void buildBlockBuildFunction(String block) {\n\t\toutputList.add(new OutputLine(indentLvl, \"\")); \t\n\t\toutputList.add(new OutputLine(indentLvl++, \"virtual function void build();\"));\n\t\t\n\t\t// add subcomponent build statements\n\t\tList<SpecialLine> buildList = subcompBuildList.getStatements(block);\n\t\tif (buildList != null) {\n\t\t\tIterator<SpecialLine> iter = buildList.iterator();\n\t\t\t// traverse subcomponent list\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tSpecialLine line = iter.next();\n\t\t\t\tline.setIndent(indentLvl);\n\t\t\t\toutputList.add(line);\n\t\t\t} \n\t\t}\t\t\t\t\t\n\t\toutputList.add(new OutputLine(--indentLvl, \"endfunction: build\"));\n\t}", "public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "public boolean mo3359c() {\n /*\n r4 = this;\n androidx.appcompat.widget.Toolbar r0 = r4.f2802a\n androidx.appcompat.widget.ActionMenuView r0 = r0.f466b\n r1 = 0\n r2 = 1\n if (r0 == 0) goto L_0x0022\n o1 r0 = r0.f305u\n if (r0 == 0) goto L_0x001e\n o1$c r3 = r0.f3457w\n if (r3 != 0) goto L_0x0019\n boolean r0 = r0.mo3824m()\n if (r0 == 0) goto L_0x0017\n goto L_0x0019\n L_0x0017:\n r0 = 0\n goto L_0x001a\n L_0x0019:\n r0 = 1\n L_0x001a:\n if (r0 == 0) goto L_0x001e\n r0 = 1\n goto L_0x001f\n L_0x001e:\n r0 = 0\n L_0x001f:\n if (r0 == 0) goto L_0x0022\n r1 = 1\n L_0x0022:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.C0661j3.mo3359c():boolean\");\n }", "public static void main(String[] args) throws Exception {\n\t\ttestMacro();\r\n\t}", "public boolean ifPeekIsBlockStmt() {\n\t\tif (ifPeek(\"IF_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"WHILE_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"FOR_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// **************\n\t\t// TODO\n\t\tif (ifPeekIsType()) {\n\t\t\treturn true;\n\t\t}\n\t\t// ***************\n\t\tif (ifPeek(\"RETURN_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"BREAK_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"CONT_\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public void caseAPrintExpr(APrintExpr node) {\n currentBlock = new Block(blockID++);\n node.getExpr().apply(this); // evaluate the expression\n setNextSuccessor();\n }", "public void b(World paramaqu, Random paramRandom, BlockPosition paramdt, Block parambec)\r\n/* 77: */ {\r\n/* 78: 93 */ BlockPosition localdt1 = paramdt.up();\r\n/* 79: */ label260:\r\n/* 80: 95 */ for (int i = 0; i < 128; i++)\r\n/* 81: */ {\r\n/* 82: 96 */ BlockPosition localdt2 = localdt1;\r\n/* 83: 97 */ for (int j = 0; j < i / 16; j++)\r\n/* 84: */ {\r\n/* 85: 98 */ localdt2 = localdt2.offset(paramRandom.nextInt(3) - 1, (paramRandom.nextInt(3) - 1) * paramRandom.nextInt(3) / 2, paramRandom.nextInt(3) - 1);\r\n/* 86: 99 */ if ((paramaqu.getBlock(localdt2.down()).getType() != BlockList.grass) || (paramaqu.getBlock(localdt2).getType().blocksMovement())) {\r\n/* 87: */ break label260;\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90:104 */ if (paramaqu.getBlock(localdt2).getType().material == Material.air)\r\n/* 91: */ {\r\n/* 92: */ Object localObject;\r\n/* 93:108 */ if (paramRandom.nextInt(8) == 0)\r\n/* 94: */ {\r\n/* 95:109 */ localObject = paramaqu.b(localdt2).a(paramRandom, localdt2);\r\n/* 96:110 */ avy localavy = ((EnumFlowerVariant)localObject).a().a();\r\n/* 97:111 */ Block localbec = localavy.instance().setData(localavy.l(), (Comparable)localObject);\r\n/* 98:112 */ if (localavy.f(paramaqu, localdt2, localbec)) {\r\n/* 99:113 */ paramaqu.setBlock(localdt2, localbec, 3);\r\n/* 100: */ }\r\n/* 101: */ }\r\n/* 102: */ else\r\n/* 103: */ {\r\n/* 104:116 */ localObject = BlockList.tallgrass.instance().setData(bbh.a, bbi.b);\r\n/* 105:117 */ if (BlockList.tallgrass.f(paramaqu, localdt2, (Block)localObject)) {\r\n/* 106:118 */ paramaqu.setBlock(localdt2, (Block)localObject, 3);\r\n/* 107: */ }\r\n/* 108: */ }\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111: */ }", "public static void callDefinitionOf (String mname,List<MDTrecord> MDT,String[] arguments ,List<ALArecord> ALA) {\n\t\t\n\t\tboolean macroStartFlag = false;\n\n\t\tfor(MDTrecord m : MDT)\n\t\t{\n\n\t\t\n\t\t\tif(m.instruction.startsWith(mname))\n\t\t\t{\t\n\t\t\t\tmacroStartFlag=true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!m.instruction.equals(\"MEND\") && macroStartFlag==true)\n\t\t\t{\n\t\t\t\t//System.out.println(\"adding instr: \"+m.instruction);\n\t\t\t\tString instr = new String();\n\t\t\t\tfor(int j=0 ; j<arguments.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(m.instruction.contains(\"&ARG\"+(j+1)))\n\t\t\t\t\t{\n//\t\t\t\t\t\tSystem.out.println(\"Replacing &ARG\"+(j+1)+\" by \"+arguments[j]);\n\t\t\t\t\t\tALArecord temp = ALArecord.getRecord(ALA, \"&ARG\"+( j+1 ), mname);\n\t\t\t\t\t\tint indexOfRecord = ALA.indexOf(temp);\n\t\t\t\t\t\tALA.set(indexOfRecord , new ALArecord(temp.index, temp.dummy, arguments[j], temp.macro));\n\t\t\t\t\t\tinstr=m.instruction.replace(\"&ARG\"+(j+1), arguments[j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\toutputProgram.add(instr);\n\t\t\t}\n\t\t\tif(m.instruction.equals(\"MEND\") && m.index+1<=MDT.size())\n\t\t\t{\n\t\t\t\tmacroStartFlag=false;\n\n\t\t\t}\n\n\n\t\t}\n\t}", "@Override\n protected void initializeMacroCommand() {\n \n addSubCommand(new PrepareControllerCommand());\n addSubCommand(new PrepareModelCommand());\n addSubCommand(new PrepareViewCommand());\n \n // Remove the command because it never be called more than once\n // getFacade().removeCommand(ApplicationConstants.STARTUP);\n }", "private static boolean blockBody_0_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"blockBody_0_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = blockBody_0_0_0(b, l + 1);\n if (!r) r = blockBody_0_0_1(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "void compileLet() {\n tagBracketPrinter(LET_TAG, OPEN_TAG_BRACKET);\n try {\n compileLetHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(LET_TAG, CLOSE_TAG_BRACKET);\n }", "public Block a(Block parambec, IBlockAccess paramard, BlockPosition paramdt)\r\n/* 18: */ {\r\n/* 19: 33 */ BlockType localatr = paramard.getBlock(paramdt.up()).getType();\r\n/* 20: 34 */ return parambec.setData(a, Boolean.valueOf((localatr == BlockList.aJ) || (localatr == BlockList.aH)));\r\n/* 21: */ }", "public void mo23813b() {\n }", "public boolean b(int paramInt, ItemStack paramamj)\r\n/* 86: */ {\r\n/* 87:107 */ return true;\r\n/* 88: */ }", "IfStatement createIfStatement();", "public void Inverse_macroblock_partition_scanning_process(){\n\t\tx=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,0);\n\t\ty=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,1);\n\n\t}", "public Element compileIf() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\t\n\t\t//Unique labels for jumping around\n\t\tString elseLabel = label();\n\t\tString endLabel = label();\n\n\t\tElement ifParent = document.createElement(\"ifStatement\");\n\n\t\t// if\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// (\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// expression\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileExpression());\n\n\t\t// )\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\t\t\n\t\t//If condition fails, go to else part of the block\n\t\twriter.writeArithmetic(\"not\");\n\t\twriter.writeIf(elseLabel);\n\n\t\t// {\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// statement inside the if block\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileStatements());\n\n\t\t// }\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// if done, go to end\n\t\twriter.writeGoto(endLabel);\n\t\t\n\t\t// Else statements start here\n\t\twriter.writeLabel(elseLabel);\n\n\t\t// else\n\n\t\t// Interesting coding challenge. I had to look ahead by one token to\n\t\t// check if there was an else block, but if it didn't exists, I would be\n\t\t// one token ahead of the XML.\n\t\t// Built a clone of the present tokenizer and used it to look ahead,\n\t\t// if an else exists, advance the main tokenizer as well\n\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\tclone.advance();\n\n\t\ttoken = clone.returnTokenVal();\n\t\tif (token.equals(\"else\")) {\n\n\t\t\t// else\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// statements inside the else block\n\t\t\tjTokenizer.advance();\n\t\t\tifParent.appendChild(compileStatements());\n\n\t\t\t// }\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// End of if-else block\n\t\t\twriter.writeLabel(endLabel);\n\n\t\t\treturn ifParent;\n\t\t} \n\t\telse {\n\n\t\t\t// End of if block\n\n\t\t\twriter.writeLabel(endLabel);\n\t\t\treturn ifParent;\n\t\t}\n\t}", "GmMacro createGmMacro(RStack stack);", "private static boolean enum_block_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"enum_block_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = enum_block_4_0_0(b, l + 1);\n if (!r) r = comment(b, l + 1);\n if (!r) r = consumeToken(b, EOL);\n exit_section_(b, m, null, r);\n return r;\n }", "ActionBlock createActionBlock();", "BAnyBlock createBAnyBlock();", "public static boolean block(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"block\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _COLLAPSE_, BLOCK, \"<block>\");\n r = config_block(b, l + 1);\n if (!r) r = model_block(b, l + 1);\n if (!r) r = type_alias(b, l + 1);\n if (!r) r = enum_block(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public Snippet visit(MethodDeclaration n, Snippet argu) {\n\t\t Snippet _ret=null;\n\t\t\ttPlasmaCode = \"\";\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.returnType.accept(this, argu);\n\t String tempString = \"\";\n\t\t\tif(f2 != null){\n\t\t\t\t//System.out.println(\" \"+f2.expType+\" \"+f2.returnTemp);\n\t\t\t\ttempString = f2.expType.typeName;\n\t\t\t}else{\n\t\t\t\ttempString = \"void \";\n\t\t\t}\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t String methodName = f3.expType.getTypeName();\n\t memberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = methodName;\n\t\t\tcurrentMethod = currentClass.methods.get(methodName);\n\t\t\t\n\t\t\t\n\t\t\ttempCounter = tempZero;\n\t\t\tblockId = 1;\n\t\t\tcurrentBlock = 1;\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t // n.nodeToken3.accept(this, argu);\n\t memberSig = null;\n\t\t\tblockId = 0;\n\t\t\tcurrentBlock = 0;\n\t\t\t\n\t\t\tString tempFormal = \"\";\n\t\t\tif(f5 != null){\n\t\t\t\ttempFormal = f5.returnTemp+\",\";\n\t\t\t}else{\n\t\t\t\ttempFormal = \"\";\n\t\t\t}\n\t\t\t\n\t\t\ttempString+=\" \"+methodName+\" \"+\"( \"+tempFormal+\" int myUniquePlacePoint)\";\n\t\t\t\n\t\t\ttPlasmaCode += \"public static \"+tempString+\"\\n\";\n\t\t\t//String placeCheckString = \"final HashMap<Integer, HashSet<Integer>> globalPointerHashMap = new final HashMap<Integer, HashSet<Integer>>(4)\";\n\t\t\t//placeCheckString += \"final int maxPlaces = 4; \\n for(int i =0; i <maxPlaces; ++i){globalPointerHashMap.put(i, new HashSet<Integer>());}\";\n\t\t\tn.block.accept(this, argu);\n\t currentClassBody.methods += tPlasmaCode;\n\t\t\ttPlasmaCode = \"\";\n\t return _ret;\n\t }", "static boolean blockBody(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"blockBody\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = blockBody_0(b, l + 1);\n r = r && lazyParseableBlock(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "protected void recordExecutionMacro(ExecutionMacro macro) {\n super.recordExecutionMacro(macro);\n \n if (styledText == null) {\n return;\n }\n \n if (macro.getCommandId().compareTo(\"org.eclipse.ui.edit.copy\") == 0 ||\n macro.getCommandId().compareTo(\"org.eclipse.jdt.ui.edit.text.java.copy.qualified.name\") == 0) {\n int offset = styledText.getSelectionRange().x;\n String text = styledText.getSelectionText();\n \n long time = Time.getCurrentTime();\n CopyMacro cmacro = new CopyMacro(time, \"Copy\", macro.getPath(), offset, text);\n \n recordRawMacro(cmacro);\n dumpMacros(cmacro);\n \n } else if (macro.getCommandId().compareTo(\"org.eclipse.ui.edit.delete\") == 0) {\n macro.setType(\"Delete\");\n }\n }", "public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\n {\n return par9;\n }", "@Nonnull\r\n private Token expanded_token()\r\n throws IOException,\r\n LexerException {\r\n for (;;) {\r\n Token tok = source_token();\r\n // System.out.println(\"Source token is \" + tok);\r\n if (tok.getType() == IDENTIFIER) {\r\n Macro m = getMacro(tok.getText());\r\n if (m == null)\r\n return tok;\r\n if (source.isExpanding(m))\r\n return tok;\r\n if (macro(m, tok))\r\n continue;\r\n }\r\n return tok;\r\n }\r\n }", "final public void conditional() throws ParseException {\n jj_consume_token(IF);\n if (jj_2_40(4)) {\n jj_consume_token(39);\n } else {\n ;\n }\n jj_consume_token(BLOCKEDP);\n label_6:\n while (true) {\n if (jj_2_41(4)) {\n ;\n } else {\n break label_6;\n }\n jj_consume_token(34);\n }\n jj_consume_token(37);\n label_7:\n while (true) {\n if (jj_2_42(4)) {\n ;\n } else {\n break label_7;\n }\n jj_consume_token(34);\n }\n if (jj_2_43(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(38);\n }", "void buildBlock(Tile t);", "public void compile(Emitter e)\n {\n String cur = \"endif\"+ e.nextLabelID();\n condition.compile(e, cur);\n exp1.compile(e);\n e.emit(cur + \":\");\n }", "protected String replaceMacros(String sTemplate, Object source)\n {\n String sRet = sTemplate;\n Set setMacros = Reporter.getMacros(sTemplate);\n\n for (Iterator i = setMacros.iterator(); i.hasNext();)\n {\n String sId = (String) i.next();\n ReportColumnView columnView = (ReportColumnView) m_mapColumns.get(sId);\n Object oValue = columnView.getOutputString(source);\n if (columnView != null && oValue != null)\n {\n sRet = sRet.replaceAll(MACRO_START + sId + MACRO_STOP,\n oValue.toString());\n }\n }\n return sRet;\n }", "public interface BlockInt {\n\t\n\t/**\n\t * Execute a block.\n\t * \n\t * Parse arguments, init, run, and check the results.\n\t * @param arg The arguments\n\t * @return true if everything goes well\n\t */\n\tpublic boolean execute(String[] args);\n\t\n\t/**\n\t * Initialises the block.\n\t * \n\t * @return true if the initialisation is ok\n\t */\n\tpublic boolean init();\n\t\n\t/**\n\t * Gives a description of the class\n\t * \n\t * @return a description\n\t */\n\tpublic String getDescription();\n}", "Editor mo117962b();", "Code compStmt(final Code andThen, final mil.Block breakBlock, final mil.Block contBlock) { // var = init\n return init.compTail(new TailCont() {\n Code with(final Tail t) {\n return new Bind(ve.getVar(), t, andThen);\n }\n });\n }", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "private void a(World paramaqu, BlockPosition paramdt, int paramInt)\r\n/* 128: */ {\r\n/* 129:126 */ setBlock(paramaqu, paramdt, BlockList.vine, paramInt);\r\n/* 130:127 */ int i = 4;\r\n/* 131: */ \r\n/* 132:129 */ paramdt = paramdt.down();\r\n/* 133:130 */ while ((paramaqu.getBlock(paramdt).getType().getMaterial() == Material.air) && (i > 0))\r\n/* 134: */ {\r\n/* 135:131 */ setBlock(paramaqu, paramdt, BlockList.vine, paramInt);\r\n/* 136:132 */ paramdt = paramdt.down();\r\n/* 137:133 */ i--;\r\n/* 138: */ }\r\n/* 139: */ }", "public boolean a(World paramaqu, Random paramRandom, BlockPosition paramdt, Block parambec)\r\n/* 72: */ {\r\n/* 73: 88 */ return true;\r\n/* 74: */ }", "public static BlockExpression block(Class clazz, Iterable<ParameterExpression> variables, Iterable<Expression> expressions) { throw Extensions.todo(); }", "@Override\n public boolean visit(CssEval x, Context ctx) {\n out.printOpt(\"/* CssEval */\");\n out.newlineOpt();\n return false;\n }", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 76: */ {\r\n/* 77: 99 */ return null;\r\n/* 78: */ }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "private Block replaceMethodChain(Block oldBlock) throws LookupException {\n // The defined variables\n Stack<Variable> variables = new Stack<>();\n // The parameter passed to the {@code Constants.CREATE_DOCUMENT} method\n FormalParameter formalParameter = oldBlock.nearestAncestor(Method.class).formalParameter(0);\n variables.push(formalParameter);\n // Use a string as we constantly have to create new NameExpressions\n lastElement = null;\n\n Block block = new Block();\n oldBlock.replaceWith(block);\n Block loneCode = oFactory().createBlock();\n loneCode.setMetadata(new TagImpl(), Neio.LONE_CODE);\n int prevCodeId = -1;\n\n List<Statement> statements = new ArrayList<>(oldBlock.statements());\n for (int i = 0; i < statements.size(); i++) {\n Statement statement = statements.get(i);\n // Is this a block of lonecode\n if (statement.hasMetadata(Neio.LONE_CODE)) {\n int id = ((CodeTag) statement.metadata(Neio.LONE_CODE)).id();\n // New codeblock\n if (loneCode.nbStatements() <= 0) {\n prevCodeId = id;\n }\n // Statement in same block\n if (id == prevCodeId) {\n loneCode.addStatement(statement);\n // Accumulate all of the statements of the lonecode\n if (i < statements.size() - 1) {\n continue;\n }\n // Process the last instruction, aka the last lonecode\n else {\n statement = loneCode;\n }\n }\n // New lonecode\n else {\n prevCodeId = id;\n statement = loneCode;\n // We still have to process the second block\n i--;\n }\n }\n // Set the counter back by one and process the lonecode\n else if (loneCode.nbStatements() > 0) {\n i--;\n statement = loneCode;\n }\n\n // Handles a codeblock if there is one\n statement = fixCodeBlock(block, statement, variables, loneCode);\n if (statement == null) {\n continue;\n }\n\n Stack<RegularMethodInvocation> callStack = new Stack<>();\n // MethodInvocations start from the back so push the invocations on a stack to get the correct order\n RegularMethodInvocation inv;\n Element methodChain = statement;\n while ((inv = getInvocation(methodChain)) != null) {\n callStack.push(inv);\n methodChain = inv;\n if (inv.getTarget() instanceof ThisLiteral) {\n break;\n }\n }\n\n\n breakupMethodChain(callStack, variables, block, methodChain, statement);\n }\n\n return block;\n }", "public void alg_RUNCONVEYER(){\nBlock.value=false;\nSystem.out.println(\"run\");\n\n}", "private void blockStatement(Scope scope, Vector queue)\r\n {\r\n Modifier modify = new Modifier();\r\n\r\n modify.access = 0;\r\n modify.classes &= Keyword.FINALSY.value | Keyword.STRICTFPSY.value;\r\n modify.fields &= Keyword.FINALSY.value | Keyword.TRANSIENTSY.value | Keyword.VOLATILESY.value;\r\n modify.methods &= Keyword.FINALSY.value | Keyword.SYNCHRONIZEDSY.value | Keyword.NATIVESY.value | Keyword.STRICTFPSY.value;\r\n modify.constants &= Keyword.FINALSY.value;\r\n\r\n Token t;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n queue.add(op);\r\n resetComment();\r\n }\r\n\r\n if (isLocalVarDecl(false))\r\n {\r\n localVariableDeclaration(modify, scope, queue);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n else\r\n {\r\n peekReset();\r\n \r\n t = nextToken;\r\n\r\n while(t.kind == Keyword.PUBLICSY || t.kind == Keyword.PROTECTEDSY ||\r\n t.kind == Keyword.PRIVATESY || t.kind == Keyword.ABSTRACTSY ||\r\n t.kind == Keyword.STATICSY || t.kind == Keyword.FINALSY ||\r\n t.kind == Keyword.STRICTFPSY)\r\n t = peek();\r\n \r\n if (t.kind == Keyword.CLASSSY || t.kind == Keyword.INTERFACESY)\r\n classOrInterfaceDeclaration(modify, scope, \"\");\r\n else\r\n statement(modify, scope, Scope.SEQUENCE, null, queue, true);\r\n }\r\n }", "public Object lambda56(Object x) {\n frame40 frame40;\n new frame40();\n frame40 frame402 = frame40;\n frame402.staticLink = this;\n frame40 frame403 = frame402;\n frame403.f129x = x;\n return srfi1.every$V(frame403.lambda$Fn40, this.lists, new Object[0]);\n }", "@Override\n\tpublic Void visit(Block block) {\n\t\tprintIndent(\"block\");\n\t\tindent++;\n\t\tfor (var v : block.content) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "CD withCode();" ]
[ "0.5899193", "0.56739175", "0.5557406", "0.55321515", "0.55201936", "0.5485145", "0.5478533", "0.5460543", "0.5458423", "0.5420557", "0.54030794", "0.53368723", "0.5312163", "0.53020453", "0.5242183", "0.5239727", "0.5225833", "0.52188736", "0.51877487", "0.5180312", "0.5178999", "0.51630336", "0.5128092", "0.51237357", "0.51149845", "0.51145476", "0.5094715", "0.5080776", "0.5074587", "0.5070731", "0.50545126", "0.5019189", "0.49992177", "0.4995506", "0.49846807", "0.49776796", "0.49630547", "0.4960823", "0.49384558", "0.49303082", "0.49033114", "0.48955214", "0.4883393", "0.4865403", "0.48540628", "0.48527688", "0.48519185", "0.4836966", "0.48359343", "0.48330992", "0.4819976", "0.48192063", "0.4818103", "0.48125908", "0.48119748", "0.48040113", "0.47949398", "0.4783155", "0.47746444", "0.4772866", "0.47683436", "0.47616988", "0.4756011", "0.4753728", "0.4749819", "0.4747344", "0.47435912", "0.47343877", "0.4729205", "0.47287396", "0.47250766", "0.47226235", "0.4720667", "0.4716152", "0.47130597", "0.47110337", "0.4703017", "0.47018313", "0.46995935", "0.46994898", "0.46987027", "0.4696582", "0.46941817", "0.46928316", "0.46925375", "0.46908006", "0.46852294", "0.46825278", "0.46766514", "0.4676615", "0.46639913", "0.466225", "0.4661664", "0.4657031", "0.4655269", "0.4654583", "0.4652267", "0.465126", "0.46505827", "0.46468312", "0.4646774" ]
0.0
-1
write a program to check if the number is entered by the user is odd or even if it is odd print "odd" else print "even"
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please a number\n"); int num = sc.nextInt(); String msg = (num % 2 == 0) ? "The number is Even" : "The number is Odd"; System.out.println(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n // create a scanner for user input \n Scanner input = new Scanner(System.in);\r\n \n //prompt user for their number\n System.out.println(\"Enter your number\"); \n //intialize user's number\n int number = input.nextInt();\n //intialize the remainder\n int remainder = number % 2; \n \n //Determin whether user's number is odd or even\n if (remainder >= 1){\n System.out.println(number + \" is an odd number \");\n }else{\n System.out.println(number +\" is an even number\");\n } \n\n\r\n }", "public static void main(String[] args) {\n\n System.out.println(\"Let's find if the number is even or odd\");\n\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a number: \");\n\n int num = input.nextInt();\n if (num % 2 == 0) {\n System.out.println(\"The number entered is even number\");\n } else {\n System.out.println(\"The number entered is odd number\");\n }\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int num; //Declare a variable\n System.out.println(\"Enter a number:\");\n num = input.nextInt();\n input.close();//scanner close\n\n if ( num % 2 == 0 ) //if any number divided by 2 is even number\n System.out.println(\"The entered number is even\");\n else // else odd number\n System.out.println(\"The entered number is odd\");\n }", "private void findOddEven() {\n\t\tif (number % 2 == 0) {\n\t\t\tif (number >= 2 && number <= 5)\n\t\t\t\tSystem.out.println(\"Number is even and between 2 to 5...!!\");\n\t\t\telse if (number >= 6 && number <= 20)\n\t\t\t\tSystem.out.println(\"Number is even and between 6 to 20...!!\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Number is even and greater than 20...!!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Number is odd...!!\");\n\t\t}\n\t}", "public static void main(String[] args) {\r\n // create a scanner for user import\r\n Scanner input = new Scanner(System.in);\n\n // declare a variable to see if a number is divisible by two\n final int DIVISIBLE_TWO = 2;\n\n // find out user number\n System.out.println(\"Please enter a number\");\n int number = input.nextInt();\n\n // declare a variable for the divided number\n int number2 = number%DIVISIBLE_TWO;\n\n //figure out if number is divisible by two\n if (number/DIVISIBLE_TWO == number2){\n System.out.println(\"Your number is odd\");\n } else {\n System.out.println (\"Your number is even\");\n }\n\r\n }", "public void parity() {\n System.out.print(\"Enter an integer: \");\n int int2 = in.nextInt();\n\n if ((int2 % 2) == 0) {\n System.out.println(\"\\nEven.\\n\");\n } else {\n System.out.println(\"\\nOdd.\\n\");\n }\n }", "public String determineEvenOrOdd(int number){\n\t\t if((number%2)==0) { return \"even\"; } else { return \"odd\"; }\n\t\t }", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n int input = 1;\n String output = \"\";\n\n\n do {\n input = scanner.nextInt();\n if (input % 2 == 0 && input != 0) {\n output = output + \"even\\n\";\n }\n if (input % 2 != 0 && input != 0) {\n output = output + \"odd\\n\";\n }\n } while (input != 0);\n System.out.println(output);\n }", "public void getEvenOdd(int num) {\r\n\t\t\r\n\t\tSystem.out.println(\"The given number is : \"+num);\r\n\t\t\r\n\t\tif(num % 2 == 0) {\r\n\t\t\tSystem.out.println(\"This is Even number\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"This is odd number\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter your number :: \"); \n\t\tint i = input.nextInt(); \n\t\t\n\t\t\n\t\tif(i%2==0)\n\t\t{\n\t\t\tSystem.out.print(\"Yes It is Even\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Yes, it is odd number\");\n\t\t}\n\t\t\t\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"ODD OR EVEN\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the number:\");\r\n\t\tint n=sc.nextInt();\r\n\t\tSystem.out.println(\"odd numbers\");\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t {\r\n\t\t\tif(i%2==1) \r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t System.out.println(\"even numb\");\r\n\t\t\tfor(int i=0;i<=n;i++){\r\n\t\t\t\tif(i%2==0) \r\n\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "private static void oddEven(int a) {\n\t\tif(a%2 ==0) {\n\t\t\tSystem.out.println(\"number is even\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"number is odd\");\n\t\t}\n\t}", "public static String oddEven(int n){\n // Returning String as an \"Even\" or \"Odd\"\n return n%2==0?\"Even\":\"Odd\";\n }", "public static int getEven() {\n int even = getValidNum();\n\n while ((even % 2) == 1) {\n System.out.print(\"Please enter an EVEN number: \");\n even = getValidNum();\n }\n return even;\n }", "public static int getOdd() {\n int odd = getValidNum();\n\n while ((odd % 2) == 0) {\n System.out.print(\"Please enter an ODD number: \");\n odd = getValidNum();\n }\n return odd;\n }", "public static void main(String[] args) {\n\t\tint n;\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter your number: \");\n\t\tn = sc.nextInt();\n\t\tif(n%2 == 0)\n\t\t\tSystem.out.println(n + \" is even\");\n\t\telse\n\t\t\tSystem.out.println(n + \" is odd\");\n\t}", "boolean isOddOrEven(int n){\n return (n & 1) == 0;\n }", "public static boolean isOdd(int num){\n boolean isOdd = true;\n if(num%2!=0){\n isOdd= true;\n }else if( num%2==0){\n isOdd=false;\n }\n\n return isOdd;\n\n }", "public boolean isOdd(){\r\n\t\tif (value % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint no;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the no.\");\n\t\tno = sc.nextInt();\n\t\t\n\t\tif(no%2==0)\n\t\t{\n\t\t\tSystem.out.println(\"No is Even\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No is odd\");\n\t\t}\n\t\tsc.close();\n\t}", "public static PerformOperation isOdd() {\n return (num) -> num % 2 != 0;\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number : \");\r\n\t\tint num=scan.nextInt();\r\n\t\tint even_count=0;\r\n\t\tint odd_count=0;\r\n\t\twhile(num>0)\r\n\t\t{\r\n\t\t\tint rem=num%10;\r\n\t\t\tif(rem%2==0)\r\n\t\t\t\teven_count+=1;\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t\tnum=num/10;\r\n\t\t}\r\n\t\tSystem.out.println(\"Odd digits : \"+odd_count);\r\n\t\tSystem.out.println(\"Even digits : \"+even_count);\r\n\t\t\r\n\r\n\t}", "public static void isEven(int n)\n\t{\n\t\tif (n % 2 == 0)\n\t\t\tSystem.out.println(n + \" is even\");\n\t\telse\n\t\t\tSystem.out.println(n + \" is odd\");\n\t}", "public static boolean isOdd(int number){\r\n\t\tif (number % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tScanner sc = new Scanner(System.in); \r\n\t\t\r\n\t\tint number = sc.nextInt();\r\n\t\t\r\n\t\tif (number % 2 == 0 && number != 2) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"YES\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NO\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\r\n\t}", "public static final boolean odd(int x) {\n \t\treturn !even(x);\n \t}", "public static void printOddInt() {\n\t\t\n\t\t//For Loop\n\t\tfor(int i=4; i<10; i++) {\n\t\t\tif(i%2!=0) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint num = 90;\n\t\t\n\t\tif (num % 2 == 1) {\n\t\t\tSystem.out.println(num+\" is an odd number\");\n\t\t}\n\t\t\n\t\t// Create a program which checks the int if it is even number\n\t\tif (num % 2 == 0) {\n\t\t\tSystem.out.println(num+\" is an even number\");\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n int number ;\n\n number=25;\n String result = \"\";\n\n //lets try with if\n if (number % 2 == 0){\n result = number + \" is even\";\n }else {\n result = number + \" is odd\";\n }\n\n //shortcut of println is sout\n System.out.println(result);\n\n //ternary\n //if == ?\n //else == :\n\n String result2= (number % 2 == 0) ? number + \" is even \" : number + \" is odd\" ;\n\n System.out.println(result2);\n\n System.out.println(\"**************\");\n\n //ben calisma yapiyorum\n int mert;\n mert=11;\n String sonuc= \"\";\n if ( mert % 2== 0){\n sonuc= mert+ \"is even\";\n }else {\n sonuc =mert+\"is odd\";\n }\n System.out.println(sonuc);\n\n\n String sonuc1 = (number%2==0) ? mert + \"is even\" : mert + \" is odd\";\n System.out.println(sonuc1);\n\n }", "public static boolean isEven(int num) {\n\t\t\treturn num%2==0;\n\t\n\t\t}", "public static boolean isOdd(int value)\n\t{\n\t\treturn (value % 2) != 0;\n\t}", "public static void main (String [] args) {\n while (true) {\n System.out.println(\"Please enter an integer\");\n Scanner scanner = new Scanner(System.in);\n int input = scanner.nextInt();\n if (input == 17) {\n break;\n }\n else if (input % 2 == 0) {\n System.out.println(\"even\");\n } else {\n System.out.println(\"odd\");\n }\n }\n System.out.println(\"My number 17! Show is over\");\n }", "public void fback() throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n\t\tSystem.out.println(\"Enter any number for finding even/odd : \");\n\t\tString S=br.readLine();\n\t\tint i=Integer.parseInt(S);\n\t\t\n\t\tif(i%2==0)\n\t\t{\n\t\t\tSystem.out.println(\"Even number\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Odd Number\");\n\t\t}\n\t}", "public static boolean isEven(int num){\n\n boolean isEven = (num%2==0)? true: false;\n\n return isEven;\n }", "public static boolean isOdd(MyInteger number1){\r\n\t\tif (number1.getInt() % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean odd(int x) {\n if (x == 0) {\n return false;\n } else {\n y = x - 1;\n even(y);\n }\n}", "public boolean isOdd() {\n boolean isOdd = false;\n if (value % 2 != 0)\n isOdd = true;\n return isOdd;\n }", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint n = t.nextInt();\n\t\tint[] a = new int[n];\n\t\tArrayList<Integer> odd = new ArrayList<>();\n\t\tArrayList<Integer> even = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = t.nextInt();\n\n\t\t\tif (a[i] % 2 == 0)\n\t\t\t\teven.add(i + 1);\n\t\t\telse\n\t\t\t\todd.add(i + 1);\n\t\t}\n\n\t\tif (even.size() == 1)\n\t\t\tSystem.out.println(even.get(0));\n\t\telse\n\t\t\tSystem.out.println(odd.get(0));\n\n\t}", "public static void main (String [] args) {\n \n // numbers that user input \n int number;\n\n // counters for odd and even numbers\n int oddCount = 0;\n int evenCount = 0;\n\n int totalNum = 0;\n\n // initialize largest odd and second largest odd number\n int largestOddNum = Integer.MIN_VALUE;\n int secondLargestOdd = Integer.MIN_VALUE;\n\n // initialize smallest even and second smallest even number\n int smallestEvenNum = Integer.MAX_VALUE;\n int secondSmallestEven = Integer.MAX_VALUE;\n \n // print out instructions\n System.out.println(\"Enter a series of integers; EOF to Quit.\");\n\n // Construct a Scanner that produces values scanned from standard input.\n Scanner input = new Scanner(System.in);\n \n //while there is more input(user has not hit EOF)\n while (input.hasNext()) {\n\n // read next integer\n number = input.nextInt(); \n \n // To find out whether this is a even number.\n if ( number % oddEvenDef == 0 ) { \n \n // Keeping track of how many even numbers have been encountered.\n evenCount++;\n\n /* To find out whether the even number input by user is less than\n default smallest even number.*/\n if ( number < smallestEvenNum) {\n\n secondSmallestEven = smallestEvenNum;\n smallestEvenNum = number;\n \n }\n\n /* To check whether number less than second smallest even number and\n not equal to smallest even number */\n else if(number < secondSmallestEven && number != smallestEvenNum) {\n secondSmallestEven = number;\n }\n \n }\n \n // To find out whether this is a odd number.\n if ( number % oddEvenDef != 0) {\n \n // Keeping track of how many even numbeers have been encountered.\n oddCount++;\n \n /* To find out whether the odd number input by user is bigger than\n default largest odd number. */ \n if ( number >largestOddNum ) {\n \n secondLargestOdd = largestOddNum;\n largestOddNum = number;\n }\n\n /* To check whether number bigger than second largest odd number\n and not equal to largest odd number.*/\n else if ( number > secondLargestOdd && number != largestOddNum) {\n secondLargestOdd = number;\n }\n }\n }\n\n // To make sure that user entered even number.\n if ( evenCount > 0 ) {\n\n System.out.println(\"Smallest distinct even number entered was \"\n + smallestEvenNum );\n \n }\n\n // To check whether second smallest even equal to MAX VALUE.\n if ( secondSmallestEven != Integer.MAX_VALUE) {\n System.out.println(\"Second smallest distinct even number entered was \"\n + secondSmallestEven);\n }\n \n // To make sure that user entered odd number.\n if ( oddCount > 0 ) {\n System.out.println(\"Largest distinct odd number entered was \" + largestOddNum );\n }\n \n // To check whether second largest odd equal to MIN VALUE.\n if ( secondLargestOdd != Integer.MIN_VALUE ) {\n System.out.println(\"Second largest distinct odd number entered was \"\n + secondLargestOdd);\n }\n\n // To find out how many numbers that user entered.\n totalNum = oddCount + evenCount;\n \n // To track if there is no numbers has been entered.\n if (totalNum == 0 ) {\n\n System.out.println(\"No numbers entered\");\n }\n }", "public static boolean isEven(MyInteger number1){\r\n\t\tif (number1.getInt()%2==0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\t}", "public static void main(String[] args) {\n checkIfNumberIsOddOrEven(112);\n checkIfNumberIsOddOrEven(111);\n\n }", "public static void main(String[] args) {\nint i =1;\r\nfor(i=1; i<=20; i++)\r\n{\r\n\tif(i % 2 == 1)\r\nSystem.out.println(i);\r\n}\r\nSystem.out.println(\"Printing only the odd numbers from 1 to 20\");\r\n\t}", "public static void main(String[] args) {\nint i=1;//display from 20 to 10\nSystem.out.println(\"odd even\");\nwhile(i<=10)\n{\n\tif(i%2!=0) {\n\tSystem.out.println(i+\" \"+(i+1));//for space /t is fine\n\t}\ni++;\n}\n\t}", "public static void main(String[] args) {\n\t\tInteger n;\nScanner sc= new Scanner (System.in);\n System.out.print (\"Introdusca un Numero\");\n\t\tn = sc. nextInt();\n\t\tif (n%2==0);\n\t\t\tSystem.out.print(\"Es un numero par\");\n\t\n\telse\n\t\t\tSystem.out.print(\"es un numero impar\");\n\t\t\n\n\t}", "int main()\n\n{\n\n int n,t,e,o;\n\n cin>>n;\n\n while(n>0)\n\n {\n\n t=n%10;\n\n if(t%2==0)\n\n {\n\n e=e+t;\n\n }\n\n else\n\n {\n\n o=o+t;\n\n }\n\n n=n/10;\n\n }\n\n if(e==o)\n\n {\n\n cout<<\"Yes\";\n\n }\n\n else\n\n {\n\n cout<<\"No\";\n\n }\n\n \n\n}", "public boolean isOdd()\n\t{\n\t\treturn isOdd(value);\n\t}", "public static boolean isEven(int number){\r\n\t\tif (number%2==0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\t}", "public static boolean isOdd(MyInteger n1){\n return n1.isOdd();\n }", "public PerformOperation isOdd() {\n return n -> ((n & 1) == 1);\n }", "public static void main(String[] args) {\n int counter = 0;\n while (counter<30){\n counter +=3;\n System.out.print(counter + \" \");\n\n }\n System.out.println(\" \");\n int evenNumber = 0;\n while(evenNumber <=50){\n System.out.print( evenNumber + \" \");\n evenNumber +=2;\n\n }\n System.out.println(\" \");\n int oddNumber = 1;\n while (oddNumber<=50){\n System.out.print(oddNumber + \" \");\n\n oddNumber+=2;\n }\n\n System.out.println(\"---------------------\");\n int evenNumber2 = 20;\n if(evenNumber2 %2 == 0){\n System.out.println(evenNumber2 + \" is even number\");\n }else{\n System.out.println(evenNumber2 + \" is odd number\");\n }\n ++evenNumber2;\n\n\n System.out.println(\"---------------------------------\");\n\n int oddNumber2 = 21;\n if (oddNumber2 %2==1){\n System.out.println(oddNumber2 + \" is odd number\");\n }else{\n System.out.println(evenNumber2 + \" is even number\");\n }\n ++oddNumber2;\n\n }", "public static void main(String[] args) {\n System.out.println(\"your number?\");\n Scanner s = new Scanner(System.in);\n int i1 = s.nextInt();\n int i2 = s.nextInt();\n int i3 = s.nextInt();\n int i4 = s.nextInt();\n int i5 = s.nextInt();\n int sum = i1 + i2 + i3 + i4 + i5;\n if (sum % 2 == 0) {\n System.out.println(sum);\n }\n }", "boolean isEven(int x) {\r\n\t\t\tif((x%2)==0) return true; else return false;\r\n\t\t}", "public static boolean isOdd(int i){\n if((i & 1) == 0){\n return false;\n }\n return true;\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tint a[]=new int[n];\r\n\t\tint even_count=0,odd_count=0;\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\ta[i]=s.nextInt();\r\n\t\t\tif(a[i]%2==0) {\r\n\t\t\t\teven_count+=1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t}\r\n\t\tSystem.out.println(\"even numbers are\"+even_count+\" \"+\"odd numbers are\"+odd_count);\r\n\t\ts.close();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int[] nums = {input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt()};\n\n //TODO: Write your code below\n int countEven = 0;\n for(int each : nums){\n if(each % 2 != 0){\n continue;\n }\n countEven++;\n }\n System.out.println(countEven);\n\n\n\n }", "@Override\n\tpublic boolean isEvenNumber(long number) {\n\t\tif(number%2 == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tint sumEven = 0;\n\t\tint sumOdd = 0;\n\t\tint num1,num2=0;\n\t\tScanner kevin = new Scanner(System.in);\n\t\tSystem.out.println(\"enter start num\");\n\t\tnum1 = kevin.nextInt();\n\t\tSystem.out.println(\"enter end num\");\n\t\tnum2 = kevin.nextInt();\n\n\t\tfor (int x = num1; x < num2; x++) {\n\t\t\tif (x%2==0) {\n\t\t\t\tsumEven+=x;\n\t\t\t\n\t\t\t}else {\n\t\t\t\tsumOdd+=x;\n\t\t\t\n\t\t\t}\n\t\t}\nSystem.out.println(\"sum of odd : \"+sumOdd);\nSystem.out.println(\"sum of even : \"+sumEven);\n\t}", "public static void printodd() {\n for (int i = 0; i < 256; i++){\n if(i%2 != 0){\n System.out.println(i);\n }\n \n }\n }", "public boolean isEven(){\r\n\t\tif (value%2==0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\t}", "public static void main(String[] args) {\n\t int[] numbers = {13, 45, 26, 22, 19, 24, 20, 30, 90, 12};\n\n for(int i = 0; i < numbers.length; i++){\n if(numbers[i]%2 == 0){\n System.out.println(\"Even number: \" + numbers[i]);\n }\n }\n }", "bool isEven(int n)\r\n{\n\tif (n ^ 1 == n + 1)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "public static void main(String[]args){\r\n\tint x = 101;\r\n\r\n\tif ((x%2)==0)\r\n\t{\r\n\t\tx = (x/2);\r\n\t\tSystem.out.println(\"X is even, so new value is: \" + x);\r\n\t}//end if\r\n\telse\r\n\t{\r\n\t x = ((x * 3) - 1);\r\n\t System.out.println(\"X is odd, so new value is: \" + x);\r\n\t}//end else\r\n}", "public static final boolean odd(long x) {\n \t\treturn !even(x);\n \t}", "public static void main(String[] args){\n\n int x = 1;\n\n while(x < 11){\n if((x % 2) == 0){\n System.out.println(\"Even number: \"+x);\n }\n x++;\n }\n\n\n\n //uncomment next line if input required\n //input.close();\n }", "public static boolean isEven(int n) {\n\r\n\t\treturn (n % 2) == 0 ? true : false;\r\n\r\n\t}", "static boolean isEvenNumber(int number) {\n\t\tif (number < 0 || number % 2 == 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn isEvenNumber(number - 1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n\t\tint num;\r\n\t\t\r\n\t\tScanner leer = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Ingrese un número\");\r\n\t\tnum = leer.nextInt();\r\n\t\t\r\n\tif (num%2==0)\r\n\t System.out.println(\"El número es par\");\r\n\telse\r\n\t System.out.println(\"El número es impar\");\r\n\t\t\r\n\t}", "public static void main (String args[]){ // Start of main method\n\t\n\tint x = 5;\n\tint y = 5;\n\t\n\tSystem.out.println(\"x is \" + x); // print out the value of x\n\tSystem.out.println(\"y is \" + y); // print out the value of y\n\t\n\tif (x < y){\n\t\tSystem.out.println(\"x is less than y\"); // if x is less than y, print statement\n\t}\n\telse if (x == y){\n\t\tSystem.out.println(\"x is equal to y\"); // if x is equal to y, print statement\n\t}\n\telse if (x > y){\n\t\tSystem.out.println(\"x is greater than y\"); // if x is greater than y, print statement\n\t}\n\t\n\tint number = 5;\n\t\n\tif (number%2 == 0){ // if the value of number is divided by two and there is no remainder, print the statement\n\tSystem.out.println(\"The number \" + number + \" is EVEN\"); \n\t}\n\telse if (number%2 != 0){ // if the value of number is divided by two and there is a remainder, print the statement\n\t\tSystem.out.println(\"The number \" + number + \" is ODD\");\n\t}\n\t\n\t\n\t}", "public static void main(String[] args) {\n\n\t int even=20;\n\t do {\n\t\tSystem.out.println(even);\n\t even+=2;\n\t }while (even<=50);\n//2. way\n\t int even1=20;\n\t do {\n\t\t if (even1%2==0) {\n\t\t\t System.out.println(even1);\n\t\t }\n\t even1++;\n\t }while (even1<=50);\n}", "public static boolean isOdd(int n) {\n\t\tif (n <= 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn !isOdd(n - 1);\n\t\t}\n\t}", "public boolean humanPlayerTypeSelectionMenu(Scanner keyboardIn) {\n boolean selectedOdds = true;\n\n keyboardIn = new Scanner(System.in);\n int selection = 0;\n\n do{\n System.out.println(\"Would you like to play Odds or Even? Please select\");\n System.out.println(\"1. Odds\");\n System.out.println(\"2. Even\");\n selection = keyboardIn.nextInt();\n } while (selection != 1 && selection != 2);\n \n if (selection == 1){\n selectedOdds = true;\n }\n else selectedOdds = false;\n\n return selectedOdds;\n }", "public boolean isOdd() {\n int lc = left == null ? 0 : left.isOdd() ? 1 : 0;\n int rc = right == null ? 0 : right.isOdd() ? 1 : 0;\n return (lc + rc + 1) % 2 == 1;\n }", "public static void main(String args[])\n {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int arr[] = new int[n+1];\n int arr1[] = new int[n+1];\n int arr2[] = new int[n+1];\n int o = 0 , e = 0;\n for(int i = 1 ; i <= n ; i++ )\n {\n arr[i] = sc.nextInt();\n if(i%2 != 0)\n {\n arr1[o] = arr[i];\n o++;\n }\n else\n {\n arr2[e] = arr[i];\n e++;\n }\n }\n //System.out.println(\"Odd place \"+o+\" even \"+e);\n int nor = sc.nextInt();\n //odd \n int temp = 0;\n /* for(int z = 0 ; z < e ; z ++)\n {\n System.out.println(arr2[z]);\n }\n */\n for(int i = 0 ; i < nor ; i++)\n {\n temp = arr1[o-1];\n \tfor(int j = o-1 ; j > 0 ; j-- )\n {\n arr1[j] = arr1[j-1]; \n }\n arr1[0] = temp;\n }\n /*for(int i = 0 ; i < o ; i++)\n System.out.println(arr1[i]);*/\n \n //even\n for(int j = 0 ; j < nor ; j++)\n {\n temp = arr2[0];\n for(int k = 0 ; k < e ; k++ )\n {\n arr2[k]=arr2[k+1];\n }\n arr2[e-1] = temp;\n }\n int j = 0 , k = 0;\n for(int i = 1 ; i <= n ; i++)\n {\n if(i%2 != 0)\n System.out.print(arr1[j++]+\" \");\n else\n System.out.print(arr2[k++]+\" \");\n }\n \t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint j=0,k=0;\r\n\t\t\r\n\t\tScanner scanner=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the size of array\");\r\n\t\tint size=scanner.nextInt();\r\n\t\t\r\n\t\tint []arr=new int[size];\r\n\t\tint []even=new int[size];\r\n\t\tint []odd=new int[size];\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the Values in array\");\r\n\t\tfor(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\tarr[i]=scanner.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t for(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\tif(arr[i]%2!=0)\r\n\t\t\t{\r\n\t\t\t\todd[j]=arr[i];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\teven[k]=arr[i];\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t \r\n\t System.out.print(\"odd:\");\r\n\t\tfor(int i=0;i<j;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(odd[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t \r\n\t\tSystem.out.print(\"Even:\");\r\n\t\tfor(int i=0;i<k;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(even[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint intNum1 = 34;\n\t\t\n\t\tint intMode = (intNum1 % 2);\n\t\t\n\t\tboolean even = (intMode == 0);\n\t\t\n\t\t//if(even == true) {\n\t if(even) {\n\t \t// even이 true 일 때 실행할 명령문들\n\t System.out.println(\"짝수 맞네!\");\n\t System.out.print(\"변수의 값은 \");\n\t System.out.print(intNum1);\n\t System.out.println(\" 입니다.\");\n\t\t} else {\n\t\t\t// even이 false 일 때 실행할 명령문들\n\t\t\tSystem.out.println(\"아니야 홀수야!\");\n\t\t}\n // if문, 비교판단문 \n\t // if(변수, 식) {} : 만약 변수나 식이 true인가 아닌가를 판단해서 명령문의 흐름을 바꾸는 keyword다.\n\t \n\t if(intMode == 0) {\n\t \tSystem.out.println(\"짝수라니까!\");\n\t }\n\t // intMode == 0 의 결과가 false 이면 위 문을 건너뛴다.\n\t \n\t // intMode는 0아니면 1인 값을 당연히 갖는다.\n\t // 라고 생각하지만 어떤 불가항력적인 이유로 0과 1이 아닌 값을 가질 수있다.\n\t // 그래서 기준이 되는 intMode == 0 이라는 식의 반대되는 개념은 intMode == 1이 아닌 intMode != 0 이라는 생각을 해야한다.\n\t if(intMode != 0) {\n\t \t\n\t }\n\t \n\t if(intMode == 0) {\n\t \tSystem.out.println(\"짝수만세\");\n\t } else {\n\t \tSystem.out.println(\"홀수만세\");\n\t }\n\t if(intMode == 0) {\n\t \tSystem.out.println(\"짝수만세\");\n\t } \n\t if(intMode != 0) {\n\t \tSystem.out.println(\"홀수만세\");\n\t }\n\t if(intMode == 1) {\n\t \tSystem.out.println(\"홀수만세\");\n\t }\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner scanner=new Scanner(System.in);\r\n\t\tint num=0;\r\n\t\tint oddCount=0;\r\n\t\tint evenCount=0;\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"정수를 입력하여 주세요:(0: 홀,짝 출력)\");\r\n\t\t\tnum=scanner.nextInt();\r\n\t\t\tif(num==0) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(num%2==0) {\r\n\t\t\t\tevenCount++;\r\n\t\t\t}else {\r\n\t\t\t\toddCount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"odd: \"+oddCount);\r\n\t\tSystem.out.println(\"even: \"+evenCount);\r\n\t}", "private static boolean isEven(Integer element) {\n return element % 2 == 0;\n }", "public static void prnt(String l) {\n String even = \"\",odd=\"\";\r\n \r\n int t = 0;\r\n \r\n while(t!=l.length())\r\n {\r\n if (t==0 || t%2==0)\r\n even = even+l.charAt(t);\r\n else\r\n odd = odd+l.charAt(t);\r\n t++;\r\n }\r\n \r\n System.out.println(\"\"+even+\" \"+odd+\"\");\r\n }", "boolean checkOdd(int[] table)\n{\n boolean found = false;\n for (int count : table)\n if (count % 2 == 1)\n {\n if (found) return false;\n found = true;\n }\n return true;\n}", "public static boolean isOdd(int iValue) {\n boolean result = (iValue % 2) != 0;\n return result;\n }", "public static void main(String[] args) {\n\t\tfor(int i=1;i<20;i++)\r\n\t\t{\r\n\t\t\tif(i%2!=0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i+\" is an ODD Number\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t}", "public static void main(String[] args) {\n\t\tint num = 8;\n\t\tint a = num & 1;\n\t\tSystem.out.println(a);\n\t\tif(a>0)\n\t\t\tSystem.out.println(\"Odd!\");\n\t\telse\n\t\t\tSystem.out.println(\"Even!\");\n\t}", "public static boolean isOdd(MyInteger value)\n\t{\n\t\treturn isOdd(value.getValue());\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint num, x = 0;\n\t\t\n\t\tSystem.out.println(\"Enter a number between 1 and 100:\");\n\t\tScanner scnr = new Scanner (System.in);\n\t\t\n\t\tnum = scnr.nextInt();\n\t\tx = num % 2; // Determine if number is even\n\t\t\n\t\t// branch for even numbers\n\t\tif ( x == 0) {\n\t\t\tif (num >= 2 && num <= 25) {\n\t\t\t\tSystem.out.println(\"Even and less than 25.\");\n\t\t\t}\n\t\t\telse if (num >=26 && num <=60) {\n\t\t\t\tSystem.out.println(\"Even.\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(num + \" Even.\");\n\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t//Odd number branch\n\t\telse if (num > 60) {\n\t\t\tSystem.out.println(num + \" Odd and over 60.\");\n\t\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(num + \" Odd.\");\n\t\t}\n\t\t\n\t\t\n\t\t}", "public static void main(String[] args) {\n\t\tint num,i=0,ch,sum=0,sum2=0,count=0,last=0;\n\t\tbutton = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter number \");\n\t\tnum= button.nextInt();\n\t\tSystem.out.println(\"1/Even number: \");\n\t\tSystem.out.println(\"2/Odd Number : \");\n\t\tSystem.out.println(\"3/print five of even\");\n\t\tSystem.out.println(\"4/The first 25% of numbers\");\n\t\tSystem.out.println(\"5/The last 75% of numbers\");\n\t\tch = button.nextInt();\n\t\tswitch(ch){\n\t\tcase 1: \n\t\t\ti=1;\n\t\t\tSystem.out.println(\"even\");\n\t\t\twhile(i<=num){\n\t\t\t\t\n\t\t\t\tif(i%2==0){\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\ti++;\n\t\t\t\t\tsum+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum of even \" + sum);\n\t\t\t\tbreak;\n\t\tcase 2: \n\t\t\t\tSystem.out.println(\"The odd\");\n\t\t\t\twhile(i<=num){\n\t\t\t\t\tif(i%2!=0){\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\ti++;\n\t\t\t\t\tsum2+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum of odd \" + sum2);\n\t\t\t\tbreak;\n\t\tcase 3: System.out.println(\"The last five of even \");\n\t\t\t\ti =1;\n\t\t\t\twhile(i<=num){\n\t\t\t\t\tif(count<5){\n\t\t\t\t\tif(i%2==0){\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tlast+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum even last five \" + last);\n\t\t\t\tbreak;\n\t\tcase 4: System.out.println(\"The last 25% of numbers \");\n\t\t\t\tint n;\n\t\t\t\ti=1;\n\t\t\t\tn = (int) ((int) num * 0.25);\n\t\t\t\tSystem.out.println(n);\n\t\t\t\twhile(i<=n){\n\t\t\t\t\tif(i%2==0){\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t//TV IS HARMING\n\t\t\t\tbreak;\n\t\tcase 5: \n\t\t\t\tn = 25;\n\t\t\t\t\tfor(int k = num - n; k<=num;k++){\n\t\t\t\t\t\tif(k%2==0){\n\t\t\t\t\t\t\tSystem.out.println(k);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\tdefault : break;\n\t\t}\n\t\t\n\t}", "public static boolean isEven(int value)\n\t{\n\t\treturn (value % 2) == 0;\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tOddAndEvenNumberPrinting(n);\n\t}", "public static boolean isEven(int a) {\n return a % 2 == 0;\n }", "public static boolean isEven(int a) {\r\n //8th error redundancy ? wonder consider or not\r\n return a % 2 == 0;\r\n }", "public static void main(String[] args) throws IOException {\n BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));\n\n // Initialize variables\n int intLength;\n int intSpaces = 0;\n int intA = 0;\n int intCount;\n String theSentence;\n String strOdd = \"\";\n char chrCharacter;\n\n // User inputs sentence and get value\n theSentence = keyboard.readLine();\n intLength = theSentence.length();\n\n // Looping to calculate how many spaces, a's and grab odd numbers\n for (intCount = 0; intCount < intLength; intCount++) {\n\n chrCharacter = theSentence.charAt(intCount);\n\n if (chrCharacter == ' ') {\n intSpaces = intSpaces + 1;\n }else if (chrCharacter == 'a' || chrCharacter == 'A') {\n intA = intA + 1;\n\n // Grabbing all the odd letters\n }if (intCount % 2 == 0) {\n strOdd = strOdd + (theSentence.charAt(intCount));\n }\n\n }\n\n // Printing results\n System.out.println(\"There are \" + intLength + \" characters in the sentence\");\n System.out.println(\"There are \" + intSpaces + \" spaces in the sentence\");\n System.out.println(\"There are \" + intA + \" letter a in the sentence\");\n System.out.println(\"Taking the odd numbered characters in the sentence produces the following string (\" + strOdd + \")\");\n\n }", "public static void printOddNumbers (int from, int to) {//when we dont know the range\n for(int i=from; i<=to; i++){\n if(i%2!=0){\n System.out.print(i + \" \");\n }\n\n }\n System.out.println();\n }", "public static void main(String[] args) {\n /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */\n Scanner sc = new Scanner(System.in);\n int cases = sc.nextInt();\n for(int i=0;i<cases;i++){\n \tString[] strArray = sc.next().split(\"\");\n\n \tString odd = \"\";\n \tString even = \"\";\n \t\n \tfor(int j=1;j<strArray.length;j++){\n \t\tif(j%2==0){\n\t\t\t\t\teven += strArray[j];\n \t\t}else{\n \t\t\todd += strArray[j];\n \t\t}\n \t\t\n \t}\n \t\n \tSystem.out.println(odd + \" \" + even);\n }\n }", "default boolean isEven(int a){\n return a % 2 ==0;\n }", "public static boolean isEven(MyInteger n1){\n return n1.isEven();\n }", "public static void main(String[] args) {\n\n\t\tScanner s =new Scanner(System.in);\n\t\tSystem.out.println(\"If Yes then it is power of 2 or else No\");\n\t\tSystem.out.print(\"Enter a positive Number:\");\n\t\tint a=s.nextInt();\n\t\t\n\t\t if (check(a)) \n\t System.out.println(\"Yes\"); \n\t else\n\t System.out.println(\"No\"); \n\t\t\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Input a number: \");\n int number = scan.nextInt();\n if (number > 0) {\n while (number % 2 == 0) {\n System.out.print(2 + \" \");\n number /= 2;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n while (number % i == 0) {\n System.out.print(i + \" \");\n number /= i;\n }\n }\n if (number > 2)\n System.out.print(number);\n }\n }", "public static final boolean odd(short x) {\n \t\treturn !even(x);\n \t}", "private boolean isOddPrime(int t) // Not the most efficient method, but it will serve\n {\n int test = 3;\n boolean foundFactor = false;\n while(test*test < t && !foundFactor)\n {\n foundFactor = (t%test == 0); // is it divisible by test\n test += 2;\n }\n\n return !foundFactor;\n }", "public static void main(String[] a){\n System.out.println(\"----Sum of the factors of perfect number is the number itself----\");\r\n System.out.println();\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tint n = sc.nextInt();\r\n\t\t\r\n\t\tboolean b = isperfect(n);\r\n\t\tif(b){\r\n\t\t \tSystem.out.println(\"perfect number\");\r\n\t\t} else{\r\n\t\t\tSystem.out.println(\"Not a perfect number\");\r\n\t\t}\r\n\t\t\r\n\t \r\n\t}", "public static void main(String[] args) {\n\r\n\t\tfor(int n = 1; n <= 100; n++) {\r\n\t\t\tif(n % 2 == 0) {\t\t\t\t//==> check if it is even\r\n\t\t\t\tSystem.out.print(n+\" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(); // ===> for seprate line\r\n\t\t\r\n\t\t//2. print all odd numbers in same line\r\n\t\t\r\n\t\tfor(int j = 1; j <= 100; j++) {\r\n\t\t\tif(j % 2 != 0) {\r\n\t\t\t\tSystem.out.print(j+ \" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//3. sumOfOdds, sumOfEvens - calculate them\r\n\t\t// and print out after the loop\r\n\t\t// sum of 1 - 10 mean (1+2+3+4+5+6+7+8+9+10) just examp.\r\n\t\tSystem.out.println(); // ===> for seprate line\r\n\t\t\r\n\t\tint sumOfOdds = 0;\r\n\t\tint sumOfEvens = 0;\r\n\t\t\r\n\t\tfor(int num = 1; num <= 10; num++) {\r\n\t\t\tif(num % 2 == 0) {\r\n\t\t\t\tsumOfEvens += num;\r\n\t\t\t}else {\r\n\t\t\t\tsumOfOdds += num;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Sum of events: \"+ sumOfEvens);\r\n\t\tSystem.out.println(\"Sum of odds: \" + sumOfOdds);\r\n\t\t\r\n\r\n\t\t\r\n\t\t\r\n\t}" ]
[ "0.84562546", "0.82568985", "0.81551045", "0.80020803", "0.7955388", "0.77144784", "0.77022445", "0.76232654", "0.74848497", "0.7461003", "0.74295586", "0.7268031", "0.7234553", "0.7207164", "0.7191421", "0.70059735", "0.7004863", "0.69318324", "0.68482924", "0.6781775", "0.67528003", "0.67115927", "0.6696256", "0.6644291", "0.6598253", "0.6584051", "0.6581719", "0.6569311", "0.65264827", "0.6519816", "0.65194273", "0.64953434", "0.64363956", "0.6350575", "0.63368857", "0.6326333", "0.6321369", "0.63051254", "0.6296536", "0.6294007", "0.6289453", "0.62628216", "0.62528235", "0.62379754", "0.623409", "0.62293047", "0.62288284", "0.62073874", "0.6205747", "0.62005055", "0.6198013", "0.6189076", "0.61741203", "0.6171699", "0.61480796", "0.61476326", "0.6123043", "0.6118773", "0.61165833", "0.61066025", "0.6103321", "0.6091617", "0.6088678", "0.6078473", "0.6066181", "0.60623616", "0.60586524", "0.60580415", "0.60563755", "0.60559326", "0.6029656", "0.60099214", "0.6009663", "0.5991609", "0.5977423", "0.5970878", "0.5970123", "0.5965687", "0.5961632", "0.5950084", "0.5945061", "0.59261054", "0.59237677", "0.5923278", "0.5911044", "0.5909533", "0.59045905", "0.58993304", "0.5869804", "0.5868748", "0.58628094", "0.5848236", "0.58463305", "0.5814817", "0.58123755", "0.5800743", "0.5788592", "0.5776433", "0.57686126", "0.5758602" ]
0.6590362
25
........................ C O N S T R U C T O R S ..........................//
public BookManager() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private USI_TRLT() {}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void baocun() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void mo55254a() {\n }", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public void mo21879u() {\n }", "private void m50366E() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private stendhal() {\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "public void xuat() {\n\n\t}", "public void mo21783H() {\n }", "public void mo6081a() {\n }", "public void mo3376r() {\n }", "private void getStatus() {\n\t\t\n\t}", "public abstract void mo20899UO();", "private void sout() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo21794S() {\n }", "public void mo1531a() {\n C2201w.m8373a(\"Photo TransferData start!\", 1);\n }", "public void run() {\n\t\t\t\t\n\t\t\t}", "public void mo21793R() {\n }", "public EchoClientHandler()\n {\n String data = \"hello zhang kylin \" ;\n firstMessage = Unpooled.buffer(2914) ;\n firstMessage.writeBytes(data.getBytes()) ;\n }", "public void mo21791P() {\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}", "private void remplirUtiliseData() {\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void conferenceroom() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo38117a() {\n }", "public void mo21878t() {\n }", "public void mo21795T() {\n }", "public void mo21779D() {\n }", "public void mo4359a() {\n }", "public abstract void mo20900UP();", "public void mo21781F() {\n }", "public final void mo51373a() {\n }", "public void mo21877s() {\n }", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "zzang mo29839S() throws RemoteException;", "public void mo21825b() {\n }", "public void mo115190b() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}", "public void Tyre() {\n\t\t\r\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "protected boolean func_70814_o() { return true; }", "public void mo21782G() {\n }", "public abstract void mo56925d();", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "public void mo9233aH() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }" ]
[ "0.5768491", "0.56634897", "0.55411", "0.55315447", "0.54346466", "0.53735703", "0.5368076", "0.5364503", "0.5323158", "0.5300383", "0.5297362", "0.5297362", "0.52810156", "0.52602535", "0.52591777", "0.52568585", "0.525597", "0.5240802", "0.52322423", "0.52322423", "0.52322423", "0.52322423", "0.52322423", "0.52322423", "0.52322423", "0.52302814", "0.5222843", "0.5222843", "0.5218139", "0.5216031", "0.52059036", "0.51948744", "0.5180866", "0.51509607", "0.5149797", "0.51321656", "0.51302403", "0.51230466", "0.51194686", "0.5114997", "0.5108205", "0.5099984", "0.50952387", "0.50952387", "0.5093563", "0.50928056", "0.5085075", "0.5081934", "0.50702906", "0.5067328", "0.50598645", "0.50561374", "0.5055283", "0.5042876", "0.5039697", "0.50228983", "0.5020955", "0.50049144", "0.5002512", "0.4994456", "0.4992457", "0.4988871", "0.49877334", "0.49877334", "0.49860382", "0.49854395", "0.49845588", "0.4973393", "0.49719635", "0.49684635", "0.49663243", "0.49543524", "0.49516574", "0.49516574", "0.49516574", "0.49516574", "0.49516574", "0.49516574", "0.49516574", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49498793", "0.49450743", "0.49450743", "0.4938461", "0.4938026", "0.4938026", "0.4938026" ]
0.0
-1
end of the main method. get the recommend books.
public Book[] getRecommendBooks() { String stmnt = String.format( "SELECT * FROM book LIMIT %d ", PAGE_LIMIT); ResultSet rs = executeQuery(stmnt); ArrayList<Book> arr = resultSetPacker(rs, Book.class); return arr.toArray(new Book[arr.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Books getBooks(String title,String authors,String isbn,String publisher);", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "public Book[] getRecommendBook(){\n\t\n\t String stmnt = String.format(\n \"SELECT * FROM book \" );\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n}", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public Iterator getBooks() {\r\n return books.iterator();\r\n }", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\n\t}", "private void printAvailableBooks() {\n\t\t\n\t}", "void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}", "public List<PrintableBook> PerformSearch_google(String[] kw, int N){\n\t\t// build the JAX-RS client object \n\t\tClient client = ClientBuilder.newClient();\n\t\tint res_cont = 0;\t// initialize number of already processed results\n\t\tint tot_res = 1;\t// initialize total number of results so that it is greater than the number of already processed results\n\t\t// build the web target\n\t\tWebTarget target = client.target(getBaseURI_google()).path(\"volumes\");\n\t\t// create empty list of PrintableBook\n\t\tList<PrintableBook> pbooks = new ArrayList<PrintableBook>();\n\t\t// prepare query string\n\t\tStringBuffer queryString = new StringBuffer(kw[0]);\n\t\tfor (int i=1; i<kw.length; i++) {\n\t\t\tqueryString.append(' ');\n\t\t\tqueryString.append(kw[i]);\n\t\t}\n\t\tint offset;\t\t// declare variable used to store offset\n\t\t// main loop on pages\n\t\tfor(int page=0; pbooks.size()<N && res_cont<tot_res; page++){\n\t\t\toffset = page*20;\n\t\t\tSystem.out.println(\"Searching \"+queryString+\" on Google books with offset \"+offset);\n\t\t\ttry {\n\t\t\t\t// perform a get request using mediaType=APPLICATION_JSON\n\t\t\t\t// and convert the response into a SearchResult object\n\t\t\t\tit.polito.dp2.rest.gbooks.client.jaxb.SearchResult result = target\n\t\t\t\t\t\t\t\t\t .queryParam(\"q\", queryString)\t\n\t\t\t\t\t\t\t\t\t .queryParam(\"printType\", \"books\")\n\t\t\t\t\t\t\t\t\t .queryParam(\"maxResults\", 20)\n\t\t\t\t\t\t\t\t\t .queryParam(\"startIndex\", offset)\n\t\t\t\t\t\t\t\t\t .request()\n\t\t\t\t\t\t\t\t\t .accept(MediaType.APPLICATION_JSON)\n\t\t\t\t\t\t\t\t\t .get(it.polito.dp2.rest.gbooks.client.jaxb.SearchResult.class);\n\t\t\t\ttot_res = result.getTotalItems().intValue();\n\t\t\t\tSystem.out.println(\"OK Response received. Total number of Items:\"+tot_res);\n\t\t\t\tSystem.out.println(\"Validating items and converting validated items to xml.\");\n\t\t\t\tfor (it.polito.dp2.rest.gbooks.client.jaxb.Items item:result.getItems()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// validate item\n\t\t\t\t \tJAXBSource source = new JAXBSource(jc_gbooks, item);\n\t\t\t\t \tSystem.out.println(\"Validating \"+item.getSelfLink());\n\t\t\t\t \tvalidator_gbooks.validate(source);\n\t\t\t\t \tSystem.out.println(\"Validation OK\");\n\t\t\t\t \t// add item to list\n\t\t\t\t\t\tSystem.out.println(\"Adding item to list\");\n\t\t\t\t\t\tPrintableItem pi = Factory.createPrintableItem(BigInteger.valueOf(idCounter.getNextId()),item.getVolumeInfo());\t\t\t\t\n\t\t\t\t\t\tif(pi instanceof PrintableBook){\n\t\t\t\t\t\t\tpbooks.add((PrintableBook)pi);\n\t\t\t\t\t\t\tif(pbooks.size()==N) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (org.xml.sax.SAXException se) {\n\t\t\t\t\t System.out.println(\"Validation Failed\");\n\t\t\t\t\t // print error messages\n\t\t\t\t\t Throwable t = se;\n\t\t\t\t\t while (t!=null) {\n\t\t\t\t\t\t String message = t.getMessage();\n\t\t\t\t\t\t if (message!= null)\n\t\t\t\t\t\t \t System.out.println(message);\n\t\t\t\t\t\t t = t.getCause();\n\t\t\t\t\t }\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tSystem.out.println(\"Unexpected I/O Exception\");\n\t\t\t\t\t} catch (JAXBException e) {\n\t\t\t\t\t\tSystem.out.println(\"Unexpected JAXB Exception\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tres_cont = res_cont + 20;\n\t\t\t} catch(WebApplicationException e) {\n\t\t\t\tSystem.err.println(\"Error in remote operation: \"+e.getMessage());\n\t\t\t\treturn null;\t\n\t\t\t}\n\t\t}\n\t System.out.println(\"Number of validated Bibliography books from gbooks: \"+pbooks.size());\n\t return pbooks;\n\t}", "public Book[] getFavoriteBooks()\n {\n String stmnt = String.format(\n \"SELECT * FROM book ORDER BY rating DESC LIMIT %d \",\n PAGE_LIMIT);\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n\n }", "private static void readBooksInfo() {\n List<eGenre> arrBook = new ArrayList<>();\n\n // 1 //\n arrBook.add(eGenre.FANTASY);\n arrBook.add(eGenre.ADVENTURE);\n book.add(new Book(1200, arrBook, \"Верн Жюль\", \"Таинственный остров\", 1875));\n arrBook.clear();\n // 2 //\n arrBook.add(eGenre.FANTASY);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(425, arrBook, \"Григоренко Виталий\", \"Иван-душитель\", 1953));\n arrBook.clear();\n // 3 //\n arrBook.add(eGenre.DETECTIVE);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(360, arrBook, \"Сейгер Райли\", \"Последние Девушки\", 1992));\n arrBook.clear();\n // 4 //\n arrBook.add(eGenre.DETECTIVE);\n book.add(new Book(385, arrBook, \"Ольга Володарская\", \"То ли ангел, то ли бес\", 1995));\n arrBook.clear();\n // 5 //\n arrBook.add(eGenre.NOVEL);\n arrBook.add(eGenre.ACTION);\n book.add(new Book(180, arrBook, \"Лихэйн Деннис\", \"Закон ночи\", 1944));\n arrBook.clear();\n // 6 //\n arrBook.add(eGenre.NOVEL);\n book.add(new Book(224, arrBook, \"Мураками Харуки\", \"Страна Чудес без тормозов и Конец Света\", 1985));\n arrBook.clear();\n // 7 //\n arrBook.add(eGenre.STORY);\n book.add(new Book(1200, arrBook, \"Джон Хейвуд\", \"Люди Севера: История викингов, 793–1241\", 2017));\n arrBook.clear();\n // 8 //\n arrBook.add(eGenre.ACTION);\n arrBook.add(eGenre.MYSTIC);\n arrBook.add(eGenre.DETECTIVE);\n book.add(new Book(415, arrBook, \"Линдквист Юн\", \"Впусти меня\", 2017));\n arrBook.clear();\n // 9 //\n arrBook.add(eGenre.ACTION);\n book.add(new Book(202, arrBook, \"Сухов Евгений\", \"Таежная месть\", 2016));\n arrBook.clear();\n // 10 //\n arrBook.add(eGenre.DETECTIVE);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(231, arrBook, \"Винд Кристиан\", \"Призраки глубин\", 2019));\n arrBook.clear();\n }", "List<Book> getAllBooks();", "public List<Book> listBooks() {\n\t\tArrayList<Book> books = new ArrayList<>();\n\t\ttry (Connection con = LibraryConnection.getConnection()) {\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"SELECT * FROM book\");\n\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tbooks.add(new Book(rs.getString(\"isbn\"), rs.getString(\"title\")));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn books;\n\t}", "public String getMyBooks()\r\n {\r\n\treturn myBooks;\r\n }", "public Books[] getBooks() {\n return books;\n }", "@Override\r\n\tpublic List<Book> getBooks() {\n\t\treturn bd.findAll();\r\n\t}", "public ArrayList<Book> search(String part){ \n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n if (part.length()>=4){\n //Adding all the searching books into an ArrayList<Book>\n //No duplicating for books having the same title\n boolean bookExist = false;\n for (Book book : this.libraryBooks){\n if ((book.getTitle().toLowerCase().contains(part.toLowerCase())) || (book.getAuthor().toLowerCase().contains(part.toLowerCase()))){\n //Check whether any books having the same title in the list\n for (Book bookSearch : this.searchBooks){\n if (bookSearch.getTitle().equals(book.getTitle())){\n bookExist = true;\n break;\n }\n }\n //If none!\n if(!bookExist){\n this.searchBooks.add(book);\n }\n }\n bookExist = false;\n }\n //To put into a numbered list for printing\n //No duplicating for books having the same title\n for (int i =0; i < (this.searchBooks.size());i++){\n // put the book in the HashMap for printing \n this.numberedListOfSearch.put(i+1, this.searchBooks.get(i));\n }\n\n //To print out\n this.println(\"The searching process has finished!\");\n String researchBooks=\"\";\n //check whether the numbered list is empty or not\n if(this.numberedListOfSearch.size() >0){\n researchBooks += \"{\";\n for (int i = 0; i < this.numberedListOfSearch.size();i++){\n researchBooks += (i+1);\n researchBooks += \": \";\n researchBooks += this.numberedListOfSearch.get(i+1).toString();\n researchBooks += \"; \";\n }\n researchBooks = researchBooks.substring(0, researchBooks.length()-2);\n researchBooks += \"}\"; \n }\n //if the numbered list is empty\n else if ( this.numberedListOfSearch.size() == 0){\n researchBooks += \"Nothing found!\";\n }\n this.println(researchBooks);\n }\n\n //If not enough input key words!\n else{\n this.println(\"Please enter more key words! At least four!!\");\n }\n return this.searchBooks;\n }", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "@Override\n\tpublic List<Book> getAllBooks() {\n\t\treturn bookList;\n\t}", "public void returnBook()\n\t{\n\t\tavailableBooks++;\n\t}", "public List<Book> getBooks() {\n return books;\n }", "public List<Book> getAllBooks()\n {\n List<Book> books = new LinkedList<Book>();\n\n //1. Query para la consulta\n String query = \"Select * FROM \"+ BookReaderContract.FeedBook.TABLE_NAME;\n\n //2. Obtener la referencia a la DB\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n\n //3. Recorrer el resultado y crear un objeto Book\n Book book = null;\n if(cursor.moveToFirst()){\n do{\n book = new Book();\n book.setId(Integer.parseInt(cursor.getString(0)));\n book.setTitle(cursor.getString(1));\n book.setAuthor(cursor.getString(2));\n books.add(book);\n }while(cursor.moveToNext());\n }\n Log.d(\"getAllBooks\",books.toString());\n return books;\n }", "public List<Book> getAllBooks(){\n\t\treturn this.bRepo.findAll();\n\t}", "public List<PrintableBook> PerformSearch_crossref(String[] kw, int N){\n\t\tClient client = ClientBuilder.newClient();\n\t\tint res_cont = 0;\t// initialize number of already processed results\n\t\tint tot_res = 1;\t// initialize total number of results so that it is greater than the number of already processed results\n\t\t// build the web target\n\t\tWebTarget target = client.target(getBaseURI_crossref()).path(\"works\");\n\t\t// create empty list of PrintableBook\n\t\tList<PrintableBook> pbooks = new ArrayList<PrintableBook>();\n\t\t// prepare query string\n\t\tStringBuffer queryString = new StringBuffer(kw[0]);\n\t\tfor (int i=1; i<kw.length; i++) {\n\t\t\tqueryString.append(' ');\n\t\t\tqueryString.append(kw[i]);\n\t\t}\n\t\tint offset;\t\t// declare variable used to store offset\n\t\t// main loop on pages\n\t\tfor(int page=0; pbooks.size()<N && res_cont<tot_res; page++){\n\t\t\toffset = page*20;\n\t\t\tSystem.out.println(\"Searching \"+queryString+\" on Crossref with offset \"+offset);\n\t\t\ttry {\n\t\t\t\t// perform a get request using mediaType=APPLICATION_JSON\n\t\t\t\t// and convert the response into a SearchResult object\n\t\t\t\tit.polito.dp2.BIB.sol2.crossref.jaxb.SearchResult result = target.queryParam(\"filter\", \"type:book\")\n\t\t\t\t\t\t\t\t\t .queryParam(\"query\", queryString)\t\n\t\t\t\t\t\t\t\t\t .queryParam(\"offset\", offset)\n\t\t\t\t\t\t\t\t\t .request()\n\t\t\t\t\t\t\t\t\t .accept(MediaType.APPLICATION_JSON)\n\t\t\t\t\t\t\t\t\t .get(it.polito.dp2.BIB.sol2.crossref.jaxb.SearchResult.class);\n\t\t\t\ttot_res = result.getMessage().getTotalResults().intValue();\n\t\t\t\tSystem.out.println(\"OK Response received. Total number of Items:\"+tot_res);\n\t\t\t\tSystem.out.println(\"Validating items and converting validated items to xml.\");\n\t\t\t\n\t\t\t\tfor (it.polito.dp2.BIB.sol2.crossref.jaxb.Items item:result.getMessage().getItems()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// validate item\n\t\t\t\t \tJAXBSource source = new JAXBSource(jc_crossref, item);\n\t\t\t\t \tSystem.out.println(\"Validating \"+item.getTitle());\n\t\t\t\t \tvalidator_crossref.validate(source);\n\t\t\t\t \tSystem.out.println(\"Validation OK\");\n\t\t\t\t \t// add item to list\n\t\t\t\t\t\tSystem.out.println(\"Adding item to list\");\n\t\t\t\t\t\tPrintableItem pi = Factory.createPrintableItem(BigInteger.valueOf(idCounter.getNextId()),item);\t\t\t\t\n\t\t\t\t\t\tif(pi instanceof PrintableBook){\n\t\t\t\t\t\t\tpbooks.add((PrintableBook)pi);\n\t\t\t\t\t\t\tif(pbooks.size()==N) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (org.xml.sax.SAXException se) {\n\t\t\t\t\t System.out.println(\"Validation Failed\");\n\t\t\t\t\t // print error messages\n\t\t\t\t\t Throwable t = se;\n\t\t\t\t\t while (t!=null) {\n\t\t\t\t\t\t String message = t.getMessage();\n\t\t\t\t\t\t if (message!= null)\n\t\t\t\t\t\t \t System.out.println(message);\n\t\t\t\t\t\t t = t.getCause();\n\t\t\t\t\t }\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tSystem.out.println(\"Unexpected I/O Exception\");\n\t\t\t\t\t} catch (JAXBException e) {\n\t\t\t\t\t\tSystem.out.println(\"Unexpected JAXB Exception\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tres_cont = res_cont + 20;\n\t\t\t} catch(WebApplicationException e) {\n\t\t\t\tSystem.err.println(\"Error in remote operation: \"+e.getMessage());\n\t\t\t\treturn null;\t\n\t\t\t}\n\t\t}\n\t System.out.println(\"Number of validated Bibliography books from crossref: \"+pbooks.size());\n\t return pbooks;\n\t}", "@Override\n\tpublic int getBooksCount() {\n\t\treturn 2;\n\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}", "public List<Book> getBooks() {\r\n\t\treturn books;\r\n\t}", "public ArrayList<Book> getListBook();", "private void getBooks(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Fetching Data\",\"Please wait...\",false,false);\n\n //Creating a rest adapter\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL)\n .build();\n\n //Creating an object of our api interface\n BooksAPI api = adapter.create(BooksAPI.class);\n\n //Defining the method\n api.getBooks(new Callback<List<Book>>() {\n @Override\n public void success(List<Book> list, Response response) {\n //Dismissing the loading progressbar\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //you can handle the errors here\n Log.e(\"error\",error.getResponse().getReason());\n }\n });\n }", "@GetMapping\n\tpublic ResponseEntity<BookList> getBooks() throws Exception {\n\t\tBookList books = crawlerService.getBooksFromUrl();\t\t\n\t\treturn new ResponseEntity<BookList>(books, HttpStatus.OK);\n\t}", "void viewBooks();", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public List<Book> getBooks() {\r\n \t\t// switch dates\r\n \t\tif (filter_dateFrom.compareTo(filter_dateTo) > 0) {\r\n \t\t\tCalendar tmp = filter_dateFrom;\r\n \t\t\tfilter_dateFrom = filter_dateTo;\r\n \t\t\tfilter_dateTo = tmp;\r\n \t\t}\r\n \r\n \t\tDate yearFrom = filter_dateFrom.getTime();\r\n \t\tDate yearTo = filter_dateTo.getTime();\r\n \r\n \t\t// genre\r\n \t\tGenre genre = null;\r\n \t\tif (!filter_genre.isEmpty() && !filter_genre.equalsIgnoreCase(\"all\")) {\r\n \t\t\tgenre = genreMgr.findByName(filter_genre);\r\n \t\t\tif (genre == null) {\r\n \t\t\t\tSystem.err.println(\"Badly working database encoding!\");\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn bookMgr.find(filter_name, filter_author, yearFrom, yearTo, genre, filter_isbn_issn);\r\n \t}", "public List<Books> searchBook(String keywords,String author,double low_price,double high_price){\n /*\n * search books by keywords of book_name\n * */\n List<Books> books=null;\n ResultSet resultSet=null;\n if(keywords!=\"\"&&author==\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book where book_name like '%\"+keywords+\"%'\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by keywords and author\n else if(keywords!=\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where b.book_name like '%keywords=?%' and book_author=?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{keywords,author});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by author\n else if(keywords==\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where book_author=?\";\n BaseDao baseDaot=dao.executeQuery(sql,new Object[]{author});\n books=resultSetToBook(baseDaot);\n return books;\n }\n else if(keywords==\"\"&&author==\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n //search books by keywords and price\n else if(keywords!=\"\"&&author!=\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where b.book_name like '%\"+keywords+\"%' \" +\n \"and book_author=? and book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{author,low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n return null;\n }", "public static Collection<BookReview> getALL() {\n }", "public List<BookReviewBean> getBookReviewsById(String bid) throws Exception {\n List<BookReviewBean> reviews = new ArrayList<BookReviewBean>();\n String query = \"SELECT poi.rating, poi.review FROM POItem poi INNER JOIN PO p ON poi.id=p.id AND p.status='ORDERED' INNER JOIN book b ON poi.bid=b.bid WHERE poi.bid=? AND poi.rating>0 ORDER BY poi.id DESC\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n p.setString(1, bid);\n ResultSet r = p.executeQuery();\n while (r.next()) {\n BookReviewBean review = new BookReviewBean(r.getInt(\"rating\"), r.getString(\"review\"));\n reviews.add(review);\n }\n return reviews;\n }\n }", "public ArrayList<Book> getBooks() {\n return bookList;\n }", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "public void getBookDetails() {\n\t}", "public java.util.List<com.huqiwen.demo.book.model.Books> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "Book getLatestBook();", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "public PageInfo<Book> getBookList() {\n \tPageHelper.startPage(1,2);\r\n List<Book> list = bookMapper.getBookList();\r\n PageInfo<Book> pageInfo=new PageInfo<Book>(list);\r\n\t\treturn pageInfo;\r\n \r\n }", "public static void main(String[] args) {\n\t\tint SizeX = 10 , SizeY = 7;\n\t\tString search_type =\"\";//用書名還是書號\n\t\tString answer =\"\";\n\t\tString query = \"\";//搜尋的關鍵字\n\t\tString operation = \"\";//儲存操作的動作: 借書/還書等\n\t\tString identity = \"\";//儲存使用者身分,student/staff/exit\n\t\tScanner in = new Scanner(System.in);\n\t\tString [][] booklists = new String[SizeX][SizeY];\n\t\t//建立資料庫\n\t\tbooklists = AddBooks(\"82101\",\"Cihai\",\"Reference\",\"Shu Xincheng\",\"20000\",booklists,0);\n\t\tbooklists = AddBooks(\"80001\",\"WW2 History\",\"History\",\"Winston Churchill\",\"971\",booklists,1);\n\t\tbooklists = AddBooks(\"00003\",\"Egg 100\",\"Cookbook\",\"Su yuan ma\",\"104\",booklists,2);\n\t\tbooklists = AddBooks(\"50001\",\"Be a honest man\",\"Political\",\"Ma Ying jeou\",\"520\",booklists,3);\n\t\tbooklists = AddBooks(\"85719\",\"Sword Art Online\",\"Novel\",\"Reki Kawahara\",\"8763\",booklists,4);\n\t\tbooklists = AddBooks(\"85728\",\"Spice and Wolf\",\"Novel\",\"Isuna Hasekura\",\"510\",booklists,5);\n\t\tbooklists = AddBooks(\"85707\",\"The Old Man and the Sea\",\"Novel\",\"Ernest Hemingway\",\"127\",booklists,6);\n\t\tbooklists = AddBooks(\"85703\",\"Romance of the Three Kingdoms\",\"Novel\",\"Luo Guanzhong\",\"480\",booklists,7);\n\t\tbooklists = AddBooks(\"80005\",\"Records of the Grand Historian\",\"History\",\"Sima Qian\",\"6000\",booklists,8);\n\t\tbooklists[4][5] = \"true\";\n\t\tbooklists[4][6] = \"1\";\n\t\t\n\t\tSystem.out.println(\"【圖書館租借模擬系統】\");\n\t\tBookSystem bs = new BookSystem();\n\t\tdo{\n\t\t\tSystem.out.println(\"請問你是何種身分?學生(student)或者圖書館人員(staff)?(輸入exit離開)\");\n\t\t\tidentity = in.nextLine();\n\t\t\tif(identity.equals(\"student\")){\n\t\t\t\tdo{\n\t\t\t\t\tbs.ViewStudent(booklists, SizeX);\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 借書(borrow)\");\n\t\t\t\t\tSystem.out.println(\"2. 還書(return)\");\n\t\t\t\t\tSystem.out.println(\"3. 預約書籍(reserve)\");\n\t\t\t\t\tSystem.out.println(\"4. 取消預約書籍(reservecancel)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\twhile(!operation.equals(\"borrow\")&&!operation.equals(\"1\")\n\t\t\t\t\t\t&&!operation.equals(\"return\")&&!operation.equals(\"2\")\n\t\t\t\t\t\t&&!operation.equals(\"reserve\")&&!operation.equals(\"3\")\n\t\t\t\t\t\t&&!operation.equals(\"reservecancel\")&&!operation.equals(\"4\")\n\t\t\t\t\t\t&&!operation.equals(\"search\")&&!operation.equals(\"5\")\n\t\t\t\t\t\t&&!operation.equals(\"exit\")&&!operation.equals(\"6\")){\n\t\t\t\t\t\t\tSystem.out.println(\"輸入錯誤!請重新輸入:\");\n\t\t\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tif(!operation.equals(\"search\") && !operation.equals(\"5\")&&!operation.equals(\"exit\")&&!operation.equals(\"6\") ){\n\t\t\t\t\t\tif(operation.equals(\"borrow\")|| operation.equals(\"1\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來借閱呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來還書呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來預借呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來取消預借呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"borrow\")||operation.equals(\"1\")) \n\t\t\t\t\t\t\tbooklists = bs.BorrowBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tbooklists = bs.ReturnBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveCancel(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"5\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}else if(identity.equals(\"staff\")){\n\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"=========This is staff page=============\");\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 登錄新書籍(bookregister)\");\n\t\t\t\t\tSystem.out.println(\"2. 刪除書籍(bookdelete)\");\n\t\t\t\t\tSystem.out.println(\"3. 更新書籍資料(bookedit)\");\n\t\t\t\t\tSystem.out.println(\"4. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢學生資料(viewstudent)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\tif(operation.equals(\"bookregister\")||operation.equals(\"1\")){\n\t\t\t\t\t\tbooklists = bs.RregisterBook(booklists,SizeX);\n\t\t\t\t\t}else if(operation.equals(\"bookdelete\")||operation.equals(\"2\")\n\t\t\t\t\t\t\t||operation.equals(\"bookedit\")||operation.equals(\"3\")){\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來刪除書籍呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來修改書籍呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tbooklists = bs.DeleteBooks(booklists,SizeX,SizeY,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tbooklists = bs.EditBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"4\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")||search_type.equals(\"1\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")||search_type.equals(\"2\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(operation.equals(\"viewstudent\")||operation.equals(\"5\")){\n\t\t\t\t\t\tbs.ViewStudent(booklists,SizeX);\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}\n\t\t\t\n\t\t}while(!identity.equals(\"exit\"));\n\t\t\n\t\tSystem.out.println(\"感謝您使用此系統!\");\n\t}", "public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}", "public Collection<Book> getBooks() {\n return books;\n }", "private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}", "public List<Book> getTotalBooksInLibrary() {\n\n return books;\n }", "public static void main(String[] args) {\n // for testing, add books and find book using it's name\n /* Library.books.add(book1);\n Library.books.add(book2);\n Library.books.add(book3);\n System.out.println(\"Enter namer for Book:\");\n String bookName = sc.nextLine();\n \n for (int i = 0; i <3 ; i++) {\n\n if (Library.books.get(i).getName().equalsIgnoreCase(bookName)) {\n \n System.out.println(books.get(i).getName());\n System.out.println(i);\n }\n }*/\n \n do{\n choicesInMenu(menu());\n } while (goOn);\n //Library.addBook();\n //Library.showAllBooks();\n\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public void cacheResult(\n\t\tjava.util.List<com.huqiwen.demo.book.model.Books> bookses);", "public ArrayList<Book> gettitleBook(String title);", "@Override\r\n\tpublic List<Book> getBooks(String kind) {\n\t\treturn null;\r\n\t}", "public static void main(String[] args) throws IOException, TasteException {\n DataModel dataModel = new FileDataModel(new File(\"D:\\\\2020新毕设\\\\recommendNews\\\\src\\\\main\\\\java\\\\cn\\\\ling\\\\news\\\\recommend\\\\movie.data\"));\n /*\n 计算相似度,相似度算法有很多种,欧几里得、皮尔逊等等。\n 这里使用的是皮尔逊PearsonCorrelationSimilarity\n */\n ItemSimilarity itemSimilarity = new PearsonCorrelationSimilarity(dataModel);\n //构建推荐器,协同过滤推荐有两种,分别是基于用户的和基于物品的,这里使用基于物品的协同过滤推荐\n GenericItemBasedRecommender recommender = new GenericItemBasedRecommender(dataModel, itemSimilarity);\n //给指定用户推荐若干个与指定商品相似的商品\n List<RecommendedItem> recommendedItemList = recommender.recommendedBecause(1, 5, 2);\n //打印推荐的结果\n System.out.println(\"使用基于物品的协同过滤算法\");\n System.out.println(\"根据用户1当前浏览的商品5,推荐2个相似的商品\");\n for (RecommendedItem recommendedItem : recommendedItemList) {\n System.out.println(recommendedItem);\n }\n }", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "@Override\n\tpublic Set<Book> getAvailableBooks() {\n\t\treturn null;\n\t}", "public List<Book> fetchAllBooks() {\n\t\treturn null;\n\t}", "Collection<Book> readAll();", "public List<Book> allBooks() {\n return bookRepository.findAll();\n }", "@Override\n protected List<Book> doInBackground(String... params) {\n\n String importedQuery[] = params[0].split(\"#\");\n String fullQuery = \"\";\n\n for (int i = 0; i < importedQuery.length; i++) {\n if (!fullQuery.equals(\"\")) fullQuery+='&';\n //vanaf hier moet de lus komen voor meerdere gekoppelde queries\n String prefix = \"\";\n String searchWord = \"\";\n\n int tmp = 0;\n for (String s : importedQuery) Log.d(TAG, \"params[]\" + tmp++ + s);\n\n String args[] = importedQuery[i].split(\"\\\\|\"); //todo params[i]\n prefix = args[0].trim();\n searchWord = args[1].trim();\n searchWord = searchWord.replace(\" \", \"+\");\n\n\n Log.d(TAG, \"searchWord:\" + searchWord);\n Log.d(TAG, \"Prefix\" + prefix);\n\n String[] options = SearchMethodGoogleApi.getPrefixesForQuery();\n// for (String s:options)Log.v(TAG+\"options\",s);\n if (!isStringInArray(prefix, options)) {\n //een ongeldige parameter mee gestuurd\n throw new IllegalArgumentException(\"invalid parameters\");\n }\n fullQuery += prefix + searchWord;\n\n //tot hier moet de lus komen voor meerdere gekoppelde queries\n\n }\n\n\n\n\n List<Book> bookList = new ArrayList<>();\n Volume volume = null;\n Volumes volumes = null;\n Books books = QueryGoogleBooksHelper.setUpClient();\n\n\n Books.Volumes.List volumesList = null;\n try {\n volumesList = books.volumes().list(fullQuery).setMaxResults(40L);\n\n Log.d(App.getTAG(), \"queryFullString:\" + fullQuery);\n\n\n // Execute the searchWord.\n volumes = volumesList.execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (volumes != null && volumes.getItems() != null) {\n //vanaf hier halen we de details op:\n for (Volume vol : volumes.getItems()) {\n Log.v(TAG + \"Book (genAll)\", vol != null ? vol.toString() : \"\");\n\n Volume.VolumeInfo volInfo = vol.getVolumeInfo();\n Volume.SaleInfo salesInfo = vol.getSaleInfo();\n Volume.SearchInfo searchInfo = vol.getSearchInfo();\n\n\n //get authors in List\n List<String> authorStringList = volInfo.getAuthors();\n ArrayList<Author> authorArrayList = new ArrayList<>();\n //copy contents of list to array\n if (volInfo.getAuthors() != null) {\n for (String author : authorStringList)\n authorArrayList.add(new Author(author));\n } else {\n authorArrayList.add(new Author(App.getContext().getString(R.string.no_returned_authors_google)));\n }\n\n //getGoogleID\n String googleID = vol.getId();\n\n //get ISBN:\n String ISBN = \"\";\n if (volInfo.getIndustryIdentifiers() != null) {\n if (volInfo.getIndustryIdentifiers().size() > 1)\n ISBN = volInfo.getIndustryIdentifiers().get(1).getIdentifier();\n }\n\n //get Title:\n String title = \"\";\n if (volInfo.getTitle() != null) {\n title = volInfo.getTitle();\n }\n //get description\n String description = \"\";\n if (volInfo.getDescription() != null) {\n description = volInfo.getDescription();\n }\n\n //get ImageLinks:\n Volume.VolumeInfo.ImageLinks imageLinks = null;\n if (volInfo.getImageLinks() != null) {\n imageLinks = volInfo.getImageLinks();\n }\n\n //get links to book (pre)views:\n String previewLink = \"\";\n if (volInfo.getPreviewLink() != null) {\n previewLink = volInfo.getPreviewLink();\n }\n\n //String shortDescription=searchInfo.getTextSnippet()+App.getContext().getString(R.string.etc_after_book_description);\n Double averageRating = volInfo.getAverageRating();\n\n //TODO:etc verder doen\n\n //create new Book and edit its info with the info from Google\n Book book = new Book(ISBN, googleID, title, authorArrayList, description, imageLinks, previewLink);\n bookList.add(book);\n Log.v(TAG, bookList.size() + \"Book added\");\n }\n }\n\n\n return bookList;\n\n\n }", "public void searchBooks(String searchKeyword) {\n\n\n books = new ArrayList<>();\n Call<BooksObject> call = NetworkUtils.booksAPI.findBooks(searchKeyword, NetworkUtils.apiKey, 5);\n call.enqueue(new Callback<BooksObject>() {\n @Override\n public void onResponse(Call<BooksObject> call, Response<BooksObject> response) {\n if (!response.isSuccessful()) {\n Log.i(TAG, \"\" + response.code());\n return;\n }\n\n BooksObject booksObject = response.body();\n ArrayList<Book> bookList = booksObject.getItems();\n for (Book b : bookList) {\n String id = b.getId();\n boolean exists = false;\n for (Book bo : library) {\n if (id.equals(bo.getId())) {\n exists = true;\n break;\n }\n }\n if (!exists) {\n books.add(b);\n }\n }\n\n customSearchAdapter = new CustomSearchAdapter(getContext(), books);\n acLibrary.setAdapter(customSearchAdapter);\n customSearchAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onFailure(Call<BooksObject> call, Throwable t) {\n Log.i(TAG, t.getMessage());\n }\n });\n\n }", "public ObservableList<Object> selectAllBooks(){\n System.out.println(\"Printing all books...\");\n dbmanager.open();\n ObservableList<Object> books = FXCollections.observableArrayList();\n\n try{\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n dbmanager.incrementNextId(Integer.parseInt(splittedString[1]));\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n Book book = new Book(jbook);\n \n book.setPublisher(dbmanager.getPmanager().read(jbook.getInt(\"publisher\")));\n \n JSONArray jauthors = jbook.getJSONArray(\"authors\");\n List<Author> authors = new ArrayList();\n for(int i=0; i<jauthors.length(); i++){\n \n int a=-1;\n a=jauthors.getInt(i);\n if(a>=0){ \n authors.add(dbmanager.getAmanager().read(a));\n }else{\n System.out.println(\"A book has mysterious author\"); \n }\n \n }\n \n book.setAuthors(authors);\n books.add(book);\n keyIterator.next();\n }\n }\n } catch(IOException e){\n e.printStackTrace();\n }\n dbmanager.close();\n return books;\n }", "public List<String > getBooks(){\n List<String> titles = new ArrayList<>();\n\n String strSQL = \"SELECT B._id, B.Title FROM TBooks B WHERE NOT B._id IN (Select TLoaned.TitleID \" +\n \" FROM TLoaned WHERE TLoaned.ReturnDate IS NULL);\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(strSQL, null);\n try {\n if (c.moveToFirst()) {\n do {\n titles.add(c.getString(0) + \". \" + c.getString(1));\n } while (c.moveToNext());\n }\n }\n finally {\n c.close();\n db.close();\n }\n return titles;\n }", "public void getAllBook(){\n Call<Book> call = api.testBooks();\n call.enqueue(\n new Callback<Book>() {\n @Override\n public void onResponse(Call<Book> call, Response<Book> response) {\n Log.e(\"Test API\", \"on Response \"+response.body());\n Book book = response.body();\n Log.e(\"Test API\", \"on Response \"+book.getAuthor());\n Log.e(\"Test API\", \"on Response \"+book.getTitle());\n Log.e(\"Test API\", \"on Response \"+book.getLanguage());\n Log.e(\"Test API\", \"on Response \"+book.getDescription());\n view.onGetSuccess(book);\n }\n\n @Override\n public void onFailure(Call<Book> call, Throwable t) {\n Log.i(\"Test API\", \"on Failure \"+t.getLocalizedMessage());\n }\n }\n );\n }", "public ArrayList<Book> getBooks()\n {\n ArrayList<Book> books = new ArrayList<>();\n String sql = \"SELECT [book_id]\\n\" +\n \" ,[book_title]\\n \" +\n \" ,[book_author]\\n\" +\n \" ,[book_publish_year]\\n\" +\n \" ,[book_category]\\n\" +\n \" ,[book_keyword]\\n\" +\n \" ,[book_status]\\n \" +\n \" FROM [lib_book_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int book_id = rs.getInt(\"book_id\");\n String book_title = rs.getString(\"book_title\");\n String book_author = rs.getString(\"book_author\");\n String book_publish_year = rs.getString(\"book_publish_year\");\n String book_category = rs.getString(\"book_category\");\n String book_keyword = rs.getString(\"book_keyword\");\n String book_status = rs.getString(\"book_status\");\n \n Book s = new Book(book_id,book_title, book_author, book_publish_year,book_category,book_keyword,book_status);\n books.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return books;\n }", "public List<BookData> getAllBooks() throws Exception{\n\t\tList<BookData> list = new ArrayList<>();\n\t\tStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\tmyStmt = myConn.createStatement();\n\t\t\tmyRs = myStmt.executeQuery(\"select title, author_name, publisher_name, book_id from books natural join book_authors\");\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public JSONObject getBookJSONObject(String bookTitle) throws BadRequestException {\n\n String apiUrlString = \"https://www.googleapis.com/books/v1/volumes?q=intitle:\" + bookTitle + \"&filter:free-ebooks&printType:books\";\n try{\n HttpURLConnection connection = null;\n // Build Connection.\n try{\n URL url = new URL(apiUrlString);\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(5000); // 5 seconds\n connection.setConnectTimeout(5000); // 5 seconds\n } catch (MalformedURLException e) {\n // Impossible: The only two URLs used in the app are taken from string resources.\n e.printStackTrace();\n } catch (ProtocolException e) {\n // Impossible: \"GET\" is a perfectly valid request method.\n e.printStackTrace();\n }\n int responseCode = connection.getResponseCode();\n if(responseCode != 200){\n connection.disconnect();\n throw new BadRequestException(\"GoogleBooksAPI request failed. Response Code: \" + responseCode);\n\n }\n\n // Read data from response.\n StringBuilder builder = new StringBuilder();\n BufferedReader responseReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n String line = responseReader.readLine();\n while (line != null){\n builder.append(line);\n line = responseReader.readLine();\n System.out.println(line);\n }\n String responseString = builder.toString();\n JSONObject responseJson = new JSONObject(responseString);\n // Close connection and return response code.\n connection.disconnect();\n return responseJson;\n } catch (SocketTimeoutException e) {\n return null;\n } catch(IOException e){\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "private void getData() {\n\t\tif (ultimoItem == 2)\n\t\t\taa.clear();\n\t\tString result = \"\";\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_BOOKS);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tresult = sb.toString();\n\t\t\t\t\tJSONArray jArray = new JSONArray(result);\n\t\t\t\t\tif (jArray.length() == 0) {\n\t\t\t\t\t\tvalorUltimo = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < jArray.length(); i++) {\n\t\t\t\t\t\tJSONObject json_data = jArray.getJSONObject(i);\n\t\t\t\t\t\tBooks resultRow = new Books();\n\t\t\t\t\t\tString creado = json_data.getString(\"created_at\");\n\t\t\t\t\t\tresultRow.id = json_data.getString(\"id\");\n\t\t\t\t\t\tresultRow.title = json_data.getString(\"title\");\n\t\t\t\t\t\tresultRow.author = json_data.getString(\"author\");\n\t\t\t\t\t\tresultRow.publisher = json_data.getString(\"publisher\");\n\t\t\t\t\t\tresultRow.additional_info = json_data\n\t\t\t\t\t\t\t\t.getString(\"additional_info\");\n\t\t\t\t\t\tresultRow.contact_info = json_data\n\t\t\t\t\t\t\t\t.getString(\"contact_info\");\n\t\t\t\t\t\tresultRow.offer_type = json_data\n\t\t\t\t\t\t\t\t.getString(\"offer_type\");\n\t\t\t\t\t\tresultRow.reply_count = json_data\n\t\t\t\t\t\t\t\t.getString(\"reply_count\");\n\t\t\t\t\t\tresultRow.price = json_data.getString(\"price\");\n\t\t\t\t\t\tfechaformato = new String[jArray.length()];\n\t\t\t\t\t\tfechaformato[i] = creado;\n\t\t\t\t\t\tString eventTime = new String(creado);\n\t\t\t\t\t\tString currentTime = new String(SuperTiempo);\n\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\"yyyy-MM-dd'T'hh:mm:ss.SSS'Z'\");\n\t\t\t\t\t\tDate eventDate = sdf.parse(eventTime);\n\t\t\t\t\t\tDate currentDate = sdf.parse(currentTime);\n\t\t\t\t\t\tlong eventTimelong = eventDate.getTime();\n\t\t\t\t\t\tlong currentTimelong = currentDate.getTime();\n\t\t\t\t\t\tlong diff = currentTimelong - eventTimelong;\n\t\t\t\t\t\tlong segundoslong = diff / 1000;\n\t\t\t\t\t\tlong minutoslong = diff / 60000; // 60 por 1000\n\t\t\t\t\t\tlong horaslong = diff / 3600000; // 60 por 60 por 1000\n\t\t\t\t\t\tlong diaslong = horaslong / 24;\n\t\t\t\t\t\tlong meseslong = diaslong / 31;\n\t\t\t\t\t\tlong añolong = meseslong / 12;\n\t\t\t\t\t\tif (añolong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + añolong + \" año \";\n\t\t\t\t\t\telse if (añolong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + añolong + \" años \";\n\t\t\t\t\t\telse if (meseslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + meseslong + \" mes \";\n\t\t\t\t\t\telse if (meseslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + meseslong + \" meses \";\n\t\t\t\t\t\telse if (diaslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + diaslong + \" día \";\n\t\t\t\t\t\telse if (diaslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + diaslong + \" días \";\n\t\t\t\t\t\telse if (horaslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + horaslong + \" hora \";\n\t\t\t\t\t\telse if (horaslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + horaslong + \" horas \";\n\t\t\t\t\t\telse if (minutoslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + minutoslong + \" minuto \";\n\t\t\t\t\t\telse if (minutoslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + minutoslong + \" minutos \";\n\t\t\t\t\t\telse if (segundoslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + segundoslong + \" segundo \";\n\t\t\t\t\t\telse if (segundoslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + segundoslong + \" segundos \";\n\t\t\t\t\t\telse if (segundoslong == 0)\n\t\t\t\t\t\t\thoraAgo = \"justo ahora\";\n\t\t\t\t\t\tresultRow.created_at = horaAgo;\n\t\t\t\t\t\tJSONObject usuarios = json_data.getJSONObject(\"owner\");\n\t\t\t\t\t\tresultRow.owner_name = usuarios.getString(\"name\");\n\t\t\t\t\t\tJSONObject grupos = json_data.getJSONObject(\"group\");\n\t\t\t\t\t\tresultRow.group_name = grupos.getString(\"name\");\n\t\t\t\t\t\tresultRow.group_id = grupos.getString(\"id\");\n\t\t\t\t\t\tJSONObject owner = json_data.getJSONObject(\"owner\");\n\t\t\t\t\t\tJSONObject profile_pic = owner\n\t\t\t\t\t\t\t\t.getJSONObject(\"profile_pic\");\n\t\t\t\t\t\tresultRow.thumbnail_url = profile_pic\n\t\t\t\t\t\t\t\t.getString(\"thumbnail_url\");\n\t\t\t\t\t\tarrayBooks.add(resultRow);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\n\t\t\t\t}\n\t\t\t\tmyListView.setAdapter(aa);\n\t\t\t\tif (ultimoItem == 1) {\n\t\t\t\t\tmyListView.setSelection(superTotal);\n\t\t\t\t\tnuevo = nuevo + superTotal;\n\t\t\t\t}\n\t\t\t\tultimoItem = 0;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getBook() {\n\t\treturn book;\r\n\t}", "@Override\n\tpublic int nbBooks() {\n\t\treturn 0;\n\t}", "public ArrayList<Book> getLibraryBooks() {\n return this.libraryBooks;\n }", "@WithSpan\n List<RecommendationContent> getRecommendations(@Nonnull Urn userUrn, @Nonnull RecommendationRequestContext requestContext);", "public void recommendMovie()\n {\n r.recommendMovie();\n }", "private void displayBookInfo(){\n //Set text of TextViews\n mTitle.setText(currentBook.title);\n mAuthors.setText(currentBook.authors);\n mDescription.setText(currentBook.description);\n mAvgRating.setText(String.format(\"%.01f\", currentBook.averageRating));\n mBookRating.setRating(currentBook.averageRating);\n\n //Concatenate string and set text to string\n String numRatingsString = String.valueOf(currentBook.numRatings) + \" Ratings\";\n mNumRatings.setText(numRatingsString);\n\n //Concatenate strings before setting them\n String titleString = \"Title: \" + currentBook.title;\n String authorsString = \"Authors: \" + currentBook.authors;\n String subjectString = \"Subject: \" + currentBook.subject;\n String copiesString = \"Library Copies: \" + currentBook.numCopies;\n String ISBN10String = \"ISBN10: \" + currentBook.ISBN10;\n String ISBN13String = \"ISBN13: \" + currentBook.ISBN13;\n\n //Set text data\n mFullTitle.setText(titleString);\n mFullAuthors.setText(authorsString);\n mSubject.setText(subjectString);\n mCopies.setText(copiesString);\n mISBN10.setText(ISBN10String);\n mISBN13.setText(ISBN13String);\n\n //Hide subtitle if it doesn't exist\n if(currentBook.subTitle.length() < 2)\n mSubTitle.setVisibility(GONE);\n else\n mSubTitle.setText(currentBook.subTitle);\n\n //Get reviews\n reviews = currentBook.reviews;\n\n //Add first 3 reviews, unless there are less than 3 reviews - Then add all reviews\n int upperBound = ((reviews.size() - 1) > 1)?2:(reviews.size()-1);\n reviewAdapter(reviews, mReviews, 0, upperBound, true);\n\n //If there are 3 reviews or less, then hide the see all button\n if(reviews.size() < 4)\n mSeeAll.setVisibility(GONE);\n }", "private Book convertScrapBookToBook(ScrapBook newScrapBook) {\n Book transientNewBook = new Book();\n\n /**\n * general settings\n */\n transientNewBook.setVersion((long) VERSION_INCREMENTATION);\n transientNewBook.setAlgOnlineServiceRef((long) 2);\n\n /**\n * Quantum\n */\n Quantum quantum = new Quantum();\n quantum.setVersion(VERSION_INCREMENTATION);\n quantum.setHeight(newScrapBook.getP25DiliCheight());\n quantum.setWeight(newScrapBook.getP26DiliCweight());\n quantum.setThickness(newScrapBook.getP23DiliCthickness());\n quantum.setWidth(newScrapBook.getP24DiliCwidth());\n\n /**\n * Guard for dilicom\n */\n if (newScrapBook.getP02DiliCean() != null) {\n transientNewBook.setAuthorName(newScrapBook.getP30DiliCauthor());\n transientNewBook.setBookBinding(newScrapBook.getP31DiliCbinding());\n //transientNewBook.setDateExtraction(ALGValidator.getTodaysDate());\n transientNewBook.setDiliCwordingCounter(newScrapBook.getP21DiliCwordingCounter());\n transientNewBook.setDiliCwordingExtended(newScrapBook.getP27DiliCwordingExtended());\n transientNewBook.setDiliCwordingStandard(newScrapBook.getP20DiliCwordingStandard());\n transientNewBook.setEan(newScrapBook.getP02DiliCean());\n transientNewBook.setDatePublished(newScrapBook.getP17DiliCdatePublished());\n transientNewBook.setDateUpdated(newScrapBook.getP45DiliCdateOfLastModification());\n transientNewBook.setMarkAsDeleted(false);\n transientNewBook.setProductType(Integer.valueOf(newScrapBook.getP18DiliCtypeProduct()));\n transientNewBook.setPublisherName(newScrapBook.getP28DiliCpublisher());\n\n /**\n * Book title\n */\n Booktitle bookTitle = new Booktitle();\n bookTitle.setVersion(VERSION_INCREMENTATION);\n bookTitle.setDiliCwordingCounter(newScrapBook.getP21DiliCwordingCounter());\n bookTitle.setDiliCwordingExtended(newScrapBook.getP27DiliCwordingExtended());\n bookTitle.setDiliCwordingStandard(newScrapBook.getP20DiliCwordingStandard());\n\n /**\n * book detail\n */\n BookDetail bookDetail = new BookDetail();\n bookDetail.setVersion(VERSION_INCREMENTATION);\n\n bookDetail.setDiliCauthor(newScrapBook.getP30DiliCauthor());\n bookDetail.setDiliCcollectionName(newScrapBook.getP29DiliCcollectionName());\n bookDetail.setDiliCcomandableUnit(newScrapBook.getP39DiliCcommandableUnit());\n bookDetail.setDiliCjointSalesPackage(newScrapBook.getP40DiliCjointSalesPackage());\n bookDetail.setDiliClinkingCodes(newScrapBook.getP37DiliClinkingCodes());\n bookDetail.setDiliCmovementCode(newScrapBook.getP01DiliCmovementCode());\n bookDetail.setDiliCnumberOfReference(newScrapBook.getP43DiliCnumberOfReference());\n bookDetail.setDiliCpublisher(newScrapBook.getP28DiliCpublisher());\n bookDetail.setDiliCserialCollection(newScrapBook.getP34DiliCserialCollection());\n bookDetail.setDiliCstoreDisplay(new Integer(StringUtils.isBlank(newScrapBook.getP22DiliCstoreDisplay()) ? \"0\" : newScrapBook.getP22DiliCstoreDisplay()));\n bookDetail.setDiliCsymbolization(newScrapBook.getP41DiliCsymbolization());\n bookDetail.setDiliCtheme(newScrapBook.getP35DiliCtheme());\n bookDetail.setQuantumByDiliCquantum(quantum);\n\n /**\n * book distributor\n */\n\n BookDistributor bookDistributor = new BookDistributor();\n bookDistributor.setVersion(VERSION_INCREMENTATION);\n bookDistributor.setDiliCamountTaxExempt1(newScrapBook.getP10DiliCamountTaxExempt1());\n bookDistributor.setDiliCamountTaxExempt2(newScrapBook.getP12DiliCamountTaxExempt2());\n bookDistributor.setDiliCamountTaxExempt3(newScrapBook.getP14DiliCamountTaxExempt3());\n bookDistributor.setDiliCavailabilityCode(newScrapBook.getP05DiliCavailabilityCode());\n bookDistributor.setDiliCdateEndOfCommercialization(newScrapBook.getP19DiliCdateEndOfCommercialization());\n bookDistributor.setDiliCdateOfTariffApplication(newScrapBook.getP04DiliCdateOfTariffApplicable());\n bookDistributor.setDiliCdatePublished(newScrapBook.getP17DiliCdatePublished());\n bookDistributor.setDiliCBookDistributorReference(newScrapBook.getP33DiliCbookDistributorReference());\n\n bookDistributor.setDiliCdiscountClassification(newScrapBook.getP08DiliCdiscountClassification());\n bookDistributor.setDiliCgencod(newScrapBook.getP03DiliCgencode());\n bookDistributor.setDiliCpriceAndVat(newScrapBook.getP07DiliCpriceAndVat());\n bookDistributor.setDiliCpriceCode(newScrapBook.getP16DiliCpriceCode());\n\n bookDistributor.setDiliCpriceType(newScrapBook.getP06DiliCpriceType());\n bookDistributor.setDiliCreturnCode(newScrapBook.getP15DiliCreturnCode());\n bookDistributor.setDiliCtypeOfProduct(newScrapBook.getP18DiliCtypeProduct());\n //change in table distributor to int\n bookDistributor.setDiliCuniqueOrMultitpleDistribution(newScrapBook.getP42DiliCuniqueOrMultitpleDistribution());\n bookDistributor.setDiliCvat1(newScrapBook.getP09DiliCvat1());\n bookDistributor.setDiliCvat2(newScrapBook.getP11DiliCvat2());\n bookDistributor.setDiliCvat3(newScrapBook.getP13DiliCvat3());\n\n transientNewBook.setBookDetailByBookDetailRef(bookDetail);\n transientNewBook.setBookDistributorByBookDistributorRef(bookDistributor);\n transientNewBook.getBookDetailByBookDetailRef().setQuantumByDiliCquantum(quantum);\n }\n return transientNewBook;\n }", "public List<Books> findBooksByGenre(String genre) {\r\n HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);\r\n List<Genre> list = new ArrayList();\r\n Genre g = new Genre();\r\n g.setType(genre);\r\n list.add(g);\r\n session.setAttribute(\"lastGenre\",list);\r\n return bookController.findBooksByGenre(genre);\r\n }", "@Override\n\tpublic List<book> look_book(book p,int index, int seve) {\n\t\treturn dao.look_book(p,index,seve);\n\t}", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "public static void main(String[] args) {\n\t\t// check number of arguments\n\t\tif (args.length < 2) {\n\t System.err.println(\"Usage: java BookClient_e number keyword1 ...\");\n\t System.exit(1);\n\t }\n\t\ttry{\n\t\t\t// extract and convert arguments\n\t\t\tint N = Integer.parseInt(args[0]);\n\t\t\tString[] keywords = Arrays.copyOfRange(args, 1, args.length);\n\t\t\t// instantiate this class\n\t\t\tBookClient_e bclient = new BookClient_e();\n\t\t\t// call methods to perform the searches\n\t\t\tList<PrintableBook> crossref = bclient.PerformSearch_crossref(keywords, N);\n\t\t\tList<PrintableBook> gbooks = bclient.PerformSearch_google(keywords, N);\n\t\t\t// leave empty line\n\t\t\tSystem.out.println();\n\t\t\t// check number of results found for crossref and print them\n\t\t\tif(crossref.size()==N){\n\t\t\t\tSystem.out.println(\"Printing \"+N+\" crossref results:\");\n\t\t\t for (PrintableBook book:crossref)\n\t\t\t \tbook.print();\n\t\t }else{\n\t\t \tSystem.out.println(\"ERROR: Not found \" + N + \" books in crossref\");\n\t\t }\n\t\t\t// leave empty line\n\t\t\tSystem.out.println();\n\t\t\t// check number of results found for gbooks and print them\n\t\t\tif(gbooks.size()==N){\n\t\t\t\tSystem.out.println(\"Printing \"+N+\" gbooks results:\");\n\t\t\t for (PrintableBook book:gbooks)\n\t\t\t \tbook.print();\n\t\t }else{\n\t\t \tSystem.out.println(\"ERROR: Not found \" + N + \" books in googlebooks\");\n\t\t }\n\t\t}catch (NumberFormatException e1) {\n\t System.err.println(\"First argument is not a valid number\");\n\t System.exit(1);\t\t\t\n\t\t} catch(Exception e2 ){\n\t\t\tSystem.err.println(\"Error during execution of operation\");\n\t\t\te2.printStackTrace(System.out);\n\t\t}\n\t}", "public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}", "DefaultListModel getAuthorsBookModel();", "Collection<Book> getAll();", "public int noOfBooks() {\n\t\treturn arlist.size();\r\n\t}", "public List<Books> findBooksByTitle(String title) {\r\n return bookController.findBooksByTitle(title);\r\n }", "private void loadReviews(){\n cursor = db.rawQuery(\"SELECT * FROM REVIEW WHERE BookID = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n List<String[]> reviews = new ArrayList<>();\n double sumRating = 0;\n\n while(cursor.moveToNext()){\n String[] arr ={\n String.valueOf(cursor.getInt(0)),\n String.valueOf(cursor.getDouble(3)),\n cursor.getString(2)\n };\n reviews.add(arr);\n sumRating += cursor.getDouble(3);\n }\n setRatingTotal( sumRating / reviews.size() );\n //Toast.makeText(this, ratingTotal+\" = \"+sumRating+\" / \"+reviews.size(), Toast.LENGTH_SHORT).show();\n ratingBarTotal = findViewById(R.id.rvRatingBarTotal);\n ratingBarTotal.setRating((float) ratingTotal);\n\n txtNumRv = findViewById(R.id.rvTxtNumRv);\n txtNoRv = findViewById(R.id.rvTxtNoReview);\n DecimalFormat df = new DecimalFormat(\"#.##\");\n if(reviews.size() == 0){\n txtNumRv.setText( R.string.noReviewsYet );\n } else {\n txtNumRv.setText(df.format(ratingTotal) + \" / \" + reviews.size() + \" reviews\");\n txtNoRv.setVisibility(View.INVISIBLE);\n }\n\n listView = findViewById(R.id.rvListView);\n listView.setAdapter(adapter = new ReviewAdapter(reviews));\n\n }", "@Override\r\n\tpublic List<Book> getBooks(String kind, int startRow, int endRow) {\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tBook b1 = new Book(23,\"The mads in heaven\",200);\r\n\t\tBook b2 = new Book(25,\"Island Treasury\",300);\r\n\t\tBook b3 = new Book(27,\"Watery heart\",400);\r\n\t\t\r\n\t\tArrayList<Book> al = new ArrayList<Book>();\r\n\t\tal.add(b1);\r\n\t\tal.add(b2);\r\n\t\tal.add(b3);\r\n\t\t\r\n\t\tIterator<Book> itr1 = al.iterator();\r\n\t\twhile(itr1.hasNext())\r\n\t\t{\r\n\t\t\tBook book = itr1.next();\r\n\t\t\tSystem.out.println(\"Book price is: \"+book.price);\r\n\t\t\tSystem.out.println(\"Number of pages in the book are: \"+book.pages);\r\n\t\t\tSystem.out.println(\"The book name is: \"+book.name);\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Book> bookList=new ArrayList<Book>();\r\n\t\tBook book1= new Book(1001,\"2 States\",\"Chetan Bhagat\",652.32f);\r\n\t\tBook book2= new Book(1002,\"Three idiots\",\"Chetan Bhagat\",650.40f);\r\n\t\tBook book3= new Book(1003,\"Hopeless\",\"Collen Hoover\",456.32f);\r\n\t\tBook book4= new Book(1004,\"The Deal\",\"Ellen Kennedy\",345.32f);\r\n\t\tBook book5= new Book(1005,\"The Goal\",\"Ellen Kennedy\",895.32f);\r\n\t\t\r\n\t\tbookList.add(book1);\r\n\t\tbookList.add(book2);\r\n\t\tbookList.add(book3);\r\n\t\tbookList.add(book4);\r\n\t\tbookList.add(book5);\r\n\t\tfor(Book book:bookList){\r\n\t\t\tSystem.out.println(book.getId()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getBname()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getAuthor()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getPrice());\r\n\t\t}\r\n\t\r\n\r\n\t}", "public List<Book> getAllBooks() {\n return entityManager.createQuery(\"select b from Book b\", Book.class).getResultList();\n }", "@Validate\n @Override\n public void getRmbtestsBooks(String author, BigDecimal publicationYear, BigDecimal rating,\n String isbn, List<String> facets, Map<String, String> okapiHeaders,\n Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) throws Exception {\n\n asyncResultHandler.handle(io.vertx.core.Future.succeededFuture(GetRmbtestsBooksResponse.withJsonOK(new Book())));\n\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn books.size();\n\t\t}", "public List<Book> getBooksToReturn() {\n\t\treturn booksToReturn;\n\t}", "public void searchForBooks(String query) {\n\n\n BooksAPI booksAPI = ServiceGenerator.getBooksAPI();\n Call<GBookList> call = booksAPI.getBook(query);\n call.enqueue(new Callback<GBookList>() {\n @EverythingIsNonNull\n @Override\n public void onResponse(Call<GBookList> call, Response<GBookList> response) {\n if (response.isSuccessful()) {\n //response.body() returns GBookList\n //from json format to object\n searchedBooks.setValue(response.body());\n\n }\n }\n @EverythingIsNonNull\n @Override\n public void onFailure(Call<GBookList> call, Throwable t) {\n Log.i(\"Retrofit \", \"Retrieving from google.books.com failed\");\n }\n });\n }", "public static void main(String[] arguments){\n Book AtlasShrugged = new Book(\"Atlas Shrugged\");\n// Book HungerGames = new Book(\"Hunger Games\");\n// CatinHat.WhatBook();\n AtlasShrugged.WhatBook();\n AtlasShrugged.CheckAvailable();\n// CatinHat.CheckAvailable();\n// HungerGames.CheckAvailable();\n //cant return total number of book instances, i would have to call out an instance to return a value.\n //System.out.println(book.length);\n\n //CatinHat.CheckIn();\n\n //AtlasShrugged.CheckIn();\n //CatinHat.CheckOut();\n AtlasShrugged.CheckOut();\n AtlasShrugged.CheckAvailable();\n AtlasShrugged.CheckIn();\n AtlasShrugged.CheckAvailable();\n //AtlasShrugged.CheckOut();\n \n// Book TheDaVinciCode = new Book(\"The Da Vinci Code\");\n// Book LePetitPrince = new Book(\"Le Petit Prince\");\n// Book ATaleofTwoCities = new Book(\"A Tale of Two Cities\");\n// Book TheLordofTheRings = new Book(\"The Lord of The Rings\");\n// TheDaVinciCode.WhatBook();\n// LePetitPrince.WhatBook();\n \n}", "@GetMapping(\"api/books\")\n public List<Book> getallBooks() {\n return bookService.all().getPayload();\n }", "public HashMap<Long, OfferBook> getOfferBooks() {\n if (offerBooks == null) {\n\n return new HashMap<Long, OfferBook>();\n }\n return offerBooks;\n }" ]
[ "0.7094824", "0.6905442", "0.6750297", "0.6569825", "0.6545984", "0.65235305", "0.64868104", "0.6380948", "0.6352877", "0.63490975", "0.6329586", "0.6307921", "0.6292627", "0.62908316", "0.6247378", "0.6163642", "0.6153332", "0.61501807", "0.6143615", "0.6132203", "0.6123668", "0.61210144", "0.6064101", "0.60580176", "0.60374576", "0.6027152", "0.6024202", "0.6018626", "0.60178906", "0.6008854", "0.60055697", "0.60049975", "0.6003933", "0.6000966", "0.5965278", "0.5959301", "0.5953505", "0.59387153", "0.5930935", "0.5927786", "0.59267163", "0.5919444", "0.59173006", "0.5909193", "0.5897779", "0.5876553", "0.5876023", "0.5855982", "0.585046", "0.58194935", "0.5810193", "0.5796822", "0.57951176", "0.57935476", "0.5786553", "0.57764524", "0.57745767", "0.57578325", "0.57362187", "0.57289124", "0.5722704", "0.5722097", "0.57193655", "0.57164085", "0.57162726", "0.57148725", "0.5698116", "0.5669205", "0.56552905", "0.56522197", "0.56506926", "0.5648023", "0.56477743", "0.56209075", "0.5620528", "0.56055194", "0.5604815", "0.5595588", "0.55857325", "0.5583957", "0.5580053", "0.5579735", "0.55775094", "0.55760056", "0.5568443", "0.5567532", "0.5565807", "0.5558652", "0.5555049", "0.5549766", "0.55470014", "0.5546992", "0.55453914", "0.5544207", "0.55410784", "0.55408514", "0.55376136", "0.5530643", "0.5527092", "0.5514422" ]
0.7299154
0
end of the method
public Book[] getFavoriteBooks() { String stmnt = String.format( "SELECT * FROM book ORDER BY rating DESC LIMIT %d ", PAGE_LIMIT); ResultSet rs = executeQuery(stmnt); ArrayList<Book> arr = resultSetPacker(rs, Book.class); return arr.toArray(new Book[arr.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void perish() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n protected void end() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n protected void end() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void memoria() {\n \n }", "public void Exterior() {\n\t\t\r\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void end() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void baocun() {\n\t\t\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private void sub() {\n\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}", "protected void end() {\n\r\n\t}", "@Override\n \tpublic void finished()\n \t{\n \t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "private void verificaData() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "protected void end()\n\t{\n\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\n\t\t\t\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n public void end() {\n }", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}" ]
[ "0.6991654", "0.68388873", "0.6755269", "0.674208", "0.6627589", "0.65728456", "0.6569988", "0.65495783", "0.65220946", "0.6514692", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.6514359", "0.65065765", "0.6505632", "0.6488729", "0.64881915", "0.648438", "0.648438", "0.648438", "0.6481978", "0.6481978", "0.64734185", "0.64647704", "0.64496243", "0.6447061", "0.64334697", "0.64279705", "0.64279705", "0.641155", "0.641155", "0.6404587", "0.63975656", "0.63863", "0.6372748", "0.6360571", "0.6350553", "0.6346596", "0.63393706", "0.63393706", "0.63393706", "0.63393706", "0.6326959", "0.6310826", "0.6310826", "0.6310826", "0.6310212", "0.62966734", "0.6295669", "0.6272068", "0.62690246", "0.6268641", "0.62591535", "0.62398076", "0.6232972", "0.6223094", "0.62099344", "0.62093705", "0.6200305", "0.6198104", "0.6197364", "0.6197364", "0.61725694", "0.6138854", "0.6131975", "0.6128089", "0.61157286", "0.6115163", "0.61125904", "0.6106285", "0.6104363", "0.60878885", "0.6085977", "0.60845304", "0.6080036", "0.6079142", "0.6069178", "0.60590786", "0.60536104", "0.60536104", "0.60482544", "0.6042814", "0.6042289", "0.6032391", "0.60258657", "0.6016553", "0.6014849", "0.6009427", "0.60082775", "0.60072905", "0.600662", "0.600662" ]
0.0
-1